Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

tonyseek
Copy link
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
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
Contributor Author

@bbangert Could you review this patch?


# delete watching
self.client.delete(path)
time.sleep(1)
Copy link
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
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
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