i3wangyi commented on a change in pull request #688: Fix the watcher leakage
issue
URL: https://github.com/apache/helix/pull/688#discussion_r370332089
##########
File path:
helix-core/src/main/java/org/apache/helix/manager/zk/zookeeper/ZkClient.java
##########
@@ -1261,31 +1257,75 @@ private void processDataOrChildChange(WatchedEvent
event, long notificationTime)
if (event.getType() == EventType.NodeDataChanged || event.getType() ==
EventType.NodeDeleted
|| event.getType() == EventType.NodeCreated) {
+ boolean pathExists = event.getType() != EventType.NodeDeleted;
Review comment:
It's an interesting case though I don't think it will introduce any new
substantial change to the behavior. Given ZK's consistency, the node recreation
event will guarantee to arrive later than the node deletion event. Let me
explain fundamentally what happens on `handleNodeDeleted`, it unsubscribes the
listener entry in zkClient (it can be confirmed that all operations are all
in-memory operations without any ZK relations);
When the T2 node re-creation event gets processed, it will re-subscribe the
listener just like it has never seen it before.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]