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

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 3.0.0
    • controller, kraft

    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

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

            Dates

              Created:
              Updated:
              Resolved: