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

tightening the offset check in ReplicaFetcherThread

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • None
    • None

    Description

      Currently, in ReplicaFetcherThread.processPartitionData(), we have the following code to make sure that the fetchOffset matches the log end offset.

      if (fetchOffset != replica.logEndOffset.messageOffset)
      throw new RuntimeException("Offset mismatch for partition %s: fetched offset = %d, log end offset = %d.".format(topicAndPartition, fetchOffset, replica.logEndOffset.messageOffset))

      It would be useful to further assert that the first offset in the messageSet to be appended to the log is >= than the log end offset.

      Attachments

        Issue Links

          Activity

            People

              imandhan Ishita Mandhan
              junrao Jun Rao
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: