mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Merge pull request #52038 from azat/s3-plain-send_metadata
Prohibit send_metadata for s3_plain disks
This commit is contained in:
commit
139f59f51f
@ -122,6 +122,14 @@ void registerDiskS3(DiskFactory & factory, bool global_skip_access_check)
|
||||
auto client = getClient(config, config_prefix, context, *settings);
|
||||
if (type == "s3_plain")
|
||||
{
|
||||
/// send_metadata changes the filenames (includes revision), while
|
||||
/// s3_plain do not care about this, and expect that the file name
|
||||
/// will not be changed.
|
||||
///
|
||||
/// And besides, send_metadata does not make sense for s3_plain.
|
||||
if (config.getBool(config_prefix + ".send_metadata", false))
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "s3_plain does not supports send_metadata");
|
||||
|
||||
s3_storage = std::make_shared<S3PlainObjectStorage>(std::move(client), std::move(settings), uri.version_id, s3_capabilities, uri.bucket, uri.endpoint);
|
||||
metadata_storage = std::make_shared<MetadataStorageFromPlainObjectStorage>(s3_storage, uri.key);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user