Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clear preferredReadReplica if broker shutdown #2108

Merged
merged 2 commits into from
Jan 12, 2022

Commits on Jan 12, 2022

  1. fix: clear preferredReadReplica if broker shutdown

    After Sarama had been given a preferred replica to consume from, it was
    mistakenly latching onto that value and not unsetting it in the case
    that the preferred replica broker was shutdown and left the cluster
    metadata.
    
    Fetches continued to work as long as that broker remained shutdown,
    because they were now being sent to the Leader, which would service them
    itself as it had no better preferred replica to point the client at.
    
    However, consumption would then hang after the broker came back online,
    because the Leader would stop returning records in the FetchResponse and
    would instead just return the preferred replicaID, expecting the
    client to send its FetchRequests over there. However, because the
    partitionConsumer had latched the value of preferredReplica it never
    dispatched to (re-)connect to the preferred replica and instead just
    continued to send FetchRequests to the leader and received no records
    back.
    
    Contributes-to: #2090
    
    Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
    dnwe committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    2441dcb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1f754e2 View commit details
    Browse the repository at this point in the history