Skip to content

Commit 73077c7

Browse files
committed
updates to upload/download
1 parent 7db08b0 commit 73077c7

5 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/aws-cpp-sdk-s3-transfer/include/aws/s3-transfer/DownloadHandle.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class AWS_S3_TRANSFER_API DownloadHandle final {
2121
public:
2222
explicit DownloadHandle(Aws::UniquePtr<DownloadHandleImpl> impl);
2323
~DownloadHandle();
24+
DownloadHandle(const DownloadHandle&) = delete;
25+
DownloadHandle& operator=(const DownloadHandle&) = delete;
2426
DownloadHandle(DownloadHandle&&) noexcept;
2527
DownloadHandle& operator=(DownloadHandle&&) noexcept;
2628

src/aws-cpp-sdk-s3-transfer/include/aws/s3-transfer/S3TransferManagerConfiguration.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ namespace Aws {
1515
namespace S3 {
1616
namespace Transfer {
1717

18-
constexpr uint64_t SEP_DEFAULT_PART_SIZE_BYTES = 8ULL * 1024 * 1024;
19-
constexpr uint64_t SEP_DEFAULT_MULTIPART_UPLOAD_THRESHOLD_BYTES = 16ULL * 1024 * 1024;
18+
constexpr uint64_t DEFAULT_PART_SIZE_BYTES = 8ULL * 1024 * 1024;
19+
constexpr uint64_t DEFAULT_MULTIPART_UPLOAD_THRESHOLD_BYTES = 16ULL * 1024 * 1024;
2020

2121
struct AWS_S3_TRANSFER_API S3TransferManagerConfiguration final : public Aws::Client::GenericClientConfiguration {
2222
using BaseClientConfigClass = Aws::Client::GenericClientConfiguration;
@@ -26,9 +26,9 @@ struct AWS_S3_TRANSFER_API S3TransferManagerConfiguration final : public Aws::Cl
2626
explicit S3TransferManagerConfiguration(bool useSmartDefaults, const char* defaultMode = "legacy", bool shouldDisableIMDS = false);
2727
S3TransferManagerConfiguration(const Aws::Client::ClientConfiguration& config);
2828

29-
uint64_t partSize = SEP_DEFAULT_PART_SIZE_BYTES;
29+
uint64_t partSize = DEFAULT_PART_SIZE_BYTES;
3030
// Object size at or above which a multipart transfer is used. Must be >= partSize.
31-
uint64_t multipartUploadThreshold = SEP_DEFAULT_MULTIPART_UPLOAD_THRESHOLD_BYTES;
31+
uint64_t multipartUploadThreshold = DEFAULT_MULTIPART_UPLOAD_THRESHOLD_BYTES;
3232
// 0 means inherit the CRT's own default.
3333
double throughputTargetGbps = 0.0;
3434
Aws::Crt::Optional<Aws::Crt::Io::TlsConnectionOptions> tlsConnectionOptions;

src/aws-cpp-sdk-s3-transfer/include/aws/s3-transfer/UploadHandle.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class AWS_S3_TRANSFER_API UploadHandle final {
2121
public:
2222
explicit UploadHandle(Aws::UniquePtr<UploadHandleImpl> impl);
2323
~UploadHandle();
24+
UploadHandle(const UploadHandle&) = delete;
25+
UploadHandle& operator=(const UploadHandle&) = delete;
2426
UploadHandle(UploadHandle&&) noexcept;
2527
UploadHandle& operator=(UploadHandle&&) noexcept;
2628

src/aws-cpp-sdk-s3-transfer/source/s3-transfer/internal/CrtOperations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ bool TryMeasureSeekableStream(Aws::IOStream& stream, uint64_t& outLength) {
238238
void RunAsyncWriteDriver(std::shared_ptr<UploadTransferState> state,
239239
std::shared_ptr<Aws::Crt::S3::S3MetaRequest> metaRequest,
240240
std::shared_ptr<Aws::IOStream> body) {
241-
Aws::Utils::Array<uint8_t> buffer(static_cast<size_t>(SEP_DEFAULT_PART_SIZE_BYTES));
241+
Aws::Utils::Array<uint8_t> buffer(static_cast<size_t>(DEFAULT_PART_SIZE_BYTES));
242242
bool eof = false;
243243
while (!eof) {
244244
if (state->canceled.load()) {

src/aws-cpp-sdk-s3-transfer/source/s3-transfer/internal/S3TransferManagerImpl.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ S3TransferManagerImpl::S3TransferManagerImpl(const S3TransferManagerConfiguratio
3030
Aws::Crt::S3::S3ClientConfig clientConfig(m_credentialsProvider);
3131
clientConfig.SetRegion(Aws::Crt::String(m_region.c_str()))
3232
.SetPartSize(config.partSize)
33-
.SetMultipartUploadThreshold(config.multipartUploadThreshold);
34-
if (config.throughputTargetGbps > 0.0) {
35-
clientConfig.SetThroughputTargetGbps(config.throughputTargetGbps);
36-
}
33+
.SetMultipartUploadThreshold(config.multipartUploadThreshold)
34+
.SetThroughputTargetGbps(config.throughputTargetGbps);
3735
if (config.tlsConnectionOptions) {
3836
clientConfig.SetTlsConnectionOptions(*config.tlsConnectionOptions);
3937
}

0 commit comments

Comments
 (0)