junkaixue commented on code in PR #2877:
URL: https://github.com/apache/helix/pull/2877#discussion_r1729526608


##########
helix-core/src/main/java/org/apache/helix/controller/rebalancer/strategy/AutoRebalanceStrategy.java:
##########
@@ -336,13 +347,21 @@ private void prepareResult(ZNRecord znRecord) {
         }
       }
     }
-    normalizePreferenceLists(znRecord.getListFields(), newPreferences);
+    normalizePreferenceLists(znRecord.getListFields(), newPreferences, 
clusterData);
+
+    String stateModelDef = 
clusterData.getIdealState(_resourceName).getStateModelDefRef();
+    StateModelDefinition stateModel = 
clusterData.getStateModelDef(stateModelDef);
 
     // generate preference maps based on the preference lists
     for (String partition : _partitions) {
       List<String> preferenceList = znRecord.getListField(partition);
       int i = 0;
       for (String participant : preferenceList) {
+        // if the participant is not alive, assign it to the initial state

Review Comment:
   If the node is not alive, why we have in the map? I assume we fix disabled 
ones, right?
   
   My assumption is if the node is not alive, we should not show something in 
map field as this is strategy, this is not delay auto.
   
   Only delay auto consider offline instances with offline timeout and put it 
as offline when node is not alive.



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

To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org
For additional commands, e-mail: reviews-h...@helix.apache.org

Reply via email to