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

sql: override StmtTimeout to 0 for sessionless IE #129489

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

annrpom
Copy link
Contributor

@annrpom annrpom commented Aug 22, 2024

For queries issued by a sessionless internal executor,
we inherit values from cluster settings. This means
that setting a cluster-wide statement timeout will
impact processes that use a sessionless internal
executor: background jobs, db console, cloud sql
shell, etc. This behavior doesn't make sense in most
cases; so, this patch will override the statement timeout
to 0s (i.e. none).

For the cloud sql shell, this change makes sense as there
is a default payload request timeout applied to these
queries (5s).

Fixes: #126261
Release note (bug fix): Internally issued queries that are not
initiated within a SQL session no longer respect a statement timeout.
This includes: background jobs, queries issued by the db
console that perform introspection, and the cloud sql shell.

@annrpom annrpom requested review from rafiss and a team August 22, 2024 17:11
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rafiss rafiss added backport-23.2.x Flags PRs that need to be backported to 23.2. backport-24.1.x Flags PRs that need to be backported to 24.1. backport-24.2.x Flags PRs that need to be backported to 24.2 labels Aug 22, 2024
Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@annrpom annrpom marked this pull request as ready for review August 22, 2024 17:22
@annrpom annrpom requested a review from a team as a code owner August 22, 2024 17:22
@annrpom annrpom requested review from michae2 and removed request for a team August 22, 2024 17:22
@annrpom
Copy link
Contributor Author

annrpom commented Aug 22, 2024

TFTR! ('-')7

bors r=rafiss

@craig
Copy link
Contributor

craig bot commented Aug 22, 2024

Merge conflict.

For queries issued by a sessionless internal executor,
we inherit values from cluster settings. This means
that setting a cluster-wide statement timeout will
impact processes that use a sessionless internal
executor: background jobs, db console, cloud sql
shell, etc. This behavior doesn't make sense in most
cases; so, this patch will override the statement timeout
to 0s (i.e. none).

For the cloud sql shell, this change makes sense as there
is a default payload request timeout applied to these
queries (5s).

Fixes: cockroachdb#126261
Release note (bug fix): Internally issued queries that are not
initiated within a SQL session no longer respect a statement timeout.
This includes: background jobs, queries issued by the db
console that perform introspection, and the cloud sql shell.
@annrpom
Copy link
Contributor Author

annrpom commented Aug 22, 2024

bors r=rafiss

@craig craig bot merged commit 408d512 into cockroachdb:master Aug 22, 2024
21 of 23 checks passed
Copy link

blathers-crl bot commented Aug 22, 2024

Based on the specified backports for this PR, I applied new labels to the following linked issue(s). Please adjust the labels as needed to match the branches actually affected by the issue(s), including adding any known older branches.


Issue #126261: branch-release-24.2.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Copy link

blathers-crl bot commented Aug 22, 2024

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from a53bf7a to blathers/backport-release-23.2-129489: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 23.2.x failed. See errors above.


error creating merge commit from a53bf7a to blathers/backport-release-24.1-129489: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 24.1.x failed. See errors above.


error creating merge commit from a53bf7a to blathers/backport-release-24.2-129489: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 24.2.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.2.x Flags PRs that need to be backported to 23.2. backport-24.1.x Flags PRs that need to be backported to 24.1. backport-24.2.x Flags PRs that need to be backported to 24.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

backfill: override statement_timeout to 0 in VERIFY INDEX job
3 participants