-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Implementing no-overwrite for sync and download #9609
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
Merged
kdaily
merged 4 commits into
aws:s3-no-overwrite
from
rakshil14-2:no_overwrite_for_sync_operation
Aug 11, 2025
Merged
Implementing no-overwrite for sync and download #9609
kdaily
merged 4 commits into
aws:s3-no-overwrite
from
rakshil14-2:no_overwrite_for_sync_operation
Aug 11, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2b8e96b
to
8f26bf8
Compare
cf15105
to
8f26bf8
Compare
Adding Warning handler for no_overwrite
handled error during download streaming streaming
ede77f2
to
db0a335
Compare
hssyoo
requested changes
Jul 30, 2025
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.
Looking good, just had some minor feedback.
hssyoo
reviewed
Aug 4, 2025
hssyoo
requested changes
Aug 4, 2025
hssyoo
approved these changes
Aug 4, 2025
Updated test case Updated doc comment Added test cases Updating Sync Strategy Updated comments Updated comments Override sync strategy Overridding sync strategy
Added no overwrite for download operation handled error during download streaming streaming Improved upload test cases Updated test cases Added test cases Resolved requested changes NIT change
cb64e3a
to
eb56a58
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue : Github Issue #2874
Description of changes:
Customers requested to prevent overwriting of objects. This is done by providing
no-overwrite
header. This PR contains implementation of--no-overwrite
flag for 2 operations i.e download and sync operations.To prevent overwriting of the file, before initiating the download, file is begin checked at the local system and if the file is absent downloading is allowed else, operation is terminated.
To implement
--no-overwrite
a new sync strategy has been introduced named to allow transfer of only those files that are not present at the destination. Since files have already been separated before initiating the operation, so again checking for its existence would be redundant and causes extra api calls hence the argument is removed before the transfer begins. This strategy is independent of size and timestamps. SinceNo-overwrite
arg is common for all the operation so now it has been moved to Transfer Args which is used bycp
,mv
andsync
commandsTesting:
Functional testing is performed to validate the object transfer processes. This included both scenarios transferring an object when object with same key is already present in the destination as well as those when the object with same key is not present on destination. These tests were conducted for both object having size less than multipart threshold and one with greater than multipart threshold.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.