mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Fix ATTACH FROM s3_plain for wide part
Previously because of incorrect MetadataStorageFromPlainObjectStorage::exists(), that used S3ObjectStorage::exists() before, which works only for existing keys, not some intermediate path. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
41884d3b88
commit
2cbc61df18
@ -39,8 +39,11 @@ std::filesystem::path MetadataStorageFromPlainObjectStorage::getAbsolutePath(con
|
||||
|
||||
bool MetadataStorageFromPlainObjectStorage::exists(const std::string & path) const
|
||||
{
|
||||
auto object = StoredObject::create(*object_storage, getAbsolutePath(path));
|
||||
return object_storage->exists(object);
|
||||
RelativePathsWithSize children;
|
||||
/// NOTE: exists() cannot be used here since it works only for existing
|
||||
/// key, and does not work for some intermediate path.
|
||||
object_storage->findAllFiles(getAbsolutePath(path), children, 1);
|
||||
return !children.empty();
|
||||
}
|
||||
|
||||
bool MetadataStorageFromPlainObjectStorage::isFile(const std::string & path) const
|
||||
|
Loading…
Reference in New Issue
Block a user