mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
dbms: Added code that lowers cancellation latency. [#METR-18510]
This commit is contained in:
parent
9bf811ddac
commit
04db615bde
@ -332,15 +332,6 @@ int Server::main(const std::vector<std::string> & args)
|
||||
SCOPE_EXIT(
|
||||
LOG_DEBUG(log, "Closed all connections.");
|
||||
|
||||
if (has_resharding_worker)
|
||||
{
|
||||
LOG_INFO(log, "Shutting down resharding thread");
|
||||
auto & resharding_worker = global_context->getReshardingWorker();
|
||||
if (resharding_worker.isStarted())
|
||||
resharding_worker.shutdown();
|
||||
LOG_DEBUG(log, "Shut down resharding thread");
|
||||
}
|
||||
|
||||
/** Попросим завершить фоновую работу у всех движков таблиц.
|
||||
* Это важно делать заранее, не в деструкторе Context-а, так как
|
||||
* движки таблиц могут при уничтожении всё ещё пользоваться Context-ом.
|
||||
@ -433,7 +424,18 @@ int Server::main(const std::vector<std::string> & args)
|
||||
LOG_INFO(log, "Ready for connections.");
|
||||
|
||||
SCOPE_EXIT(
|
||||
LOG_DEBUG(log, "Received termination signal. Waiting for current connections to close.");
|
||||
LOG_DEBUG(log, "Received termination signal.");
|
||||
|
||||
if (has_resharding_worker)
|
||||
{
|
||||
LOG_INFO(log, "Shutting down resharding thread");
|
||||
auto & resharding_worker = global_context->getReshardingWorker();
|
||||
if (resharding_worker.isStarted())
|
||||
resharding_worker.shutdown();
|
||||
LOG_DEBUG(log, "Shut down resharding thread");
|
||||
}
|
||||
|
||||
LOG_DEBUG(log, "Waiting for current connections to close.");
|
||||
|
||||
users_config_reloader.reset();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user