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

ProducerFencedExceptions should wipe out the state store only for the tasks that are related to the failed transaction

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.9.0
    • None
    • streams
    • None

    Description

      A ProducerFencedException is thrown when the StreamThread reaches the `transaction.timeout.ms` limit and EOS is enabled, causing dirty closes on the running StreamTask in order to protect Exactly Once Semantics. Even if the failed transaction contained records associated with a single stream task, it wipes out all associated StreamTask states. In the inflight transaction, the StreamsProducer should keep track of the associated task and only close 'dirty' these tasks when the producer is fenced.

      Steps to reproduce:

      1. Deploys a Kafka Streams instance that uses multiple tasks in a single StreamThread
      2. Set the `transaction.timeout.ms` small enough to cause a timeout during processing.
      3. Send load to your input topics.

       

      Check how many of your StreamTasks are currently closed dirty.

      stream-thread [app1-StreamThread-1] task [0_0] Closed dirty

      Attachments

        1. app1.log.tgz
          1.24 MB
          Eduwer Camacaro

        Activity

          People

            eduwerc Eduwer Camacaro
            eduwerc Eduwer Camacaro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: