Skip to content

Add metrics to track server startup time spending on different status callback#18493

Open
J-HowHuang wants to merge 2 commits into
apache:masterfrom
J-HowHuang:server-startup-metrics
Open

Add metrics to track server startup time spending on different status callback#18493
J-HowHuang wants to merge 2 commits into
apache:masterfrom
J-HowHuang:server-startup-metrics

Conversation

@J-HowHuang
Copy link
Copy Markdown
Collaborator

Changes

Wraps each ServiceStatusCallback registered during server startup with a TimeToHealthyTrackingCallback that records the elapsed time until the delegate first reports GOOD into a per-checker ServerGauge:

  • STARTUP_CURRENT_STATE_MATCH_TIME_MS
  • STARTUP_EXTERNAL_VIEW_MATCH_TIME_MS
  • STARTUP_REALTIME_CONSUMPTION_CATCHUP_TIME_MS

Also updates MultipleCallbackServiceStatusCallback to iterate through all callbacks instead of short-circuiting on the first non-GOOD one, so the time-to-healthy wrapper observes every callback transition.

J-HowHuang and others added 2 commits May 13, 2026 13:15
Wraps each ServiceStatusCallback registered during server startup with a
TimeToHealthyTrackingCallback that records the elapsed time until the
delegate first reports GOOD into a per-checker ServerGauge:
- STARTUP_CURRENT_STATE_MATCH_TIME_MS
- STARTUP_EXTERNAL_VIEW_MATCH_TIME_MS
- STARTUP_REALTIME_CONSUMPTION_CATCHUP_TIME_MS

Also updates MultipleCallbackServiceStatusCallback to iterate through all
callbacks instead of short-circuiting on the first non-GOOD one, so the
time-to-healthy wrapper observes every callback transition.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The original contract returned the first non-GOOD status from
MultipleCallbackServiceStatusCallback and short-circuited the loop.
Short-circuiting prevented the time-to-healthy wrappers added in the
previous commit from observing later callbacks transitioning to GOOD.

Iterate every callback so wrappers see each transition, but still
report the first non-GOOD status, so the aggregate behavior is
unchanged for broker/controller/minion/server health endpoints.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 13, 2026

Codecov Report

❌ Patch coverage is 30.43478% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.74%. Comparing base (c35dee5) to head (d89b4e6).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
.../pinot/server/starter/helix/BaseServerStarter.java 0.00% 16 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18493      +/-   ##
============================================
+ Coverage     63.68%   63.74%   +0.05%     
  Complexity     1685     1685              
============================================
  Files          3265     3266       +1     
  Lines        199745   199837      +92     
  Branches      31013    31024      +11     
============================================
+ Hits         127215   127392     +177     
+ Misses        62395    62285     -110     
- Partials      10135    10160      +25     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 63.74% <30.43%> (+0.05%) ⬆️
temurin 63.74% <30.43%> (+0.05%) ⬆️
unittests 63.74% <30.43%> (+0.05%) ⬆️
unittests1 55.84% <100.00%> (+0.06%) ⬆️
unittests2 35.01% <13.04%> (+0.07%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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