Merge pull request #69190 from ClickHouse/fix_flaky_move_partition

Fix flaky 02915_move_partition_inactive_replica
This commit is contained in:
alesapin 2024-09-04 10:40:32 +00:00 committed by GitHub
commit e695814e1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 1 deletions

View File

@ -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;

View File

@ -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;