pnowojski commented on a change in pull request #9993:
[FLINK-14498][runtime]Introduce NetworkBufferPool#isAvailable() for interacting
with LocalBufferPool.
URL: https://github.com/apache/flink/pull/9993#discussion_r341203502
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPool.java
##########
@@ -231,25 +230,39 @@ private BufferBuilder toBufferBuilder(MemorySegment
memorySegment) {
@Nullable
private MemorySegment requestMemorySegment(boolean isBlocking) throws
InterruptedException, IOException {
+ if (!isBlocking) {
Review comment:
Sorry for adding a bit more of the confussion, but I just spotted one more
thing: `requestMemorySegment(boolean isBlocking)` is actually used only in two
places, one blockingly and the other non blocking. I think we can get rid of
this `if (!isBlocking)` condition by simply inlining this method.
Also it would also get rid of the ugly `try/catch(InterruptedException)` in
the non blocking method.
----------------------------------------------------------------
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]
With regards,
Apache Git Services