mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Use method which was added for s3 instead
This commit is contained in:
parent
5f5bbc1fca
commit
b25dfdd6af
@ -367,15 +367,17 @@ SyncGuardPtr DiskLocal::getDirectorySyncGuard(const String & path) const
|
||||
return std::make_unique<LocalDirectorySyncGuard>(fs::path(disk_path) / path);
|
||||
}
|
||||
|
||||
void DiskLocal::updateFromConfigIfChanged(const Poco::Util::AbstractConfiguration & config,
|
||||
const String & config_prefix, ContextPtr context)
|
||||
|
||||
void DiskLocal::applyNewSettings(const Poco::Util::AbstractConfiguration & config, ContextPtr context, const String & config_prefix, const DisksMap &)
|
||||
{
|
||||
String new_disk_path;
|
||||
UInt64 new_keep_free_space_bytes;
|
||||
|
||||
loadDiskLocalConfig(name, config, config_prefix, context, new_disk_path, new_keep_free_space_bytes);
|
||||
|
||||
if (disk_path != new_disk_path)
|
||||
throw Exception("Disk path can't update from config " + name, ErrorCodes::UNKNOWN_ELEMENT_IN_CONFIG);
|
||||
throw Exception("Disk path can't be updated from config " + name, ErrorCodes::UNKNOWN_ELEMENT_IN_CONFIG);
|
||||
|
||||
if (keep_free_space_bytes != new_keep_free_space_bytes)
|
||||
keep_free_space_bytes = new_keep_free_space_bytes;
|
||||
}
|
||||
|
@ -105,9 +105,7 @@ public:
|
||||
|
||||
SyncGuardPtr getDirectorySyncGuard(const String & path) const override;
|
||||
|
||||
void updateFromConfigIfChanged(const Poco::Util::AbstractConfiguration & config,
|
||||
const String & config_prefix,
|
||||
ContextPtr context) override;
|
||||
void applyNewSettings(const Poco::Util::AbstractConfiguration & config, ContextPtr context, const String & config_prefix, const DisksMap &) override;
|
||||
|
||||
private:
|
||||
bool tryReserve(UInt64 bytes);
|
||||
|
@ -74,8 +74,6 @@ DiskSelectorPtr DiskSelector::updateFromConfig(
|
||||
disk->applyNewSettings(config, context, disk_config_prefix, result->getDisksMap());
|
||||
|
||||
old_disks_minus_new_disks.erase(disk_name);
|
||||
|
||||
result->getDisksMap().find(disk_name)->second->updateFromConfigIfChanged(config, disk_config_prefix, context);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,11 +231,6 @@ public:
|
||||
/// Required for remote disk to ensure that replica has access to data written by other node
|
||||
virtual bool checkUniqueId(const String & id) const { return exists(id); }
|
||||
|
||||
/// Reload config if it was changed
|
||||
virtual void updateFromConfigIfChanged(const Poco::Util::AbstractConfiguration & /* config */,
|
||||
const String & /* config_prefix */,
|
||||
ContextPtr /* context */) { }
|
||||
|
||||
/// Invoked on partitions freeze query.
|
||||
virtual void onFreeze(const String &) { }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user