mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
7a46b862a6
The test is a stress test which queries all system tables in parallel. System table SYSTEM.MODELS is now populated using the library-bridge. This made the test fail with error: 2022-09-12 23:51:34 Code: 410. DB::Exception: Received from localhost:9000. DB::Exception: BridgeHelper: clickhouse-library-bridge is not responding. (EXTERNAL_SERVER_IS_NOT_RESPONDING) 2022-09-12 23:51:34 (query: SELECT * FROM system.models LIMIT 10000 FORMAT Null) Looking at the logs, the server tried to start the library-bridge when querying SYSTEM.MODELS but multiple handshake attempts failed. So (most likely) the infrastructure is slow or (unlikely) there are settings in CI (e.g. a firewall) preventing communication with the bridge. Because 1. other system tables are also excluded (zookeeper, merge_tree_metadata_cache), 2. SYSTEM.MODELS is tested in integration test "test_catboost_evaluate" and 3. the test runs locally just fine, I am excluding SYSTEM.MODELS from it.
32 lines
1.0 KiB
Bash
Executable File
32 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Server may ignore some exceptions, but it still print exceptions to logs and (at least in CI) sends Error and Warning log messages to client
|
|
# making test fail because of non-empty stderr. Ignore such log messages.
|
|
CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL=fatal
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
# shellcheck source=../shell_config.sh
|
|
. "$CURDIR"/../shell_config.sh
|
|
|
|
THREADS=8
|
|
RAND=$(($RANDOM))
|
|
LIMIT=10000
|
|
|
|
function run_selects()
|
|
{
|
|
thread_num=$1
|
|
readarray -t tables_arr < <(${CLICKHOUSE_CLIENT} -q "SELECT database || '.' || name FROM system.tables
|
|
WHERE database in ('system', 'information_schema', 'INFORMATION_SCHEMA') and name!='zookeeper' and name!='merge_tree_metadata_cache' and name!='models'
|
|
AND sipHash64(name || toString($RAND)) % $THREADS = $thread_num")
|
|
|
|
for t in "${tables_arr[@]}"
|
|
do
|
|
${CLICKHOUSE_CLIENT} -q "SELECT * FROM $t LIMIT $LIMIT FORMAT Null" # Suppress style check: database=$CLICKHOUSE_DATABASEs
|
|
done
|
|
}
|
|
|
|
for ((i=0; i<THREADS; i++)) do
|
|
run_selects "$i" &
|
|
done
|
|
wait
|