mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
Fix obvious bug
This commit is contained in:
parent
5d186a438c
commit
71a7ae1274
@ -386,11 +386,10 @@ void DiskObjectStorage::removeMetadata(const String & path, std::vector<String>
|
||||
if (!metadata_storage->isFile(path))
|
||||
throw Exception(ErrorCodes::BAD_FILE_TYPE, "Path '{}' is not a regular file", path);
|
||||
|
||||
auto remote_objects = metadata_storage->getRemotePaths(path);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
auto remote_objects = metadata_storage->getRemotePaths(path);
|
||||
auto tx = metadata_storage->createTransaction();
|
||||
uint32_t hardlink_count = metadata_storage->unlinkAndGetHardlinkCount(path, tx);
|
||||
tx->commit();
|
||||
@ -499,7 +498,7 @@ void DiskObjectStorage::removeSharedRecursive(const String & path, bool keep_all
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<UInt64> DiskObjectStorage::tryReserve(UInt64 bytes)
|
||||
std::optional<UInt64> DiskObjectStorage::tryReserve(UInt64 bytes)
|
||||
{
|
||||
std::lock_guard lock(reservation_mutex);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user