dajac opened a new pull request, #24366:
URL: https://github.com/apache/kafka/pull/24366

   The assignment of a classic group refers to topics by name. When a
   topic was re-created with fewer partitions and a consumer of the
   consumer protocol upgrades the group before the classic members rejoin,
   the members of the consumer group keep the partitions that the new
   topic doesn't have. The uniform assignor fails on them. With the
   assignor offloaded, every run fails and the new member gets no
   partitions until those members leave. Otherwise, the heartbeat that
   upgrades the group fails with UNKNOWN_SERVER_ERROR. When the upgrade
   computes no new target assignment, as after a static member
   replacement, the members are assigned the partitions that don't exist.
   
   `ConsumerGroup#fromClassicGroup` converts the classic assignments with
   `Utils#toTopicPartitionMap`, which maps each topic name to the id of the
   current topic and copies the partition numbers without checking them.
   
   This patch makes `Utils#toTopicPartitionMap` drop the partitions that
   are not in the metadata image, and the topics left without partitions.
   The dropped partitions need no new target assignment: they don't
   exist, so the remaining assignment leaves no partition unassigned
   because of them.
   
   Rejected options: dropping the partitions when the target assignment
   is computed, which leaves them in the current assignments and in the
   target assignment until then; bumping the group epoch when the
   conversion drops a partition, which computes a new target assignment
   that the remaining assignment doesn't need.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to