J-HowHuang commented on code in PR #19252:
URL: https://github.com/apache/pinot/pull/19252#discussion_r3799277212
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/SegmentStatusChecker.java:
##########
@@ -382,10 +383,25 @@ private boolean updateSegmentMetrics(String
tableNameWithType, TableConfig table
List<String> unavailableSegmentsByState = new ArrayList<>();
List<String> unavailableSegmentsByInstance = new ArrayList<>();
- for (String segment : segments) {
+ // The segment ZK metadata and the znode stats are read in a single
batched request
+ List<String> segmentsToCheck = new ArrayList<>(segments);
+ List<Stat> segmentStats = new ArrayList<>(numSegments);
+ List<SegmentZKMetadata> segmentsZKMetadata =
Review Comment:
It's a good idea. I didn't do it simply because other controller periodic
tasks like RVM and retention manager also call `getSegmentsZKMetadata` on the
entire table. So I assumed the segment scale issue is still moderated.
Might be worth doing this since this `SegmentStatusChecker` runs in a higher
frequency (default 5 min)
--
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]