akalash commented on a change in pull request #15885:
URL: https://github.com/apache/flink/pull/15885#discussion_r642547588
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/BufferWritingResultPartition.java
##########
@@ -348,6 +348,7 @@ private void finishUnicastBufferBuilder(int
targetSubpartition) {
if (bufferBuilder != null) {
numBytesOut.inc(bufferBuilder.finish());
numBuffersOut.inc();
+ bufferBuilder.recycle();
Review comment:
Yes, unfortunately, we need both because in case of calling `close()` on
exception we want to recycle buffer but don't want to finish it. In fact, I see
only one place where we definitely should distinguish these methods so maybe it
will be possible to reduce it to one method but I am still not sure.
--
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]