cockroachdb / cockroachdb/cockroach

crosscluster/physical: ALTER VC set replication read virtual cluster should return an error if the app tenant has not completed initial scan

Open
#147,643 3 comments 0 reactions 0 assignees View on GitHub
A-disaster-recovery branch-release-24.3 C-bug E-starter P-2 T-disaster-recovery
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

when we added https://github.com/cockroachdb/cockroach/pull/143853 we allowed users to create a reader tenant. Here in you can see that the command seemed to work but it doesn't create a second tenant, I think because the standby tenant is still in the 'initialize replication' phase. We should error this command out and provide a helpful error message.

demo@127.0.0.1:26257/movr> show virtual clusters;
id | name | data_state | service_mode
-----+-----------+--------------------------+---------------
1 | system | ready | shared
3 | mycluster | ready | shared
4 | second | initializing replication | none
(3 rows)

Time: 8ms total (execution 7ms / network 1ms)

demo@127.0.0.1:26257/movr> alter virtual cluster second set replication read virtual cluster;
ALTER VIRTUAL CLUSTER REPLICATION 0

Time: 4ms total (execution 4ms / network 1ms)

demo@127.0.0.1:26257/movr> show virtual clusters;
id | name | data_state | service_mode
-----+-----------+-------------+---------------
1 | system | ready | shared
3 | mycluster | ready | shared
4 | second | replicating | none
(3 rows)

Jira issue: CRDB-51176

Epic CRDB-52290

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.