mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

Added timeout goroutine to stop waiting on lock after timeout expiration. This necessitated reworking the flow of the acquire handler. createNode now _only_ creates the node; it no longer waits on the lock itself. getLockIndex (perhaps this is poorly named) extracts out the lock checking routine so that it can be used by "get" and "watch", both. get() was added to instantaneously attempt to acquire a lock with no waiting. If a lock fails to acquire, for whatever reason, an error is returned, resulting in a code 500 to the client.