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 2022/04/14 20:47:21 UTC

[GitHub] [helix] qqu0127 commented on a diff in pull request #2035: MaintenanceManagementService improvement - Allow implementation of OperationInterface to return null

qqu0127 commented on code in PR #2035:
URL: https://github.com/apache/helix/pull/2035#discussion_r850792825


##########
helix-rest/src/main/java/org/apache/helix/rest/clusterMaintenanceService/MaintenanceManagementInstanceInfo.java:
##########
@@ -84,11 +85,12 @@ public void mergeResult(MaintenanceManagementInstanceInfo info) {
   }
 
   public void mergeResult(MaintenanceManagementInstanceInfo info, boolean nonBlockingFailure) {
-    messages.addAll(info.getMessages());
-    status =
-        (info.isSuccessful() || nonBlockingFailure) && isSuccessful() ? OperationalStatus.SUCCESS
-            : OperationalStatus.FAILURE;
-    if (info.hasOperationResult()) {
+    if (info != null) {
+      messages.addAll(info.getMessages());
+    }
+    status = ((info == null || info.isSuccessful() || nonBlockingFailure) && isSuccessful())

Review Comment:
   Is `status` a class attribute? Let's follow the naming convention like `_status`, thanks.



-- 
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-unsubscribe@helix.apache.org

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