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/14 13:01:40 UTC

[GitHub] [flink] wsry commented on a change in pull request #11877: [FLINK-16641][network] Announce sender's backlog to solve the deadlock issue without exclusive buffers

wsry commented on a change in pull request #11877:
URL: https://github.com/apache/flink/pull/11877#discussion_r425117136



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/CreditBasedSequenceNumberingViewReader.java
##########
@@ -163,8 +172,15 @@ boolean hasBuffersAvailable() {
 		return subpartitionView.isAvailable(Integer.MAX_VALUE);
 	}
 
-	@Override
-	public BufferAndAvailability getNextBuffer() throws IOException {
+	private AddBacklogMessage getAddBacklogMessage() {
+		int backlog = subpartitionView.getAndResetUnannouncedBacklog();
+		if (backlog > 0) {
+			return new AddBacklogMessage(receiverId, backlog, false);
+		}
+		return null;

Review comment:
       It can be null because of redundant data available notification.




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