[
https://issues.apache.org/jira/browse/KAFKA-20254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matthias J. Sax updated KAFKA-20254:
------------------------------------
Fix Version/s: 4.3.0
4.2.1
> Streams group replay fails after log compaction removes classic group
> tombstone
> -------------------------------------------------------------------------------
>
> Key: KAFKA-20254
> URL: https://issues.apache.org/jira/browse/KAFKA-20254
> Project: Kafka
> Issue Type: Task
> Components: group-coordinator, streams
> Affects Versions: 4.2.0
> Reporter: Lucas Brutschy
> Assignee: Lucas Brutschy
> Priority: Blocker
> Fix For: 4.3.0, 4.2.1
>
>
> After offline migration from classic group to streams group, the group
> coordinator fails with "Group X is not a streams group" after a coordinator
> restart or partition reassignment.
> The offline migration (classic → streams) writes a GroupMetadataKey tombstone
> to delete the classic group. However, the OffsetCommitKey records for that
> group remain in __consumer_offsets. After log compaction removes the
> tombstone (past delete.retention.ms), the following happens during
> coordinator replay:
> 1. OffsetMetadataManager.replay encounters offset commit records without an
> existing group
> 2. It calls getOrMaybeCreateClassicGroup(groupId, true), which creates a
> simple classic group (empty, no protocol type)
> 3. When streams group records are replayed next,
> getOrMaybeCreatePersistedStreamsGroup finds a classic group already exists
> and throws "Group X is not a streams group"
>
> Trigger conditions:
> - Classic group converted to streams group via offline migration
> - Enough time passes for log compaction to clean up the GroupMetadataKey
> tombstone
> - Coordinator restarts or partition is reassigned, triggering a full replay
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)