-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add clientQueryId and its cancel operation #14823
base: master
Are you sure you want to change the base?
Conversation
} | ||
String clientQueryId = extractClientQueryId(sqlNodeAndOptions); | ||
if (StringUtils.isBlank(clientQueryId)) { | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) in general we don't recommend returning NULL as a coding practice
Is ClientQueryID a new concept? Is it same as requestID ? How does the support added here improve the existing Query Cancellation (which is also exposed to user IIRC) ? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14823 +/- ##
============================================
+ Coverage 61.75% 63.75% +2.00%
- Complexity 207 1611 +1404
============================================
Files 2436 2708 +272
Lines 133233 151316 +18083
Branches 20636 23355 +2719
============================================
+ Hits 82274 96468 +14194
- Misses 44911 47606 +2695
- Partials 6048 7242 +1194
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Hi Siddharth, AFAIK, the current cancellation feature depends on the internal requestId generated by the broker itself. That request id is not returned until the query completes, so an external user requires first to ask for the active running queries, determine from the responded array the requestId assigned to the one he's interested in (just comparing the query body) and finally use the cancel operation to abort it. That's two back-and-forth trips between the user and the cluster. With a client-provided requestId he can skip one step, going straight to the cancel operation using his own ID to abort the query. |
Adds the option to provide a "clientQueryId" as a QueryOption and eventually use it to cancel the running query.