Jackie-Jiang commented on code in PR #14178:
URL: https://github.com/apache/pinot/pull/14178#discussion_r1792514703
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/TableRebalancer.java:
##########
@@ -389,16 +389,21 @@ private RebalanceResult doRebalance(TableConfig
tableConfig, RebalanceConfig reb
// 3. Check if the target assignment is reached. Rebalance is done if it
is reached.
// 4. Calculate the next assignment based on the current assignment,
target assignment and min available replicas.
// 5. Update the IdealState to the next assignment. If the IdealState
changes before the update, go back to step 1.
+ boolean firstRound = true;
while (true) {
// Wait for ExternalView to converge before updating the next IdealState
// NOTE: Monitor the segments to be moved from both the previous round
and this round to ensure the moved segments
// in the previous round are also converged.
Set<String> segmentsToMonitor = new HashSet<>(segmentsToMove);
- segmentsToMove =
SegmentAssignmentUtils.getSegmentsToMove(currentAssignment, targetAssignment);
- segmentsToMonitor.addAll(segmentsToMove);
+ if (firstRound) {
+ firstRound = false;
+ } else {
+ segmentsToMove =
SegmentAssignmentUtils.getSegmentsToMove(currentAssignment, targetAssignment);
Review Comment:
Done
--
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]