mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
Improve wait_for_mutation check
Fast return if there isn't any mutation (it's likely it has finished already)
This commit is contained in:
parent
66e675e54e
commit
be126cbbc5
@ -10,7 +10,7 @@ function wait_for_mutation()
|
||||
for i in {1..100}
|
||||
do
|
||||
sleep 0.1
|
||||
if [[ $(${CLICKHOUSE_CLIENT} --query="SELECT min(is_done) FROM system.mutations WHERE database='$database' AND table='$table' AND mutation_id='$mutation_id'") -eq 1 ]]; then
|
||||
if [[ $(${CLICKHOUSE_CLIENT} --query="SELECT min(is_done) + (count() == 0) FROM system.mutations WHERE database='$database' AND table='$table' AND mutation_id='$mutation_id'") -eq 1 ]]; then
|
||||
break
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user