Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.7.1, 3.8.1
-
None
-
None
Description
I found this in reply to apache#1950 (comment). But it turns out a known issue apache#1106 (comment).
I think it is worth to note separately in jira for potential future discussions and fix. I have pushed a test case for this. It fails as expected.
[ERROR] Failures: [ERROR] WatchEventWhenAutoResetTest.testPersistentRecursiveWatch:237 do not receive a NodeDataChanged ==> expected: not <null> [ERROR] WatchEventWhenAutoResetTest.testPersistentWatch:211 do not receive a NodeDataChanged ==> expected: not <null>
It is hard to fix this with sole DataTree. Two independent comments pointed out this. I guess we have to walk through txn log to deliver a correct fix.
Watches will not be received while disconnected from a server. When a client reconnects, any previously registered watches will be reregistered and triggered if needed. In general this all occurs transparently. There is one case where a watch may be missed: a watch for the existence of a znode not yet created will be missed if the znode is created and deleted while disconnected.
This is what our programer's guide says. It is well-known, at least for me, that we can lose some transiently intermediate events in reconnection. But in case of persistent watch, we can lose more. This forces clients to rebuild their knowledge on reconnection.
Attachments
Issue Links
- relates to
-
ZOOKEEPER-43 Server side of the auto reset watches patch
- Closed