test replication lag metric

This commit is contained in:
Michael Stetsyuk 2024-07-19 14:30:27 +02:00
parent a6d4db342b
commit 3f66b39a18
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,4 @@
0
2
0
2

View File

@ -0,0 +1,9 @@
CREATE DATABASE rdb1 ENGINE = Replicated('/test/test_replication_lag_metric', 'shard1', 'replica1');
CREATE DATABASE rdb2 ENGINE = Replicated('/test/test_replication_lag_metric', 'shard1', 'replica2');
SET distributed_ddl_task_timeout = 0;
CREATE TABLE rdb1.t (id UInt32) ENGINE = ReplicatedMergeTree ORDER BY id;
SELECT replication_lag FROM system.clusters;
DROP DATABASE rdb1;
DROP DATABASE rdb2;