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



##########
File path: 
helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManager.java
##########
@@ -418,7 +418,16 @@ private void carryOverPreviousCurrentState() {
       String path = _keyBuilder.currentStates(_instanceName, 
session).getPath();
       LOG.info("Removing current states from previous sessions. path: " + 
path);
       _zkclient.deleteRecursively(path);
-      path = _keyBuilder.taskCurrentStates(_instanceName, session).getPath();
+    }
+
+    // Remove all previous task current state sessions

Review comment:
       I suggest you move the task CS sessions removal logic to a separate 
method. Just call it carryOverPreviousTaskCurrentState or 
cleanPreviousCurrentState.
   
   We should avoid huge methods whenever possible.




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