jiangxin369 commented on code in PR #23957: URL: https://github.com/apache/flink/pull/23957#discussion_r1436041141
########## flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/tiered/storage/TieredStorageMemoryManagerImpl.java: ########## @@ -244,6 +282,39 @@ public void release() { ExceptionUtils.rethrow(e); } } + while (!bufferQueue.isEmpty()) { + MemorySegment segment = bufferQueue.poll(); + bufferPool.recycle(segment); + numRequestedBuffers.decrementAndGet(); + } + } + + @VisibleForTesting Review Comment: The method is for testing the behavior of requesting and releasing buffers when there is a cached `bufferQueue` in the `TieredStorageMemoryManagerImpl`. Without this method, I cannot determine whether the behavior is logical, such as whether a Buffer is requested from the pool or from the internal `bufferQueue`. -- 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