pnowojski commented on a change in pull request #17037:
URL: https://github.com/apache/flink/pull/17037#discussion_r698277969
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPool.java
##########
@@ -216,9 +220,10 @@
// Lock is only taken, because #checkAvailability asserts it. It's a
small penalty for
// thread safety.
synchronized (this.availableMemorySegments) {
- if (checkAvailability()) {
- availabilityHelper.resetAvailable();
- }
+ // guarantee that we have one buffer on initialization
Review comment:
1. Can you expand the java doc why is it important? Also maybe mention
the difference between input and output?
2. Can you respect here `numberOfRequiredMemorySegments`? If this value is
zero, we should probably skip requesting.
3. Can you also keep the best effort code `checkAvailability()` that was
requesting all buffers at once if they were available?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]