xyuanlu commented on code in PR #2127:
URL: https://github.com/apache/helix/pull/2127#discussion_r888191966


##########
helix-core/src/main/java/org/apache/helix/cloud/event/helix/DefaultCloudEventCallbackImpl.java:
##########
@@ -90,10 +90,9 @@ public void exitMaintenanceMode(HelixManager manager, Object 
eventInfo) {
     // Check if there is any disabled live instance that was disabled due to 
cloud event,
     // if none left, exit maintenance mode
     HelixDataAccessor accessor = manager.getHelixDataAccessor();
-    if (instances.stream().noneMatch(instance ->
-        InstanceValidationUtil.getInstanceHelixDisabledType(accessor, instance)
-            .equals(InstanceConstants.InstanceDisabledType.CLOUD_EVENT.name())
-            && InstanceValidationUtil.isAlive(accessor, instance))) {
+    if (instances.stream().noneMatch(instance -> HelixEventHandlingUtil
+        .IsInstanceDisabledForCloudEvent(manager.getClusterName(), instance, 
accessor.getBaseDataAccessor())
+        && InstanceValidationUtil.isAlive(accessor, instance))) {

Review Comment:
   This PR only adds a API signature. As cloud event handling feature is still 
under development, it is ok for this change.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to