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 2020/12/10 22:58:31 UTC

[GitHub] [helix] dasahcc commented on a change in pull request #1584: Participant-side Task Current State Migration

dasahcc commented on a change in pull request #1584:
URL: https://github.com/apache/helix/pull/1584#discussion_r540560573



##########
File path: helix-core/src/main/java/org/apache/helix/task/TaskRunner.java
##########
@@ -208,7 +209,10 @@ private static boolean setRequestedState(HelixDataAccessor accessor, String inst
         String.format("Requesting a state transition to %s for partition %s.", state, partition));
     try {
       PropertyKey.Builder keyBuilder = accessor.keyBuilder();
-      PropertyKey key = keyBuilder.currentState(instance, sessionId, resource);
+      PropertyKey key =
+          Boolean.getBoolean(SystemPropertyKeys.TASK_CURRENT_STATE_PATH_DISABLED) ? keyBuilder

Review comment:
       Let's have the path build when TaskRunner instantiated.

##########
File path: helix-core/src/main/java/org/apache/helix/messaging/handling/HelixStateTransitionHandler.java
##########
@@ -264,8 +271,12 @@ void postHandleMessage() {
 
     try {
       // Update the ZK current state of the node
-      PropertyKey key = keyBuilder.currentState(instanceName, sessionId, resource,
-          bucketizer.getBucketName(partitionKey));
+      PropertyKey key =
+          _isTaskMessage && !Boolean.getBoolean(SystemPropertyKeys.TASK_CURRENT_STATE_PATH_DISABLED)

Review comment:
       Let's have a variable to track TASK_CURRENT_STATE_PATH_DISABLED. We dont have to do the parse every time. Also, let's give a default value as true since participant will be the last component to deploy.




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