diff --git a/fdbclient/BackupContainerBlobStore.cpp b/fdbclient/BackupContainerBlobStore.cpp index 505dea70a41..19d81dde598 100644 --- a/fdbclient/BackupContainerBlobStore.cpp +++ b/fdbclient/BackupContainerBlobStore.cpp @@ -198,9 +198,6 @@ void BackupContainerBlobStore::validateBackupUrl(const std::string& resource) { Future> BackupContainerBlobStore::readFile(const std::string& path) { Reference f = makeReference(m_bstore, m_bucket, dataPath(path)); - if (usesEncryption() && !StringRef(path).startsWith("properties/"_sr)) { - f = makeReference(f, AsyncFileEncrypted::Mode::READ_ONLY, encryptionBlockSize); - } if (m_bstore->knobs.enable_read_cache) { f = makeReference(f, m_bstore->knobs.read_block_size, @@ -208,6 +205,9 @@ Future> BackupContainerBlobStore::readFile(const std::stri m_bstore->knobs.concurrent_reads_per_file, m_bstore->knobs.read_cache_blocks_per_file); } + if (usesEncryption() && !StringRef(path).startsWith("properties/"_sr)) { + f = makeReference(f, AsyncFileEncrypted::Mode::READ_ONLY, encryptionBlockSize); + } return f; }