Do not save preprocessed config for clickhouse-local

It seems that there is no purpose on doing this, and it just produce an
error due to permission errors (i.e. before this patch if you will pass
small config with some overrides then it will try to write to
/var/lib/clickhouse by default).
This commit is contained in:
Azat Khuzhin 2021-10-25 21:12:45 +03:00
parent ff56a81b46
commit 7fe028245e

View File

@ -179,7 +179,6 @@ void LocalServer::initialize(Poco::Util::Application & self)
ConfigProcessor config_processor(config_path, false, true);
config_processor.setConfigPath(fs::path(config_path).parent_path());
auto loaded_config = config_processor.loadConfig();
config_processor.savePreprocessedConfig(loaded_config, loaded_config.configuration->getString("path", "."));
config().add(loaded_config.configuration.duplicate(), PRIO_DEFAULT, false);
}
@ -380,7 +379,6 @@ void LocalServer::setupUsers()
const auto users_config_path = config().getString("users_config", config().getString("config-file", "config.xml"));
ConfigProcessor config_processor(users_config_path);
const auto loaded_config = config_processor.loadConfig();
config_processor.savePreprocessedConfig(loaded_config, config().getString("path", DBMS_DEFAULT_PATH));
users_config = loaded_config.configuration;
}
else