Comments (7)
What behavior is expected when watching a node that doesn't exist? Immediate error? Silently ignored until it does exist?
from kazoo.
Not sure. We already have immediate error on first call. What are the choices?
- Don't set session listener if first read failed.
- Silently ignore.
- Raise error every time (immediate and deferred)
I think current implementation is wrong anyway - it blocks session events until _get_data
returns and docs say that users should avoid doing that.
Hm... How zookeeper behaves if watched node being removed? How does Curator
handles this situation?
from kazoo.
Curator doesn't have any functionality that matches the DataWatch. If the node is deleted, or can't be found on a reconnect, those could just be ignored and if it exists again, and the children are different that before, it calls the function.
from kazoo.
You mean DataWatch
must keep both exists
and get
watches? If you expose exists
method from DataWatch
class (which should be a simple cached boolean flag) - that should work.
from kazoo.
... but removing node causes it's content change, so user must be notified.
from kazoo.
Yep, makes sense. I think it'd be easiest if None was delivered in the event that its removed, since the values have to be string we can use None safely to indicate there is no longer a node.
from kazoo.
Thanks!
from kazoo.
Related Issues (20)
- Abort in `selector_select` HOT 1
- Make the ReadTheDocs CI check a required check for PR's HOT 1
- New kazoo release to include SSL fixes HOT 4
- Unhandled exception in connection loop when administrator sets system time in past HOT 1
- Documentation of the ZooKeeper wire protocol? HOT 1
- No handlers could be found for logger "kazoo.handlers.threading"
- Switch publishing to using the new Trusted Publishers action HOT 1
- RuntimeError: Invalid error code HOT 5
- KazooClient thread-safety and instance reuse HOT 4
- Zookeeper sequence node overflow causes perpetual re-election HOT 6
- Non-blocking lock acquisition failure can "leak" the ephemeral lock node.
- Zookeeper Server's watch residue
- Connecting to read only zookeeper HOT 1
- Add option to recursively set ACLs
- asyncio support HOT 4
- kazoo/client.py in python2.7 use KazooClient init throw a error HOT 1
- delete() fails with version greater than 2**31-1 HOT 2
- timeout param is not respected HOT 1
- Add support for SNI hostnames
- Connection timeout is not set to client._session_timeout / 1000 / len(client.hosts) in all places HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kazoo.