Make 03002_part_log_rmt_fetch_* tests parallel

This commit is contained in:
Raúl Marín 2024-08-08 15:00:13 +02:00
parent dbf743d58d
commit de0d6f0368
2 changed files with 8 additions and 9 deletions

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash
# Tags: no-replicated-database, no-parallel, no-shared-merge-tree
# Tags: no-replicated-database, no-shared-merge-tree, no-fasttest
# SMT: The merge process is completely different from RMT
# no-fasttest: Avoid long waits
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
@ -12,8 +13,7 @@ function wait_until()
{
local q=$1 && shift
while [ "$($CLICKHOUSE_CLIENT -nm -q "$q")" != "1" ]; do
# too frequent FLUSH LOGS is too costly
sleep 2
sleep 0.5
done
}
@ -41,7 +41,7 @@ $CLICKHOUSE_CLIENT -nm -q "
system start replicated sends rmt_master;
"
# wait until rmt_slave will fetch the part and reflect this error in system.part_log
wait_until "system flush logs; select count()>0 from system.part_log where table = 'rmt_slave' and database = '$CLICKHOUSE_DATABASE' and error > 0"
wait_until "select count()>0 from system.part_log where table = 'rmt_slave' and database = '$CLICKHOUSE_DATABASE' and error > 0"
$CLICKHOUSE_CLIENT -nm -q "
system sync replica rmt_slave;

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash
# Tags: no-replicated-database, no-parallel, no-shared-merge-tree
# Tags: no-replicated-database, no-shared-merge-tree, no-fasttest
# SMT: The merge process is completely different from RMT
# no-fasttest: Avoid long waits
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
@ -15,8 +16,7 @@ function wait_until()
{
local q=$1 && shift
while [ "$($CLICKHOUSE_CLIENT -nm -q "$q")" != "1" ]; do
# too frequent FLUSH LOGS is too costly
sleep 2
sleep 0.5
done
}
@ -43,9 +43,8 @@ $CLICKHOUSE_CLIENT -nm -q "
wait_for_mutation rmt_master 0000000000
$CLICKHOUSE_CLIENT -nm -q "system start pulling replication log rmt_slave"
# and wait until rmt_slave to fetch the part and reflect this error in system.part_log
wait_until "system flush logs; select count()>0 from system.part_log where table = 'rmt_slave' and database = '$CLICKHOUSE_DATABASE' and error > 0"
wait_until "select count()>0 from system.part_log where table = 'rmt_slave' and database = '$CLICKHOUSE_DATABASE' and error > 0"
$CLICKHOUSE_CLIENT -nm -q "
system flush logs;
select 'before';
select table, event_type, error>0, countIf(error=0) from system.part_log where database = currentDatabase() group by 1, 2, 3 order by 1, 2, 3;