Kafka Connect: Exclude zombie commitId from validThroughTs()#17080
Open
thswlsqls wants to merge 1 commit into
Open
Kafka Connect: Exclude zombie commitId from validThroughTs()#17080thswlsqls wants to merge 1 commit into
thswlsqls wants to merge 1 commit into
Conversation
CommitState.addReady() buffers every DATA_COMPLETE event regardless of commitId, and validThroughTs() used the buffer without filtering, so a zombie coordinator's stale event (from a prior commit) could corrupt or null out the valid-through timestamp written to VALID_THROUGH_TS_SNAPSHOT_PROP. Filter readyBuffer by currentCommitId, matching the pattern already used for receivedPartitionCount. Generated-by: Claude Code
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.
Closes #17077
Summary
CommitState.addReady()buffers everyDATA_COMPLETEevent inreadyBufferregardless ofcommitId, andvalidThroughTs()used that buffer unfiltered, so a zombie coordinator's stale event from a previous commit could corrupt or null outVALID_THROUGH_TS_SNAPSHOT_PROP.validThroughTs()now filtersreadyBufferbyObjects.equals(currentCommitId, payload.commitId()), the same patternaddReady()already applies toreceivedPartitionCount.receivedPartitionCountandisCommitReady()but leftvalidThroughTs()unfiltered — this closes that gap.Testing done
TestCommitState#testGetValidThroughTsIgnoresZombieCoordinatorPayloads, mirroringtestIsCommitReadyIgnoresZombieCoordinatorPayloadsfrom PR Kafka Connect: Make CommitState.isCommitReady() O(1) #16453, covering a zombie coordinator'sDATA_COMPLETE(differentcommitId, null timestamp) being excluded from the valid-through calculation.TestCommitState#testGetValidThroughTsto stubcommitId()on its mockedDataCompletepayloads so they match the new filter../gradlew :iceberg-kafka-connect:iceberg-kafka-connect:checkpasses —TestCommitState5/5, full module 123/123, 0 failures.