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

Controller's committed offset get out of sync with raft client listener context

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: controller, kraft
    • Labels:

      Description

      The active controller creates an in-memory snapshot for every offset returned by RaftClient::scheduleAppend and RaftClient::scheduleAtomicAppend. For RaftClient::scheduleAppend, the RaftClient is free to split those records into multiple batches. Because of this when scheduleAppend is use there is no guarantee that the active leader will always have an in-memory snapshot for every "last committed offset".

      To get around this problem, when the active controller renounces from leader if there is no snapshot at the last committed offset it will instead.

      1. Reset the snapshot registry
      2. Unregister the listener from the RaftClient
      3. Register a new listener with the RaftClient

        Attachments

          Activity

            People

            • Assignee:
              jagsancio Jose Armando Garcia Sancio
              Reporter:
              jagsancio Jose Armando Garcia Sancio
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: