TanYuxin-tyx commented on code in PR #22960: URL: https://github.com/apache/flink/pull/22960#discussion_r1259354497
########## flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/tiered/storage/TieredStorageMemoryManagerImpl.java: ########## @@ -200,6 +201,20 @@ public int numOwnerRequestedBuffer(Object owner) { return numRequestedBuffer == null ? 0 : numRequestedBuffer.get(); } + @Override + public void transferBufferOwnership(Object oldOwner, Object newOwner, Buffer buffer) { + checkState(buffer.isBuffer(), "Only buffer supports transfer ownership."); + AtomicInteger numOldOwnerRequested = numOwnerRequestedBuffers.get(oldOwner); + if (numOldOwnerRequested == null) { + throw new RuntimeException("Failed to transfer buffer ownership for " + oldOwner); + } Review Comment: Use `decNumRequestedBuffer(oldOwner)` instead. -- 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