Skip to content

Close the ChildrenWatch if the node doesn't exist. #393

Merged
bbangert merged 3 commits intopython-zk:masterfrom
tonyseek:hotfix/handle-children-watch-nonode
Jul 29, 2016
Merged

Close the ChildrenWatch if the node doesn't exist. #393
bbangert merged 3 commits intopython-zk:masterfrom
tonyseek:hotfix/handle-children-watch-nonode

Conversation

@tonyseek
Copy link
Copy Markdown
Contributor

@tonyseek tonyseek commented Apr 29, 2016

This implementation resolves the "NoNodeError" while watching children.

Fix #149.

@tonyseek tonyseek force-pushed the hotfix/handle-children-watch-nonode branch 5 times, most recently from dd8cbc4 to baec5f9 Compare May 3, 2016 02:44
tonyseek added 2 commits June 21, 2016 14:12
This implementation resolves the "NoNodeError" while watching children.

Fix python-zk#149.
@tonyseek tonyseek force-pushed the hotfix/handle-children-watch-nonode branch from baec5f9 to 6fd5062 Compare June 21, 2016 06:13
@tonyseek tonyseek changed the title Resolve "NoNodeError" while watching children. Close the ChildrenWatch if the node doesn't exist. Jun 21, 2016
@tonyseek
Copy link
Copy Markdown
Contributor Author

@bbangert Could you review this patch?

Comment thread kazoo/tests/test_watchers.py Outdated

# delete watching
self.client.delete(path)
time.sleep(1)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice if there was a non-timing dependent way to wait for this. But I understand there may not be. Maybe if the test tries to grab the watchers _run_lock which should be released as soon as _stopped is set and returned?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a good idea. I will have a try.

@bbangert
Copy link
Copy Markdown
Member

LGTM

@tonyseek tonyseek force-pushed the hotfix/handle-children-watch-nonode branch 2 times, most recently from 141b90b to b742888 Compare July 29, 2016 18:20
@tonyseek tonyseek force-pushed the hotfix/handle-children-watch-nonode branch from b742888 to 2016924 Compare July 29, 2016 18:35
@bbangert bbangert merged commit e7d60ab into python-zk:master Jul 29, 2016
@tonyseek tonyseek deleted the hotfix/handle-children-watch-nonode branch July 29, 2016 19:05
tonyseek added a commit to eleme/kazoo that referenced this pull request Sep 27, 2016
@norrs norrs mentioned this pull request Jan 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ChildrenWatch should not log exceptions if the node its watching is deleted

2 participants