This commit is contained in:
Alexander Tokmakov 2023-05-01 13:09:24 +02:00
parent 6dcfdbfaf2
commit 451f02be39
2 changed files with 1 additions and 3 deletions

View File

@ -11,8 +11,6 @@ t
2
2
rdb_default 1 1 s1 r1 1
rdb_default 1 2 s1 r2 1
rdb_default 2 1 s2 r1 1
2
2
rdb_default 1 1 s1 r1 1

View File

@ -29,7 +29,7 @@ db3="${db}_3"
$CLICKHOUSE_CLIENT --allow_experimental_database_replicated=1 -q "create database $db2 engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's1', 'r2')"
$CLICKHOUSE_CLIENT --allow_experimental_database_replicated=1 -q "create database $db3 engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's2', 'r1')"
$CLICKHOUSE_CLIENT -q "system sync database replica $db"
$CLICKHOUSE_CLIENT -q "select cluster, shard_num, replica_num, database_shard_name, database_replica_name, is_active from system.clusters where cluster='$db' order by shard_num, replica_num"
$CLICKHOUSE_CLIENT -q "select cluster, shard_num, replica_num, database_shard_name, database_replica_name, is_active from system.clusters where cluster='$db' and shard_num=1 and replica_num=1"
$CLICKHOUSE_CLIENT -q "system drop database replica 's1|r1' from database $db2" 2>&1| grep -Fac "is active, cannot drop it"
$CLICKHOUSE_CLIENT -q "detach database $db3"