mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Wait fo KILL MUTATION to finish
This commit is contained in:
parent
722b385908
commit
d3663c356f
@ -57,6 +57,14 @@ $CLICKHOUSE_CLIENT --query="SELECT count() FROM system.mutations WHERE database
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query="KILL MUTATION WHERE database = '$CLICKHOUSE_DATABASE' AND table = 'kill_mutation_r1' AND mutation_id = '0000000001'"
|
||||
|
||||
# Wait for the 1st mutation to be actually killed and the 2nd to finish
|
||||
query_result=$($CLICKHOUSE_CLIENT --query="$check_query1" 2>&1)
|
||||
while [ "$query_result" != "0" ]
|
||||
do
|
||||
query_result=$($CLICKHOUSE_CLIENT --query="$check_query1" 2>&1)
|
||||
sleep 0.5
|
||||
done
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query="SYSTEM SYNC REPLICA kill_mutation_r1"
|
||||
${CLICKHOUSE_CLIENT} --query="SYSTEM SYNC REPLICA kill_mutation_r2"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user