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


##########
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:
   Fair point. I considered min_active just as a static string field, but was 
unsure what best practice was. Technically it is still a stoppable check, just 
ran separately from those in the stoppable_check_list. 
   
   Would you suggest removing from enum list and have it as a separate static 
string field?



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