mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Do not check to and from files existence in metadata_storage because it does not see uncommitted changes
This commit is contained in:
parent
8607e74966
commit
b45ff56e4d
@ -595,12 +595,6 @@ void DiskObjectStorageTransaction::moveFile(const String & from_path, const Stri
|
|||||||
operations_to_execute.emplace_back(
|
operations_to_execute.emplace_back(
|
||||||
std::make_unique<PureMetadataObjectStorageOperation>(object_storage, metadata_storage, [from_path, to_path, this](MetadataTransactionPtr tx)
|
std::make_unique<PureMetadataObjectStorageOperation>(object_storage, metadata_storage, [from_path, to_path, this](MetadataTransactionPtr tx)
|
||||||
{
|
{
|
||||||
if (metadata_storage.exists(to_path))
|
|
||||||
throw Exception(ErrorCodes::FILE_ALREADY_EXISTS, "File already exists: {}", to_path);
|
|
||||||
|
|
||||||
if (!metadata_storage.exists(from_path))
|
|
||||||
throw Exception(ErrorCodes::FILE_DOESNT_EXIST, "File {} doesn't exist, cannot move", from_path);
|
|
||||||
|
|
||||||
tx->moveFile(from_path, to_path);
|
tx->moveFile(from_path, to_path);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user