Skip to content

Commit dc52a40

Browse files
committed
decrease stop max-tries back to default, do not clear old parts at shutdown
1 parent b1d11ce commit dc52a40

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

docker/test/stress/run.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,7 @@ function stop()
131131
# Preserve the pid, since the server can hung after the PID will be deleted.
132132
pid="$(cat /var/run/clickhouse-server/clickhouse-server.pid)"
133133

134-
# --max-tries is supported only since 22.12
135-
if dpkg --compare-versions "$(clickhouse local -q 'select version()')" ge "22.12"; then
136-
# Increase default waiting timeout for sanitizers and debug builds
137-
clickhouse stop --max-tries 180 --do-not-kill && return
138-
else
139-
clickhouse stop --do-not-kill && return
140-
fi
134+
clickhouse stop --do-not-kill && return
141135

142136
# We failed to stop the server with SIGTERM. Maybe it hang, let's collect stacktraces.
143137
kill -TERM "$(pidof gdb)" ||:

src/Storages/StorageMergeTree.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -185,26 +185,6 @@ void StorageMergeTree::shutdown()
185185

186186
if (deduplication_log)
187187
deduplication_log->shutdown();
188-
189-
try
190-
{
191-
/// We clear all old parts after stopping all background operations.
192-
/// It's important, because background operations can produce temporary
193-
/// parts which will remove themselves in their destructors. If so, we
194-
/// may have race condition between our remove call and background
195-
/// process.
196-
/// Do not clear old parts in case when server is shutting down because it failed to start due to some exception.
197-
198-
if (Context::getGlobalContextInstance()->getApplicationType() == Context::ApplicationType::SERVER
199-
&& Context::getGlobalContextInstance()->isServerCompletelyStarted())
200-
clearOldPartsFromFilesystem(true);
201-
}
202-
catch (...)
203-
{
204-
/// Example: the case of readonly filesystem, we have failure removing old parts.
205-
/// Should not prevent table shutdown.
206-
tryLogCurrentException(log);
207-
}
208188
}
209189

210190

0 commit comments

Comments
 (0)