You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/05/15 14:46:03 UTC

[GitHub] [flink] rkhachatryan commented on a change in pull request #12173: [FLINK-17727][task] don't create output stream with no channel state (unaligned checkpoints)

rkhachatryan commented on a change in pull request #12173:
URL: https://github.com/apache/flink/pull/12173#discussion_r425851712



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/channel/ChannelStateCheckpointWriter.java
##########
@@ -150,6 +151,12 @@ private void complete(boolean precondition, RunnableWithException complete) thro
 	}
 
 	private void finishWriteAndResult() throws IOException {
+		if (inputChannelOffsets.isEmpty() && resultSubpartitionOffsets.isEmpty()) {
+			dataStream.close();
+			result.inputChannelStateHandles.complete(emptyList());
+			result.resultSubpartitionStateHandles.complete(emptyList());
+			return;
+		}

Review comment:
       No, this is the contract of `CheckpointStateOutputStream`: `closeAndGetHandle` persists the data, while `close` removes the file.




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