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/11 08:54:13 UTC

[GitHub] [flink] AHeise commented on a change in pull request #12072: [FLINK-17580][checkpointing] Fix NPE in unaligned checkpoint after EndOfPartition events

AHeise commented on a change in pull request #12072:
URL: https://github.com/apache/flink/pull/12072#discussion_r422886479



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTaskNetworkInput.java
##########
@@ -210,12 +210,15 @@ public int getInputIndex() {
 			final InputChannel channel = checkpointedInputGate.getChannel(channelIndex);
 
 			// Assumption for retrieving buffers = one concurrent checkpoint
-			recordDeserializers[channelIndex].getUnconsumedBuffer().ifPresent(buffer ->
-				channelStateWriter.addInputData(
-					checkpointId,
-					channel.getChannelInfo(),
-					ChannelStateWriter.SEQUENCE_NUMBER_UNKNOWN,
-					buffer));
+			RecordDeserializer<?> deserializer = recordDeserializers[channelIndex];
+			if (deserializer != null) {

Review comment:
       Yes, I'm not a big fan of using `IOException`s everywhere, especially for unrecoverable issues. So your suggestion makes lots of sense.
   But I'd also like to avoid larger refactorings right now (and `DataOutputSerializer` is used at various places), when it can be easily avoided as above. I'm assuming the quest for a more functional style takes a long time with the current exception handling as is.




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