You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by ppadma <gi...@git.apache.org> on 2017/06/20 23:07:16 UTC

[GitHub] drill pull request #857: DRILL-5599: Notify StatusHandler that batch sending...

Github user ppadma commented on a diff in the pull request:

    https://github.com/apache/drill/pull/857#discussion_r123118764
  
    --- Diff: exec/rpc/src/main/java/org/apache/drill/exec/rpc/RequestIdMap.java ---
    @@ -111,13 +111,16 @@ public RpcListener(RpcOutcomeListener<T> handler, Class<T> clazz, int coordinati
     
         @Override
         public void operationComplete(ChannelFuture future) throws Exception {
    -
           if (!future.isSuccess()) {
    -        removeFromMap(coordinationId);
    -        if (future.channel().isActive()) {
    -          throw new RpcException("Future failed");
    -        } else {
    -          setException(new ChannelClosedException());
    +        try {
    +          removeFromMap(coordinationId);
    +        } finally {
    +          final Throwable cause = future.cause();
    +          if (future.channel().isActive()) {
    +            setException(cause == null ? new RpcException("Future has failed") : cause);
    --- End diff --
    
    overall, LGTM.  Some minor comments.


---
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.
---