mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Even less directories
This commit is contained in:
parent
089cc25d9b
commit
6a083ebed0
@ -249,9 +249,6 @@ void LocalServer::tryInitPath()
|
||||
LOG_DEBUG(log, "Working directory created: {}", path);
|
||||
}
|
||||
|
||||
fs::create_directories(fs::path(path) / "data" / "");
|
||||
fs::create_directories(fs::path(path) / "metadata" / "");
|
||||
|
||||
global_context->setPath(fs::path(path) / "");
|
||||
|
||||
global_context->setTemporaryStoragePath(fs::path(path) / "tmp" / "", 0);
|
||||
|
@ -224,7 +224,7 @@ static UInt64 getTotalSpaceByName(const String & name, const String & disk_path,
|
||||
{
|
||||
struct statvfs fs;
|
||||
if (name == "default") /// for default disk we get space from path/data/
|
||||
fs = getStatVFS((fs::path(disk_path) / "data/").string());
|
||||
fs = getStatVFS((fs::path(disk_path) / "data" / "").string());
|
||||
else
|
||||
fs = getStatVFS(disk_path);
|
||||
UInt64 total_size = fs.f_blocks * fs.f_frsize;
|
||||
@ -248,7 +248,7 @@ std::optional<UInt64> DiskLocal::getAvailableSpace() const
|
||||
/// available for superuser only and for system purposes
|
||||
struct statvfs fs;
|
||||
if (name == "default") /// for default disk we get space from path/data/
|
||||
fs = getStatVFS((fs::path(disk_path) / "data/").string());
|
||||
fs = getStatVFS((fs::path(disk_path) / "data" / "").string());
|
||||
else
|
||||
fs = getStatVFS(disk_path);
|
||||
UInt64 total_size = fs.f_bavail * fs.f_frsize;
|
||||
|
@ -1091,9 +1091,7 @@ void Context::setTemporaryStoragePath(const String & path, size_t max_size)
|
||||
VolumePtr volume = createLocalSingleDiskVolume(shared->tmp_path, shared->getConfigRefWithLock(lock));
|
||||
|
||||
for (const auto & disk : volume->getDisks())
|
||||
{
|
||||
setupTmpPath(shared->log, disk->getPath());
|
||||
}
|
||||
|
||||
TemporaryDataOnDiskSettings temporary_data_on_disk_settings;
|
||||
temporary_data_on_disk_settings.max_size_on_disk = max_size;
|
||||
|
Loading…
Reference in New Issue
Block a user