Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Enable query cancellation for MSQE + cancel using client-provided id #14823
Enable query cancellation for MSQE + cancel using client-provided id #14823
Changes from 18 commits
f7a9488
39a4f94
c969abd
8162bc6
aa8c120
7a5f713
a9d1e49
97e7b5d
65f73a0
e3a9a5e
fe5c846
ae3260c
2eb506e
5dd5409
e9bbdac
9dcc393
5ac7d9e
a46659c
110fb16
47fb9bb
52998d3
e2678af
c201cf4
c60b953
6042ad2
b458a5b
9d0f335
1e00bf6
d3061ba
a0e1e83
d0e6393
5e58284
f8d23cd
f4ad417
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can we document from what to what are we mapping here?
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.
Sure e2678af
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.
Please use javadoc to document 😆
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.
My bad f8d23cd
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.
It is not something we introduced in this PR, but something I think we need to take care of in the future:
We use BaseBrokerRequestHandler as the root/common state for the broker, probably for historical reasons. But that is not true. A single broker may have SSE, MSE, GRPC and even TSE queries running at the same time. It would be a better design to have a shared state between them instead of the trick we do with the delegate.
This is something we need to improve in the future
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.
I agree with the shared state refactor, we should write it down somewhere so we actually do it ;-)
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.
We need javadoc here to explain how it should work. At least we should say that queryId may be a client or pinot generated id.
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.
Actually the
queryId
received here always refers to a broker-generated internal id. TheclientQueryId -> brokerQueryId
translation is done byBaseBrokerRequestHandler.cancelQueryByClientId
.Added some minimal javadoc here: 52998d3
I tried to mimic the current code design for
handleRequest
, but it is a bit confusing the existance of twohandleRequest
methods here:SqlNodeAndOptions
parameter.requestId
and thequery
's string itself.To increase confusion, neither of the two methods have a javadoc.
This probably could get better designed if we move forward with the proposed shared state design.