This is an automated email from the ASF dual-hosted git repository.
yashmayya pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new cac8d63f112 Handle NullPointerException in tenant rebalance while
rebalancing table with failed dry-run (#17027)
cac8d63f112 is described below
commit cac8d63f112cf74720cc726c06d21af8c5089f5c
Author: Jhow <[email protected]>
AuthorDate: Fri Oct 17 10:30:34 2025 -0700
Handle NullPointerException in tenant rebalance while rebalancing table
with failed dry-run (#17027)
---
.../helix/core/rebalance/tenant/TenantRebalancer.java | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git
a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/tenant/TenantRebalancer.java
b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/tenant/TenantRebalancer.java
index 8f30c45d775..a45639524a9 100644
---
a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/tenant/TenantRebalancer.java
+++
b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/tenant/TenantRebalancer.java
@@ -21,6 +21,7 @@ package
org.apache.pinot.controller.helix.core.rebalance.tenant;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
@@ -355,11 +356,19 @@ public class TenantRebalancer {
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("Proceeding with table rebalance: {} despite its failed
dry-run", table);
+ } else {
+ Preconditions.checkState(dryRunResult.getRebalanceSummaryResult() !=
null,
+ "Non-failed dry-run result missing summary");
+ jobContext =
+ new TenantTableRebalanceJobContext(table, dryRunResult.getJobId(),
dryRunResult.getRebalanceSummaryResult()
+ .getSegmentInfo()
+ .getReplicationFactor()
+ .getExpectedValueAfterRebalance() == 1);
+ }
if (dimTables.contains(table)) {
// check if the dimension table is a pure scale out or scale in.
// pure scale out means that only new servers are added and no servers
are removed, vice versa
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]