priyen-stripe opened a new issue, #17646:
URL: https://github.com/apache/pinot/issues/17646

   **Description:**
   
     When running a table rebalance on an OFFLINE table that has consistent 
data push and segments actively being pushed, a NullPointerException can occur 
in TableRebalancer.doRebalance().
   
     **Environment:**
     - Apache Pinot version: 1.5 (a commit from jan 14. 2026)
     - Table type: OFFLINE with consistent segment push
   
     **Steps to Reproduce:**
     1. Have an OFFLINE table with consistent data push 
     2. Actively push segments, start a rebalance on the table (e.g., to move 
it to a different server pool)
     3. While the rebalancer is waiting for EV-IS convergence, a scheduled 
segment refresh runs and deletes/replaces an existing segment
     4. The rebalancer detects the IdealState version change and attempts to 
re-check segment states
     5. NPE is thrown
   
   
     The rebalancer throws a NullPointerException and the rebalance fails. This 
makes it difficult to rebalance tables that have continuous ingestion without 
pausing the data pipeline.
   
     **Stack Trace:**
     java.util.concurrent.CompletionException: java.lang.NullPointerException: 
Cannot invoke "java.util.Map.equals(Object)" because "oldInstanceStateMap" is 
null
         at 
java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
         at 
java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
         at 
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
         at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
         at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
         at java.base/java.lang.Thread.run(Thread.java:1583)
     Caused by: java.lang.NullPointerException: Cannot invoke 
"java.util.Map.equals(Object)" because "oldInstanceStateMap" is null
         at 
org.apache.pinot.controller.helix.core.rebalance.TableRebalancer.doRebalance(TableRebalancer.java:634)
         at 
org.apache.pinot.controller.helix.core.rebalance.TableRebalancer.rebalance(TableRebalancer.java:197)
         at 
org.apache.pinot.controller.helix.core.rebalance.TableRebalanceManager.rebalanceTable(TableRebalanceManager.java:221)
         at 
org.apache.pinot.controller.helix.core.rebalance.TableRebalanceManager.rebalanceTable(TableRebalanceManager.java:127)
         at 
org.apache.pinot.controller.helix.core.rebalance.TableRebalanceManager.lambda$rebalanceTableAsync$0(TableRebalanceManager.java:158)
         at 
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
         ... 3 more
   
     **Relevant Logs:**
     INFO  Successfully updated the IdealState
     INFO  Starting EV-IS convergence check loop, 378 unique segments to 
monitor in current step
     INFO  ExternalView converged in 25088ms, with 0 extensions
     INFO  IdealState version changed while waiting for ExternalView to 
converge, re-calculating the target assignment
     INFO  Segment state changed in IdealState from: {Server_xyz_8098=ONLINE} 
to: null for segment: <segment_name>, re-calculating the target assignment 
based on the new IdealState
     ERROR Caught exception/error while rebalancing table


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