-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[broker] Add health check callbacks for tenant tags and routing readiness #17580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
suvodeep-pyne
wants to merge
7
commits into
apache:master
Choose a base branch
from
suvodeep-pyne:data-711
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #17580 +/- ##
============================================
- Coverage 63.16% 63.12% -0.05%
- Complexity 1479 1495 +16
============================================
Files 3173 3175 +2
Lines 189917 190210 +293
Branches 29064 29091 +27
============================================
+ Hits 119970 120072 +102
- Misses 60621 60792 +171
- Partials 9326 9346 +20
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:
|
This change ensures that broker health checks take tenant tags and routing readiness into account before reporting the broker as healthy. Two new ServiceStatusCallback implementations are added: - TenantTagReadinessCallback: Verifies the broker has valid tenant tags (not just broker_untagged) - RoutingReadinessCallback: Verifies routing exists for all assigned tables This addresses a production issue where queries could be routed to brokers that were not yet ready to serve traffic, causing query failures. The callbacks are registered before the IdealState/ExternalView match callbacks, with TenantTagReadinessCallback preceding RoutingReadinessCallback since an untagged broker has no tables assigned.
…lState ExternalView represents the actual cluster state (what Helix participants have reported), while IdealState represents the desired state. Participants should use ExternalView to determine their responsibilities, following the Helix layer separation principle.
Introduce `/health/readiness` to check broker readiness status. Add shutdown detection mechanism to handle graceful service degradation during broker shutdown. Update service status callbacks to include readiness checks.
55614c8 to
d8d03a9
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
TenantTagReadinessCallbackto verify broker has valid tenant tags (not justbroker_untagged)RoutingReadinessCallbackto verify routing exists for all online tables before reporting healthyBaseBrokerStarter.registerServiceStatusHandler()with documented ordering dependencyExternalView(actual state) instead ofIdealState(desired state) inRoutingReadinessCallback, following the Helix layer separation principleBackground
This addresses a production issue where queries could be routed to brokers that were not yet ready to serve traffic, causing query failures. The root cause is that the existing health check only validates Helix state convergence but doesn't verify:
Test plan
TenantTagReadinessCallback(4 tests)RoutingReadinessCallback(6 tests including ExternalView API verification)HelixBrokerStarterTest