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

Connect can lose track of last committed offsets for topic partitions after partial consumer revocation

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 3.1.0, 3.0.1
    • 3.1.0, 3.0.1
    • connect
    • None

    Description

      The Connect framework tracks the last successfully-committed offsets for each topic partition that is currently assigned to the consumer of each sink task. If a sink task throws an exception from SinkTask::preCommit, the consumer is "rewound" by seeking to those last successfully-committed offsets for each topic partition, so that the same records can be redelivered to the task again.

      With the changes from KAFKA-12487, we failed to correctly update the logic for tracking these last-committed offsets which can cause topic partitions to be missing from them after partial revocation of topic partitions from the consumer. Specifically, we make the assumption that, whenever an offset commit succeeds, the offsets that were successfully committed constitute the entirely of the last-committed offsets for the task; when a partial consumer revocation takes place, we only commit offsets for some of the topic partitions assigned to the task's producer, and this assumption fails.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ChrisEgerton Chris Egerton
            ChrisEgerton Chris Egerton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment