-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: add distsql_prevent_partitioning_soft_limited_scans #160051
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
Conversation
253afed to
f0d8984
Compare
f0d8984 to
5bd125d
Compare
5bd125d to
7185b36
Compare
yuzefovich
left a comment
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 could see us backporting both commits to 26.1. It's an innovation release after all, so it might be more stable to tweak the default in 26.1 as opposed to 26.2. Thoughts?
@yuzefovich reviewed 13 files and all commit messages, and made 2 comments.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @michae2 and @mw5h).
pkg/sql/vars.go line 4533 at r1 (raw file):
// CockroachDB extension. `prevent_partitioning_soft_limit_table_readers`: {
nit: I think the session var should have distsql_ prefix. How about something like distsql_soft_limit_single_table_reader_enabled?
Add a setting to the physical planner which prevents partitioning of soft-limited scans, to make them match hard-limited scans. This makes them lazier. Fixes: cockroachdb#160530 Release note (performance improvement): Add a new session variable, `distsql_prevent_partitioning_soft_limited_scans`, which, when true, prevents scans with soft limits from being planned as multiple TableReaders by the physical planner. This should decrease the initial setup costs of some fully-distributed query plans.
Release note (performance improvement): enable setting `distsql_prevent_partitioning_soft_limited_scans` by default.
7185b36 to
7fda5a4
Compare
michae2
left a comment
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.
TFTR! For now I'm only planning to backport the first commit.
bors r=yuzefovich
@michae2 made 2 comments.
Reviewable status:complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @mw5h and @yuzefovich).
pkg/sql/vars.go line 4533 at r1 (raw file):
Previously, yuzefovich (Yahor Yuzefovich) wrote…
nit: I think the session var should have
distsql_prefix. How about something likedistsql_soft_limit_single_table_reader_enabled?
I went with distsql_prevent_partitioning_soft_limited_scans, hope you don't mind it too much.
|
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 #160530: branch-release-25.2, branch-release-25.2.11-rc, branch-release-25.3, branch-release-25.3.7-rc, branch-release-25.4, branch-release-25.4.3-rc, branch-release-26.1. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
|
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 57ed28d to blathers/backport-release-25.2-160051: 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 25.2.x failed. See errors above. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 57ed28d to blathers/backport-release-25.3-160051: 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 25.3.x failed. See errors above. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 57ed28d to blathers/backport-release-25.4-160051: 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 25.4.x failed. See errors above. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 57ed28d to blathers/backport-release-25.2.11-rc-160051: 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 25.2.11-rc failed. See errors above. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 57ed28d to blathers/backport-release-25.3.7-rc-160051: 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 25.3.7-rc failed. See errors above. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 57ed28d to blathers/backport-release-25.4.3-rc-160051: 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 25.4.3-rc failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
|
Sounds good to me! I also have fragmented sleep right now, so I'll help with creating the RC backports 😃 |
sql: add distsql_prevent_partitioning_soft_limited_scans
Add a setting to the physical planner which prevents partitioning of soft-limited scans, to make them match hard-limited scans. This makes them lazier.
Fixes: #160530
Release note (performance improvement): Add a new session variable,
distsql_prevent_partitioning_soft_limited_scans, which, when true, prevents scans with soft limits from being planned as multiple TableReaders by the physical planner. This should decrease the initial setup costs of some fully-distributed query plans.sql: enable distsql_prevent_partitioning_soft_limited_scans by default
Release note (performance improvement): enable setting
distsql_prevent_partitioning_soft_limited_scansby default.