rkhachatryan commented on a change in pull request #12457:
URL: https://github.com/apache/flink/pull/12457#discussion_r435741797
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/channel/ChannelStateWriteRequest.java
##########
@@ -52,6 +53,10 @@ static ChannelStateWriteRequest write(long checkpointId,
InputChannelInfo info,
return buildWriteRequest(checkpointId, "writeInput", iterator,
(writer, buffer) -> writer.writeInput(info, buffer));
}
+ static ChannelStateWriteRequest write(long checkpointId,
ResultSubpartitionInfo info, Buffer... buffers) {
+ return buildWriteRequest(checkpointId, "writeOutput",
ofElements(Buffer::recycleBuffer, buffers), (writer, buffer) ->
writer.writeOutput(info, buffer));
+ }
+
Review comment:
It is using `CloseableIterator` now, which recycles on unused elements
on `close()`.
Previous version recycled all buffers in `cancel` regardless of whether they
were used or not.
----------------------------------------------------------------
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]