Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ErrFailed on both ctx.Done and when retries are exhausted #164

Open
Moulik245 opened this issue Oct 30, 2024 · 0 comments
Open

Using ErrFailed on both ctx.Done and when retries are exhausted #164

Moulik245 opened this issue Oct 30, 2024 · 0 comments

Comments

@Moulik245
Copy link

If the context is canceled while trying to acquire a lock, ErrFailed is returned, which has the message "redsync: failed to acquire lock" :

return ErrFailed

but ErrFailed is also returned when all retries have been exhausted:

return ErrFailed

This makes it harder to tell whether the lock was not acquired due to context being canceled or retries being exhausted. I think it would be better if these situations returned different error messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant