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

Consumer offset reset after new segment rolling

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 2.5.0, 2.4.1
    • Fix Version/s: 2.4.2, 2.5.1
    • Component/s: None
    • Labels:
      None

      Description

      After upgrade from kafka 2.1.1 to 2.4.0, I'm experiencing unexpected consumer offset resets.

      Consumer:

      2020-02-12T11:12:58.402+01:00 hostname 4a2a39a35a02 [2020-02-12T11:12:58,402][INFO ][org.apache.kafka.clients.consumer.internals.Fetcher] [Consumer clientId=logstash-1, groupId=logstash] Fetch offset 1632750575 is out of range for partition stats-5, resetting offset
      

      Broker:

      2020-02-12 11:12:58:400 CET INFO  [data-plane-kafka-request-handler-1][kafka.log.Log] [Log partition=stats-5, dir=/kafka4/data] Rolled new log segment at offset 1632750565 in 2 ms.

      All resets are perfectly correlated to rolling new segments at the broker - segment is rolled first, then, couple of ms later, reset on the consumer occurs. Attached is grafana graph with consumer lag per partition. All sudden spikes in lag are offset resets due to this bug.

        Attachments

        1. Untitled.png
          64 kB
          Rafał Boniecki
        2. image-2020-04-06-17-10-32-636.png
          1.29 MB
          Alexis Seigneurin

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                boniek Rafał Boniecki
              • Votes:
                3 Vote for this issue
                Watchers:
                17 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: