This commit is contained in:
Alexander Tokmakov 2020-08-13 22:41:06 +03:00
parent cd3155ff19
commit d1ef34adff

View File

@ -247,12 +247,15 @@ try
context->setCurrentDatabase(default_database);
applyCmdOptions();
if (!context->getPath().empty())
String path = context->getPath();
if (!path.empty())
{
/// Lock path directory before read
status.emplace(context->getPath() + "status", StatusFile::write_full_info);
LOG_DEBUG(log, "Loading metadata from {}", context->getPath());
LOG_DEBUG(log, "Loading metadata from {}", path);
Poco::File(path + "data/").createDirectories();
Poco::File(path + "metadata/").createDirectories();
loadMetadataSystem(*context);
attachSystemTables(*context);
loadMetadata(*context);