flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] AHeise commented on a change in pull request #11507: [FLINK-16587] Add basic CheckpointBarrierHandler for unaligned checkpoint
Date Thu, 09 Apr 2020 21:01:56 GMT
AHeise commented on a change in pull request #11507: [FLINK-16587] Add basic CheckpointBarrierHandler
for unaligned checkpoint
URL: https://github.com/apache/flink/pull/11507#discussion_r406475213
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java
 ##########
 @@ -542,6 +573,16 @@ public void onBuffer(Buffer buffer, int sequenceNumber, int backlog)
throws IOEx
 			if (backlog >= 0) {
 				onSenderBacklog(backlog);
 			}
+
+			if (checkpointBarrier != null) {
+				receivedCheckpointId = checkpointBarrier.getId();
+			}
+			if (checkpointBarrier != null && inputGate.bufferReceivedListener != null) {
+				inputGate.bufferReceivedListener.notifyBarrierReceived(checkpointBarrier, channelInfo);
+			}
+			if (notifyReceivedBuffer != null && inputGate.bufferReceivedListener != null)
{
 
 Review comment:
   That's a tricky one. `receivedCheckpointId < lastRequestedCheckpointId` can only be
true if the checkpoint has been triggered through `Unaligner`, which in turn guarantees that
`bufferReceivedListener != null`. 
   
   Aside from your suggestions, we could also add this assumption to the place, where we create
`notifyReceivedBuffer` to make it more explicit. (So don't retain if `bufferReceivedListener
== null`). Then we would just trust branch prediction to effectively get rid of the check.


----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message