[Disks] ReadBufferFromS3 requires a version id.

This commit is contained in:
Saad Ur Rahman 2022-03-14 20:18:10 -04:00
parent e3a96393a1
commit 98b2994352
No known key found for this signature in database
GPG Key ID: C6773CD21542E49C
2 changed files with 4 additions and 1 deletions

View File

@ -43,7 +43,7 @@ SeekableReadBufferPtr ReadBufferFromS3Gather::createImplementationBuffer(const S
auto remote_file_reader_creator = [=, this]()
{
return std::make_unique<ReadBufferFromS3>(
client_ptr, bucket, fs::path(metadata.remote_fs_root_path) / path, max_single_read_retries,
client_ptr, bucket, version_id, fs::path(metadata.remote_fs_root_path) / path, max_single_read_retries,
settings, /* use_external_buffer */true, read_until_position, /* restricted_seek */true);
};

View File

@ -104,12 +104,14 @@ public:
const String & path_,
std::shared_ptr<Aws::S3::S3Client> client_ptr_,
const String & bucket_,
const String & version_id_,
IDiskRemote::Metadata metadata_,
size_t max_single_read_retries_,
const ReadSettings & settings_)
: ReadBufferFromRemoteFSGather(metadata_, settings_, path_)
, client_ptr(std::move(client_ptr_))
, bucket(bucket_)
, version_id(version_id_)
, max_single_read_retries(max_single_read_retries_)
{
}
@ -119,6 +121,7 @@ public:
private:
std::shared_ptr<Aws::S3::S3Client> client_ptr;
String bucket;
String version_id;
UInt64 max_single_read_retries;
};
#endif