mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Fix stupid bug
This commit is contained in:
parent
5c3846f421
commit
0cd82080b9
@ -389,13 +389,14 @@ void DiskObjectStorage::removeMetadata(const String & path, std::vector<String>
|
||||
|
||||
try
|
||||
{
|
||||
uint32_t hardlink_count = metadata_storage->getHardlinkCount(path);
|
||||
auto remote_objects = metadata_storage->getRemotePaths(path);
|
||||
|
||||
auto tx = metadata_storage->createTransaction();
|
||||
tx->unlinkMetadata(path);
|
||||
tx->commit();
|
||||
uint32_t hardlink_count = metadata_storage->getHardlinkCount(path);
|
||||
|
||||
if (hardlink_count == 0)
|
||||
if (hardlink_count <= 1)
|
||||
{
|
||||
paths_to_remove = remote_objects;
|
||||
for (const auto & path_to_remove : paths_to_remove)
|
||||
|
Loading…
Reference in New Issue
Block a user