mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Update run.sh
This commit is contained in:
parent
a4525bb98f
commit
49f3e8e19b
@ -127,23 +127,23 @@ EOL
|
|||||||
|
|
||||||
function stop()
|
function stop()
|
||||||
{
|
{
|
||||||
local max_tries=""
|
|
||||||
if [ -n "$1" ]
|
|
||||||
then
|
|
||||||
max_tries="--max-tries $1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local pid
|
local pid
|
||||||
# Preserve the pid, since the server can hung after the PID will be deleted.
|
# Preserve the pid, since the server can hung after the PID will be deleted.
|
||||||
pid="$(cat /var/run/clickhouse-server/clickhouse-server.pid)"
|
pid="$(cat /var/run/clickhouse-server/clickhouse-server.pid)"
|
||||||
|
|
||||||
clickhouse stop $max_tries --do-not-kill && return
|
clickhouse stop $max_tries --do-not-kill && return
|
||||||
|
|
||||||
|
if [ -n "$1" ]
|
||||||
|
then
|
||||||
|
# temporarily disable it in BC check
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# We failed to stop the server with SIGTERM. Maybe it hang, let's collect stacktraces.
|
# We failed to stop the server with SIGTERM. Maybe it hang, let's collect stacktraces.
|
||||||
kill -TERM "$(pidof gdb)" ||:
|
kill -TERM "$(pidof gdb)" ||:
|
||||||
sleep 5
|
sleep 5
|
||||||
echo "thread apply all backtrace (on stop)" >> /test_output/gdb.log
|
echo "thread apply all backtrace (on stop)" >> /test_output/gdb.log
|
||||||
gdb -batch -ex 'thread apply all backtrace' -p "$pid" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log
|
timout 30m gdb -batch -ex 'thread apply all backtrace' -p "$pid" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log
|
||||||
clickhouse stop --force
|
clickhouse stop --force
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -431,7 +431,7 @@ else
|
|||||||
|
|
||||||
clickhouse-client --query="SELECT 'Tables count:', count() FROM system.tables"
|
clickhouse-client --query="SELECT 'Tables count:', count() FROM system.tables"
|
||||||
|
|
||||||
stop 180
|
stop 1
|
||||||
mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.backward.stress.log
|
mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.backward.stress.log
|
||||||
|
|
||||||
# Start new server
|
# Start new server
|
||||||
|
Loading…
Reference in New Issue
Block a user