[
https://issues.apache.org/jira/browse/FLINK-9087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16426882#comment-16426882
]
ASF GitHub Bot commented on FLINK-9087:
---------------------------------------
Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/5802#discussion_r179451610
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/RecordWriter.java
---
@@ -164,7 +164,7 @@ public BufferConsumer broadcastEvent(AbstractEvent
event) throws IOException {
if (flushAlways) {
flushAll();
}
- return eventBufferConsumer;
--- End diff --
You don't need to close the `eventBufferConsumer` since the
try-with-resources should already do that. Returning the closed value, however,
is kind of strange and only needed in one test. Let's make the method return
`void` as you suggested and adapt the test.
> Return value of broadcastEvent should be closed in
> StreamTask#performCheckpoint
> -------------------------------------------------------------------------------
>
> Key: FLINK-9087
> URL: https://issues.apache.org/jira/browse/FLINK-9087
> Project: Flink
> Issue Type: Bug
> Reporter: Ted Yu
> Priority: Minor
>
> {code}
> for (StreamRecordWriter<SerializationDelegate<StreamRecord<OUT>>>
> streamRecordWriter : streamRecordWriters) {
> try {
> streamRecordWriter.broadcastEvent(message);
> {code}
> The BufferConsumer returned by broadcastEvent() should be closed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)