pnowojski commented on code in PR #19723: URL: https://github.com/apache/flink/pull/19723#discussion_r876818823
########## flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/channel/ChannelStateWriteRequest.java: ########## @@ -103,18 +104,21 @@ static ChannelStateWriteRequest buildFutureWriteRequest( checkBufferIsBuffer(buffer); bufferConsumer.accept(writer, buffer); } - } catch (Throwable e) { + } catch (ExecutionException e) { writer.fail(e); } }, throwable -> { - List<Buffer> buffers = dataFuture.get(); - if (buffers == null || buffers.isEmpty()) { - return; + try { + List<Buffer> buffers = dataFuture.get(); + if (buffers == null || buffers.isEmpty()) { + return; + } + CloseableIterator<Buffer> iterator = + CloseableIterator.fromList(buffers, Buffer::recycleBuffer); + iterator.close(); + } catch (ExecutionException ignored) { Review Comment: You shouldn't be modifying the code that you have added in the same pr in another commit. As in our [coding style guideline](https://flink.apache.org/contributing/code-style-and-quality-pull-requests.html#separate-refactoring-cleanup-and-independent-changes): > There should be no cleanup commits that fix issues that have been introduced in previous commits of the same PR. Commits should be clean in themselves. Why do you even need to handle exceptions here? The pre-existing `buildWriteRequest()` does nothing like that. -- 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org