Skip to content

KAFKA-20444: [2/N] Update OffsetMetadataManager to use new TxnOffsetCommit errors (KIP-1319)#22214

Merged
dajac merged 1 commit intoapache:trunkfrom
dajac:KAFKA-20444-pr4b
May 6, 2026
Merged

KAFKA-20444: [2/N] Update OffsetMetadataManager to use new TxnOffsetCommit errors (KIP-1319)#22214
dajac merged 1 commit intoapache:trunkfrom
dajac:KAFKA-20444-pr4b

Conversation

@dajac
Copy link
Copy Markdown
Member

@dajac dajac commented May 5, 2026

This patch updates OffsetMetadataManager to propagate
GROUP_ID_NOT_FOUND and STALE_MEMBER_EPOCH directly starting from
version 6 of the TxnOffsetCommit API, both at the group lookup and at
the per-partition validator. The legacy mapping to ILLEGAL_GENERATION
is preserved for versions 0 to 5.

Reviewers: Chia-Ping Tsai chia7712@gmail.com

…ommit errors (KIP-1319)

This patch updates `OffsetMetadataManager` to propagate
`GROUP_ID_NOT_FOUND` and `STALE_MEMBER_EPOCH` directly starting from
version 6 of the `TxnOffsetCommit` API, both at the group lookup
and at the per-partition validator. The legacy mapping to
`ILLEGAL_GENERATION` is preserved for versions 0 to 5.
Copy link
Copy Markdown
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// facility. In this case, a so-called simple group is created and the request
// is accepted.
group = groupMetadataManager.getOrMaybeCreateClassicGroup(request.groupId(), true);
} else if (TxnOffsetCommitRequest.supportsGroupIdNotFoundError((short) context.requestVersion())) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why requestVersion uses int rather than short, as header.apiVersion() actually returns a short

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, not sure why we used an int in AuthorizableRequestContext. It seems to be a mistake to me.

@dajac dajac merged commit 7238479 into apache:trunk May 6, 2026
25 checks passed
@dajac dajac deleted the KAFKA-20444-pr4b branch May 6, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants