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

Auto extend is not stopped event when getting conflict as a result #48

Open
mennyst opened this issue Dec 6, 2018 · 2 comments
Open

Comments

@mennyst
Copy link

mennyst commented Dec 6, 2018

Hey,

I saw your implementation and i am concerned from some scenarios.

  1. When the auto extend timer gets to starvation from any reason and then when the timer is released another process locks the same key, then the extend gets to conflict but it still tries to acquire the lock on the next interval and might succeed so the client (code) will never know that someone else took hold of the key in the mean time?
  2. Same as the first only the extend only tries to acquire the key after the second process takes hold and already release the key, so we don't event know there was a conflict
  3. My suggestion to overcome this issue is to only try and auto extend the lock in between expiry / 2 until expiry, so the key can't be extended if the key already expired

What do you think?

@Crozin
Copy link

Crozin commented Apr 15, 2019

Any update? This issue concerns me as well. Some event triggered on State change would be useful.

@TomGullen
Copy link

Over a long enough period of time could this cause resource exhaustion? (Memory leak/network connections etc?)

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

3 participants