multitenant: tenant range endKey incorrect on tenant creation #97985
Labels
A-multitenancy
Related to multi-tenancy
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
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
The text was updated successfully, but these errors were encountered: