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: support manual splits on table boundaries for secondary tenants #65903

Open
Tracked by #73874
irfansharif opened this issue May 31, 2021 · 6 comments
Open
Tracked by #73874
Labels
A-multitenancy Related to multi-tenancy A-zone-configs C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team

Comments

@irfansharif
Copy link
Contributor

irfansharif commented May 31, 2021

Is your feature request related to a problem? Please describe.

On the host tenant, we unconditionally split on all table/index/partition boundaries. We opted not to do the same for secondary tenants as that would open us up to an order-of-magnitude more ranges in the system. Still, as secondary tenants, it may be beneficial to split on particular table boundaries for performance reasons. It will certainly be necessary when defining divergent zone configs on adjacent tables, but even that, it'd be nice for us to support. This issue is similar but not the same thing as #54254 (which talks about supporting splits within a table boundary).

Describe the solution you'd like

Supporting a form of ALTER TABLE ... SPLIT AT to allow defining manual splits on table boundaries (by splitting at the end/start of the table).

Describe alternatives you've considered

Once we support multi-tenant zone configs (#49854), users could define no-op zone configs on the tables they wish to split apart. Another option would asking users to define dummy table partitions on each table, where the partition would straddle the entire table's keyspace. This would work as long as we always split on partitions for secondary tenants (do we?).

Jira issue: CRDB-7790
Epic: CRDB-25188

@irfansharif irfansharif added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-zone-configs A-multitenancy Related to multi-tenancy labels May 31, 2021
@irfansharif
Copy link
Contributor Author

If we went with #66063, this issue would generalize to also now supporting manual splits on table boundaries for the host tenant.

@ajstorm
Copy link
Collaborator

ajstorm commented Apr 28, 2022

@irfansharif is this a duplicate of #54254??

@irfansharif
Copy link
Contributor Author

No it’s not.

@exalate-issue-sync exalate-issue-sync bot added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Jan 10, 2023
@knz
Copy link
Contributor

knz commented Mar 9, 2023

@ecwall has completed this work.

@knz knz closed this as completed Mar 9, 2023
@irfansharif irfansharif reopened this Mar 9, 2023
@irfansharif
Copy link
Contributor Author

This issue was not talking about a secondary tenant being able to use ALTER TABLE … SPLIT AT to split within a table, which the tenant capabilities work you linked internally (#94644, #95013, #95040, #96390) now lets us do. It’s talking about introducing syntax to let uses split at the end of tables explicitly, which is different. I think you meant to close #54254.

@knz
Copy link
Contributor

knz commented Mar 9, 2023

Ok thanks for explaining. But IMHO this is not a task for the multi-tenant vteam. It's a task for the KV team, as a long tail of work resulting from the enablement of range coalescing.

@rafiss rafiss added T-kv KV Team and removed T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Sep 5, 2023
@github-project-automation github-project-automation bot moved this to Incoming in KV Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-multitenancy Related to multi-tenancy A-zone-configs C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team
Projects
No open projects
Status: Incoming
Development

No branches or pull requests

6 participants