Coordinate distributed systems.
Go to file
Julien Danjou 0dc996b92d redis: fix concurrent access on acquire()
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 059f2ae540)
2017-07-18 18:11:51 +02:00
doc/source Add partitioner implementation 2017-01-01 19:03:40 +01:00
examples Add partitioner implementation 2017-01-01 19:03:40 +01:00
releasenotes Add partitioner implementation 2017-01-01 19:03:40 +01:00
tools [doc] Note lack of constraints is a choice 2016-12-22 09:49:10 +11:00
tooz redis: fix concurrent access on acquire() 2017-07-18 18:11:51 +02:00
.coveragerc Add standard code coverage configuration file 2015-10-02 09:09:41 -04:00
.gitignore Add reno for release notes management 2016-11-03 15:09:51 +08:00
.gitreview Update .gitreview for stable/ocata 2017-01-20 19:16:28 +00:00
.testr.conf Enable OS_LOG_CAPTURE so that logs can be seen (on error) 2016-02-08 14:58:22 -08:00
CONTRIBUTING.rst Add CONTRIBUTING.rst 2016-11-18 16:44:36 +08:00
LICENSE First commit of Tooz 2013-12-19 12:18:35 +01:00
README.rst Switch badges from 'pypip.in' to 'shields.io' 2015-06-11 20:44:26 -07:00
bindep.txt Install only needed packages 2016-09-22 10:20:50 +02:00
requirements.txt Updated from global requirements 2017-02-09 18:22:07 +00:00
run-examples.sh Have examples run in the py27 environment and make them work 2014-09-19 11:57:56 -07:00
setup-consul-env.sh Use pifpaf to setup daemons 2016-06-09 10:40:16 +02:00
setup-etcd-env.sh Update etcd version in tests 2016-08-26 12:11:47 +02:00
setup.cfg Updated from global requirements 2017-02-09 18:22:07 +00:00
setup.py Updated from global requirements 2015-09-17 12:17:45 +00:00
tox.ini [doc] Note lack of constraints is a choice 2016-12-22 09:49:10 +11:00

README.rst

Tooz

Latest Version

Downloads

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.

Join us