You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/10/30 04:33:48 UTC

[GitHub] [druid] nisart007 commented on issue #13284: Druid doesn't cancel the query request explicitly

nisart007 commented on issue #13284:
URL: https://github.com/apache/druid/issues/13284#issuecomment-1296103824

   @rohangarg Thanks for your help.
   
   Yes, you are right!! It is working fine version in 24.0 for SQL Query and native Query.
   
   Let me conclude Cancel API testing:
   
   ### Native query
   
   Long running POST request:
   
      `curl --request POST 'https://router:8888/druid/v2/sql' \ --header 'Content-Type: application/json' \   --data-raw '{"queryType":"timeseries","dataSource":{"type":"table","name":"myDataSource"},"intervals":{"type":"intervals","intervals":["2022-09-01T00:00:00.000Z/146140482-04-24T15:36:27.903Z"]},"granularity":{"type":"all"},"aggregations":[{"type":"longSum","name":"a0","fieldName":"sum_Views"}],"context":{"sqlOuterLimit":1001,"queryId":"nativeQueryId"}}'`
   
   Cancel Request:  
   
   `curl --request DELETE 'https://router:8888/druid/v2/nativeQueryId'`
   
   Cancel request returns 202 Accepted and it was successfully cancelled.
   
   
   ### SQL query (Support Druid version >=0.23.0 )
   Long running POST request:
   
   `curl --request POST 'https://router:8888/druid/v2/sql' \ --header 'Content-Type: application/json' \ --data-raw '{"query" : "SELECT COUNT(*) from MyDataSource", "context" : {"sqlQueryId" : "sqlQueryId"}}'`
   
   Cancel Request:  
   
   `curl --request DELETE 'https://router:8888/druid/v2/sql/sqlQueryId'`
   
   Cancel request returns 202 Accepted and it was successfully cancelled.
   
   #### Both Test Long Running POST response after cancel: 
   
       {
       "error": "Query cancelled",
       "errorMessage": "Future.cancel() was called.",
       "errorClass": "java.util.concurrent.CancellationException",
       "host": "10.10.10.10:8083"
       }
   
   This is not an issue hence closing it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org