Skip to content

multitenant: tenant range endKey incorrect on tenant creation  #97985

@ecwall

Description

@ecwall

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

Metadata

Metadata

Assignees

Labels

A-multitenancyRelated to multi-tenancyC-bugCode 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)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions