Coordinate distributed systems.
Go to file
Imran Ansari a333c79066 Acquire fails with "ToozError: Not found"
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
2017-08-14 16:58:40 +00:00
doc/source doc: use list-table for driver support tables 2017-07-10 12:44:29 +00:00
examples doc: update heartbeat doc to use start_heart=True 2017-04-27 16:40:57 +02:00
releasenotes Update reno for stable/pike 2017-07-28 21:09:02 +00:00
tools [doc] Note lack of constraints is a choice 2016-12-22 09:49:10 +11:00
tooz Acquire fails with "ToozError: Not found" 2017-08-14 16:58:40 +00: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 Fix .gitreview after rename/transfer 2014-12-06 19:27:17 +03: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 Update URLs in documents according to document migration 2017-07-13 12:09:43 +08:00
bindep.txt Install only needed packages 2016-09-22 10:20:50 +02:00
requirements.txt Replace retrying with tenacity 2016-11-24 10:25:52 +01:00
run-examples.sh Have examples run in the py27 environment and make them work 2014-09-19 11:57:56 -07:00
run-tests.sh Simplify env list and test running 2017-06-09 18:09:31 +02:00
setup-consul-env.sh Use pifpaf to setup daemons 2016-06-09 10:40:16 +02:00
setup-etcd-env.sh Switch tests to use latest etcd - 3.1.3 2017-03-14 15:17:42 +00:00
setup.cfg Update URLs in documents according to document migration 2017-07-13 12:09:43 +08:00
setup.py Updated from global requirements 2015-09-17 12:17:45 +00:00
tox.ini doc: use list-table for driver support tables 2017-07-10 12:44:29 +00: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