AHeise commented on a change in pull request #13991:
URL: https://github.com/apache/flink/pull/13991#discussion_r524261004



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/SortMergeResultPartition.java
##########
@@ -317,7 +317,6 @@ public ResultSubpartitionView createSubpartitionView(
                                availabilityListener,
                                resultFile);
                        readers.add(reader);
-                       availabilityListener.notifyDataAvailable();

Review comment:
       Could you please also add the component name to the commit message? Also 
`This closes #13991.` should probably appear in the last commit.

##########
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:
       Do we need to return the segments to the `MemoryManager`? I guess not 
since they are unpooled.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to