mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
assert that setting are not empty
This commit is contained in:
parent
e3aa2d9d56
commit
933a38269c
@ -90,6 +90,17 @@ WriteBufferFromS3::WriteBufferFromS3(
|
||||
allocateBuffer();
|
||||
}
|
||||
|
||||
void WriteBufferFromS3::assertSettings() const
|
||||
{
|
||||
assert(request_settings.min_upload_part_size > 0);
|
||||
assert(request_settings.max_upload_part_size > 0);
|
||||
assert(request_settings.upload_part_size_multiply_factor > 0);
|
||||
assert(request_settings.upload_part_size_multiply_parts_count_threshold > 0);
|
||||
assert(request_settings.max_part_number > 0);
|
||||
assert(request_settings.max_single_part_upload_size > 0);
|
||||
assert(request_settings.max_unexpected_write_error_retries > 0);
|
||||
}
|
||||
|
||||
void WriteBufferFromS3::nextImpl()
|
||||
{
|
||||
if (!offset())
|
||||
@ -111,6 +122,7 @@ void WriteBufferFromS3::nextImpl()
|
||||
if (multipart_upload_id.empty() && last_part_size > request_settings.max_single_part_upload_size)
|
||||
createMultipartUpload();
|
||||
|
||||
assert(upload_part_size>0);
|
||||
if (!multipart_upload_id.empty() && last_part_size > upload_part_size)
|
||||
{
|
||||
writePart();
|
||||
|
@ -63,6 +63,7 @@ public:
|
||||
void preFinalize() override;
|
||||
|
||||
private:
|
||||
void assertSettings() const;
|
||||
void allocateBuffer();
|
||||
|
||||
void createMultipartUpload();
|
||||
|
Loading…
Reference in New Issue
Block a user