kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-14562 [1/2]: Implement epoch bump after every transaction

Open jolshan opened this issue 1 year ago • 1 comments

Implement server side changes for epoch bump but keep EndTxn as an unstable API until the client side changes are implemented. EndTxnResponse will return the producer ID and epoch for the transaction. Introduces new tagged fields to the TransactionLogValue to persist the clientTransactionVersion, previousProducerId, and nextProducerId to the log so that the state can be reloaded. See KIP-890 for more details.

Small updates to naming of lastProducerId -> PreviousProducerId. Also cleans up the many TransactionMetadata constructors.

Committer Checklist (excluded from commit message)

  • [ ] Verify design and implementation
  • [ ] Verify test coverage and CI build status
  • [ ] Verify documentation (including upgrade notes)

jolshan avatar Jul 29 '24 20:07 jolshan

I may go back and clean up some of the "magic" values in tests. I use 0 for TV 0 and 2 for TV 2, but I could use a named variable for these versions, or latest if I just want the latest.

jolshan avatar Aug 13 '24 00:08 jolshan

Ah, I just noticed that they are failed tests that seem related. Could you please take a look into those?

dajac avatar Sep 25 '24 13:09 dajac