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

Align the length passed to FileChannel by `FileRecords.writeTo`

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0
    • None
    • None

    Description

      https://github.com/apache/kafka/pull/2140/files#r563471404

      we set `int count = Math.min(length, oldSize)`, but we are expected to write from `offset`, so the count should be `Math.min(length, oldSize - offset)`.

      Attachments

        Issue Links

          Activity

            People

              dengziming Deng Ziming
              dengziming Deng Ziming
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: