-
Notifications
You must be signed in to change notification settings - Fork 4.1k
multitenant: tenant range endKey incorrect on tenant creation #97985
Copy link
Copy link
Closed
Labels
A-multitenancyRelated to multi-tenancyRelated to multi-tenancyC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Description
When a tenant is created, its last range's endkey is Max instead of the startKey of the next tenant. This is automatically corrected by the reconciler later on (see https://github.com/cockroachdb/cockroach/pull/95100/files#diff-58b36925f72a8a1d1f9b496bdd458b2edd6846835ba6fb1717b1e7abc1d0e9e9R19).
As a temporary workaround TestTenant.WaitForTenantEndKeySplit was added as part of #95100 for tests (e.g. sql_keys logic test) that need the "correct" tenant range endKey (the next tenant's startKey instead of Max).
It would be better to handle this by making sure the tenant's last range's endKey is the tenant keyspace's endKey during tenant creation.
Jira issue: CRDB-25003
Epic: CRDB-23559
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-multitenancyRelated to multi-tenancyRelated to multi-tenancyC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)