Merge pull request #1636 from bocharov/master

Fix mark cache settings initialization.
This commit is contained in:
alexey-milovidov 2017-12-13 23:45:45 +03:00 committed by GitHub
commit 1612aab3c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,17 +253,17 @@ int Server::main(const std::vector<std::string> & /*args*/)
if (uncompressed_cache_size)
global_context->setUncompressedCache(uncompressed_cache_size);
/// Size of cache for marks (index of MergeTree family of tables). It is necessary.
size_t mark_cache_size = config().getUInt64("mark_cache_size");
if (mark_cache_size)
global_context->setMarkCache(mark_cache_size);
/// Load global settings from default profile.
Settings & settings = global_context->getSettingsRef();
String default_profile_name = config().getString("default_profile", "default");
global_context->setDefaultProfileName(default_profile_name);
global_context->setSetting("profile", default_profile_name);
/// Size of cache for marks (index of MergeTree family of tables). It is necessary.
size_t mark_cache_size = config().getUInt64("mark_cache_size");
if (mark_cache_size)
global_context->setMarkCache(mark_cache_size);
/// Set path for format schema files
auto format_schema_path = Poco::File(config().getString("format_schema_path", path + "format_schemas/"));
global_context->setFormatSchemaPath(format_schema_path.path() + "/");