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
KAFKA-14055; Txn markers should not be removed by matching records in the offset map #12390
Merged
Conversation
This file contains 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
junrao
approved these changes
Jul 8, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hachikuji : Thanks for the PR. LGTM. Are the test timeouts related to this PR?
hachikuji
added a commit
that referenced
this pull request
Jul 10, 2022
… the offset map (#12390) When cleaning a topic with transactional data, if the keys used in the user data happen to conflict with the keys in the transaction markers, it is possible for the markers to get removed before the corresponding data from the transaction is removed. This results in a hanging transaction or the loss of the transaction's atomicity since it would effectively get bundled into the next transaction in the log. Currently control records are excluded when building the offset map, but not when doing the cleaning. This patch fixes the problem by checking for control batches in the `shouldRetainRecord` callback. Reviewers: Jun Rao <junrao@gmail.com>
hachikuji
added a commit
that referenced
this pull request
Jul 10, 2022
… the offset map (#12390) When cleaning a topic with transactional data, if the keys used in the user data happen to conflict with the keys in the transaction markers, it is possible for the markers to get removed before the corresponding data from the transaction is removed. This results in a hanging transaction or the loss of the transaction's atomicity since it would effectively get bundled into the next transaction in the log. Currently control records are excluded when building the offset map, but not when doing the cleaning. This patch fixes the problem by checking for control batches in the `shouldRetainRecord` callback. Reviewers: Jun Rao <junrao@gmail.com>
hachikuji
added a commit
that referenced
this pull request
Jul 10, 2022
… the offset map (#12390) When cleaning a topic with transactional data, if the keys used in the user data happen to conflict with the keys in the transaction markers, it is possible for the markers to get removed before the corresponding data from the transaction is removed. This results in a hanging transaction or the loss of the transaction's atomicity since it would effectively get bundled into the next transaction in the log. Currently control records are excluded when building the offset map, but not when doing the cleaning. This patch fixes the problem by checking for control batches in the `shouldRetainRecord` callback. Reviewers: Jun Rao <junrao@gmail.com>
ijuma
added a commit
to confluentinc/kafka
that referenced
this pull request
Aug 3, 2022
> $ git merge-base apache-github/3.3 apache-github/trunk > 23c92ce > $ git show 23c92ce > commit 23c92ce > Author: SC <pch838811@gmail.com> > Date: Mon Jul 11 11:36:56 2022 +0900 > > MINOR: Use String#format for niceMemoryUnits result (apache#12389) > > Reviewers: Luke Chen <showuon@gmail.com>, Divij Vaidya <diviv@amazon.com> * commit '23c92ce79366e86ca719e5e51c550c27324acd83': MINOR: Use String#format for niceMemoryUnits result (apache#12389) KAFKA-14055; Txn markers should not be removed by matching records in the offset map (apache#12390) KAFKA-13474: Allow reconfiguration of SSL certs for broker to controller connection (apache#12381) KAFKA-13996: log.cleaner.io.max.bytes.per.second can be changed dynamically (apache#12296) KAFKA-13983: Fail the creation with "/" in resource name in zk ACL (apache#12359) KAFKA-12943: update aggregating documentation (apache#12091) KAFKA-13846: Follow up PR to address review comments (apache#12297)
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.
When cleaning a topic with transactional data, if the keys used in the user data happen to conflict with the keys in the transaction markers, it is possible for the markers to get removed before the corresponding data from the transaction is removed. This results in a hanging transaction or the loss of the transaction's atomicity since it would effectively get bundled into the next transaction in the log. Currently control records are excluded when building the offset map, but not when doing the cleaning. This patch fixes the problem by checking for control batches in the
shouldRetainRecord
callback.Committer Checklist (excluded from commit message)