GrantPSpencer commented on code in PR #2886: URL: https://github.com/apache/helix/pull/2886#discussion_r1731625660
########## 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: Spoke offline with @MarkGaox , will look into leveraging filterInstancesForNextCheck and getInstanceHealthStatus in an attempt to reduce complexity added to code -- 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