Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4581#discussion_r152342364
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/AsynchronousBufferFileWriter.java
 ---
    @@ -31,9 +31,26 @@ protected AsynchronousBufferFileWriter(ID channelID, 
RequestQueue<WriteRequest>
                super(channelID, requestQueue, CALLBACK, true);
        }
     
    +   /**
    +    * Writes the given block asynchronously.
    +    *
    +    * @param buffer
    +    *              the buffer to be written (will be recycled when done)
    --- End diff --
    
    good catch, but actually, `SpillableSubpartition` doesn't do any recycling 
itself: in its `finish()` method, it relies on the buffer being on-heap and 
then garbage-collected, for the `add()` function, it relies on the caller, i.e. 
`ResultPartition#add()` (which I also forgot to adapt).


---

Reply via email to