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: reconsider remaining uses of DistributionTypeSystemTenantOnly #116534

Closed
stevendanna opened this issue Dec 15, 2023 · 0 comments · Fixed by #116559
Closed

sql: reconsider remaining uses of DistributionTypeSystemTenantOnly #116534

stevendanna opened this issue Dec 15, 2023 · 0 comments · Fixed by #116559
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-queries SQL Queries Team

Comments

@stevendanna
Copy link
Collaborator

stevendanna commented Dec 15, 2023

Describe the problem

Planners created with DistributionTypeSystemTenantOnly won't distribute work across SQL pods. This represents a possible performance problem for operations inside secondary tenants.

pkg/ccl/streamingccl/streamproducer/stream_lifetime.go
290:		nil /* planner */, nil /* txn */, sql.DistributionTypeSystemTenantOnly)
pkg/sql/backfill.go
1048:			txn.KV(), DistributionTypeSystemTenantOnly)
1355:				DistributionTypeSystemTenantOnly)
pkg/sql/create_stats.go
600:			DistributionTypeSystemTenantOnly)
pkg/sql/distsql_plan_ctas.go
36:		distribute = DistributionTypeSystemTenantOnly
pkg/sql/distsql_spec_exec_factory.go
78:		distribute = DistributionTypeSystemTenantOnly
pkg/sql/index_backfiller.go
196:			nil /* planner */, txn.KV(), DistributionTypeSystemTenantOnly)
pkg/sql/mvcc_backfiller.go
142:			DistributionTypeSystemTenantOnly)

Jira issue: CRDB-34659

@stevendanna stevendanna added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Dec 15, 2023
@stevendanna stevendanna added the T-sql-queries SQL Queries Team label Dec 15, 2023
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Dec 15, 2023
stevendanna added a commit to stevendanna/cockroach that referenced this issue Dec 15, 2023
Uses of DistributionTypeSystemTenantOnly represent places where UA/MT
performance may not match single-tenant performance.

This replaces all uses of DistributionTypeSystemTenantOnly with
DistributionTypeAlways.

Epic: none

Fixes cockroachdb#116534
@yuzefovich yuzefovich moved this from Triage to Active in SQL Queries Dec 19, 2023
craig bot pushed a commit that referenced this issue Mar 13, 2024
116559: sql,*: remove DistributionTypeSystemTenantOnly r=yuzefovich a=stevendanna

**sql,*: remove DistributionTypeSystemTenantOnly**

Uses of DistributionTypeSystemTenantOnly represent places where UA/MT performance may not match single-tenant performance.

This replaces all uses of DistributionTypeSystemTenantOnly with DistributionTypeAlways.

Epic: none

Fixes #116534

**sql: rename two DistributionType options**

This commit does the following renaming to better represent the options:
- `DistributionTypeNone` -> `LocalDistribution`
- `DistributionTypeAlways` -> `FullDistribution`.

Release note: None

Co-authored-by: Steven Danna <[email protected]>
Co-authored-by: Yahor Yuzefovich <[email protected]>
@craig craig bot closed this as completed in 6f8cfd7 Mar 13, 2024
@github-project-automation github-project-automation bot moved this from Active to Done in SQL Queries Mar 13, 2024
jasminejsun pushed a commit to jasminejsun/cockroach that referenced this issue Mar 18, 2024
Uses of DistributionTypeSystemTenantOnly represent places where UA/MT
performance may not match single-tenant performance.

This replaces all uses of DistributionTypeSystemTenantOnly with
DistributionTypeAlways.

Epic: none

Fixes cockroachdb#116534
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant