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



##########
File path: 
helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java
##########
@@ -483,7 +483,7 @@ private void chargePendingTransition(Resource resource, 
CurrentStateOutput curre
         rebalanceType = 
StateTransitionThrottleConfig.RebalanceType.LOAD_BALANCE;
       }
 
-      if (pendingMap.size() > 0) {
+      if (pendingMap.size() > 0 && rebalanceType != RebalanceType.NONE) {

Review comment:
       This could be meaningless since we will remove the whole stage anyway.

##########
File path: 
helix-core/src/main/java/org/apache/helix/controller/stages/MessageOutput.java
##########
@@ -64,6 +64,18 @@ public void addMessages(String resourceName, Partition 
partition,
     return Collections.emptyList();
   }
 
+  public Map<Partition, List<Message>> getResourceMessages(String 
resourceName) {
+    Map<Partition, List<Message>> map = _messagesMap.get(resourceName);
+    if (map != null) {
+      return map;

Review comment:
       Shall we return Collections.unmodifiablemap?

##########
File path: 
helix-core/src/main/java/org/apache/helix/controller/stages/AttributeName.java
##########
@@ -48,7 +48,20 @@
   // This attribute should only be used in TaskGarbageCollectionStage, misuse 
could cause race conditions.
   TO_BE_PURGED_WORKFLOWS,
   // This attribute should only be used in TaskGarbageCollectionStage, misuse 
could cause race conditions.
+
   JOBS_WITHOUT_CONFIG,
   // This attribute should only be used in TaskGarbageCollectionStage, misuse 
could cause race conditions.
-  TO_BE_PURGED_JOBS_MAP
+  TO_BE_PURGED_JOBS_MAP,
+
+  // This attribute denotes the messages output from Per Preplica Throttle 
stage
+  PER_REPLICA_THROTTLED_MESSAGES,
+
+  // This attribute denotes the targeted partition state mapping from Per 
Preplica Throttle stage
+  PER_REPLICA_RETRACED_STATES,
+
+  // This attribute denotes the filtered out messages deemed as recovery 
message
+  PER_REPLICA_THROTTLED_RECOVERY_MESSAGES,
+
+  // This attribute denotes the filtered out messages deemed as load message
+  PER_REPLICA_THOTTLED_LOAD_MESSAGES

Review comment:
       Why we need this config? As we said, we should keep backward compatible 
with old throttling configs.

##########
File path: 
helix-core/src/main/java/org/apache/helix/controller/stages/PerReplicaThrottleStage.java
##########
@@ -0,0 +1,951 @@
+package org.apache.helix.controller.stages;

Review comment:
       This new file is hard to review... Can we do this? Since most of the 
code is copied from IntermediateStage. Let's use IntermediateStage file and 
make the change for the review first as a PR? Then after reviewed, we can 
rename the file to PerReplicaThrottleStage.
   
   I know split it into two PRs could break tests for first one. But I think 
that could be more efficient for reviewing.




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