drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #857: DRILL-5599: Notify StatusHandler that batch sending...
Date Wed, 21 Jun 2017 01:28:06 GMT
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/857#discussion_r123135561
  
    --- 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 --
    
    I think the point is that the message is not sent to the end user, or written to the log.
Rather, it is letting the listener know that the send failed. There is a reason for the failure.
Ideally the `cause` is the real reason.
    
    Still it would be good if we were to log such failures. So, maybe "Unknown channel failure"
or some such might be helpful. Probably the developer will search the code to find where we
raise that exception, so the message just has to be unique...


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