jiajunwang commented on a change in pull request #1107:
URL: https://github.com/apache/helix/pull/1107#discussion_r443867935



##########
File path: 
helix-core/src/main/java/org/apache/helix/manager/zk/ZkBucketDataAccessor.java
##########
@@ -329,32 +330,34 @@ public void close() {
     disconnect();
   }
 
-  private void updateGCTimer(String rootPath, String currentVersion) {
-    TimerTask gcTask = new TimerTask() {
-      @Override
-      public void run() {
+  private synchronized void updateGCTimer(String rootPath, long 
currentVersion) {
+    if (_gcTaskFuture != null) {
+      _gcTaskFuture.cancel(false);
+    }

Review comment:
       This cancel will only cancel the pending tasks. For the pending tasks 
that are queued up, they will only cause extra children list read. The later 
operation will be the same. And if there is risk of incomplete deleting, then 
that concern lives no matter we let it queued up or not. That issue (if exists) 
should be addressed separately.




----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to