2021-09-12 12:35:27 +00:00
|
|
|
-- Tags: no-parallel, no-fasttest
|
|
|
|
-- Tag no-fasttest: Look at DistributedFilesToInsert, so cannot run in parallel.
|
|
|
|
|
2020-08-27 19:00:35 +00:00
|
|
|
-- otherwise SYSTEM STOP DISTRIBUTED SENDS does not makes any effect (for localhost)
|
|
|
|
-- (i.e. no .bin files and hence no sending is required)
|
|
|
|
set prefer_localhost_replica=0;
|
|
|
|
|
|
|
|
drop table if exists data_01460;
|
|
|
|
drop table if exists dist_01460;
|
|
|
|
|
|
|
|
create table data_01460 as system.one engine=Null();
|
2021-07-16 01:08:59 +00:00
|
|
|
create table dist_01460 as data_01460 engine=Distributed(test_shard_localhost, currentDatabase(), data_01460) settings monitor_sleep_time_ms=50;
|
2020-08-27 19:00:35 +00:00
|
|
|
|
|
|
|
select 'INSERT';
|
|
|
|
select value from system.metrics where metric = 'DistributedFilesToInsert';
|
|
|
|
insert into dist_01460 select * from system.one;
|
2021-07-16 01:08:59 +00:00
|
|
|
select sleep(1) format Null; -- monitor_sleep_time_ms
|
2020-08-27 19:00:35 +00:00
|
|
|
select value from system.metrics where metric = 'DistributedFilesToInsert';
|
|
|
|
|
|
|
|
select 'STOP/START DISTRIBUTED SENDS';
|
|
|
|
system stop distributed sends dist_01460;
|
|
|
|
insert into dist_01460 select * from system.one;
|
2021-07-16 01:08:59 +00:00
|
|
|
select sleep(1) format Null; -- monitor_sleep_time_ms
|
2020-08-27 19:00:35 +00:00
|
|
|
select value from system.metrics where metric = 'DistributedFilesToInsert';
|
|
|
|
system start distributed sends dist_01460;
|
2021-07-16 01:08:59 +00:00
|
|
|
select sleep(1) format Null; -- monitor_sleep_time_ms
|
2020-08-27 19:00:35 +00:00
|
|
|
select value from system.metrics where metric = 'DistributedFilesToInsert';
|
|
|
|
|
|
|
|
select 'FLUSH DISTRIBUTED';
|
|
|
|
system stop distributed sends dist_01460;
|
|
|
|
insert into dist_01460 select * from system.one;
|
2021-07-16 01:08:59 +00:00
|
|
|
select sleep(1) format Null; -- monitor_sleep_time_ms
|
2020-08-27 19:00:35 +00:00
|
|
|
select value from system.metrics where metric = 'DistributedFilesToInsert';
|
|
|
|
system flush distributed dist_01460;
|
|
|
|
select value from system.metrics where metric = 'DistributedFilesToInsert';
|
|
|
|
|
|
|
|
select 'DROP TABLE';
|
|
|
|
system stop distributed sends dist_01460;
|
|
|
|
insert into dist_01460 select * from system.one;
|
2021-07-16 01:08:59 +00:00
|
|
|
select sleep(1) format Null; -- monitor_sleep_time_ms
|
2020-08-27 19:00:35 +00:00
|
|
|
select value from system.metrics where metric = 'DistributedFilesToInsert';
|
|
|
|
drop table dist_01460;
|
|
|
|
select value from system.metrics where metric = 'DistributedFilesToInsert';
|
2020-11-11 15:29:36 +00:00
|
|
|
|
|
|
|
drop table data_01460;
|