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 [email protected] or file a JIRA ticket
with INFRA.
---