You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Chia-Ping Tsai (Jira)" <ji...@apache.org> on 2021/01/27 04:52:00 UTC
[jira] [Resolved] (KAFKA-12233) Align the length passed to
FileChannel by `FileRecords.writeTo`
[ 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)