dengziming created KAFKA-12233:
----------------------------------
Summary: `FileRecords.writeTo` set length incorrectly
Key: KAFKA-12233
URL: https://issues.apache.org/jira/browse/KAFKA-12233
Project: Kafka
Issue Type: Bug
Reporter: dengziming
Assignee: dengziming
[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)`.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)