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

FileRecords.read doesn't handle size > sizeInBytes when start is not zero

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.2.0, 0.11.0.0, 1.0.0
    • Fix Version/s: 1.1.0
    • Component/s: log
    • Labels:
      None

      Description

      now the code is :
      def read(position: Int, size: Int): FileMessageSet =

      { ..... new FileMessageSet(file, channel, start = this.start + position, end = math.min(this.start + position + size, sizeInBytes())) }

      if this.start is not 0, the end is only the FileMessageSet's size, not the actually position of end position.
      the end parameter should be:
      end = math.min(this.start + position + size, this.start+sizeInBytes())

      Update Problem still remains in FileRecords.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jkreps Jay Kreps
                Reporter:
                pengwei Pengwei
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: