J-HowHuang commented on code in PR #19252:
URL: https://github.com/apache/pinot/pull/19252#discussion_r3800069537


##########
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:
   Added batch-fetching in `SegmentStatusChecker` and default the batch to 10k, 
implemented at the `SegmentStatusChecker` level



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