This commit is contained in:
Igor Mineev 2019-05-21 14:09:57 +03:00
parent f74b7331f5
commit 645ce7c9a4
2 changed files with 3 additions and 1 deletions

View File

@ -237,7 +237,7 @@ SchemaSelector::SchemaSelector(const Poco::Util::AbstractConfiguration & config,
if (!std::all_of(name.begin(), name.end(), isWordCharASCII))
throw Exception("Schema name can contain only alphanumeric and '_' (" + name + ")", ErrorCodes::EXCESSIVE_ELEMENT_IN_CONFIG);
schemas.emplace(name, Schema{config, config_prefix + "." + name, disks});
LOG_INFO(logger, "Storage schema " << name << " Sloaded");
LOG_INFO(logger, "Storage schema " << name << " loaded");
}
constexpr auto default_schema_name = "default";

View File

@ -170,6 +170,8 @@ public:
{
/// Just make reservation if size is 0
if (size == 0) {
std::lock_guard lock(DiskSpaceMonitor::mutex);
reserves = &DiskSpaceMonitor::reserved[disk_ptr->getName()];
++reserves->reservation_count;
valid = true;
return;