mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Merge pull request #69190 from ClickHouse/fix_flaky_move_partition
Fix flaky 02915_move_partition_inactive_replica
This commit is contained in:
commit
e695814e1f
@ -40,10 +40,17 @@ OPTIMIZE TABLE shard_0.from_0;
|
||||
OPTIMIZE TABLE shard_1.from_0;
|
||||
OPTIMIZE TABLE shard_0.from_1;
|
||||
OPTIMIZE TABLE shard_1.from_1;
|
||||
|
||||
OPTIMIZE TABLE shard_0.to;
|
||||
|
||||
-- If moved parts are not merged by OPTIMIZE or background merge restart
|
||||
-- can log Warning about metadata version on disk. It's normal situation
|
||||
-- and test shouldn't rarely fail because of it.
|
||||
set send_logs_level = 'error';
|
||||
|
||||
system restart replica shard_0.to;
|
||||
|
||||
-- Doesn't lead to test flakyness, because we don't check anything after it
|
||||
select sleep(2);
|
||||
|
||||
attach table shard_1.to;
|
||||
@ -54,4 +61,3 @@ drop table if exists shard_0.from_1;
|
||||
drop table if exists shard_1.from_1;
|
||||
drop table if exists shard_0.to;
|
||||
drop table if exists shard_1.to;
|
||||
|
||||
|
@ -35,8 +35,15 @@ OPTIMIZE TABLE shard_0.to;
|
||||
OPTIMIZE TABLE shard_0.to;
|
||||
select name, active from system.parts where database='shard_0' and table='to' and active order by name;
|
||||
|
||||
-- If moved parts are not merged by OPTIMIZE or background merge restart
|
||||
-- can log Warning about metadata version on disk. It's normal situation
|
||||
-- and test shouldn't rarely fail because of it.
|
||||
set send_logs_level = 'error';
|
||||
|
||||
system restart replica shard_0.to;
|
||||
|
||||
-- Doesn't lead to test flakyness, because we don't check content in table
|
||||
-- which doesn't depend on any background operation
|
||||
select sleep(3);
|
||||
|
||||
attach table shard_1.to;
|
Loading…
Reference in New Issue
Block a user