-
Notifications
You must be signed in to change notification settings - Fork 122
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
How can I get lock result within a fixed time interval? #115
Comments
Currently timeout and canceling on-wire operation is not supported. Hopefully to be fixed within two weeks. |
Related to #3 |
Great!! |
Hi, @sighingnow Any news about this? Do you have a new estimate about when it could it be completed and published? Best regards. |
I have just finished the decoupling of API and thread model (discussed in #100). The timeout feature for whole API set will be finished in this week. Apology for the delay. |
Closed by #131. You could find a |
Hello,
I want to acquire the ownership of a lock (using etcd3 lock feature) but the lock operation should be completed within a maximum time interval. I mean that I would like to get the lock in the following N seconds, if isn't possible then it should fail and abort the operation. I cannot be waiting indefinitely to get the lock.
I can try to do something like this:
Although with this approach I don't get blocked there is a problem, because it's possible that the
future.wait_for()
could return by timeout although the lock will be really created (only the success answer has not arrived on time).I searched for similar questions and although #34 (now closed) seems add a timeout per client operation, I think that could be interesting feature but it doesn't solve how to abort tge on going lock operation, so the lock will be created in regular scenario. This is also an issue due the dangled lock is created (but it will not be used by the client and then will expire) and it could block other clients that want to create a lock using the same prefix.
There is any option to cancel an ongoing etcd operation?
Perhaps it could be adding support for gRPC call deadline (though ClientContext), as suggests #102
Any ideas?
Thanks in advance.
The text was updated successfully, but these errors were encountered: