nisart007 opened a new issue, #13284:
URL: https://github.com/apache/druid/issues/13284

   
   ### Affected Version
   
   Druid Version :0.22.1
   
   ### Description
   
   In my usecase I am using Druid data on dasboard with UI cancel option, so 
that user can cancel the request explicitly and run the next query.
   
   I was testing the way mentioned on the Druid doc  
https://druid.apache.org/docs/latest/querying/sql-api.html#cancel-a-query
   
   ### Test 1
   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" : "myQuery01"}}'`
   
   Cancel Request:
   `curl --request DELETE 'https://router:8888/druid/v2/sql/myQuery01'`
   
   I was expecting as soon I run the Cancel curl request then long running 
request should be interupted. But nothing happening.
   Cancel request always return **404** http status, I was expecting **202** as 
per the doc.
   
   Where as following endpoint always return **202** even the query is not 
running or queryid is not present in druid system as well, which is wrong too.
   `curl --request DELETE 'https://router:8888/druid/v2/myQuery01'`
   (Removed /sql from the URL)
   
   ### Test 2
   To be more precise I have added timeout 60 seconds also in the query context 
and run cancel/delete request many times before 60 seconds.
   
   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" : "myQuery01", "timeout": 60000}}}'`
   
   Finally long running request query timeout happend and I got:
   
   ```
   {
   "error": "Query timeout",
   "errorMessage": "Query [cacb33d5-f575-44c0-8672-de364e827382] timed out!",
   "errorClass": "org.apache.druid.query.QueryTimeoutException",
   "host": "[10.10.10.10:8083](http://10.10.10.10:8083/)"
   }
   
   ```
   **Still cancel request always returning 404.**
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to