. It is our responsibility to implement a commit in an idempotent way. Generally, this shouldn&rsquo;t be an issue. In our example, we can recognize such a situation: the temporary file is not in the temporary directory, but has already been moved to the target directory.</p>
<p>There are a handful of other edge cases that <code>TwoPhaseCommitSinkFunction</code> takes into account, too. <a href="//nightlies.apache.org/flink/flink-docs-release-1.4/api/java/org/apache/flink/streaming/api/functions/sink/TwoPha