I want to simulate a scenario where I have to recover a cluster where some replicas are in read-only mode. What can I do to set a table replica to read-only so that the following query returns at least one line ?
SELECT
database,
`table`
FROM system.replicas
WHERE is_readonly = 1
DETACH TABLE db.table;
SYSTEM DROP REPLICA '{replica}' FROM ZKPATH ...;
ATTACH TABLE db.table;
SELECT * FROM system.replicas WHERE is_readonly = 1 FORMAT Vertical;