-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: authoritative query timeout for vttablet from vtgate #16735
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16735 +/- ##
==========================================
- Coverage 68.94% 68.93% -0.02%
==========================================
Files 1565 1565
Lines 201748 201764 +16
==========================================
- Hits 139093 139083 -10
- Misses 62655 62681 +26 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
8dc31cf
to
4451119
Compare
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
99b3c5f
to
bb03bc9
Compare
Or, actually, maybe test coverage is great, and this is why these tests are failing?
|
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
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.
Noting for self reference this usage sample:
select /*vt+ QUERY_TIMEOUT_MS=0 */ sleep(5) from dual
Still unsure about the relevance of the foreign key related changes.
@shlomi-noach |
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
### <a id="query-timeout"/>Query Timeout Override | ||
VTGate sends an authoritative query timeout to VTTablet when the `QUERY_TIMEOUT_MS` comment directive, | ||
`query_timeout` session system variable, or `query-timeout` flag is set. |
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.
`query_timeout` session system variable, or `query-timeout` flag is set. | |
`query_timeout` session system variable, or `query-timeout` flag are set. |
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.
even one of them set is enough.
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 think is
is more apt here.
Hello! 👋 This Pull Request is now handled by arewefastyet. The current HEAD and future commits will be benchmarked. You can find the performance comparison on the arewefastyet website. |
Description
This PR uses the comment directive
QUERY_TIMEOUT_MS
, session variablequery_timeout
and VTGate's flagquery-timeout
to set the query timeout on the execute options sent to vttablet.VTTablet will consider this as authoritative over VTTablet's default query timeout.
VTGate will set the execution context using the same timeout value.
QUERY_TIMEOUT_MS
will override the session value if set. If nothing is set then no timeout value will be sent down to VTTablet.Order of precedence: Query Comment > Session Value > VTGate flag.
If the query is executed inside a transaction then only the smaller value of query vs transaction timeout will be considered at VTTablet.
Related Issue(s)
Checklist