klsince opened a new pull request, #9171: URL: https://github.com/apache/pinot/pull/9171
This PR adds the support to list running queries and cancel a query as needed. As context, Pinot is typically used for low latency + high QPS scenario, so query cancellation hasn't been really needed. But as more and more data gets kept in Pinot, users might start to run exploratory queries over long time window, which may take minutes to finish. Query cancel support makes life easier to Iterate those kinda queries. Timeout is less handy here, as setting it too low aborts the query too soon; setting it too high might let query run off, if the query is not written properly (which often happens while exploring the data). The key change is the extension in QueryScheduler to track queryId <> queryFuture. Essentially, query is cancelled by calling queryFuture.cancel(), which firstly interrupts task running on pqr thread, which then interrupts tasks running on pqw threads. The other changes are used to add `GET /queries` and `DELETE /query/<queryId>` rest APIs on broker, which calls `DELETE /query/<queryId>` on servers via the MultiHttpMethod util to cancel the query that may be running on multiple servers. In this PR, each broker tracks the running queries submitted to it, and not knowing the queries tracked by other brokers. So as next step, may also add the two rest APIs on controller, so that users can have cluster wide view of the running queries and cancel them from controller. ## Release Notes ## A new config to turn on and off the query cancellation feature. pinot.query.scheduler.enable.query.cancellation, false by default -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org