Skip to content

Commit 9014187

Browse files
Filter QUERY_WAS_CANCELLED in test 01111_create_drop_replicated_db_stress
In this stress test, concurrent database creation and dropping can cause DDL queries to be killed while pending in the Replicated database DDL queue, producing `QUERY_WAS_CANCELLED` exceptions. This is expected behavior and should be filtered from stdout like other expected errors. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=98447&sha=9168bcfe4d65887ae3cd2630d4c0f0d4169f66c9&name_0=PR&name_1=Stateless%20tests%20%28amd_tsan%2C%20s3%20storage%2C%20sequential%2C%201%2F2%29 Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent dc2ab35 commit 9014187

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/queries/0_stateless/01111_create_drop_replicated_db_stress.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function create_db()
2020
$CLICKHOUSE_CLIENT --query \
2121
"create database if not exists ${CLICKHOUSE_DATABASE}_repl_01111_$SUFFIX engine=Replicated('/test/01111/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX', '$SHARD', '$REPLICA')" \
2222
2>&1| grep -Fa "Exception: " | grep -Fv "REPLICA_ALREADY_EXISTS" | grep -Fiv "Will not try to start it up" | \
23-
grep -Fv "Coordination::Exception" | grep -Fv "already contains some data and it does not look like Replicated database path"
23+
grep -Fv "Coordination::Exception" | grep -Fv "already contains some data and it does not look like Replicated database path" | grep -Fv QUERY_WAS_CANCELLED
2424
sleep 0.$RANDOM
2525
done
2626
}
@@ -33,7 +33,7 @@ function drop_db()
3333
if [[ "$database" == "$CLICKHOUSE_DATABASE" ]]; then continue; fi
3434
if [ -z "$database" ]; then continue; fi
3535
$CLICKHOUSE_CLIENT --query \
36-
"drop database if exists $database" 2>&1| grep -Fa "Exception: " | grep -Fv DATABASE_NOT_EMPTY
36+
"drop database if exists $database" 2>&1| grep -Fa "Exception: " | grep -Fv DATABASE_NOT_EMPTY | grep -Fv QUERY_WAS_CANCELLED
3737
sleep 0.$RANDOM
3838
done
3939
}
@@ -45,7 +45,7 @@ function sync_db()
4545
database=$($CLICKHOUSE_CLIENT -q "select name from system.databases where name like '${CLICKHOUSE_DATABASE}%' order by rand() limit 1")
4646
if [ -z "$database" ]; then continue; fi
4747
$CLICKHOUSE_CLIENT --receive_timeout=1 -q \
48-
"system sync database replica $database" 2>&1| grep -Fa "Exception: " | grep -Fv TIMEOUT_EXCEEDED | grep -Fv "only with Replicated engine" | grep -Fv UNKNOWN_DATABASE | grep -Fv UNFINISHED
48+
"system sync database replica $database" 2>&1| grep -Fa "Exception: " | grep -Fv TIMEOUT_EXCEEDED | grep -Fv "only with Replicated engine" | grep -Fv UNKNOWN_DATABASE | grep -Fv UNFINISHED | grep -Fv QUERY_WAS_CANCELLED
4949
sleep 0.$RANDOM
5050
done
5151
}
@@ -58,7 +58,7 @@ function create_table()
5858
if [ -z "$database" ]; then continue; fi
5959
$CLICKHOUSE_CLIENT --lock_acquire_timeout=120 --distributed_ddl_task_timeout=0 -q \
6060
"create table $database.rmt_${RANDOM}_${RANDOM}_${RANDOM} (n int) engine=ReplicatedMergeTree order by tuple() -- suppress $CLICKHOUSE_TEST_ZOOKEEPER_PREFIX" \
61-
2>&1| grep -Fa "Exception: " | grep -Fv "Macro 'uuid' in engine arguments is" | grep -Fv "Cannot enqueue query" | grep -Fv "ZooKeeper session expired" | grep -Fv UNKNOWN_DATABASE | grep -Fv TABLE_IS_DROPPED | grep -Fv UNFINISHED | grep -Fv TIMEOUT_EXCEEDED
61+
2>&1| grep -Fa "Exception: " | grep -Fv "Macro 'uuid' in engine arguments is" | grep -Fv "Cannot enqueue query" | grep -Fv "ZooKeeper session expired" | grep -Fv UNKNOWN_DATABASE | grep -Fv TABLE_IS_DROPPED | grep -Fv UNFINISHED | grep -Fv TIMEOUT_EXCEEDED | grep -Fv QUERY_WAS_CANCELLED
6262
sleep 0.$RANDOM
6363
done
6464
}
@@ -71,7 +71,7 @@ function alter_table()
7171
if [ -z "$table" ]; then continue; fi
7272
$CLICKHOUSE_CLIENT --max_execution_time 300 --lock_acquire_timeout=120 --distributed_ddl_task_timeout=0 -q \
7373
"alter table $table update n = n + (select max(n) from merge(REGEXP('${CLICKHOUSE_DATABASE}.*'), '.*')) where 1 settings allow_nondeterministic_mutations=1" \
74-
2>&1| grep -Fa "Exception: " | grep -Fv "Cannot enqueue query" | grep -Fv "ZooKeeper session expired" | grep -Fv UNKNOWN_DATABASE | grep -Fv UNKNOWN_TABLE | grep -Fv TABLE_IS_READ_ONLY | grep -Fv TABLE_IS_DROPPED | grep -Fv ABORTED | grep -Fv "There are no tables satisfied provided regexp" | grep -Fv UNFINISHED | grep -Fv TIMEOUT_EXCEEDED
74+
2>&1| grep -Fa "Exception: " | grep -Fv "Cannot enqueue query" | grep -Fv "ZooKeeper session expired" | grep -Fv UNKNOWN_DATABASE | grep -Fv UNKNOWN_TABLE | grep -Fv TABLE_IS_READ_ONLY | grep -Fv TABLE_IS_DROPPED | grep -Fv ABORTED | grep -Fv "There are no tables satisfied provided regexp" | grep -Fv UNFINISHED | grep -Fv TIMEOUT_EXCEEDED | grep -Fv QUERY_WAS_CANCELLED
7575
sleep 0.$RANDOM
7676
done
7777
}
@@ -83,7 +83,7 @@ function insert()
8383
table=$($CLICKHOUSE_CLIENT -q "select database || '.' || name from system.tables where database like '${CLICKHOUSE_DATABASE}%' order by rand() limit 1")
8484
if [ -z "$table" ]; then continue; fi
8585
$CLICKHOUSE_CLIENT -q \
86-
"insert into $table values ($RANDOM)" 2>&1| grep -Fa "Exception: " | grep -Fv UNKNOWN_DATABASE | grep -Fv UNKNOWN_TABLE | grep -Fv TABLE_IS_READ_ONLY | grep -Fv TABLE_IS_DROPPED | grep -Fv TABLE_UUID_MISMATCH
86+
"insert into $table values ($RANDOM)" 2>&1| grep -Fa "Exception: " | grep -Fv UNKNOWN_DATABASE | grep -Fv UNKNOWN_TABLE | grep -Fv TABLE_IS_READ_ONLY | grep -Fv TABLE_IS_DROPPED | grep -Fv TABLE_UUID_MISMATCH | grep -Fv QUERY_WAS_CANCELLED
8787
done
8888
}
8989

0 commit comments

Comments
 (0)