drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vrozov <...@git.apache.org>
Subject [GitHub] drill pull request #934: DRILL-3449 When Foreman node dies, the FragmentExec...
Date Sun, 10 Sep 2017 05:01:45 GMT
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.


---

Mime
View raw message