s not sufficient, because all of the components must &ldquo;agree&rdquo; together on committing or rolling back to ensure a consistent result. Flink uses the two-phase commit protocol and its pre-commit phase to address this challenge.</p>
<p>The starting of a checkpoint represents the &ldquo;pre-commit&rdquo; phase of our two-phase commit protocol. When a checkpoint starts, the Flink JobManager injects a checkpoint barrier (which separates the records in the data stream into the set that goes into the curr