[ https://issues.apache.org/jira/browse/KAFKA-12233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chia-Ping Tsai resolved KAFKA-12233. ------------------------------------ Fix Version/s: 2.8.0 Resolution: Fixed > Align the length passed to FileChannel by `FileRecords.writeTo` > --------------------------------------------------------------- > > Key: KAFKA-12233 > URL: https://issues.apache.org/jira/browse/KAFKA-12233 > Project: Kafka > Issue Type: Bug > Reporter: dengziming > Assignee: dengziming > Priority: Major > Fix For: 2.8.0 > > > [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)