-
Notifications
You must be signed in to change notification settings - Fork 101
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
Refactor chunk upload and make the parallel uploads configurable #68
Conversation
24a1b34
to
abaf3c5
Compare
Signed-off-by: Swapnil Mhamane <[email protected]>
abaf3c5
to
40558fa
Compare
@georgekuruvillak @shreyas-s-rao Thank you for the review. I have addressed your comments. PTAL. |
pkg/snapstore/utils.go
Outdated
default: | ||
chunkUploadCh <- *chunk | ||
} | ||
}) | ||
} | ||
remainingChunks-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remainingChunks should be reduced only on a successful upload, ryt? So can we have it in an else
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh. Right. Sorry this I probably changed back in second iteration of refactoring. Will change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work. Well written. I have some minor comments. Can you go through it and address it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work. Well written. I have some minor comments. Can you go through it and address it?
680e421
to
636fd53
Compare
@georgekuruvillak Done. Tested and updated PR. Automated negative unit test are on the way in different PR once we have mock clients for different providers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I just have a few refactoring suggestions. Other than that, LGTM! 😃
636fd53
to
ff934a8
Compare
Signed-off-by: Swapnil Mhamane <[email protected]>
ff934a8
to
a19ec64
Compare
Signed-off-by: Swapnil Mhamane <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍🏼
Signed-off-by: Swapnil Mhamane [email protected]
What this PR does / why we need it:
Earlier we used to spawn go routine for all chunks simultaneously which was causing network traffic. This PR refactor the multi-part/chunk upload code. Now, we can configure the number of parallel chunk upload upper limit.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Please test both snapshot and server sub-command against all cloud providers.
Release note: