[NO ISSUE][OTH] Cancel Query on interrupt
- user model changes: no
- storage format changes: no
- interface changes: no
details:
- Cancel queries that are submitted through NC query service in
the event of interrupt.
Change-Id: I287f8f605afe432b4459ae536941e4708dac18af
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1976
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Xikui Wang <xkkwww@gmail.com>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
index ef49c35..69e995b 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
@@ -85,7 +85,7 @@
try {
responseMsg = (ExecuteStatementResponseMessage) responseFuture.get(timeout,
java.util.concurrent.TimeUnit.MILLISECONDS);
- } catch (TimeoutException exception) {
+ } catch (InterruptedException | TimeoutException exception) {
RuntimeDataException hde = new RuntimeDataException(ErrorCode.QUERY_TIMEOUT, exception);
// cancel query
cancelQuery(ncMb, ncCtx.getNodeId(), param.clientContextID, hde);