0dc996b92d
Redis-py is not thread safe and in lock management, which means the following
can also happen:
1. lock.acquire()
2a. lock.release() ---\_ at the same time for all 2. operations
2b. lock.acquire() ---/
2c. lock.heartbeat() /
which means the lock can be when a lock is already acquired and in the process
of being released and re-acquired in paralllel:
1. acquire() acquire the lock (self._lock.acquire())
2. release() release the lock (self._lock.release()) and remove it from
self._lock.acquire() where it's not (discard() does not raise on non-existing
element)
3. acquire() put the lock in _acquired_locks
4. heartbeat() iterates on _acquired_locks and try to extend a lock that indeed
was acquired but was in the mean time released by Redis.
Change-Id: Ib9549b44485cb15de312ec9dfa57b148cb45e2c9
Closes-Bug: #1557593
(cherry picked from commit
|
||
---|---|---|
doc/source | ||
examples | ||
releasenotes | ||
tools | ||
tooz | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.testr.conf | ||
CONTRIBUTING.rst | ||
LICENSE | ||
README.rst | ||
bindep.txt | ||
requirements.txt | ||
run-examples.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: http://docs.openstack.org/developer/tooz
- Source: http://git.openstack.org/cgit/openstack/tooz
- Bugs: http://bugs.launchpad.net/python-tooz/