Skip to content
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

VTgate --query-timeout is ignored #13694

Closed
angelUrg opened this issue Aug 3, 2023 · 1 comment
Closed

VTgate --query-timeout is ignored #13694

angelUrg opened this issue Aug 3, 2023 · 1 comment

Comments

@angelUrg
Copy link

angelUrg commented Aug 3, 2023

Overview of the Issue

The initial problem is that we have a joins queries like this:
select a.SchemeId as Id, a.Enabled, a.SegmentId, b.CompanyName, shb.IsProfileEnabled from table1 as a join schemes as b on b.Id = a.SchemeId join table2 as shb on a.SchemeId = shb.SchemeId where a.SchemeId = 'xxx' and a.ConfigurationID = 'xxx';

This queries are creating a lot of scatter queries which we want to kill or prevent from running too long so we've tried with --query-timeout.

The query on our test environment was running for 12 seconds so we've set --query-timeout to 3000ms, restarted vtgate but and run the query again - it wasn't killed after 3 seconds, finished successfully after 12 seconds.

For the sake of the test we've changed --query-timeout to 500ms and here we had a result but it was killing 100% of the queries executed , no matter JOIN, SELECT or other.

Reproduction Steps

The part of the vschema for these tables:

{
	"sharded": true,
	"vindexes": {
		"identity_keyspace_binary": {
			"type": "binary"
		}
		"table1": {
			"columnVindexes": [{
				"column": "KeySpaceId",
				"name": "identity_keyspace_binary"
			}]
		},
		"table2": {
			"columnVindexes": [{
				"column": "KeySpaceId",
				"name": "identity_keyspace_binary"
			}]
		},

Binary Version

16.0.2

Operating System and Environment details

CentOS 7
Linux 5.15.49-linuxkit-pr
aarch64

Log Fragments

The scatter queries created by Vitess are not visible, only the one entered by us.
@angelUrg angelUrg added Needs Triage This issue needs to be correctly labelled and triaged Type: Bug labels Aug 3, 2023
@rohit-nayak-ps rohit-nayak-ps added Component: Query Serving and removed Needs Triage This issue needs to be correctly labelled and triaged labels Aug 3, 2023
@GrahamCampbell
Copy link
Contributor

I think this is happening because the timeout doesn't apply to the outer query. It is only applied to the individual queries sent to each vttablet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants