Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4472

offsetRetentionMs miscalculated in GroupCoordinator

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0.1, 0.10.1.0
    • Fix Version/s: 0.10.1.1, 0.10.2.0
    • Component/s: None
    • Labels:
      None

      Description

      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().

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kichristensen Kim Christensen
                Reporter:
                jaliyetti Jason Aliyetti
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: