[ 
https://issues.apache.org/jira/browse/KAFKA-20254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18064028#comment-18064028
 ] 

ASF GitHub Bot commented on KAFKA-20254:
----------------------------------------

lucasbru opened a new pull request, #824:
URL: https://github.com/apache/kafka-site/pull/824

   A critical broker-side bug in the offline migration code (KAFKA-20254) 
affects migrations from classic to streams groups in 4.2.0. Newly created 
streams groups are not impacted.
   
   This adds warnings to the upgrade notes, streams upgrade guide, and streams 
rebalance protocol documentation advising users to wait for a later release 
that includes the fix before attempting migrations.




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

Reply via email to