Merge pull request #29914 from amosbird/waitunfinish

Add shutdown_wait_unfinished_queries setting
This commit is contained in:
Maksim Kita 2021-10-12 18:42:31 +03:00 committed by GitHub
commit 18a980d7b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1539,7 +1539,8 @@ if (ThreadFuzzer::instance().isEffective())
LOG_INFO(log, "Closed all listening sockets.");
/// Killing remaining queries.
global_context->getProcessList().killAllQueries();
if (!config().getBool("shutdown_wait_unfinished_queries", false))
global_context->getProcessList().killAllQueries();
if (current_connections)
current_connections = waitServersToFinish(*servers, config().getInt("shutdown_wait_unfinished", 5));