KAFKA-8351; Cleaner should handle transactions spanning multiple segments#6722
Conversation
dhruvilshah3
left a comment
There was a problem hiding this comment.
Thanks for the patch. LGTM, left couple of minor comments.
There was a problem hiding this comment.
nit: might be better to use addAbortedTransactions.
junrao
left a comment
There was a problem hiding this comment.
@hachikuji : Thanks for the PR. LGTM. Just a minor comment below.
There was a problem hiding this comment.
Could we add transactionMetadata to the javadoc?
df5c392 to
e525b63
Compare
|
@viktorsomogyi Thanks for the questions.
Just like a normal topic, producer state can be lost due to retention. Note that I have proposed in KIP-360 to retain producer state beyond the retention in the log. That may allow us simplify the cleaner's bookkeeping here.
I'm not 100% sure I understand the question, but transaction state is local to the partition after the transaction completes. Once markers are written to the log, the transaction is considered complete locally and the data is exposed. |
…ents (#6722) When cleaning transactional data, we need to keep track of which transactions still have data associated with them so that we do not remove the markers. We had logic to do this, but the state was not being carried over when beginning cleaning for a new set of segments. This could cause the cleaner to incorrectly believe a transaction marker was no longer needed. The fix here carries the transactional state between groups of segments to be cleaned. Reviewers: Dhruvil Shah <dhruvil@confluent.io>, Viktor Somogyi <viktorsomogyi@gmail.com>, Jun Rao <junrao@gmail.com>
…ents (#6722) When cleaning transactional data, we need to keep track of which transactions still have data associated with them so that we do not remove the markers. We had logic to do this, but the state was not being carried over when beginning cleaning for a new set of segments. This could cause the cleaner to incorrectly believe a transaction marker was no longer needed. The fix here carries the transactional state between groups of segments to be cleaned. Reviewers: Dhruvil Shah <dhruvil@confluent.io>, Viktor Somogyi <viktorsomogyi@gmail.com>, Jun Rao <junrao@gmail.com>
…ents (apache#6722) When cleaning transactional data, we need to keep track of which transactions still have data associated with them so that we do not remove the markers. We had logic to do this, but the state was not being carried over when beginning cleaning for a new set of segments. This could cause the cleaner to incorrectly believe a transaction marker was no longer needed. The fix here carries the transactional state between groups of segments to be cleaned. Reviewers: Dhruvil Shah <dhruvil@confluent.io>, Viktor Somogyi <viktorsomogyi@gmail.com>, Jason Gustafson <jason@confluent.io>
…ents (apache#6722) When cleaning transactional data, we need to keep track of which transactions still have data associated with them so that we do not remove the markers. We had logic to do this, but the state was not being carried over when beginning cleaning for a new set of segments. This could cause the cleaner to incorrectly believe a transaction marker was no longer needed. The fix here carries the transactional state between groups of segments to be cleaned. Reviewers: Dhruvil Shah <dhruvil@confluent.io>, Viktor Somogyi <viktorsomogyi@gmail.com>, Jason Gustafson <jason@confluent.io>
When cleaning transactional data, we need to keep track of which transactions still have data associated with them so that we do not remove the markers. We had logic to do this, but it was not being carried over when beginning cleaning for a new set of segments. This could cause the cleaner to incorrectly believe a transaction marker was no longer needed. The fix here carries the transactional state between groups of segments to be cleaned.
Committer Checklist (excluded from commit message)