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/06/10 20:38:56 UTC

[GitHub] [helix] junkaixue opened a new pull request #1792: Fix MaintenanceRecoveryStage Hanging

junkaixue opened a new pull request #1792:
URL: https://github.com/apache/helix/pull/1792


   
   
   ### Issues
   
   - [ ] My PR addresses the following Helix issues and references them in the PR description:
   
   ### Description
   
   - [X] Here are some details about my PR, including screenshots of any UI changes:
   
   The mainteance recovery stage should be in the order after IntermediateStage since it requires the output from IntermediateStage.
   
   ### Tests
   
   - [ ] The following tests are written for this issue:
   
   
   - The following is the result of the "mvn test" command on the appropriate module:
   
   org.apache.helix.controller.strategy.crushMapping.TestCardDealingAdjustmentAlgorithmV2.testComputeMappingForDifferentReplicas(org.apache.helix.controller.strategy.crushMapping.TestCardDealingAdjustmentAlgorithmV2)
   [ERROR]   Run 1: TestCardDealingAdjustmentAlgorithmV2.testComputeMappingForDifferentReplicas:273 Total movements: 4 != expected 8, replica: 1
   [ERROR]   Run 2: TestCardDealingAdjustmentAlgorithmV2.testComputeMappingForDifferentReplicas:273 Total movements: 4 != expected 8, replica: 2
   [ERROR]   Run 3: TestCardDealingAdjustmentAlgorithmV2.testComputeMappingForDifferentReplicas:273 Total movements: 12 != expected 21, replica: 3
   [INFO]   Run 4: PASS
   [INFO]   Run 5: PASS
   [INFO]
   [INFO]
   [ERROR] Tests run: 1259, Failures: 1, Errors: 0, Skipped: 0
   [INFO]
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time: 01:24 h
   [INFO] Finished at: 2021-06-09T15:07:34-07:00
   [INFO] Final Memory: 34M/860M
   [INFO] ------------------------------------------------------------------------
   
   [INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.872 s - in org.apache.helix.controller.strategy.crushMapping.TestCardDealingAdjustmentAlgorithmV2
   [INFO]
   [INFO] Results:
   [INFO]
   [INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
   [INFO]
   [INFO]
   [INFO] --- jacoco-maven-plugin:0.8.6:report (generate-code-coverage-report) @ helix-core ---
   [INFO] Loading execution data file /home/jxue/helix/helix-core/target/jacoco.exec
   [INFO] Analyzed bundle 'Apache Helix :: Core' with 892 classes
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time: 10.476 s
   [INFO] Finished at: 2021-06-10T13:38:27-07:00
   [INFO] Final Memory: 41M/1021M
   [INFO] ------------------------------------------------------------------------
   
   ### Changes that Break Backward Compatibility (Optional)
   
   - My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include:
   
   
   
   ### Documentation (Optional)
   
   - In case of new functionality, my PR adds documentation in the following wiki page:
   
   (Link the GitHub wiki you added)
   
   ### Commits
   
   - My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Code Quality
   
   - My diff has been formatted using helix-style.xml 
   (helix-style-intellij.xml if IntelliJ IDE is used)
   


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


[GitHub] [helix] junkaixue merged pull request #1792: Fix MaintenanceRecoveryStage Hanging

Posted by GitBox <gi...@apache.org>.
junkaixue merged pull request #1792:
URL: https://github.com/apache/helix/pull/1792


   


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


[GitHub] [helix] junkaixue commented on a change in pull request #1792: Fix MaintenanceRecoveryStage Hanging

Posted by GitBox <gi...@apache.org>.
junkaixue commented on a change in pull request #1792:
URL: https://github.com/apache/helix/pull/1792#discussion_r649569918



##########
File path: helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
##########
@@ -513,13 +513,13 @@ private static PipelineRegistry createDefaultRegistry(String pipelineName) {
       rebalancePipeline.addStage(new BestPossibleStateCalcStage());
       // Need to add MaintenanceRecoveryStage here because MAX_PARTITIONS_PER_INSTANCE check could
       // only occur after IntermediateStateCalcStage calculation
-      rebalancePipeline.addStage(new MaintenanceRecoveryStage());
       rebalancePipeline.addStage(new MessageGenerationPhase());
       rebalancePipeline.addStage(new MessageSelectionStage());
       // The IntermediateStateCalcStage should be applied after message selection
       // Messages are throttled already removed by IntermediateStateCalcStage in MessageSelection output
       rebalancePipeline.addStage(new IntermediateStateCalcStage());
       rebalancePipeline.addStage(new MessageThrottleStage());
+      rebalancePipeline.addStage(new MaintenanceRecoveryStage());

Review comment:
       Because they are correlated. For phase2, we would like to combine IntermediateStage and MessageThrottling together. Thus the result can impact the decision of MaintenanceRecovery As well.




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


[GitHub] [helix] huizhilu commented on a change in pull request #1792: Fix MaintenanceRecoveryStage Hanging

Posted by GitBox <gi...@apache.org>.
huizhilu commented on a change in pull request #1792:
URL: https://github.com/apache/helix/pull/1792#discussion_r649571187



##########
File path: helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
##########
@@ -513,13 +513,13 @@ private static PipelineRegistry createDefaultRegistry(String pipelineName) {
       rebalancePipeline.addStage(new BestPossibleStateCalcStage());
       // Need to add MaintenanceRecoveryStage here because MAX_PARTITIONS_PER_INSTANCE check could
       // only occur after IntermediateStateCalcStage calculation
-      rebalancePipeline.addStage(new MaintenanceRecoveryStage());
       rebalancePipeline.addStage(new MessageGenerationPhase());
       rebalancePipeline.addStage(new MessageSelectionStage());
       // The IntermediateStateCalcStage should be applied after message selection
       // Messages are throttled already removed by IntermediateStateCalcStage in MessageSelection output
       rebalancePipeline.addStage(new IntermediateStateCalcStage());
       rebalancePipeline.addStage(new MessageThrottleStage());
+      rebalancePipeline.addStage(new MaintenanceRecoveryStage());

Review comment:
       Thanks for the clarification. Don't forget to move and update the comment 




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


[GitHub] [helix] huizhilu commented on a change in pull request #1792: Fix MaintenanceRecoveryStage Hanging

Posted by GitBox <gi...@apache.org>.
huizhilu commented on a change in pull request #1792:
URL: https://github.com/apache/helix/pull/1792#discussion_r649548843



##########
File path: helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
##########
@@ -513,13 +513,13 @@ private static PipelineRegistry createDefaultRegistry(String pipelineName) {
       rebalancePipeline.addStage(new BestPossibleStateCalcStage());
       // Need to add MaintenanceRecoveryStage here because MAX_PARTITIONS_PER_INSTANCE check could
       // only occur after IntermediateStateCalcStage calculation
-      rebalancePipeline.addStage(new MaintenanceRecoveryStage());
       rebalancePipeline.addStage(new MessageGenerationPhase());
       rebalancePipeline.addStage(new MessageSelectionStage());
       // The IntermediateStateCalcStage should be applied after message selection
       // Messages are throttled already removed by IntermediateStateCalcStage in MessageSelection output
       rebalancePipeline.addStage(new IntermediateStateCalcStage());
       rebalancePipeline.addStage(new MessageThrottleStage());
+      rebalancePipeline.addStage(new MaintenanceRecoveryStage());

Review comment:
       Question: why not put it right after `IntermediateStateCalcStage`, before `MessageThrottleStage`?

##########
File path: helix-core/src/test/java/org/apache/helix/integration/controller/TestClusterMaintenanceMode.java
##########
@@ -436,4 +435,16 @@ public void testMaintenanceHistory() throws InterruptedException, IOException {
     return new ObjectMapper().readValue(value,
         TypeFactory.defaultInstance().constructMapType(HashMap.class, String.class, String.class));
   }
+
+
+  private boolean verifyMaintenanceSignal(long timeout, boolean exists) throws InterruptedException {

Review comment:
       Can leverage `TestHelper.verify()`




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