flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NicoK <...@git.apache.org>
Subject [GitHub] flink pull request #4581: [FLINK-7499][io] also let AsynchronousBufferFileWr...
Date Tue, 21 Nov 2017 17:10:53 GMT
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).


---

Mime
View raw message