mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
a03a9051e1
From [1] and [2]: [1]: https://clickhouse-test-reports.s3.yandex.net/21724/dacb6066237b78511ad5f07cc65045b8cf4e5e7b/functional_stateless_tests_flaky_check_(address).html#fail1 [2]: https://clickhouse-test-reports.s3.yandex.net/21724/ee8ece157987f3cd8b68ca4a5b7df709f4688208/functional_stateless_tests_flaky_check_(address)/test_run.txt.out.log [3]: https://clickhouse-test-reports.s3.yandex.net/21724/e4485ce0b1d1b21c4360bbdecacd2485d1634a91/functional_stateless_tests_flaky_check_(address)/test_run.txt.out.log
30 lines
1023 B
Bash
Executable File
30 lines
1023 B
Bash
Executable File
#!/usr/bin/env bash
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
# shellcheck source=../shell_config.sh
|
|
. "$CURDIR"/../shell_config.sh
|
|
|
|
function thread_create_drop_table {
|
|
while true; do
|
|
REPLICA=$(($RANDOM % 10))
|
|
$CLICKHOUSE_CLIENT --query "CREATE TABLE IF NOT EXISTS t1 (x UInt64, s Array(Nullable(String))) ENGINE = ReplicatedMergeTree('/clickhouse/tables/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX/test_01671', 'r_$REPLICA') order by x" 2>/dev/null
|
|
sleep 0.0$RANDOM
|
|
$CLICKHOUSE_CLIENT --query "DROP TABLE IF EXISTS t1"
|
|
done
|
|
}
|
|
|
|
function thread_alter_table {
|
|
while true; do
|
|
$CLICKHOUSE_CLIENT --query "ALTER TABLE $CLICKHOUSE_DATABASE.t1 on cluster test_shard_localhost ADD COLUMN newcol UInt32" >/dev/null 2>&1
|
|
sleep 0.0$RANDOM
|
|
done
|
|
}
|
|
|
|
export -f thread_create_drop_table
|
|
export -f thread_alter_table
|
|
timeout 20 bash -c "thread_create_drop_table" &
|
|
timeout 20 bash -c 'thread_alter_table' &
|
|
wait
|
|
sleep 1
|
|
|
|
$CLICKHOUSE_CLIENT --query "DROP TABLE IF EXISTS t1";
|