2022-12-19 11:21:19 +00:00
|
|
|
-- Tags: long, zookeeper, no-replicated-database, no-polymorphic-parts, no-random-merge-tree-settings
|
2021-09-12 12:35:27 +00:00
|
|
|
-- Tag no-replicated-database: Fails due to additional replicas or shards
|
|
|
|
|
2022-11-10 12:14:04 +00:00
|
|
|
SET insert_keeper_fault_injection_probability=0; -- disable fault injection; part ids are non-deterministic in case of insert retries
|
|
|
|
|
|
|
|
drop table if exists rmt sync;
|
2021-08-27 06:39:08 +00:00
|
|
|
-- cleanup code will perform extra Exists
|
|
|
|
-- (so the .reference will not match)
|
2023-05-22 17:07:18 +00:00
|
|
|
create table rmt (n int) engine=ReplicatedMergeTree('/test/01158/{database}/rmt', '1') order by n settings cleanup_delay_period=86400, max_cleanup_delay_period=86400, replicated_can_become_leader=0;
|
2021-07-13 19:01:43 +00:00
|
|
|
system sync replica rmt;
|
2021-07-09 14:05:35 +00:00
|
|
|
insert into rmt values (1);
|
|
|
|
insert into rmt values (1);
|
2022-11-10 12:14:04 +00:00
|
|
|
system sync replica rmt;
|
2021-07-09 14:05:35 +00:00
|
|
|
system flush logs;
|
|
|
|
|
|
|
|
select 'log';
|
2021-08-26 21:41:06 +00:00
|
|
|
select address, type, has_watch, op_num, path, is_ephemeral, is_sequential, version, requests_size, request_idx, error, watch_type,
|
2021-07-09 14:05:35 +00:00
|
|
|
watch_state, path_created, stat_version, stat_cversion, stat_dataLength, stat_numChildren
|
2022-07-14 08:01:20 +00:00
|
|
|
from system.zookeeper_log where path like '/test/01158/' || currentDatabase() || '/rmt/log%' and op_num not in (3, 4, 12, 500)
|
2021-07-09 14:05:35 +00:00
|
|
|
order by xid, type, request_idx;
|
|
|
|
|
|
|
|
select 'parts';
|
|
|
|
select type, has_watch, op_num, path, is_ephemeral, is_sequential, version, requests_size, request_idx, error, watch_type,
|
|
|
|
watch_state, path_created, stat_version, stat_cversion, stat_dataLength, stat_numChildren
|
|
|
|
from system.zookeeper_log
|
2022-10-31 18:20:58 +00:00
|
|
|
where (session_id, xid) in (select session_id, xid from system.zookeeper_log where path='/test/01158/' || currentDatabase() || '/rmt/replicas/1/parts/all_0_0_0')
|
2021-07-09 14:05:35 +00:00
|
|
|
order by xid, type, request_idx;
|
|
|
|
|
|
|
|
select 'blocks';
|
|
|
|
select type, has_watch, op_num, path, is_ephemeral, is_sequential, version, requests_size, request_idx, error, watch_type,
|
|
|
|
watch_state, path_created, stat_version, stat_cversion, stat_dataLength, stat_numChildren
|
|
|
|
from system.zookeeper_log
|
2022-11-07 19:27:18 +00:00
|
|
|
where (session_id, xid) in (select session_id, xid from system.zookeeper_log where path like '/test/01158/' || currentDatabase() || '/rmt/blocks/%' and op_num not in (1, 12, 500))
|
2021-07-09 14:05:35 +00:00
|
|
|
order by xid, type, request_idx;
|
|
|
|
|
2022-11-10 12:14:04 +00:00
|
|
|
drop table rmt sync;
|
2022-07-28 19:03:13 +00:00
|
|
|
|
|
|
|
system flush logs;
|
|
|
|
select 'duration_ms';
|
|
|
|
select count()>0 from system.zookeeper_log where path like '/test/01158/' || currentDatabase() || '/rmt%' and duration_ms > 0;
|