You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2021/05/14 21:21:48 UTC
[GitHub] [helix] jiajunwang commented on a change in pull request #1736: Properly clean up TaskCurrentState sessions
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org