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

   When a classic group is converted to a consumer group during a rebalance
   that started in CompletingRebalance, the converted members own no
   partitions, even though cooperative members still consume theirs. The
   first target assignment of the consumer group then gives those
   partitions to other members, so two members consume the same partitions
   until the old owners rejoin and revoke them.
   
   A rebalance that starts in CompletingRebalance, for example because a
   member joins before the leader sends its SyncGroup, or because the write
   of the leader's assignment fails, resets the in-memory assignment of
   every member to empty. The assignments stay empty until the next
   SyncGroup of the leader, even across the next join phase. The reset is
   never written to the log, and cooperative members keep their partitions
   meanwhile. `ConsumerGroup.fromClassicGroup` builds the assigned
   partitions and the target assignment of each member from these empty
   assignments.
   
   This patch keeps the assignments of the members when such a rebalance
   starts, as when a rebalance starts from Stable. The conversion code does
   not change: it reads the last assignment of the leader, which is also
   what a coordinator failover reloads from the log. The SyncGroup
   responses with the error still carry an empty assignment, so nothing
   changes on the wire. `resetAndPropagateAssignmentWithError` is renamed
   to `propagateError`.
   
   Converting a member with an empty assignment from the owned partitions
   that it reports in its JoinGroup metadata was rejected. A static member
   that missed join phases can still report partitions that the leader has
   since given to another member. Two members would then claim the same
   partition, and the conversion would fail.
   
   
   


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