Add log message for list of tables on RESTART REPLICAS

This commit is contained in:
Azat Khuzhin 2021-01-10 12:44:56 +03:00
parent ff16f68116
commit 39cfffd4d2

View File

@ -467,8 +467,11 @@ void InterpreterSystemQuery::restartReplicas(Context & system_context)
guard.second = catalog.getDDLGuard(guard.first.database_name, guard.first.table_name); guard.second = catalog.getDDLGuard(guard.first.database_name, guard.first.table_name);
ThreadPool pool(std::min(size_t(getNumberOfPhysicalCPUCores()), replica_names.size())); ThreadPool pool(std::min(size_t(getNumberOfPhysicalCPUCores()), replica_names.size()));
for (auto & table : replica_names) for (auto & replica : replica_names)
pool.scheduleOrThrowOnError([&]() { tryRestartReplica(table, system_context, false); }); {
LOG_TRACE(log, "Restarting replica on {}", replica.getNameForLogs());
pool.scheduleOrThrowOnError([&]() { tryRestartReplica(replica, system_context, false); });
}
pool.wait(); pool.wait();
} }