Fix Kinesis empty segment commit loop after shard merge - #19086
Open
Vamsi-klu wants to merge 1 commit into
Open
Conversation
After shard merge/split, fail-closed end-of-shard probes treated closed drained shards as still live, so the controller recreated empty consuming segments forever and blocked child shards. Closed-shard short-circuit and empty-only probes now mark the parent ended.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19086 +/- ##
=========================================
Coverage 65.47% 65.47%
- Complexity 1421 1430 +9
=========================================
Files 3426 3426
Lines 217315 217354 +39
Branches 34509 34517 +8
=========================================
+ Hits 142283 142318 +35
- Misses 63513 63517 +4
Partials 11519 11519
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Ready for review — all required CI checks are green on this PR. Issue: #17209 Could the following folks take a look when convenient? Formal GitHub "Request review" is unavailable from a fork contributor account on Thank you! |
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.
Why
After a Kinesis shard merge/split, servers correctly stop with
endOfPartitionGroupand commit. The controller then re-probed end-of-shard viaKinesisStreamMetadataProvider.consumedEndOfShard. On max empty non-EOP polls (including rate-limit empties), the provider assumed the shard was still live. That recreated a new consuming segment on the closed parent, which immediately committed empty — forever — and blocked child-shard admission (shardsEnded).This is a production reliability bug for any realtime table on Kinesis that rescales shards.
Impact
How
In
KinesisStreamMetadataProvider:endingSequenceNumber.Test plan
KinesisStreamMetadataProviderTest(closed shard + empty-only probes ⇒ parent removed; sequence short-circuit; child admission after parent end)../mvnw -pl pinot-plugins/pinot-stream-ingestion/pinot-kinesis -am -Dtest=KinesisStreamMetadataProviderTest -Dsurefire.failIfNoSpecifiedTests=false testRelated
fixes: #17209
Reviewers
Suggested: maintainers familiar with stream ingestion / Kinesis
Was generative AI tooling used to co-author this PR?
Generated-by: Grok Build (xAI)