[
https://issues.apache.org/jira/browse/KAFKA-4472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15713380#comment-15713380
]
ASF GitHub Bot commented on KAFKA-4472:
---------------------------------------
GitHub user kichristensen opened a pull request:
https://github.com/apache/kafka/pull/2200
KAFKA-4472: offsetRetentionMs miscalculated in GroupCoordinator
Fix possible integer overflow
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kichristensen/kafka
MiscalculatedOffsetRetention
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/2200.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2200
----
commit e0ea8736d104d68f3d2969edef485592b3aaf320
Author: Kim Christensen <[email protected]>
Date: 2016-12-01T23:11:30Z
Fix possible overflow
----
> offsetRetentionMs miscalculated in GroupCoordinator
> ---------------------------------------------------
>
> Key: KAFKA-4472
> URL: https://issues.apache.org/jira/browse/KAFKA-4472
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 0.10.1.0, 0.10.0.1
> Reporter: Jason Aliyetti
> Assignee: Kim Christensen
>
> The configuration "offsets.retention.minutes" is documented as being an
> integer. When large values are set (i.e. Integer.MAX_VALUE), an overflow
> error occurs when converting from minutes to milliseconds. For instance,
> setting the config value as 2147483647 results in a offsetsRetentionMs of
> -60000. This means that all committed offsets are past their expiration when
> they are created and will be nullified on the next expiration check, which is
> unexpected given the type of the configuration.
> The fix would be to change
> "offsetsRetentionMs = config.offsetsRetentionMinutes * 60 * 1000L"
> to
> "offsetsRetentionMs = config.offsetsRetentionMinutes * 60L * 1000L"
> in GroupCoordinator.apply().
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)