abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][OTH] Cancel Query on interrupt
......................................................................


[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 <[email protected]>
Reviewed-by: Xikui Wang <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Anon. E. Moose #1000171: 
  Jenkins: Verified; No violations found; Verified
  Xikui Wang: Looks good to me, approved

Objections:
  Jenkins: 



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

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1976
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I287f8f605afe432b4459ae536941e4708dac18af
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Xikui Wang <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>

Reply via email to