pnowojski commented on a change in pull request #7911: [FLINK-11082][network] 
Fix the logic of getting backlog in sub partition
URL: https://github.com/apache/flink/pull/7911#discussion_r264636431
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/SpillableSubpartitionView.java
 ##########
 @@ -156,7 +156,8 @@ public BufferAndBacklog getNextBuffer() throws 
IOException, InterruptedException
                                checkState(nextBuffer.isFinished(),
                                        "We can only read from 
SpillableSubpartition after it was finished");
 
-                               newBacklog = 
parent.decreaseBuffersInBacklogUnsafe(nextBuffer.isBuffer());
+                               
parent.decreaseBuffersInBacklog(nextBuffer.isBuffer());
+                               newBacklog = parent.getBuffersInBacklog();
 
 Review comment:
   1. Ok, I get it now :) Thanks for pointing this out.
   
   I think that adding this extra parameter to the `decreaseBuffersInBacklog` 
would indeed be a worse solution and it's better to just use 
`getBuffersInBacklogUnsafe` here.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to