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


##########
helix-rest/src/main/java/org/apache/helix/rest/clusterMaintenanceService/HealthCheck.java:
##########
@@ -62,9 +63,12 @@ public enum HealthCheck {
   MIN_ACTIVE_REPLICA_CHECK_FAILED;
 
   /**
-   * Pre-defined list of checks to test if an instance can be stopped at 
runtime
+   * Pre-defined list of checks to test if an instance can be stopped at 
runtime. Excludes MIN_ACTIVE_REPLICA_CHECK as
+   * that is performed separately.
    */
-  public static List<HealthCheck> STOPPABLE_CHECK_LIST = 
Arrays.asList(HealthCheck.values());
+  public static List<HealthCheck> STOPPABLE_CHECK_LIST = 
Arrays.stream(HealthCheck.values())
+      .filter(healthCheck -> healthCheck != 
HealthCheck.MIN_ACTIVE_REPLICA_CHECK_FAILED)
+      .collect(Collectors.toList());

Review Comment:
   Why not just remove the entry from this enum?



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