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



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/BufferManager.java
##########
@@ -349,7 +373,7 @@ int unsynchronizedGetFloatingBuffersAvailable() {
                 */
                int addExclusiveBuffer(Buffer buffer, int numRequiredBuffers) {
                        exclusiveBuffers.add(buffer);
-                       if (getAvailableBufferSize() > numRequiredBuffers) {
+                       if (numRequiredBuffers == 0) {

Review comment:
       It should not be changed here. If the `numRequiredBuffers` is 0, 
`getAvailableBufferSize()` must be more than it. If `numRequiredBuffers` is `1` 
or something else, as long as the `getAvailableBufferSize()` is more than it, 
we also need to release a floating buffer.




----------------------------------------------------------------
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:
[email protected]


Reply via email to