diff --git a/src/Storages/MergeTree/DataPartsExchange.cpp b/src/Storages/MergeTree/DataPartsExchange.cpp index 23d62d11814..97d47a4d00c 100644 --- a/src/Storages/MergeTree/DataPartsExchange.cpp +++ b/src/Storages/MergeTree/DataPartsExchange.cpp @@ -1,5 +1,7 @@ #include +#include + #include #include #include @@ -579,6 +581,8 @@ MergeTreeData::MutableDataPartPtr Fetcher::fetchSelectedPart( if (e.code() != ErrorCodes::S3_ERROR && e.code() != ErrorCodes::ZERO_COPY_REPLICATION_ERROR) throw; + +#if USE_AWS_S3 if (const auto * s3_exception = dynamic_cast(&e)) { /// It doesn't make sense to retry Access Denied or No Such Key @@ -588,6 +592,7 @@ MergeTreeData::MutableDataPartPtr Fetcher::fetchSelectedPart( throw; } } +#endif LOG_WARNING(log, fmt::runtime(e.message() + " Will retry fetching part without zero-copy."));