summaryrefslogtreecommitdiff
path: root/kazoo
Commit message (Collapse)AuthorAgeFilesLines
* chore: 2.5.0 release and changelog2.5.0release/2.5Ben Bangert2018-06-011-1/+1
|
* fix(core): Fix gevent 1.3b1+ timeout importCarson Ip2018-05-111-2/+2
| | | | | gevent.event.Timeout is undocumented and will break when using gevent 1.3b1+. Use gevent.Timeout as suggested in gevent docs.
* fix(core): Correctly fire multiple callbacksPatrick White2018-03-262-3/+19
| | | | | | 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.
* Update states.pyWei-Ming Yang2018-03-241-3/+3
| | | | fix a typo.
* feat(recipe): allow non ephemeral lockingRaghu Udiyar2018-03-232-4/+28
| | | | | | | | | | 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.
* fix(recipe): conn hangs when TreeCache refreshingJiangge Zhang2018-03-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix(recipe): Unexpected exceptions break TreeCacheJiangge Zhang2018-03-232-14/+30
|
* perf(recipe): Give TreeCache standalone queueJiangge Zhang2018-03-231-1/+16
| | | | This commit lets TreeCache do not use queue of connection routine any more.
* refactor: Unify queue factory in various handlersJiangge Zhang2018-03-232-7/+9
| | | | Then every handlers have queue_impl and queue_empty as their attributes.
* fix (recipe): Don't set creation watch on lock predecessor nodePatrick White2018-03-151-5/+8
| | | | | | | | 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.
* fix: Pass watch as keyword arg instead of positional arg (#495)arushiagg2018-02-261-3/+4
| | | 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() (#487)Jim Hanko2017-11-092-1/+29
| | | | | fix(core): resolve race in IAsyncResult.wait() closes #485
* fix: Remove use of "async" as a variableTravis Gockel2017-08-244-65/+67
| | | | | | | 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
* Remove unused GEVENT_VERSION env variable.462-virtualenv-continuedHanno Schlichting2017-07-241-9/+0
|
* style: pep8 importsjeffwidman-pep8-importsJeff Widman2017-07-2320-74/+64
| | | | | Also incorporates some recommendations from pep-257 on docstring conventions.
* chore: tag 2.4.0 release2.4.0release/2.4Ben Bangert2017-06-141-1/+1
|
* feat(recipe): Add TreeCache recipeJiangge Zhang2017-06-132-0/+667
| | | | | Kazoo implementation of Apache Curator's TreeCache recipe. See also: http://curator.apache.org/curator-recipes/tree-cache.html
* fix(core): revert PR #305 SetWatches which caused RuntimeErrorfeat/revert-pr-305Ben Bangert2017-06-124-84/+1
| | | | | | PR #305 introduced a feature to restore watches on reconnect. Unfortunately this introduced RuntimeError's under various cases, so reverting it is necessary.
* feat(core): allow multiple endpoints in KazooClient hosts argEdward Ribeiro2017-06-112-4/+66
| | | | | | The hosts arg to KazooClient now supports a list of multiple endpoints. Closes #411
* feat(core): use epoll when available to support fds > 1023Patrick White2017-06-042-2/+105
| | | | | | | 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
* fix: add missed parens to LockingQueue function call.Bill Sanders2017-06-031-1/+1
|
* feat: pep8 all the thingsfeat/issue-445Ben Bangert2017-06-0116-83/+152
| | | | | | Brings the code-base back up to validating flake8 checks. Closes #445
* chore: tag 2.3.1 releaseBen Bangert2017-06-011-1/+1
|
* chore: tag 2.3.0 releaseBen Bangert2017-05-311-1/+1
|
* Revert "New recipe proposal: TreeCache"Ben Bangert2017-05-312-667/+0
|
* Merge pull request #430 from anskornyakov/hotfix/semaphore-deadlockBen Bangert2017-05-311-3/+3
|\ | | | | fix deadlock in nonblocking semaphore acquiring
| * fix deadlock in nonblocking semaphore acquiring, do inner lock release for ↵Anton Skornyakov2017-04-201-3/+3
| | | | | | | | every lock acquiring attempt
* | Merge pull request #418 from josephaltmaier/masterBen Bangert2017-05-311-2/+4
|\ \ | | | | | | Always call _safe_close() on KazooClient.stop() so we don't leak work…
| * | Always call _safe_close() on KazooClient.stop() so we don't leak worker threadsjoseph2017-03-011-2/+4
| |/
* | Merge pull request #400 from tonyseek/hotfix/xid-mismatchBen Bangert2017-05-312-2/+75
|\ \ | | | | | | Fix the client.add_auth hangs by xids mismatch.
| * | Fix the client.add_auth hangs by xids mismatch.Jiangge Zhang2016-07-292-2/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #398 from tonyseek/feature/treecache-recipeBen Bangert2017-05-312-0/+667
|\ \ \ | | | | | | | | New recipe proposal: TreeCache
| * | | Fix the infinite refresh after root node deletedqifei.wan2017-04-242-3/+7
| | | |
| * | | Closed tree cache could not be started againJiangge Zhang2017-04-172-1/+13
| | | |
| * | | Rename "was_xxx" to "on_xxx" in TreeCacheJiangge Zhang2017-02-252-16/+16
| | | | | | | | | | | | | | | | https://github.com/python-zk/kazoo/pull/398#discussion_r90782660
| * | | Use KazooException instead of RuntimeError in TreeCacheJiangge Zhang2017-02-252-3/+4
| | | | | | | | | | | | | | | | https://github.com/python-zk/kazoo/pull/398#discussion_r90782555
| * | | Add default logger if no listener is present.Jiangge Zhang2016-12-051-7/+9
| | | |
| * | | Implement and test the TreeCache recipe.Jiangge Zhang2016-06-232-0/+648
| |/ /
* | | Merge pull request #397 from paperlessreceipts/counter-pre-post-valuesBen Bangert2017-05-312-2/+23
|\ \ \ | | | | | | | | Counter: expose the previous and changed values.
| * | | Counter: expose the previous and changed values.Lukasz Kawczynski2016-06-102-2/+23
| |/ / | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #391 from michielbaird/watcher_changesBen Bangert2017-05-314-2/+40
|\ \ \ | | | | | | | | Ensure pending watches are not dropped when connection is lost
| * | | Added test add fixed a regressionMichiel Johan Baird2016-04-203-2/+20
| | | |
| * | | Ensure watches are notified when connection state is lostMichiel Johan Baird2016-04-202-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | - This behaviour matches the reference implementation in Zookeeper - New EventType added: NONE - Path defaults to None as in reference implementation
* | | | Merge pull request #369 from FedericoCeratto/patch-1Ben Bangert2017-05-311-2/+2
|\ \ \ \ | | | | | | | | | | Set default max_delay to one minute
| * | | | Set default max_delay to one minuteFederico Ceratto2015-11-301-2/+2
| | | | |
* | | | | Merge pull request #365 from radix/construct-exceptions-with-saner-argumentsBen Bangert2017-05-312-4/+7
|\ \ \ \ \ | | | | | | | | | | | | construct empty exceptions with no arguments, instead of () and {}
| * | | | | add test for new exception construction behaviorChristopher Armstrong2015-11-131-0/+6
| | | | | |
| * | | | | construct empty exceptions with no arguments, instead of () and {}Christopher Armstrong2015-11-131-4/+1
| |/ / / /
* | | | | Merge pull request #359 from rockerbox/queue-patchBen Bangert2017-05-311-7/+3
|\ \ \ \ \ | | | | | | | | | | | | Fixed Queue to clear children before retry
| * | | | | made recipe.queue clear children on retrypatrickotoole2015-09-181-7/+3
| | | | | |