jiangxin369 commented on code in PR #23851: URL: https://github.com/apache/flink/pull/23851#discussion_r1466154957
########## flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/tiered/storage/TieredStorageMemoryManagerImpl.java: ########## @@ -335,19 +338,21 @@ private MemorySegment requestBufferBlockingFromPool() { } /** @return a memory segment from the internal buffer queue. */ - private MemorySegment requestBufferBlockingFromQueue() { + private MemorySegment requestBufferFromQueue() { CompletableFuture<Void> requestBufferFuture = new CompletableFuture<>(); scheduleCheckRequestBufferFuture( requestBufferFuture, INITIAL_REQUEST_BUFFER_TIMEOUT_FOR_RECLAIMING_MS); + hardBackpressureTimerGauge.markStart(); MemorySegment memorySegment = null; try { - memorySegment = bufferQueue.take(); + memorySegment = bufferQueue.poll(100, TimeUnit.MILLISECONDS); Review Comment: The `requestBufferBlocking` calls this method in a `while (memorySegment == null)` loop, so it would not throw NPE. But I indeed need to add a `@Nullable` annotation to this 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org