You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/10/27 09:51:45 UTC

[GitHub] [pinot] antwigambrah commented on a diff in pull request #9662: Table rebalance status

antwigambrah commented on code in PR #9662:
URL: https://github.com/apache/pinot/pull/9662#discussion_r1006652566


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/TableRebalancer.java:
##########
@@ -383,6 +383,19 @@ public RebalanceResult rebalance(TableConfig tableConfig, Configuration rebalanc
     }
   }
 
+  public RebalanceResult.Status rebalanceStatus(String tableNameWithType, IdealState idealState,
+      ExternalView externalView) {
+
+    if (idealState == null) {
+      throw new IllegalStateException("ideal state is empty");
+    }
+    if (externalView != null && isExternalViewConverged(tableNameWithType, externalView.getRecord().getMapFields(),

Review Comment:
   HI @siddharthteotia, sorry I updated the above code before reading this comment.Currently, the external view returns  false if it is not converged yet and logs an error if the external view ends up having segments in error .I believe it is best to return the status FAILED instead of logging. Also, would it be ok to return NO_OP if the external view is still null when the api is called .cc @Jackie-Jiang 



-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org