Github user vrozov commented on a diff in the pull request: https://github.com/apache/drill/pull/934#discussion_r137941124 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentStatusReporter.java --- @@ -113,4 +120,14 @@ void fail(final UserException ex) { sendStatus(status); } + @Override + public void close() + { + final ControlTunnel tunnel = this.tunnel.getAndSet(null); + if (tunnel != null) { + logger.debug("Closing {}", this); --- End diff -- We are closing FragmentStatusReporter, not the `tunnel` that it references. The ControlTunnel is not Closable even though it has a reference to a resource that is Closable and should provide a way to release the resource it holds. Please let me know if a comment is required here, but I do plan to make ControlTunnel Closable. As it requires code refactoring not directly related to the JIRA/PR, I plan to do this in a separate PR.
---