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
- 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
Assessment
This issue has not been assessed yet.