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 2019/07/10 10:13:03 UTC

[GitHub] [flink] zhijiangW commented on a change in pull request #9062: [FLINK-13100][network] Fix the bug of throwing IOException while FileChannelBoundedData#nextBuffer

zhijiangW commented on a change in pull request #9062: [FLINK-13100][network] Fix the bug of throwing IOException while FileChannelBoundedData#nextBuffer
URL: https://github.com/apache/flink/pull/9062#discussion_r301988423
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/BoundedBlockingSubpartitionReader.java
 ##########
 @@ -89,9 +114,30 @@ public BufferAndBacklog getNextBuffer() throws IOException {
 		return BufferAndBacklog.fromBufferAndLookahead(current, nextBuffer, dataBufferBacklog);
 	}
 
+	/**
+	 * This method is actually only meaningful for the {@link BoundedBlockingSubpartitionType#FILE}. For the
+	 * other types the next buffer is always not null while {@link ResultSubpartitionView#getNextBuffer()},
+	 * so it is no need to notify available via this method. But the implementation is also compatible with
+	 * other types even though called by mistake.
+	 */
 	@Override
 	public void notifyDataAvailable() {
-		throw new IllegalStateException("No data should become available on a blocking partition during consumption.");
+		if (nextBuffer == null) {
 
 Review comment:
   Do you mean checking via `checkState(dataReader instanceof FileChannelBoundedData.FileBufferReader)` when next buffer is null? 

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