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

Return resource name of lock that was not acquired in vote against error #293

Open
awfulstew opened this issue Apr 2, 2024 · 0 comments

Comments

@awfulstew
Copy link

Hi @mike-marcacci, this appears to be a flavor of request you have received before (i.e. more specific error messaging) but I didn't see this specific request already. Let me know if this is a duplicate or something you wouldn't want to introduce!

For my use case, I am acquiring two locks at the same time before running an operation. The current version of the library just returns a generic message The operation was applied to: 0 of the 2 requested resources. in the vote data when a server fails to acquire the locks. This generic message makes it impossible at the time of the error to know which of the two locks could not be acquired. Knowing which lock was already acquired is useful for better tracking as in my case contention on the first lock is more expected, while contention on the second lock should be rare and thus a useful metric to alert on.

I believe that this change could be implemented with a small tweak to the acquire script, and a larger change to the _attemptOperationOnClient functions error handling, but I didn't want to create a PR for this change if there was no appetite for it.

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