mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Merge pull request #13980 from ClickHouse/fix-stress-test-2
Attempt to fix stress test
This commit is contained in:
commit
ad64cea4aa
2
debian/clickhouse-server.init
vendored
2
debian/clickhouse-server.init
vendored
@ -76,7 +76,7 @@ is_supported_command()
|
|||||||
|
|
||||||
is_running()
|
is_running()
|
||||||
{
|
{
|
||||||
[ -r "$CLICKHOUSE_PIDFILE" ] && pgrep -s $(cat "$CLICKHOUSE_PIDFILE") 1> /dev/null 2> /dev/null
|
pgrep --pidfile "$CLICKHOUSE_PIDFILE" $(echo "${PROGRAM}" | cut -c1-15) 1> /dev/null 2> /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,7 +8,19 @@ dpkg -i package_folder/clickhouse-server_*.deb
|
|||||||
dpkg -i package_folder/clickhouse-client_*.deb
|
dpkg -i package_folder/clickhouse-client_*.deb
|
||||||
dpkg -i package_folder/clickhouse-test_*.deb
|
dpkg -i package_folder/clickhouse-test_*.deb
|
||||||
|
|
||||||
function wait_server()
|
function stop()
|
||||||
|
{
|
||||||
|
timeout 120 service clickhouse-server stop
|
||||||
|
|
||||||
|
# Wait for process to disappear from processlist and also try to kill zombies.
|
||||||
|
while kill -9 $(pidof clickhouse-server)
|
||||||
|
do
|
||||||
|
echo "Killed clickhouse-server"
|
||||||
|
sleep 0.5
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function start()
|
||||||
{
|
{
|
||||||
counter=0
|
counter=0
|
||||||
until clickhouse-client --query "SELECT 1"
|
until clickhouse-client --query "SELECT 1"
|
||||||
@ -18,9 +30,10 @@ function wait_server()
|
|||||||
echo "Cannot start clickhouse-server"
|
echo "Cannot start clickhouse-server"
|
||||||
cat /var/log/clickhouse-server/stdout.log
|
cat /var/log/clickhouse-server/stdout.log
|
||||||
tail -n1000 /var/log/clickhouse-server/stderr.log
|
tail -n1000 /var/log/clickhouse-server/stderr.log
|
||||||
tail -n1000 /var/log/clickhouse-server/clickhouse-server.err.log
|
tail -n1000 /var/log/clickhouse-server/clickhouse-server.log
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
timeout 120 service clickhouse-server start
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
counter=$(($counter + 1))
|
counter=$(($counter + 1))
|
||||||
done
|
done
|
||||||
@ -34,19 +47,15 @@ echo "TSAN_OPTIONS='halt_on_error=1 history_size=7 ignore_noninstrumented_module
|
|||||||
echo "UBSAN_OPTIONS='print_stacktrace=1'" >> /etc/environment
|
echo "UBSAN_OPTIONS='print_stacktrace=1'" >> /etc/environment
|
||||||
echo "ASAN_OPTIONS='malloc_context_size=10 verbosity=1 allocator_release_to_os_interval_ms=10000'" >> /etc/environment
|
echo "ASAN_OPTIONS='malloc_context_size=10 verbosity=1 allocator_release_to_os_interval_ms=10000'" >> /etc/environment
|
||||||
|
|
||||||
timeout 120 service clickhouse-server start
|
start
|
||||||
|
|
||||||
wait_server
|
|
||||||
|
|
||||||
/s3downloader --dataset-names $DATASETS
|
/s3downloader --dataset-names $DATASETS
|
||||||
chmod 777 -R /var/lib/clickhouse
|
chmod 777 -R /var/lib/clickhouse
|
||||||
clickhouse-client --query "ATTACH DATABASE IF NOT EXISTS datasets ENGINE = Ordinary"
|
clickhouse-client --query "ATTACH DATABASE IF NOT EXISTS datasets ENGINE = Ordinary"
|
||||||
clickhouse-client --query "CREATE DATABASE IF NOT EXISTS test"
|
clickhouse-client --query "CREATE DATABASE IF NOT EXISTS test"
|
||||||
|
|
||||||
timeout 120 service clickhouse-server stop
|
stop
|
||||||
timeout 120 service clickhouse-server start
|
start
|
||||||
|
|
||||||
wait_server
|
|
||||||
|
|
||||||
clickhouse-client --query "SHOW TABLES FROM datasets"
|
clickhouse-client --query "SHOW TABLES FROM datasets"
|
||||||
clickhouse-client --query "SHOW TABLES FROM test"
|
clickhouse-client --query "SHOW TABLES FROM test"
|
||||||
@ -56,9 +65,7 @@ clickhouse-client --query "SHOW TABLES FROM test"
|
|||||||
|
|
||||||
./stress --output-folder test_output --skip-func-tests "$SKIP_TESTS_OPTION"
|
./stress --output-folder test_output --skip-func-tests "$SKIP_TESTS_OPTION"
|
||||||
|
|
||||||
timeout 120 service clickhouse-server stop
|
stop
|
||||||
timeout 120 service clickhouse-server start
|
start
|
||||||
|
|
||||||
wait_server
|
|
||||||
|
|
||||||
clickhouse-client --query "SELECT 'Server successfuly started'" > /test_output/alive_check.txt || echo 'Server failed to start' > /test_output/alive_check.txt
|
clickhouse-client --query "SELECT 'Server successfuly started'" > /test_output/alive_check.txt || echo 'Server failed to start' > /test_output/alive_check.txt
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
<test>
|
<test>
|
||||||
|
|
||||||
|
|
||||||
<preconditions>
|
<preconditions>
|
||||||
<table_exists>test.hits</table_exists>
|
<table_exists>test.hits</table_exists>
|
||||||
<table_exists>hits_100m_single</table_exists>
|
<table_exists>hits_100m_single</table_exists>
|
||||||
</preconditions>
|
</preconditions>
|
||||||
|
|
||||||
|
|
||||||
<create_query>DROP TABLE IF EXISTS test_model</create_query>
|
<create_query>DROP TABLE IF EXISTS test_model</create_query>
|
||||||
<create_query>CREATE TABLE test_model engine = Memory as select stochasticLinearRegressionState(0.0001)(Age, Income, ParamPrice, Robotness, RefererHash) as state from test.hits</create_query>
|
<create_query>CREATE TABLE test_model engine = Memory as select stochasticLinearRegressionState(0.0001)(Age, Income, ParamPrice, Robotness, RefererHash) as state from test.hits</create_query>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user