Skip to content

sql: connecting to an inactive tenant should return an error  #83650

@samiskin

Description

@samiskin

Context: https://cockroachlabs.slack.com/archives/C02HWA24541/p1656595977592689

For the purposes of streaming replication, we want to create a tenant in an inactive state such that during the entire replication process one is unable to query the state of the tenant. This way the potentially-inconsistent state as we stream SSTables over is not observable until we explicitly revert to a single Cutover timestamp that leaves the tenant's tables in a consistent state and we call sql.ActivateTenant afterwards.

At the moment #83646 creates a tenant with the descpb.TenantInfo_ADD state and calls ActivateTenant afterwards, however we are still able to open up a db connection and execute SQL queries as the tenant during the replication process.

Jira issue: CRDB-17187

Epic CRDB-26691

Metadata

Metadata

Assignees

Labels

A-tenant-streamingIncluding cluster streamingC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-multitenantIssues owned by the multi-tenant virtual team

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions