You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/queries/0_stateless/mergetree_mutations.lib
+10-17Lines changed: 10 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -7,19 +7,16 @@ function wait_for_mutation()
7
7
local database=$3
8
8
database=${database:="${CLICKHOUSE_DATABASE}"}
9
9
10
-
local i
11
-
foriin {1..100}
10
+
for_in {1..300}
12
11
do
13
12
sleep 0.1
14
13
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
15
-
break
14
+
return
16
15
fi
17
-
18
-
if [[ $i-eq 100 ]];then
19
-
echo"Timed out while waiting for mutation to execute!"
20
-
fi
21
-
22
16
done
17
+
18
+
echo"Timed out while waiting for mutation to execute!"
19
+
${CLICKHOUSE_CLIENT} -q "SELECT * FROM system.mutations WHERE database='$database' AND table like '$table' AND mutation_id='$mutation_id' AND is_done=0"
23
20
}
24
21
25
22
functionwait_for_all_mutations()
@@ -28,20 +25,16 @@ function wait_for_all_mutations()
28
25
local database=$2
29
26
database=${database:="${CLICKHOUSE_DATABASE}"}
30
27
31
-
local i
32
-
foriin {1..200}
28
+
for_in {1..600}
33
29
do
34
30
if [[ $(${CLICKHOUSE_CLIENT} --query="SELECT coalesce(minOrNull(is_done), 1) FROM system.mutations WHERE database='$database' AND table like '$table'")-eq 1 ]];then
35
-
break
31
+
return
36
32
fi
37
-
38
-
if [[ $i-eq 200 ]];then
39
-
echo"Timed out while waiting for mutation to execute!"
40
-
${CLICKHOUSE_CLIENT} -q "SELECT * FROM system.mutations WHERE database='$database' AND table like '$table' AND is_done=0"
41
-
fi
42
-
43
33
sleep 0.3
44
34
done
35
+
36
+
echo"Timed out while waiting for mutation to execute!"
37
+
${CLICKHOUSE_CLIENT} -q "SELECT * FROM system.mutations WHERE database='$database' AND table like '$table' AND is_done=0"
Copy file name to clipboardExpand all lines: tests/queries/0_stateless/replication.lib
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ function try_sync_replicas()
17
17
WHERE (database = currentDatabase()) AND (table LIKE '$table_name_prefix%')
18
18
))")
19
19
local tables_arr
20
-
readarray -t tables_arr <<(${CLICKHOUSE_CLIENT} -q "SELECT name FROM system.tables WHERE database=currentDatabase() AND name like '$table_name_prefix%' AND engine like '%Replicated%'")
20
+
readarray -t tables_arr <<(${CLICKHOUSE_CLIENT} -q "SELECT name FROM system.tables WHERE database=currentDatabase() AND name like '$table_name_prefix%' AND (engine like '%Replicated%' or engine like '%Shared%')")
0 commit comments