From 3a6307a990f6e574d124c7f831beedec30cc1737 Mon Sep 17 00:00:00 2001 From: turbo jason Date: Tue, 2 Mar 2021 15:13:54 +0800 Subject: [PATCH] [ClickHouse][LOG]correct shutdown timeout log --- src/Coordination/NuKeeperServer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Coordination/NuKeeperServer.cpp b/src/Coordination/NuKeeperServer.cpp index 400ef8fd58b..9ff1e2801c9 100644 --- a/src/Coordination/NuKeeperServer.cpp +++ b/src/Coordination/NuKeeperServer.cpp @@ -80,8 +80,9 @@ void NuKeeperServer::shutdown() { state_machine->shutdownStorage(); state_manager->flushLogStore(); - if (!launcher.shutdown(coordination_settings->shutdown_timeout.totalSeconds())) - LOG_WARNING(&Poco::Logger::get("NuKeeperServer"), "Failed to shutdown RAFT server in {} seconds", 5); + auto timeout = coordination_settings->shutdown_timeout.totalSeconds(); + if (!launcher.shutdown(timeout)) + LOG_WARNING(&Poco::Logger::get("NuKeeperServer"), "Failed to shutdown RAFT server in {} seconds", timeout); } namespace