Skip to content

SegmentStatusChecker batch read the zk segment metadata instead of per segment - #19252

Open
J-HowHuang wants to merge 2 commits into
apache:masterfrom
J-HowHuang:ssc-batch-segment-zk-read
Open

SegmentStatusChecker batch read the zk segment metadata instead of per segment#19252
J-HowHuang wants to merge 2 commits into
apache:masterfrom
J-HowHuang:ssc-batch-segment-zk-read

Conversation

@J-HowHuang

Copy link
Copy Markdown
Collaborator

Description

The current implementation does iterative ZK metadata read for each segment. It's bad when segment count is at few hundred thousands, the zk read latency due to the queued read request causes this checker to run more than the default task frequency 5 min. There was even a TODO: revisit the logic and reduce the ZK access at the method itself.

Change

Batch read the segment ZK metadata for the entire table, then perform the replica checks and other maths. This approach is acceptable as retention manager, realtime validation manager are all fetching them for the entire table.

@codecov-commenter

codecov-commenter commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.98%. Comparing base (504efc4) to head (fa4d286).
⚠️ Report is 70 commits behind head on master.

Files with missing lines Patch % Lines
...e/pinot/controller/helix/SegmentStatusChecker.java 78.26% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #19252      +/-   ##
============================================
+ Coverage     65.70%   66.98%   +1.27%     
  Complexity     1423     1423              
============================================
  Files          3439     3453      +14     
  Lines        218064   218952     +888     
  Branches      34679    34806     +127     
============================================
+ Hits         143289   146666    +3377     
+ Misses        63226    60572    -2654     
- Partials      11549    11714     +165     
Flag Coverage Δ
custom-integration1 ?
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-25 66.98% <78.26%> (+1.27%) ⬆️
lane-a 100.00% <ø> (?)
lane-b 0.00% <ø> (?)
temurin 66.98% <78.26%> (+1.27%) ⬆️
unittests 66.98% <78.26%> (+1.27%) ⬆️
unittests1 57.72% <ø> (+0.68%) ⬆️
unittests2 39.04% <78.26%> (+1.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants