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

Follower's lastFetchedEpoch wrongly set when fetch response has no record

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.6.0, 3.5.1
    • 3.7.0
    • None
    • None

    Description

      A regression is introduced by https://github.com/apache/kafka/pull/13843/files#diff-508e9dc4d52744119dda36d69ce63a1901abfd3080ca72fc4554250b7e9f5242. When the fetch response has no record for a partition, validBytes is 0. In this case, we shouldn't set the last fetch epoch to logAppendInfo.lastLeaderEpoch.asScala since there is no record and it is Optional.empty. We should use currentFetchState.lastFetchedEpoch instead.

      An effect of this is truncation of fetch might not work correctly.

       

      Attachments

        Issue Links

          Activity

            People

              chernyih@gmail.com Chern Yih Cheah
              chernyih@gmail.com Chern Yih Cheah
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: