You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/10/15 16:12:24 UTC

[GitHub] [kafka] hachikuji commented on pull request #9441: KAFKA-10614: Ensure group state (un)load is executed in the submitted order

hachikuji commented on pull request #9441:
URL: https://github.com/apache/kafka/pull/9441#issuecomment-709432283


   @tombentley Thanks for the patch. I think the problem is in the callback inside `KafkaApis.handleLeaderAndIsrRequest`. With two concurrent `LeaderAndIsr` requests, there is no guarantee about the ordering of the callbacks even though `ReplicaManager` checks epoch. They can get reordered like the following:
   
   1. Call `ReplicaManager.becomeLeaderOrFollower` with epoch=1 in thread 1
   2. Call `ReplicaManager.becomeLeaderOrFollower` with epoch=2 in thread 2
   3. Call `onLeadershipChange` callback in thread 2
   4. Call `onLeadershipChange` callback in thread 1
   
   At least that's my understanding of the issue. I think we need to find a way to push the epoch validation into `GroupCoordinator`. 


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

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