zhijiangW commented on a change in pull request #11877:
URL: https://github.com/apache/flink/pull/11877#discussion_r422466188



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java
##########
@@ -428,6 +423,23 @@ public void notifyBufferDestroyed() {
                // Nothing to do actually.
        }
 
+       @Override
+       public void onCheckpointBarrier(CheckpointBarrier barrier) {

Review comment:
       Make the following condition out of `synchronized` part, then we do not 
need to touch the lock for most of the cases.
   ```
   CheckpointOptions options = barrier.getCheckpointOptions();
   if (!(initialCredit == 0 && options.isExactlyOnceMode() && 
!options.isUnalignedCheckpoint()))  {
        return;
   }
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to