Add option to DiskS3 that allows it's usage if S3 unavailable (#14497)

This commit is contained in:
Pavel Kovalenko 2020-09-09 02:35:57 +03:00 committed by GitHub
parent c4005bae1d
commit 3632b0bdb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,9 +145,12 @@ void registerDiskS3(DiskFactory & factory)
config.getUInt64(config_prefix + ".min_bytes_for_seek", 1024 * 1024));
/// This code is used only to check access to the corresponding disk.
checkWriteAccess(*s3disk);
checkReadAccess(name, *s3disk);
checkRemoveAccess(*s3disk);
if (!config.getBool(config_prefix + ".skip_access_check", false))
{
checkWriteAccess(*s3disk);
checkReadAccess(name, *s3disk);
checkRemoveAccess(*s3disk);
}
bool cache_enabled = config.getBool(config_prefix + ".cache_enabled", true);