yashmayya commented on code in PR #17027:
URL: https://github.com/apache/pinot/pull/17027#discussion_r2437431827


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/tenant/TenantRebalancer.java:
##########
@@ -355,11 +356,19 @@ ConcurrentLinkedDeque<TenantTableRebalanceJobContext> 
createTableQueue(TenantReb
     Queue<TenantTableRebalanceJobContext> lastQueue = new LinkedList<>();
     Set<String> dimTables = getDimensionalTables(config.getTenantName());
     dryRunResults.forEach((table, dryRunResult) -> {
-      TenantTableRebalanceJobContext jobContext =
-          new TenantTableRebalanceJobContext(table, dryRunResult.getJobId(), 
dryRunResult.getRebalanceSummaryResult()
-              .getSegmentInfo()
-              .getReplicationFactor()
-              .getExpectedValueAfterRebalance() == 1);
+      TenantTableRebalanceJobContext jobContext;
+      if (dryRunResult.getStatus() == RebalanceResult.Status.FAILED) {
+        jobContext = new TenantTableRebalanceJobContext(table, 
dryRunResult.getJobId(), false);
+        LOGGER.warn("User proceeded with rebalancing table: {} despite its 
failed dry-run", table);

Review Comment:
   Also what scenarios do we typically see these dry runs failing in? When does 
it make sense to proceed with an actual rebalance if the dry run fails?



##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/tenant/TenantRebalancer.java:
##########
@@ -355,11 +356,19 @@ ConcurrentLinkedDeque<TenantTableRebalanceJobContext> 
createTableQueue(TenantReb
     Queue<TenantTableRebalanceJobContext> lastQueue = new LinkedList<>();
     Set<String> dimTables = getDimensionalTables(config.getTenantName());
     dryRunResults.forEach((table, dryRunResult) -> {
-      TenantTableRebalanceJobContext jobContext =
-          new TenantTableRebalanceJobContext(table, dryRunResult.getJobId(), 
dryRunResult.getRebalanceSummaryResult()
-              .getSegmentInfo()
-              .getReplicationFactor()
-              .getExpectedValueAfterRebalance() == 1);
+      TenantTableRebalanceJobContext jobContext;
+      if (dryRunResult.getStatus() == RebalanceResult.Status.FAILED) {
+        jobContext = new TenantTableRebalanceJobContext(table, 
dryRunResult.getJobId(), false);
+        LOGGER.warn("User proceeded with rebalancing table: {} despite its 
failed dry-run", table);

Review Comment:
   nit: I'd suggest rewording this to "Proceeding with table rebalance despite 
failed dry run..." or something similar because there's no guarantee that the 
user actually performed a dry run before triggering the actual rebalance right 
(but we do an internal dry run regardless)?



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