KAFKA-20444: [3/N] Allow building TxnOffsetCommit v6 requests with topic IDs (KIP-1319)#22215
Merged
dajac merged 1 commit intoapache:trunkfrom May 6, 2026
Merged
KAFKA-20444: [3/N] Allow building TxnOffsetCommit v6 requests with topic IDs (KIP-1319)#22215dajac merged 1 commit intoapache:trunkfrom
dajac merged 1 commit intoapache:trunkfrom
Conversation
…pic IDs (KIP-1319) This patch adds a `forTopicIdsOrNames(...)` factory to `TxnOffsetCommitRequest.Builder` that allows building requests starting from version 6 of the API. The existing `forTopicNames(...)` factory is capped at version 5. `build(short version)` validates that the request carries topic IDs starting from version 6 and topic names for versions 0 to 5. No call site uses the new factory yet — that lands in a follow-up patch wiring up `TransactionManager`.
squah-confluent
approved these changes
May 6, 2026
Contributor
squah-confluent
left a comment
There was a problem hiding this comment.
Thanks, lgtm.
The test coverage in TxnOffsetCommitRequestTest is a bit disjointed now.
Comment on lines
+91
to
+93
| @ParameterizedTest | ||
| @ApiKeyVersionsSource(apiKey = ApiKeys.TXN_OFFSET_COMMIT, toVersion = 5) | ||
| public void testConstructor(short version) { |
Contributor
There was a problem hiding this comment.
It's weird that we now only test up to version 5 for some of these tests.
Member
Author
There was a problem hiding this comment.
We can only test up to version 5 with topic names. I could perhaps update a few more... I will check separately.
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.
This patch adds a
forTopicIdsOrNames(...)factory toTxnOffsetCommitRequest.Builderthat allows building requests startingfrom version 6 of the API. The existing
forTopicNames(...)factory iscapped at version 5.
build(short version)validates that the requestcarries topic IDs starting from version 6 and topic names for versions 0
to 5. No call site uses the new factory yet — that lands in a follow-up
patch wiring up
TransactionManager.Reviewers: Sean Quah squah@confluent.io