Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAR-113: Add --min-chunk-size option to barman-cloud-backup #849

Merged

Conversation

mikewallace1979
Copy link
Contributor

No description provided.

@mikewallace1979 mikewallace1979 marked this pull request as ready for review September 22, 2023 19:29
Copy link
Contributor

@gcalacoci gcalacoci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite sure how I managed to add this to the PR - it wasn't intentional.

Adds a new option, `--min-chunk-size`, to `barman-cloud-backup`. If set
then this will be used when setting the minimum size of an upload chunk
in a multipart upload. The only guarantee Barman offers here is that
the upload chunk size will be greater than this value - the actual
chunk size used will be whichver is greatest of: `--min-chunk-size`,
the `MIN_CHUNK_SIZE` for the cloud provider, or the calculated chunk
size based on the `max_archive_size` and the `MAX_CHUNKS_PER_FILE`
property of the cloud interface.

This can be used to ensure uploaded chunks are not smaller than the
specified value.

Relates to BAR-113.
Rather than test the `--min-chunk-size` against the calculated chunk
size in one place and then test the result against the cloud interface
`MIN_CHUNK_SIZE` in another, we peform all `chunk_size` setting checks
in the `CloudUploadController` and update `CloudTarUploader` so that it
is just given the chunk size by the upload controller.

Relates to BAR-113.
Updates the unit tests for the `CloudBackupUploader` creation such that
they validate that both `--max-archive-size` and the new
`--min-chunk-size` options are passed to the `CloudBackupUploader`.

Relates to BAR-113.
Update tests so that chunk_size is now passed to CloudTarUploader
instead of being read from the cloud interface.

Relates to BAR-113.
Adds tests for ClourUploadController which verify that it computes the
correct max_archive_size and chunk_size given the supplied arguments
and cloud interface properties.

Relates to BAR-113.
@mikewallace1979 mikewallace1979 force-pushed the bar-113-option-for-min-chunk-size-in-barman-cloud branch from c03d615 to 83f6951 Compare September 27, 2023 09:08
@edb-sonar-app
Copy link

edb-sonar-app bot commented Sep 27, 2023

@mikewallace1979 mikewallace1979 merged commit 53a0461 into master Sep 27, 2023
9 checks passed
@mikewallace1979 mikewallace1979 deleted the bar-113-option-for-min-chunk-size-in-barman-cloud branch September 27, 2023 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants