Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.8.1, 1.9.0
Description
During startup of a transactional Kafka producer from previous state, we recover in two steps:
- in TwoPhaseCommitSinkFunction, we commit pending commit-transactions and abort pending transactions and then call into finishRecoveringContext()
- in FlinkKafkaProducer#finishRecoveringContext() we iterate over all recovered transaction IDs and abort them.
This may lead to some transactions being worked on twice. Since this is quite some expensive operation, we unnecessarily slow down the job startup but could easily give finishRecoveringContext() a set of transactions that TwoPhaseCommitSinkFunction already covered instead.
Attachments
Issue Links
- links to