Source:
<code>public void checkpointState( CheckpointMetaData metadata, CheckpointOptions options, CheckpointMetrics metrics, OperatorChain<?, ?> operatorChain, Supplier<Boolean> isCanceled) throws Exception { checkNotNull(options); checkNotNull(metrics); if (lastCheckpointId >= metadata.getCheckpointId()) { LOG.info("Out of order checkpoint barrier (aborted previously?): >= {}", lastCheckpointId, metadata.getCheckpointId()); channelStateWriter.abort(metadata.getCheckpointId(), new CancellationException(), true); checkAndClearAbortedStatus(metadata.getCheckpointId()); return; } lastCheckpointId = metadata.getCheckpointId(); if (checkAndClearAbortedStatus(metadata.getCheckpointId())) { LOG.info("Checkpoint has been notified as aborted, would not trigger any checkpoint.", metadata.getCheckpointId()); return; } operatorChain.prepareSnapshotPreBarrier(metadata.getCheckpointId()); operatorChain.broadcastEvent( new CheckpointBarrier(metadata.getCheckpointId(), metadata.getTimestamp(), options), <START> options.isUnalignedCheckpoint()); <END> if (includeChannelState(options)) { prepareInflightDataSnapshot(metadata.getCheckpointId()); } Map<OperatorID, OperatorSnapshotFutures> snapshotFutures = new HashMap<>(operatorChain.getNumberOfOperators()); try { if (takeSnapshotSync(snapshotFutures, metadata, metrics, options, operatorChain, isCanceled)) { finishAndReportAsync(snapshotFutures, metadata, metrics, options); } else { cleanup(snapshotFutures, metadata, metrics, new Exception("Checkpoint declined")); } } catch (Exception ex) { cleanup(snapshotFutures, metadata, metrics, ex); throw ex; } }</code><technical_language>I idea of barrier options instead of local task configuration</technical_language>

Target:
public void checkpointState( CheckpointMetaData metadata, CheckpointOptions options, CheckpointMetrics metrics, OperatorChain<?, ?> operatorChain, Supplier<Boolean> isCanceled) throws Exception { checkNotNull(options); checkNotNull(metrics); if (lastCheckpointId >= metadata.getCheckpointId()) { LOG.info("Out of order checkpoint barrier (aborted previously?): >= {}", lastCheckpointId, metadata.getCheckpointId()); channelStateWriter.abort(metadata.getCheckpointId(), new CancellationException(), true); checkAndClearAbortedStatus(metadata.getCheckpointId()); return; } lastCheckpointId = metadata.getCheckpointId(); if (checkAndClearAbortedStatus(metadata.getCheckpointId())) { LOG.info("Checkpoint has been notified as aborted, would not trigger any checkpoint.", metadata.getCheckpointId()); return; } operatorChain.prepareSnapshotPreBarrier(metadata.getCheckpointId()); operatorChain.broadcastEvent( new CheckpointBarrier(metadata.getCheckpointId(), metadata.getTimestamp(), options), options.isUnalignedCheckpoint()); if (options.isUnalignedCheckpoint()) { prepareInflightDataSnapshot(metadata.getCheckpointId()); } Map<OperatorID, OperatorSnapshotFutures> snapshotFutures = new HashMap<>(operatorChain.getNumberOfOperators()); try { if (takeSnapshotSync(snapshotFutures, metadata, metrics, options, operatorChain, isCanceled)) { finishAndReportAsync(snapshotFutures, metadata, metrics, options); } else { cleanup(snapshotFutures, metadata, metrics, new Exception("Checkpoint declined")); } } catch (Exception ex) { cleanup(snapshotFutures, metadata, metrics, ex); throw ex; } }