mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Merge pull request #45136 from ClickHouse/cleanup_44197
Minor cleanup in stress/run.sh
This commit is contained in:
commit
6aefd1bc91
@ -128,18 +128,12 @@ EOL
|
||||
|
||||
function stop()
|
||||
{
|
||||
local max_tries="${1:-90}"
|
||||
local pid
|
||||
# Preserve the pid, since the server can hung after the PID will be deleted.
|
||||
pid="$(cat /var/run/clickhouse-server/clickhouse-server.pid)"
|
||||
|
||||
clickhouse stop $max_tries --do-not-kill && return
|
||||
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
# temporarily disable it in BC check
|
||||
clickhouse stop --force
|
||||
return
|
||||
fi
|
||||
clickhouse stop --max-tries "$max_tries" --do-not-kill && return
|
||||
|
||||
# We failed to stop the server with SIGTERM. Maybe it hang, let's collect stacktraces.
|
||||
kill -TERM "$(pidof gdb)" ||:
|
||||
@ -465,7 +459,8 @@ if [ "$DISABLE_BC_CHECK" -ne "1" ]; then
|
||||
clickhouse stop --force
|
||||
)
|
||||
|
||||
stop 1
|
||||
# Use bigger timeout for previous version
|
||||
stop 300
|
||||
mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.backward.stress.log
|
||||
|
||||
# Start new server
|
||||
|
@ -1544,8 +1544,11 @@ def check_server_started(args):
|
||||
print(" OK")
|
||||
sys.stdout.flush()
|
||||
return True
|
||||
except (ConnectionError, http.client.ImproperConnectionState):
|
||||
print(".", end="")
|
||||
except (ConnectionError, http.client.ImproperConnectionState) as e:
|
||||
if args.hung_check:
|
||||
print("Connection error, will retry: ", str(e))
|
||||
else:
|
||||
print(".", end="")
|
||||
sys.stdout.flush()
|
||||
retry_count -= 1
|
||||
sleep(0.5)
|
||||
|
Loading…
Reference in New Issue
Block a user