drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudheeshkatkam <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-3743: Fail active listeners if server co...
Date Tue, 05 Apr 2016 18:08:50 GMT
Github user sudheeshkatkam commented on a diff in the pull request:

    https://github.com/apache/drill/pull/460#discussion_r58587275
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/QueryResultHandler.java
---
    @@ -278,49 +297,31 @@ public void queryIdArrived(QueryId queryId) {
     
       private class SubmissionListener extends BaseRpcOutcomeListener<QueryId> {
         private final UserResultsListener resultsListener;
    -    private final RemoteConnection connection;
    -    private final ChannelFuture closeFuture;
    -    private final ChannelClosedListener closeListener;
         private final AtomicBoolean isTerminal = new AtomicBoolean(false);
     
    -    public SubmissionListener(RemoteConnection connection, UserResultsListener resultsListener)
{
    -      super();
    +    public SubmissionListener(UserResultsListener resultsListener) {
           this.resultsListener = resultsListener;
    -      this.connection = connection;
    -      this.closeFuture = connection.getChannel().closeFuture();
    -      this.closeListener = new ChannelClosedListener();
    -      closeFuture.addListener(closeListener);
    -    }
    -
    -    private class ChannelClosedListener implements GenericFutureListener<Future<Void>>
{
    -
    -      @Override
    -      public void operationComplete(Future<Void> future) throws Exception {
    -        resultsListener.submissionFailed(UserException.connectionError()
    -            .message("Connection %s closed unexpectedly.", connection.getName())
    -            .build(logger));
    -      }
    -
         }
     
         @Override
         public void failed(RpcException ex) {
           if (!isTerminal.compareAndSet(false, true)) {
    +        logger.warn("Received multiple outcomes (success/failure) while submitting query.");
             return;
           }
     
    -      closeFuture.removeListener(closeListener);
    -      resultsListener.submissionFailed(UserException.systemError(ex).build(logger));
    -
    +      resultsListener.submissionFailed(UserException.systemError(ex)
    +          .message("Unexpected failure while submitting query to a Drillbit.")
    --- End diff --
    
    will update.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message