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

LeaderEpochFileCache.endOffsetFor() should check for UNDEFINED_EPOCH explicitly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.11.0.0
    • 0.11.0.3, 1.0.2, 1.1.1, 2.0.0
    • core
    • None

    Description

      In LeaderEpochFileCache.endOffsetFor() , we have the following code.

       

       

      if (requestedEpoch == latestEpoch) {
       leo().messageOffset
      

       

      In the case when the requestedEpoch is UNDEFINED_EPOCH and latestEpoch is also UNDEFINED_EPOCH, we return leo. This will cause the follower to truncate to a wrong offset. If requestedEpoch is UNDEFINED_EPOCH, we need to request UNDEFINED_EPOCH_OFFSET.

      Attachments

        Issue Links

          Activity

            People

              apovzner Anna Povzner
              junrao Jun Rao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: