Handle finalize and null-path instance config callbacks#18173
Open
xiangfu0 wants to merge 2 commits intoapache:masterfrom
Open
Handle finalize and null-path instance config callbacks#18173xiangfu0 wants to merge 2 commits intoapache:masterfrom
xiangfu0 wants to merge 2 commits intoapache:masterfrom
Conversation
439d805 to
d31db22
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18173 +/- ##
============================================
- Coverage 63.30% 63.29% -0.01%
+ Complexity 1627 1624 -3
============================================
Files 3224 3224
Lines 196558 196565 +7
Branches 30365 30367 +2
============================================
- Hits 124426 124421 -5
- Misses 62177 62178 +1
- Partials 9955 9966 +11
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:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Improves ServerGrpcChannelBackoffResetHandler resiliency to Helix callback lifecycle edge cases by explicitly handling FINALIZE events and tolerating callbacks where pathChanged is missing.
Changes:
- Clear tracked shutdown state on
NotificationContext.Type.FINALIZEto avoid stale lifecycle state. - Fall back to a full cluster scan when Helix does not provide
context.getPathChanged(). - Add unit tests covering
FINALIZEhandling and null-pathChangedfallback behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/ServerGrpcChannelBackoffResetHandler.java |
Handles FINALIZE by clearing local state; safely falls back to full scan when pathChanged is absent. |
pinot-server/src/test/java/org/apache/pinot/server/starter/helix/ServerGrpcChannelBackoffResetHandlerTest.java |
Adds tests validating FINALIZE clears tracked state and that null pathChanged triggers a full scan/reset. |
d31db22 to
8cabf74
Compare
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
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
NotificationContext.Type.FINALIZEinServerGrpcChannelBackoffResetHandlerpathChanged_shuttingDownServerslifecycle-safe instead of assuming every non-init callback is a single-instance updateWhy
ServerGrpcChannelBackoffResetHandlercurrently assumes every non-INIT/ non-child-change callback has a populatedpathChanged, and it does not clear local state onFINALIZE. That is brittle against Helix callback lifecycle edges.Validation
./mvnw -pl pinot-server -am -Dtest=ServerGrpcChannelBackoffResetHandlerTest test -Dsurefire.failIfNoSpecifiedTests=false