jiajunwang commented on a change in pull request #688: Fix the watcher leakage
issue
URL: https://github.com/apache/helix/pull/688#discussion_r368312648
##########
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:
This might be a potential bug. For example,
T1: node deleted, and NodeDeleted is sent.
T2: node is re-created
T3: The NodeDeleted event is processed, pathExists is set to false. And it
is **NOT** the truth!
This might be OK, since we will have another event coming later. But it may
introduce a substantial change of the ZkClient behavior. So I would prefer if
we don't do it. The minimum fix itself does not require this enhancement.
Please correct me if I am wrong.
----------------------------------------------------------------
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]