flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NicoK <...@git.apache.org>
Subject [GitHub] flink pull request #5802: [FLINK-9087] [runtime] close the BufferConsumer in...
Date Thu, 05 Apr 2018 13:02:52 GMT
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.


---

Mime
View raw message