flashmouse commented on PR #13920:
URL: https://github.com/apache/kafka/pull/13920#issuecomment-1612747935

   I found another one bug.
   
   In 
``org.apache.kafka.clients.consumer.internals.AbstractStickyAssignor#allSubscriptionsEqual``,
  it would check whether one partition is assigned by multiple consumers in 
different generation, the logic has 3 if-else body, the last one condition 
``memberGeneration < otherMemberGeneration`` should add this line below:
   ```
   allPreviousPartitionsToOwner.put(tp, otherConsumer);
   ```
   without this line may happen error in such scenario below:
   say we have 3 consumers, they own partition1 respectively in generation 1, 
2, 3, and then the check sequence is gen3, gen1, gen2, then gen3 and gen2 are 
all added to ``consumerToOwnedPartitions`` so this partition added twice.
   
   this may happen if one partition is owned by at least 3 generation consumer.
   
   @rreddy-22  @kirktrue could u take a look? thx!


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to