Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4844#discussion_r147162652
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
 ---
    @@ -1270,6 +1272,42 @@ public void run() {
        }
     
        /**
    +    * Discards the given pending checkpoint because of the given cause.
    +    *
    +    * @param pendingCheckpoint to discard
    +    * @param cause for discarding the checkpoint
    +    */
    +   private void discardCheckpoint(PendingCheckpoint pendingCheckpoint, 
@Nullable Throwable cause) {
    +           Thread.holdsLock(lock);
    --- End diff --
    
    Should that be an `assert(Thread.holdsLock(lock));` or a 
`Preconditions.checkState(Thread.holdsLock(lock));`?


---

Reply via email to