-
Notifications
You must be signed in to change notification settings - Fork 209
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
feat: add timeout for query #539
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jiacai2050
commented
Jan 6, 2023
jiacai2050
commented
Jan 6, 2023
58ef183
to
f83ad02
Compare
ShiKaiWi
reviewed
Jan 9, 2023
309530f
to
280b89c
Compare
fb32430
to
cfce16f
Compare
ShiKaiWi
reviewed
Jan 9, 2023
ShiKaiWi
approved these changes
Jan 10, 2023
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.
LGTM
chunshao90
pushed a commit
to chunshao90/ceresdb
that referenced
this pull request
May 15, 2023
* add timeout when collect * add timeout control for memtable scan and sst scan * add timeout for user-facing service, like grpc, http * add timeout in top level execute * remove deadline from sst options * timeout http handle at top level * refactor timeout to Option * add check_deadline in InstantExt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Which issue does this PR close?
Closes #165
Rationale for this change
See issue above
This PR only support set timeout in config file, will support set timeout in request level in next PR.
What changes are included in this PR?
In principle, if all operations are async/await, we can just timeout at the beginning of query, but it's not that ideal in real case, there maybe exists
AnalyzeExec
,CoalescePartitionsExec
,HashAggregateExec
datafusion#1121So we have to add timeout detect in those cases beside top-level timeout. AKAIK, there are two places need special handling:
When implement this feature, I also find TableProvider is wrongly cached, please see comments in
Are there any user-facing changes?
No
How does this change test
Existing UT, and manually test a large table with
select count(1) from cpu;
, it will return following error after 5s timeout