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

RackAwareReplicaSelector should choose a replica from the isr

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.4.0, 3.3.2
    • None
    • None

    Description

      The default replica selector chooses a replica on whether the broker.rack matches the client.rack in the fetch request and whether the offset exists in the follower. If the follower is not in the ISR, we know it's lagging behind which will also lag the consumer behind. Let's consider two cases:

      1. the follower recovers and joins the isr. the consumer will no longer lag
      2. the follower continues to lag behind. after 5 minutes, the consumer will refresh the preferred read replica and it returns the same lagging follower since the offset the consumer will fetch from is capped by the follower's HWM. this can go on indefinitely

      If the replica selector chooses a broker in the ISR then we can ensure that at least every 5 minutes the consumer will consume from an up-to-date replica. 

       

       

       

       

      Attachments

        Activity

          People

            jeffkbkim Jeff Kim
            jeffkbkim Jeff Kim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: