| 805 | } |
| 806 | |
| 807 | std::unique_ptr<ReadBufferFromFileBase> BackupImpl::readFileByObjectKey(const BackupFileInfo & info) const |
| 808 | { |
| 809 | if (open_mode == OpenMode::WRITE) |
| 810 | throw Exception(ErrorCodes::LOGICAL_ERROR, "The backup file should not be opened for writing. Something is wrong internally"); |
| 811 | |
| 812 | if (info.object_key.empty()) |
| 813 | throw Exception(ErrorCodes::LOGICAL_ERROR, "Object key of {} is empty string", info.data_file_name); |
| 814 | |
| 815 | return lightweight_snapshot_reader->readFile(info.object_key); |
| 816 | } |
| 817 | |
| 818 | std::unique_ptr<ReadBufferFromFileBase> |
| 819 | BackupImpl::readFileImpl(const String & file_name, const SizeAndChecksum & size_and_checksum, bool read_encrypted) const |