Description
In LogCleaner.LogToClean, the following computations, which are used to compute the cleanable ratio, can overflow since the segment size is an integer.
val cleanBytes = log.logSegments(-1, firstDirtyOffset).map(_.size).sum ... val cleanableBytes = log.logSegments(firstDirtyOffset, math.max(firstDirtyOffset, firstUncleanableOffset)).map(_.size).sum
A PR is already available: https://github.com/apache/kafka/pull/4043.