Sylwester Lachiewicz created FLINK-41828:
--------------------------------------------

             Summary: KafkaCommitter fails over on INVALID_PRODUCER_ID_MAPPING 
when re-committing a restored transaction
                 Key: FLINK-41828
                 URL: https://issues.apache.org/jira/browse/FLINK-41828
             Project: Flink
          Issue Type: Bug
          Components: Connectors / Kafka
    Affects Versions: kafka-5.1.0
            Reporter: Sylwester Lachiewicz


When the broker has assigned a transactional id a different producer id since 
the checkpoint (for example after {{transactional.id.expiration.ms}}, or when 
{{POOLING}} reused the id under a new producer), the committer's re-commit of 
the restored transaction fails with {{InvalidPidMappingException}} 
({{INVALID_PRODUCER_ID_MAPPING}}).

{{KafkaCommitter.commit()}} handles {{ProducerFencedException}}, 
{{InvalidTxnStateException}} and {{UnknownProducerIdException}} as known 
failures, but this exception falls into the generic {{catch (Exception)}}, 
which calls {{signalFailedWithUnknownReason}} and fails the job over. The 
restored committable is retried after the failover and fails the same way, and 
the id is never reported on the backchannel.

Expected: treat it like the other known failures of a transaction that can no 
longer be committed: log it, report {{TransactionFinished.erroneously}} and 
call {{signalFailedWithKnownReason}}.

Found in review of [PR 
#314|https://github.com/apache/flink-connector-kafka/pull/314]; main has the 
same behaviour.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to