[
https://issues.apache.org/jira/browse/KAFKA-6030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jason Gustafson resolved KAFKA-6030.
------------------------------------
Resolution: Fixed
Issue resolved by pull request 4043
[https://github.com/apache/kafka/pull/4043]
> Integer overflow in log cleaner cleanable ratio computation
> -----------------------------------------------------------
>
> Key: KAFKA-6030
> URL: https://issues.apache.org/jira/browse/KAFKA-6030
> Project: Kafka
> Issue Type: Bug
> Reporter: Jason Gustafson
> Fix For: 1.0.0, 0.11.0.2
>
>
> In {{LogCleaner.LogToClean}}, the following computations, which are used to
> compute the cleanable ratio, can overflow since the segment size is an
> integer.
> {code}
> val cleanBytes = log.logSegments(-1, firstDirtyOffset).map(_.size).sum
> ...
> val cleanableBytes = log.logSegments(firstDirtyOffset,
> math.max(firstDirtyOffset, firstUncleanableOffset)).map(_.size).sum
> {code}
> A PR is already available: https://github.com/apache/kafka/pull/4043.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)