J-HowHuang commented on code in PR #19055:
URL: https://github.com/apache/pinot/pull/19055#discussion_r3641057762
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/BaseSegmentAssignment.java:
##########
@@ -102,10 +116,24 @@ protected Pair<List<Map<String, Map<String, String>>>,
Map<String, Map<String, S
_logger.info("Rebalancing tiers: {} for table: {} with bootstrap: {}",
tierInstancePartitionsMap.keySet(),
_tableNameWithType, bootstrap);
+ // Resolve the eligible tier of each segment once (single bulk ZK read)
and reuse it across the multiple
+ // rebalanceTiers() invocations of this rebalance, instead of reading each
segment's ZK metadata every time.
+ if (_segmentToTierName == null) {
+ _segmentToTierName =
+ SegmentAssignmentUtils.getSegmentToTierNameMap(_helixManager,
_tableNameWithType, sortedTiers);
+ }
+ // Resolve any segment that appeared after the initial bulk read (e.g. a
segment that committed during a long
Review Comment:
Agree. Removed.
--
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]