MarkGaox commented on code in PR #2886: URL: https://github.com/apache/helix/pull/2886#discussion_r1731588044
########## helix-rest/src/main/java/org/apache/helix/rest/clusterMaintenanceService/MaintenanceManagementService.java: ########## @@ -472,9 +472,15 @@ private MaintenanceManagementInstanceInfo takeFreeSingleInstanceHelper(String cl private List<String> batchHelixInstanceStoppableCheck(String clusterId, Collection<String> instances, Map<String, StoppableCheck> finalStoppableChecks, Set<String> toBeStoppedInstances) { + + // Perform all but min_active replicas check in parallel Map<String, Future<StoppableCheck>> helixInstanceChecks = instances.stream().collect( Collectors.toMap(Function.identity(), instance -> POOL.submit( () -> performHelixOwnInstanceCheck(clusterId, instance, toBeStoppedInstances)))); + + // Perform min_active replicas check sequentially + addInstanceMinActiveReplicaCheck(helixInstanceChecks, toBeStoppedInstances); Review Comment: Sounds good, let's keep the current order. What do you think about adding this check to the filterInstancesForNextCheck() method? Otherwise, we would end up with two identical methods, which seems redundant. -- 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