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

Stand-by Task of an Optimized Source Table Does Not Write Anything to its State Store

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.0
    • 2.4.0
    • streams

    Description

      With the following topology:

      builder.table(
          INPUT_TOPIC, 
          Consumed.with(Serdes.Integer(), Serdes.Integer()), 
          Materialized.<Integer, Integer, KeyValueStore<Bytes, byte[]>>as(stateName)
      )
      

      and with topology optimization turned on, Kafka Streams uses the input topic INPUT_TOPIC as the change log topic for state store stateName. A stand-by task for such a topology should read from INPUT_TOPIC and should write the records to its state store so that the streams client that runs the stand-by task can take over the execution of the topology in case of a failure with an up-to-date replica of the state.

      Currently, the stand-by task described above reads from the input topic but does not write the records to its state store. Thus, after a failure the stand-by task cannot provide any up-to-date state store and the streams client needs to construct the state from scratch before it can take over the execution.

      The described behaviour can be reproduced with the attached test.

      Attachments

        1. StandbyTaskTest.java
          9 kB
          Bruno Cadonna

        Issue Links

          Activity

            People

              cpettitt-confluent Chris Pettitt
              cadonna Bruno Cadonna
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: