Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9823

Consumer should check equality of the generation for coordinator requests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.6.0
    • consumer
    • None

    Description

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

      Attachments

        Activity

          People

            guozhang Guozhang Wang
            guozhang Guozhang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: