vitess icon indicating copy to clipboard operation
vitess copied to clipboard

Bug Report: Query timeout applies only on Route and not on the entire query execution

Open GuptaManan100 opened this issue 6 months ago • 0 comments

Overview of the Issue

Currently, the query timeout expressed by the --query-timeout flag, query_timeout session variable and Query_timeout_ms comment directive only applies to the query execution on the routes and not the entire execution of the query. This is not the correct behavior, since if the query is running with a timeout of 3 seconds, and is running a join that can potentially run 100s of select queries each taking about a second. Ideally, this query should timeout after 3 seconds, but currently it would continue to run and would not timeout since we only add the 3 second timeout to the routes, and they all run under a second, even if the entire execution takes much longer.

Reproduction Steps

  1. Set up a cluster
  2. Run a query that has multiple joins with a timeout such that total execution time is more than the timeout.

Binary Version

main

Operating System and Environment details

-

Log Fragments

No response

GuptaManan100 avatar Aug 21 '24 11:08 GuptaManan100