johnyangk commented on a change in pull request #223: [NEMO-388] Off-heap
memory management (reuse ByteBuffer)
URL: https://github.com/apache/incubator-nemo/pull/223#discussion_r310455617
##########
File path:
runtime/executor/src/main/java/org/apache/nemo/runtime/executor/bytetransfer/ByteOutputContext.java
##########
@@ -247,8 +246,24 @@ private void writeDataFrame(final Object body, final long
length) throws IOExcep
throw new IOException("Stream already closed.");
}
channel.writeAndFlush(DataFrameEncoder.DataFrame.newInstance(getContextId(),
body, length, newSubStream))
+ .addListener((ChannelFutureListener) future -> {
+ if (future.isSuccess()) {
Review comment:
I think this should be removed, since we want to release upon not only
success but also failure and cancellation. The listener will be invoked upon
future.isDone(), so no check should be needed at all. (I read the ChannelFuture
documentation)
----------------------------------------------------------------
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]
With regards,
Apache Git Services