Akanksha-kedia opened a new pull request, #18716:
URL: https://github.com/apache/pinot/pull/18716

   ## Description
   `IdealState.getInstanceStateMap(segmentId)` can return `null` when a 
partition exists in the ideal state but has no instance assignments. The 
previous code called `.size()` directly on the result without a null check, 
which would throw a `NullPointerException` during replica count changes.
   
   ## Fix
   Add a null check on `instanceStateMap` and skip the segment if it is null — 
consistent with how this scenario is handled elsewhere in the codebase.
   
   ## Tests
   No functional change for the normal (non-null) path. The null case is a 
defensive guard for an edge condition during cluster state transitions.
   
   ## Checklist
   - [x] No new public APIs without documentation
   - [x] Backward compatible change
   - [x] Code follows existing patterns in the codebase


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