curcur opened a new pull request #16768:
URL: https://github.com/apache/flink/pull/16768


   ## What is the purpose of the change
   
   Do not create transactions in TwoPhaseCommitSinkFunction after finish() is 
called. The reason is that after finish() is called, no more input is expected 
and hence no more transactions are needed.
   
   The problem of creating transactions is that there would be one/or possibly 
several open transactions that would be never closed after the task finishes.
   
   ## Brief change log
   Introduce empty transaction holder; so that after sink function is closed, 
we will place empty transaction as a holder.
   
   ## Verifying this change
   - add unit tests
   - existing unit tests + ITTests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (affect recovery that 
uses two-phase commit, like Kafka)
     - The S3 file system connector: (no)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to