| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
gevent.event.Timeout is undocumented and will break when using gevent 1.3b1+.
Use gevent.Timeout as suggested in gevent docs.
|
|
|
|
|
|
| |
Due to the use of unbound lambdas in AsyncResult, multiple callbacks
wouldn't actually get called, it would only call the final callback N
times, where N is the number of registered callbacks.
|
|
|
|
| |
fix a typo.
|
|
|
|
|
|
|
|
|
|
| |
Right now if the program taking the lock exits, the lock is also
released implicitly as the zk node is ephemeral. In some usecases
its desirable to make the lock release explicit. For example, in
scripting multiple programs that contend for a lock, or purposeful
failing lock acquirers to detect issues.
The ephemeral flag in acquire() allows for this behavior.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous implementation of session watcher triggers blocked operations.
If there is a huge tree in ZooKeeper, reconnecting event will lead an
initialized TreeCache into a bad performance state, because the connection
routine was blocked by the session watcher of TreeCache.
This commit put those blocked operations into a background queue to fix this.
There is an example code snippet:
from kazoo.client import KazooClient
from kazoo.recipe.cache import TreeCache
client = KazooClient()
client.start()
cache = TreeCache(client, '/a-huge-tree')
cache.start()
# Wait the cache be initialized and trigger a connection lost event.
client.get_children('/') # The connection is still broken
The patch of this commit has been used in the production environment of
https://github.com/eleme.
|
| |
|
|
|
|
| |
This commit lets TreeCache do not use queue of connection routine any more.
|
|
|
|
| |
Then every handlers have queue_impl and queue_empty as their attributes.
|
|
|
|
|
|
|
|
| |
Using exists will register a creation, as well as update and deletion
watch on the given node. This introduces a race, where the predecessor
node can get deleted between the call to getChildren() and exists().
If that happens, the exists() sets a create watch on a node that will
never be created, leaks a create watch.
|
|
|
| |
We instrument calls to async functions, but are unable to get the watch parameter because it is not being passed as part of kwargs. This will allow us to capture the watch parameter.
|
|
|
|
|
| |
fix(core): resolve race in IAsyncResult.wait()
closes #485
|
|
|
|
|
|
|
| |
The use of "async" and "await" as variable are deprecated in Python 3.7. This
patch removes the use of "async" (there is no usage of "await" to fix).
Closes #455
|
| |
|
|
|
|
|
| |
Also incorporates some recommendations from pep-257 on docstring
conventions.
|
| |
|
|
|
|
|
| |
Kazoo implementation of Apache Curator's TreeCache recipe. See also:
http://curator.apache.org/curator-recipes/tree-cache.html
|
|
|
|
|
|
| |
PR #305 introduced a feature to restore watches on reconnect.
Unfortunately this introduced RuntimeError's under various cases, so
reverting it is necessary.
|
|
|
|
|
|
| |
The hosts arg to KazooClient now supports a list of multiple endpoints.
Closes #411
|
|
|
|
|
|
|
| |
When epoll is available, and the highest fd in use is > 1023, route through epoll.
Otherwise, use the existing select() behavior so by and large nothing changes.
Closes #266, #171
|
| |
|
|
|
|
|
|
| |
Brings the code-base back up to validating flake8 checks.
Closes #445
|
| |
|
| |
|
| |
|
|\
| |
| | |
fix deadlock in nonblocking semaphore acquiring
|
| |
| |
| |
| | |
every lock acquiring attempt
|
|\ \
| | |
| | | |
Always call _safe_close() on KazooClient.stop() so we don't leak work…
|
| |/ |
|
|\ \
| | |
| | | |
Fix the client.add_auth hangs by xids mismatch.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit fixes https://github.com/python-zk/kazoo/issues/229 by throwing
the runtime exception into the dequeued async_result. It will end the waiting
of user threading.
But this commit doesn't fix the xids mismatch itself. The unordered xids may
caused by a bug from the ZooKeeper server side, such as the official issues
https://issues.apache.org/jira/browse/ZOOKEEPER-1863 described.
|
|\ \ \
| | | |
| | | | |
New recipe proposal: TreeCache
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
https://github.com/python-zk/kazoo/pull/398#discussion_r90782660
|
| | | |
| | | |
| | | |
| | | | |
https://github.com/python-zk/kazoo/pull/398#discussion_r90782555
|
| | | | |
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Counter: expose the previous and changed values.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit extends the `Counter` API with the `pre_value` and
`post_value` attributes. These attributes are set when a counter
is changed. Previously, if the counter was modified concurrently,
it was not possible to access the exact value to which the counter
was set after a successful increment or decrement.
|
|\ \ \
| | | |
| | | | |
Ensure pending watches are not dropped when connection is lost
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- This behaviour matches the reference implementation in Zookeeper
- New EventType added: NONE
- Path defaults to None as in reference implementation
|
|\ \ \ \
| | | | |
| | | | | |
Set default max_delay to one minute
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
construct empty exceptions with no arguments, instead of () and {}
|
| | | | | | |
|
| |/ / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fixed Queue to clear children before retry
|
| | | | | | |
|