You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Lucas Brutschy (Jira)" <ji...@apache.org> on 2026/03/09 10:09:00 UTC

[jira] [Resolved] (KAFKA-20254) Streams group replay fails after log compaction removes classic group tombstone

     [ https://issues.apache.org/jira/browse/KAFKA-20254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lucas Brutschy resolved KAFKA-20254.
------------------------------------
    Resolution: Fixed

> 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)