mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Revert "Merge pull request #36634 from azat/01502_long_log_tinylog_deadlock_race-test"
This reverts commitc04c62795e
, reversing changes made to88f05ac14a
.
This commit is contained in:
parent
70f39e0849
commit
f3c2ca6a13
@ -10,40 +10,46 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|||||||
. "$CURDIR"/../shell_config.sh
|
. "$CURDIR"/../shell_config.sh
|
||||||
|
|
||||||
|
|
||||||
function thread_create()
|
function thread_create {
|
||||||
{
|
while true; do
|
||||||
$CLICKHOUSE_CLIENT --query "CREATE TABLE IF NOT EXISTS $1 (x UInt64, s Array(Nullable(String))) ENGINE = $2" 2>&1 | grep -v -F 'Received exception from server' | grep -v -P 'Code: (60|57)'
|
$CLICKHOUSE_CLIENT --query "CREATE TABLE IF NOT EXISTS $1 (x UInt64, s Array(Nullable(String))) ENGINE = $2" 2>&1 | grep -v -F 'Received exception from server' | grep -v -P 'Code: (60|57)'
|
||||||
sleep 0.0$RANDOM
|
sleep 0.0$RANDOM
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function thread_drop()
|
function thread_drop {
|
||||||
{
|
while true; do
|
||||||
$CLICKHOUSE_CLIENT --query "DROP TABLE IF EXISTS $1" 2>&1 | grep -v -e 'Received exception from server' -e '^(query: ' | grep -v -P 'Code: (60|57)'
|
$CLICKHOUSE_CLIENT --query "DROP TABLE IF EXISTS $1" 2>&1 | grep -v -e 'Received exception from server' -e '^(query: ' | grep -v -P 'Code: (60|57)'
|
||||||
sleep 0.0$RANDOM
|
sleep 0.0$RANDOM
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function thread_rename()
|
function thread_rename {
|
||||||
{
|
while true; do
|
||||||
$CLICKHOUSE_CLIENT --query "RENAME TABLE $1 TO $2" 2>&1 | grep -v -e 'Received exception from server' -e '^(query: ' | grep -v -P 'Code: (60|57)'
|
$CLICKHOUSE_CLIENT --query "RENAME TABLE $1 TO $2" 2>&1 | grep -v -e 'Received exception from server' -e '^(query: ' | grep -v -P 'Code: (60|57)'
|
||||||
sleep 0.0$RANDOM
|
sleep 0.0$RANDOM
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function thread_select()
|
function thread_select {
|
||||||
{
|
while true; do
|
||||||
$CLICKHOUSE_CLIENT --query "SELECT * FROM $1 FORMAT Null" 2>&1 | grep -v -e 'Received exception from server' -e '^(query: ' | grep -v -P 'Code: (60|218)'
|
$CLICKHOUSE_CLIENT --query "SELECT * FROM $1 FORMAT Null" 2>&1 | grep -v -e 'Received exception from server' -e '^(query: ' | grep -v -P 'Code: (60|218)'
|
||||||
sleep 0.0$RANDOM
|
sleep 0.0$RANDOM
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function thread_insert()
|
function thread_insert {
|
||||||
{
|
while true; do
|
||||||
$CLICKHOUSE_CLIENT --query "INSERT INTO $1 SELECT rand64(1), [toString(rand64(2))] FROM numbers($2)" 2>&1 | grep -v -e 'Received exception from server' -e '^(query: ' | grep -v -P 'Code: (60|218)'
|
$CLICKHOUSE_CLIENT --query "INSERT INTO $1 SELECT rand64(1), [toString(rand64(2))] FROM numbers($2)" 2>&1 | grep -v -e 'Received exception from server' -e '^(query: ' | grep -v -P 'Code: (60|218)'
|
||||||
sleep 0.0$RANDOM
|
sleep 0.0$RANDOM
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function thread_insert_select()
|
function thread_insert_select {
|
||||||
{
|
while true; do
|
||||||
$CLICKHOUSE_CLIENT --query "INSERT INTO $1 SELECT * FROM $2" 2>&1 | grep -v -e 'Received exception from server' -e '^(query: ' | grep -v -P 'Code: (60|218)'
|
$CLICKHOUSE_CLIENT --query "INSERT INTO $1 SELECT * FROM $2" 2>&1 | grep -v -e 'Received exception from server' -e '^(query: ' | grep -v -P 'Code: (60|218)'
|
||||||
sleep 0.0$RANDOM
|
sleep 0.0$RANDOM
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
export -f thread_create
|
export -f thread_create
|
||||||
@ -59,18 +65,18 @@ export -f thread_insert_select
|
|||||||
function test_with_engine {
|
function test_with_engine {
|
||||||
echo "Testing $1"
|
echo "Testing $1"
|
||||||
|
|
||||||
clickhouse_client_loop_timeout 10 thread_create t1 $1 &
|
timeout 10 bash -c "thread_create t1 $1" &
|
||||||
clickhouse_client_loop_timeout 10 thread_create t2 $1 &
|
timeout 10 bash -c "thread_create t2 $1" &
|
||||||
clickhouse_client_loop_timeout 10 thread_drop t1 &
|
timeout 10 bash -c 'thread_drop t1' &
|
||||||
clickhouse_client_loop_timeout 10 thread_drop t2 &
|
timeout 10 bash -c 'thread_drop t2' &
|
||||||
clickhouse_client_loop_timeout 10 thread_rename t1 t2 &
|
timeout 10 bash -c 'thread_rename t1 t2' &
|
||||||
clickhouse_client_loop_timeout 10 thread_rename t2 t1 &
|
timeout 10 bash -c 'thread_rename t2 t1' &
|
||||||
clickhouse_client_loop_timeout 10 thread_select t1 &
|
timeout 10 bash -c 'thread_select t1' &
|
||||||
clickhouse_client_loop_timeout 10 thread_select t2 &
|
timeout 10 bash -c 'thread_select t2' &
|
||||||
clickhouse_client_loop_timeout 10 thread_insert t1 5 &
|
timeout 10 bash -c 'thread_insert t1 5' &
|
||||||
clickhouse_client_loop_timeout 10 thread_insert t2 10 &
|
timeout 10 bash -c 'thread_insert t2 10' &
|
||||||
clickhouse_client_loop_timeout 10 thread_insert_select t1 t2 &
|
timeout 10 bash -c 'thread_insert_select t1 t2' &
|
||||||
clickhouse_client_loop_timeout 10 thread_insert_select t2 t1 &
|
timeout 10 bash -c 'thread_insert_select t2 t1' &
|
||||||
|
|
||||||
wait
|
wait
|
||||||
echo "Done $1"
|
echo "Done $1"
|
||||||
|
Loading…
Reference in New Issue
Block a user