feat: authoritative query timeout for vttablet from vtgate#16735
feat: authoritative query timeout for vttablet from vtgate#16735harshit-gangal merged 15 commits intovitessio:mainfrom
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
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>
@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.
| `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.
even one of them set is enough.
There was a problem hiding this comment.
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_timeoutand VTGate's flagquery-timeoutto 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_MSwill 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