You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2021/03/26 21:19:19 UTC

[GitHub] [helix] pkuwm commented on a change in pull request #1689: Add option to force all checks for stoppable api

pkuwm commented on a change in pull request #1689:
URL: https://github.com/apache/helix/pull/1689#discussion_r602591310



##########
File path: helix-rest/src/main/java/org/apache/helix/rest/server/service/InstanceServiceImpl.java
##########
@@ -225,9 +248,11 @@ public StoppableCheck getInstanceStoppableCheck(String clusterId, String instanc
         StoppableCheck stoppableCheck = entry.getValue().get();
         if (!stoppableCheck.isStoppable()) {
           // put the check result of the failed-to-stop instances
-          finalStoppableCheckByInstance.put(instance, stoppableCheck);
-        } else {
-          // instance passed this around of check will be checked in the next round
+          addStoppableCheck(finalStoppableCheckByInstance, instance, stoppableCheck);
+        }
+        if (stoppableCheck.isStoppable() || _allChecks){
+          // instance passed this around of check or mandatory all checks
+          // will be checked in the next round
           instancesForNextCheck.add(instance);
         }

Review comment:
       @dasahcc I've thought about it and this logic won't work. Because when allChecks enabled, customers would like to have all the failed checks in the response. In the logic you presented, if allChecks == true, it won't add the failed check.
   
   I do think the current 2 "if"s are clearer to understand.  




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org