Add batched SegmentZKMetadata iteration API and migrate controller usages#17706
Add batched SegmentZKMetadata iteration API and migrate controller usages#17706xiangfu0 wants to merge 1 commit intoapache:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #17706 +/- ##
============================================
- Coverage 63.23% 55.61% -7.62%
+ Complexity 1502 727 -775
============================================
Files 3179 2479 -700
Lines 190710 140471 -50239
Branches 29153 22384 -6769
============================================
- Hits 120597 78126 -42471
+ Misses 60746 55751 -4995
+ Partials 9367 6594 -2773
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
28e86e3 to
17da5ce
Compare
17da5ce to
2005659
Compare
| _pinotHelixResourceManager.getSegmentsZKMetadata(tableNameWithType); | ||
|
|
||
| for (SegmentZKMetadata segmentZKMetadata : segmentZKMetadataList) { | ||
| _pinotHelixResourceManager.forEachSegmentsZKMetadata(tableNameWithType, segmentZKMetadata -> { |
There was a problem hiding this comment.
Won't this actually be slower due to more ZK point calls rather than earlier getChildren() calls ?
I think if use cases require all data, then earlier getChildren() calls is probably a better choice.
There was a problem hiding this comment.
For propertyStore, underlying it's also wrapping a for loop on top of zkclient to call each path to fetch the znRecord then construct the segment metadata.
So there is no difference in terms of the zk overhead.
GetChildren for all segment name is always just one zk call to fetch all.
Summary