Hi All, 

In my last couple of projects, I have heavily used zookeeper watches. However, 
ZK watch is a one time event.  

I strongly feel that zookeeper should have a way to set a watch permanently 
(unless removed by the user through an API or the znode is deleted). This would 
guarantee that no data change event is missed by the client. Otherwise, we can 
miss data change event that occurs between receiving the call back from 
previous watch and resetting the new watch again.  This problem is also stated 
in documentation. 

I am sure even others might have felt this need sometime or the other.  This 
missing capability makes ZK watcher functionality best effort and not full 
proof.  Consequently, clients who can not afford to miss any event, can not use 
ZooKeeper reliably. 

I think we should have these APIs unless there is some theoretical or practical 
problem with these. 

1. API to set a watch permanently.  
2. Removing a watch when not needed. 


Looking forward for a discussion.


Thanks
Mudit



Reply via email to