mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #18970 from ClickHouse/fix_01459_manual_write_to_replicas_quorum
Fix rarely flaky test 01459_manual_write_to_replicas_quorum
This commit is contained in:
commit
c12abcd481
@ -15,10 +15,12 @@ for i in $(seq 1 $NUM_REPLICAS); do
|
||||
"
|
||||
done
|
||||
|
||||
valid_exceptions_to_retry='Quorum for previous write has not been satisfied yet|Another quorum insert has been already started|Unexpected logical error while adding block'
|
||||
|
||||
function thread {
|
||||
for x in {0..99}; do
|
||||
while true; do
|
||||
$CLICKHOUSE_CLIENT --insert_quorum 5 --insert_quorum_parallel 0 --query "INSERT INTO r$1 SELECT $x" 2>&1 | grep -qF 'Quorum for previous write has not been satisfied yet' || break
|
||||
$CLICKHOUSE_CLIENT --insert_quorum 5 --insert_quorum_parallel 0 --query "INSERT INTO r$1 SELECT $x" 2>&1 | grep -qE "$valid_exceptions_to_retry" || break
|
||||
done
|
||||
done
|
||||
}
|
||||
@ -32,7 +34,9 @@ wait
|
||||
for i in $(seq 1 $NUM_REPLICAS); do
|
||||
$CLICKHOUSE_CLIENT -n -q "
|
||||
SYSTEM SYNC REPLICA r$i;
|
||||
SELECT count(), min(x), max(x), sum(x) FROM r$i;
|
||||
DROP TABLE IF EXISTS r$i;
|
||||
"
|
||||
SELECT count(), min(x), max(x), sum(x) FROM r$i;"
|
||||
done
|
||||
|
||||
for i in $(seq 1 $NUM_REPLICAS); do
|
||||
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS r$i;"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user