mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 09:52:38 +00:00
Fix default data path
This commit is contained in:
parent
eba3f3e0d0
commit
320d509b42
@ -1719,7 +1719,7 @@ DiskSelector & Context::getDiskSelector() const
|
||||
constexpr auto config_name = "storage_configuration.disks";
|
||||
auto & config = getConfigRef();
|
||||
|
||||
shared->merge_tree_disk_selector = std::make_unique<DiskSelector>(config, config_name, getPath());
|
||||
shared->merge_tree_disk_selector = std::make_unique<DiskSelector>(config, config_name, getPath() + "data/");
|
||||
}
|
||||
return *shared->merge_tree_disk_selector;
|
||||
}
|
||||
|
@ -2607,7 +2607,7 @@ MergeTreeData::DataPartsVector MergeTreeData::getAllDataPartsVector(MergeTreeDat
|
||||
|
||||
DiskSpaceMonitor::ReservationPtr MergeTreeData::reserveSpaceForPart(UInt64 expected_size)
|
||||
{
|
||||
constexpr UInt64 SIZE_1MB = 1ull << 20; ///@TODO_IGR ASK Is it OK?
|
||||
constexpr UInt64 SIZE_1MB = 1ull << 20u; ///@TODO_IGR ASK Is it OK?
|
||||
constexpr UInt64 MAGIC_CONST = 1;
|
||||
|
||||
if (expected_size < SIZE_1MB)
|
||||
@ -2617,8 +2617,7 @@ DiskSpaceMonitor::ReservationPtr MergeTreeData::reserveSpaceForPart(UInt64 expec
|
||||
if (reservation)
|
||||
return reservation;
|
||||
|
||||
throw Exception("Not enough free disk space to reserve: " + formatReadableSizeWithBinarySuffix(expected_size) + " requested, "
|
||||
+ formatReadableSizeWithBinarySuffix(schema.getMaxUnreservedFreeSpace()) + " available",
|
||||
throw Exception("Not enough free disk space to reserve: " + formatReadableSizeWithBinarySuffix(expected_size) + " requested",
|
||||
ErrorCodes::NOT_ENOUGH_SPACE);
|
||||
}
|
||||
|
||||
|
@ -1050,8 +1050,6 @@ bool StorageReplicatedMergeTree::tryExecuteMerge(const LogEntry & entry)
|
||||
|
||||
/// Can throw an exception.
|
||||
DiskSpaceMonitor::ReservationPtr reserved_space = reserveSpaceForPart(estimated_space_for_merge);
|
||||
if (!reserved_space)
|
||||
throw Exception("TMP MSG", ErrorCodes::NOT_ENOUGH_SPACE); ///@TODO_IGR FIX
|
||||
|
||||
auto table_lock = lockStructureForShare(false, RWLockImpl::NO_QUERY);
|
||||
|
||||
@ -1183,8 +1181,6 @@ bool StorageReplicatedMergeTree::tryExecutePartMutation(const StorageReplicatedM
|
||||
|
||||
/// Can throw an exception.
|
||||
DiskSpaceMonitor::ReservationPtr reserved_space = reserveSpaceForPart(estimated_space_for_result);
|
||||
if (!reserved_space)
|
||||
throw Exception("TMP MSG", ErrorCodes::NOT_ENOUGH_SPACE); ///@TODO_IGR FIX
|
||||
|
||||
auto table_lock = lockStructureForShare(false, RWLockImpl::NO_QUERY);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user