a333c79066
For Etcd3Lock, blocking call to acquire an already acquired lock fails when the thread/process, that acquired the lock takes more than the timeout specified for the lock. Scenario ======== 1. First thread acquires a lock "Lock1" 2. Second thread tries to acquire "Lock1" with blocking=True 3. First thread releases lock after few minutes 4. Second thread tries to acquire it and fails with exception: ToozError: Not found Cause ===== Lease gets created when the lock is created and the default timeout is 30 secs. Since the first thread takes more than 30 seconds to complete, the lease for the second thread gets expired leading to "Not found" message. Resolution ========== Create lease within Etcd3Lock.acquire() rather than Etcd3Lock.__init__() of Etcd3Lock Change-Id: Ief75675ebde2d824a25aec6210e2a868cf3dbbe7 Closes-Bug: #1708836 |
||
---|---|---|
doc/source | ||
examples | ||
releasenotes | ||
tools | ||
tooz | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.testr.conf | ||
CONTRIBUTING.rst | ||
LICENSE | ||
README.rst | ||
bindep.txt | ||
requirements.txt | ||
run-examples.sh | ||
run-tests.sh | ||
setup-consul-env.sh | ||
setup-etcd-env.sh | ||
setup.cfg | ||
setup.py | ||
tox.ini |
README.rst
Tooz
The Tooz project aims at centralizing the most common distributed primitives like group membership protocol, lock service and leader election by providing a coordination API helping developers to build distributed applications.
- Free software: Apache license
- Documentation: https://docs.openstack.org/tooz/latest/
- Source: https://git.openstack.org/cgit/openstack/tooz
- Bugs: https://bugs.launchpad.net/python-tooz/