Github user pnowojski commented on a diff in the pull request:
https://github.com/apache/flink/pull/4581#discussion_r148531290
--- 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 --
Shouldn't this contract be in `BlockChannelWriterWithCallback`? Now it's
kind of strange that recycle is implementation dependent. Especially that
`SpillableSubpartition` is using `BufferFileWriter` and still depends on
recycling.
---