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

State-store can desynchronise with changelog

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.11.0.3, 1.0.2, 1.1.1, 2.0.0
    • Fix Version/s: 0.11.0.4, 1.0.3, 1.1.2, 2.0.1, 2.1.0
    • Component/s: streams
    • Labels:

      Description

      n.b. this bug has been verified with exactly-once processing enabled

      Consider the following scenario:

      • A record, N is read into a Kafka topology
      • the state store is updated
      • the topology crashes

      Expected behaviour:

      1. Node is restarted
      2. Offset was never updated, so record N is reprocessed
      3. State-store is reset to position N-1
      4. Record is reprocessed

      Actual Behaviour

      1. Node is restarted
      2. Record N is reprocessed (good)
      3. The state store has the state from the previous processing

      I'd consider this a corruption of the state-store, hence the critical Priority, although High may be more appropriate.

      I wrote a proof-of-concept here, which demonstrates the problem on Linux:

      https://github.com/spadger/kafka-streams-sad-state-store

        Attachments

          Activity

            People

            • Assignee:
              guozhang Guozhang Wang
              Reporter:
              jonmbates Jon Bates
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: