shauryachats opened a new pull request, #18635:
URL: https://github.com/apache/pinot/pull/18635

   ## Summary
   Tables that import instance partitions from another table via 
`instancePartitionsMap` (without a separate `instanceAssignmentConfigMap` entry 
for COMPLETED) were broken during rebalance. 
   
   `TableRebalancer.getInstancePartitionsMap()` only loads COMPLETED instance 
partitions when 
`InstanceAssignmentConfigUtils.shouldRelocateCompletedSegments()` returns true 
- but that method only looked at `instanceAssignmentConfigMap` and tenant tag 
overrides, not imported partitions in `instancePartitionsMap`.
   
   As a result, rebalance passed only CONSUMING instance partitions into 
segment assignment. Completed segments stayed pinned to one server per stream 
partition instead of spreading across all servers in each instance partition 
under `ReplicaGroupSegmentAssignmentStrategy` (e.g. 16 servers used instead of 
64 in the prod layout).
   The fix adds a check for 
`InstancePartitionsUtils.hasPreConfiguredInstancePartitions(tableConfig, 
COMPLETED)` so imported COMPLETED partitions trigger relocation the same way as 
explicitly configured assignment.
   
   ## Test
   
`RealtimeReplicaGroupSegmentAssignmentTest#testImportedInstancePartitionsWithMultipleServersPerPartition`
 mirrors the TableRebalancer path: it builds the rebalance 
`instancePartitionsMap` via `shouldRelocateCompletedSegments(tableConfig)` 
rather than always injecting COMPLETED IPs. It asserts the pre-fix behavior 
when COMPLETED IPs are omitted, and that with the fix all servers receive 
completed segments (including bootstrap rebalance).
   


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