pnowojski commented on code in PR #21131:
URL: https://github.com/apache/flink/pull/21131#discussion_r1008052894


##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/channel/ChannelStateWriteRequestDispatcherImpl.java:
##########
@@ -98,18 +120,19 @@ private ChannelStateCheckpointWriter 
buildWriter(CheckpointStartRequest request)
                 streamFactoryResolver.resolveCheckpointStorageLocation(
                         request.getCheckpointId(), 
request.getLocationReference()),
                 serializer,
-                () -> writers.remove(request.getCheckpointId()));
+                () -> this.writer = null);

Review Comment:
   shouldn't you check here if this is the correct writer? Could it happen that 
the `this.writer` got reseted for a newer checkpoint but this callback happens 
later, reseting the field back to `null`? If this can not happen, it would be 
nice to at least have a `checkState` to make sure it's not happening? 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to