wsry commented on a change in pull request #13991:
URL: https://github.com/apache/flink/pull/13991#discussion_r524276107
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/SortMergeSubpartitionReader.java
##########
@@ -138,7 +138,9 @@ public void notifyDataAvailable() {
@Override
public void recycle(MemorySegment segment) {
- readBuffers.add(segment);
+ if (!isReleased) {
+ readBuffers.add(segment);
+ }
Review comment:
You are right, the buffers are unpooled so we do not need to return the
segments to the ```MemoryManager```.
----------------------------------------------------------------
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]