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

Consumer should check equality of the generation for coordinator requests

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0
    • Component/s: consumer
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: