pnowojski commented on a change in pull request #13499:
URL: https://github.com/apache/flink/pull/13499#discussion_r496484824



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPool.java
##########
@@ -190,6 +205,12 @@
                        subpartitionBufferRecyclers[i] = new 
SubpartitionBufferRecycler(i, this);
                }
                this.maxBuffersPerChannel = maxBuffersPerChannel;
+
+               if (checkAvailability()) {
+                       availabilityHelper.resetAvailable();
+               }
+
+               assert hasConsistentAvailability();

Review comment:
       I mean I do not see a performance benefit of avoiding a couple of 
`checkState`s on per buffer path, while it could provide some help, if bug will 
occur on some production setup only.
   
   In per record paths, I guess I would agree more with `assert`s




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


Reply via email to