From 39cfffd4d228acbe645fc551cb47d65b0e2ea921 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 10 Jan 2021 12:44:56 +0300 Subject: [PATCH] Add log message for list of tables on RESTART REPLICAS --- src/Interpreters/InterpreterSystemQuery.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Interpreters/InterpreterSystemQuery.cpp b/src/Interpreters/InterpreterSystemQuery.cpp index 7a74164cfd0..86706701141 100644 --- a/src/Interpreters/InterpreterSystemQuery.cpp +++ b/src/Interpreters/InterpreterSystemQuery.cpp @@ -467,8 +467,11 @@ void InterpreterSystemQuery::restartReplicas(Context & system_context) guard.second = catalog.getDDLGuard(guard.first.database_name, guard.first.table_name); ThreadPool pool(std::min(size_t(getNumberOfPhysicalCPUCores()), replica_names.size())); - for (auto & table : replica_names) - pool.scheduleOrThrowOnError([&]() { tryRestartReplica(table, system_context, false); }); + for (auto & replica : replica_names) + { + LOG_TRACE(log, "Restarting replica on {}", replica.getNameForLogs()); + pool.scheduleOrThrowOnError([&]() { tryRestartReplica(replica, system_context, false); }); + } pool.wait(); }