Github user adeneche commented on a diff in the pull request:
https://github.com/apache/drill/pull/460#discussion_r58650141
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/QueryResultHandler.java
---
@@ -354,17 +335,57 @@ public void success(QueryId queryId, ByteBuf buf) {
@Override
public void interrupted(final InterruptedException ex) {
- logger.warn("Interrupted while waiting for query results from
Drillbit", ex);
-
if (!isTerminal.compareAndSet(false, true)) {
+ logger.warn("Received multiple responses to run query request.");
return;
}
- closeFuture.removeListener(closeListener);
-
// Throw an interrupted UserException?
-
resultsListener.submissionFailed(UserException.systemError(ex).build(logger));
+ resultsListener.submissionFailed(UserException.systemError(ex)
--- End diff --
We shouldn't use a "system error" when we want to display a proper error
message. System errors are meant for unexpected errors that don't have a "nice"
error message yet.
This may require adding a new "client" user exception type, to make it
easier to differentiate errors that happen on the client side.
This is may be too much of a change for this pull request, so it's fine if
you just create a JIRA to address this change later, as I think there are other
places in the client code that could also throw a client error instead of a
system error.
---
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.
---