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

Restore improvement: rate limit #4070

Merged
merged 7 commits into from
Oct 15, 2024
Merged

Conversation

Michal-Leszczynski
Copy link
Collaborator

This PR adds a way to control rate limit in the context of restore via new --rate-limit restore flag with default value 0 - meaning no rate limit at all.
It borrows rate limit syntax from backup pkg for consistency - meaning that it's possible to specify rate limit per dc.

Fixes #3947

As we want to add rate limit to restore, we should
reuse the code already present in the backup pkg.
This commit also makes functions generic.
It's useful for testing purposes.
This is the first step to control rate limit in the context of restore.
This commit requires changes in the usage of RcloneCopyPaths in restore pkg.
This commit allows user to control rclone server rate limit used during restore.
This commit requires changes in the usage of RcloneMoveDir in backup pkg.
…th rate limit

This way this test also checks rate limit before and after backup.
It also checks transfers before, in the middle, when paused,
when resumed, and after restore.

This commit also extends the test to change transfers
and rate limit values when restore is paused, so that
it validates that they are correctly re-set during
restore data stage.
@Michal-Leszczynski Michal-Leszczynski marked this pull request as ready for review October 15, 2024 10:54
@Michal-Leszczynski
Copy link
Collaborator Author

@karol-kokoszka This PR is ready for review!

Copy link
Collaborator

@karol-kokoszka karol-kokoszka left a comment

Choose a reason for hiding this comment

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

👍

@karol-kokoszka
Copy link
Collaborator

@Michal-Leszczynski Is it possible to give another commit name when you choose to "squash and merge" ? I see that there are plenty of "Restore improvement: transfers" etc commits on master.
feat(restore): <explain> looks better I guess.

@Michal-Leszczynski Michal-Leszczynski merged commit 8af93cf into master Oct 15, 2024
52 checks passed
@Michal-Leszczynski Michal-Leszczynski deleted the ml/restore-ratelimit branch October 15, 2024 14:54
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.

Use rate limit in the restore
2 participants