klsince commented on code in PR #11768:
URL: https://github.com/apache/pinot/pull/11768#discussion_r1355436444


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/TableRebalancer.java:
##########
@@ -241,13 +241,19 @@ public RebalanceResult rebalance(TableConfig tableConfig, 
RebalanceConfig rebala
           tierToInstancePartitionsMap, null);
     }
 
+    // Record the beginning of rebalance
+    
_tableRebalanceObserver.onTrigger(TableRebalanceObserver.Trigger.START_TRIGGER, 
currentAssignment,
+        targetAssignment);
+
     boolean segmentAssignmentUnchanged = 
currentAssignment.equals(targetAssignment);
     LOGGER.info("For rebalanceId: {}, instancePartitionsUnchanged: {}, 
tierInstancePartitionsUnchanged: {}, "
             + "segmentAssignmentUnchanged: {} for table: {}", rebalanceJobId, 
instancePartitionsUnchanged,
         tierInstancePartitionsUnchanged, segmentAssignmentUnchanged, 
tableNameWithType);
 
     if (segmentAssignmentUnchanged) {
-      LOGGER.info("Table: {} is already balanced", tableNameWithType);
+      String msg = String.format("Table: %s is already balanced", 
tableNameWithType);
+      LOGGER.info(msg);
+      _tableRebalanceObserver.onSuccess(msg);

Review Comment:
   and in general, I'd prefer we just track job status in `ZK` for table 
rebalances that really move segments around and potentially take time to 
finish, so returning NO_OP for all cases of 'table is already balanced'



-- 
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-unsubscr...@pinot.apache.org

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


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

Reply via email to