-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28413/
-----------------------------------------------------------

Review request for helix and Shi Lu.


Bugs: HELIX-541


Repository: helix-git


Description
-------

In message selection stage, we should consider both toState and fromState in 
pending messages. For example, assuming we have a STANDBY->LEADER pending 
message, and the current state of the corresponding partition is in LEADER. At 
this time if the rebalancer selects another LEADER for the partition and 
message generation stage generates an OFFLINE->STANDBY message for the new 
leader, we will enter into the livelock described in HELIX-541.

Fix it by including both fromState and toState in pending state calculation. 
Add a test case that has high probably to reproduce this problem.


Diffs
-----

  
helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateComputationStage.java
 6a30a9d 
  
helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateOutput.java
 ac9d748 
  
helix-core/src/main/java/org/apache/helix/controller/stages/MessageGenerationPhase.java
 92964e9 
  
helix-core/src/main/java/org/apache/helix/controller/stages/MessageSelectionStage.java
 f3a8257 
  
helix-core/src/main/java/org/apache/helix/controller/stages/TaskAssignmentStage.java
 5772385 
  
helix-core/src/main/java/org/apache/helix/controller/strategy/AutoRebalanceStrategy.java
 1e7f275 
  helix-core/src/main/java/org/apache/helix/task/FixedTargetTaskRebalancer.java 
53d2ee9 
  helix-core/src/main/java/org/apache/helix/task/TaskRebalancer.java 131236e 
  
helix-core/src/test/java/org/apache/helix/controller/stages/TestCurrentStateComputationStage.java
 7687e18 
  
helix-core/src/test/java/org/apache/helix/controller/stages/TestMsgSelectionStage.java
 820abbe 
  
helix-core/src/test/java/org/apache/helix/integration/TestControllerLiveLock.java
 e69de29 

Diff: https://reviews.apache.org/r/28413/diff/


Testing
-------

mvn test


Thanks,

Zhen Zhang

Reply via email to