Github user bjlovegithub commented on the issue: https://github.com/apache/flink/pull/2629 Maybe this is a solution. We will not think about changing the type of `checkpointLock`, which is an `Object` ans quite efficient, and not change the order of `broadcastBarriers` and `operator.snapshotState()`. By placing **pause** `EmitterThread` codes in `StreamTask.performCheckpoint()`, like this: ` private boolean performCheckpoint(CheckpointMetaData checkpointMetaData) throws Exception { LOG.debug("Starting checkpoint {} on task {}", checkpointMetaData.getCheckpointId(), getName()); synchronized (lock) { if (isRunning) { // stop working threads first. for (StreamOperator operator : operatorChain.getAllOperators()) { if (operator instanceof AsyncWaitOperator) { operator.pauseEmitterThread(); } } // broadcast barriers after snapshot operators' states. operatorChain.broadcastCheckpointBarrier( checkpointMetaData.getCheckpointId(), checkpointMetaData.getTimestamp() ); checkpointState(checkpointMetaData); return true; } else { return false; } } }`
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---