Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4815 Idempotent/transactional Producer (KIP-98)
  3. KAFKA-5260

Producer should not send AbortTxn unless transaction has actually begun

    XMLWordPrintableJSON

Details

    Description

      When there is an authorization error in AddOffsets or AddPartitions, the producer will raise an authorization exception. When that happens, the user should abort the transaction. The problem is that in an authorization error, the coordinator will not have transitioned to a new state, so if it suddenly receives an AbortTxnRequest, that request will fail with an InvalidTxnState, which will be propagated to the error. The suggested solution is to keep track locally when we are certain that no transaction has been officially begun and to skip sending the AbortTxnRequest in that case.

      Attachments

        Issue Links

          Activity

            People

              damianguy Damian Guy
              hachikuji Jason Gustafson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: