J-HowHuang commented on code in PR #15496:
URL: https://github.com/apache/pinot/pull/15496#discussion_r2036153944


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/DefaultRebalancePreChecker.java:
##########
@@ -77,7 +78,9 @@ public Map<String, RebalancePreCheckerResult> 
check(PreCheckContext preCheckCont
 
     LOGGER.info("Start pre-checks for table: {} with rebalanceJobId: {}", 
tableNameWithType, rebalanceJobId);
 
-    Map<String, RebalancePreCheckerResult> preCheckResult = new HashMap<>();
+    // Right now pre-check items are done sequentially. If pre-check items are 
to be done in parallel, we should not
+    // use linked hash map but to sort the result in the end
+    Map<String, RebalancePreCheckerResult> preCheckResult = new 
LinkedHashMap<>();

Review Comment:
   A map structure is easier for future developers who wants to check on any 
specific pre-check item's status (e.g. if we want to abort rebalance if a 
certain pre-check did not pass). I think a map is better in this sense.



-- 
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: commits-unsubscr...@pinot.apache.org

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


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

Reply via email to