Guozhang Wang created KAFKA-9823:
------------------------------------

             Summary: Consumer should check equality of the generation for 
coordinator requests
                 Key: KAFKA-9823
                 URL: https://issues.apache.org/jira/browse/KAFKA-9823
             Project: Kafka
          Issue Type: Bug
          Components: consumer
            Reporter: Guozhang Wang
            Assignee: Guozhang Wang


In consumer's requests to group coordinator (heartbeat, join-group, sync-group, 
commit; leave-group is not considered since consumer do not check its responses 
anyways), we encoded the generation / member information and the response may 
indicate that the member.id is invalid or generation is stale, which would 
cause consumer to reset and re-join group.

However, when the response is sent back it is possible that the consumer has 
already started re-join due to other channels indicating it out of the group, 
and hence resetting would introduce unnecessarily more re-joining operations.

We should, instead, remember the generation information that was sent along 
with the request and upon getting the response compare that with the current 
generation information. If they do not match it means the responded error 
indicating stale information has been updated in other places and hence can be 
handled differently (for example, in heartbeat handling we can just ignore the 
error).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to