libkv
libkv copied to clipboard
Zookeeper: Relinquish locks on session close
The zookeeper store implements locking by using ephermeral nodes. On session close, all ephemeral nodes created by a client are removed, which means that other clients can acquire the lock.
Previously, the zookeeper store failed to notify clients that the lock had been relinquished due to the session being closed (due to expiration or otherwise). Which means that the clients would continue execution while believing (wrongfully) that they still hold the lock.
Now, the zookeeper store monitors the state of the session and notifies clients that the lock has been lost when the session is closed.
Signed-off-by: Daniel Ferstay [email protected]
The CI failure is fixed by https://github.com/docker/libkv/pull/154