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

David Jacot resolved KAFKA-21649.
---------------------------------
    Fix Version/s: 4.5.0
                   4.4.1
                   4.3.3
       Resolution: Fixed

> An upgrade after a topic was re-created with fewer partitions assigns 
> partitions that don't exist
> -------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-21649
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21649
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 4.0.0
>            Reporter: David Jacot
>            Assignee: David Jacot
>            Priority: Major
>             Fix For: 4.5.0, 4.4.1, 4.3.3
>
>
> When a consumer that uses the consumer protocol joins a classic group, the 
> group coordinator converts the classic group to a consumer group. The 
> converted members keep the last classic assignment, which is also the target 
> assignment. The classic assignment refers to topics by name. If a subscribed 
> topic was deleted and created again with fewer partitions before the classic 
> members rejoin, the converted members are assigned partitions of the new 
> topic that don't exist.
> Impact:
> * With the uniform assignor, the default server assignor, every computation 
> of the target assignment fails with "Partitions were left unassigned" or an 
> ArrayIndexOutOfBoundsException.
> * When the assignor runs in the heartbeat, the heartbeat that converts the 
> group fails with UNKNOWN_SERVER_ERROR, and every later attempt fails the same 
> way.
> * When the assignor is offloaded, every run fails, and the joining consumer 
> never gets partitions while the converted members keep the partitions that 
> don't exist.
> * When the conversion computes no new target assignment, for example when a 
> static member replaces its classic self with the same subscription, the 
> members are assigned partitions that don't exist.
> *Steps to reproduce*
> # A classic consumer joins group G, subscribed to topic T with 4 partitions. 
> G is Stable and the consumer is assigned T-0 to T-3.
> # Delete T and create it again with 2 partitions.
> # Before the classic consumer refreshes its metadata and rejoins 
> (metadata.max.age.ms), start a consumer with group.protocol=consumer in G, 
> subscribed to T.
> # The coordinator converts G to a consumer group, and the new consumer's 
> heartbeat fails with UNKNOWN_SERVER_ERROR.
> *Expected:* the converted group assigns the 2 partitions of the new topic T.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to