Merge pull request #21676 from azat/fix-server-startup

Start accepting connections after DDLWorker and dictionaries initialization
This commit is contained in:
alesapin 2021-03-15 13:10:44 +03:00 committed by GitHub
commit 9d9684cc42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1280,9 +1280,6 @@ int Server::main(const std::vector<std::string> & /*args*/)
async_metrics.start(); async_metrics.start();
global_context->enableNamedSessions(); global_context->enableNamedSessions();
for (auto & server : *servers)
server.start();
{ {
String level_str = config().getString("text_log.level", ""); String level_str = config().getString("text_log.level", "");
int level = level_str.empty() ? INT_MAX : Poco::Logger::parseLevel(level_str); int level = level_str.empty() ? INT_MAX : Poco::Logger::parseLevel(level_str);
@ -1334,6 +1331,8 @@ int Server::main(const std::vector<std::string> & /*args*/)
"distributed_ddl", "DDLWorker", &CurrentMetrics::MaxDDLEntryID)); "distributed_ddl", "DDLWorker", &CurrentMetrics::MaxDDLEntryID));
} }
for (auto & server : *servers)
server.start();
LOG_INFO(log, "Ready for connections."); LOG_INFO(log, "Ready for connections.");
SCOPE_EXIT({ SCOPE_EXIT({