-
Notifications
You must be signed in to change notification settings - Fork 595
mirror:not overwrit target object when mirror watch #5193
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
Conversation
not overwrit target object when mirror watch
@jiuker pls check this pr thanks |
Let me test first. Will get back here |
@jiuker ^^? |
Sorry. I can't reprdouce it.
And your pr is change around restart mc mirror
when mc running
Couldn't found any issues. Please share more info. |
@@ -418,21 +418,23 @@ func (mj *mirrorJob) doRemove(ctx context.Context, sURLs URLs, event EventInfo) | |||
// doMirror - Mirror an object to multiple destination. URLs status contains a copy of sURLs and error if any. | |||
func (mj *mirrorJob) doMirrorWatch(ctx context.Context, targetPath string, tgtSSE encrypt.ServerSide, sURLs URLs, event EventInfo) URLs { | |||
shouldQueue := false | |||
if !mj.opts.isOverwrite && !mj.opts.activeActive { | |||
if !mj.opts.isOverwrite { |
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.
not related to --overwrite
} | ||
if shouldQueue || mj.opts.isOverwrite || mj.opts.activeActive { | ||
if shouldQueue || mj.opts.isOverwrite { |
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.
not related to --overwrite
targetClient, err := newClient(targetPath) | ||
if err != nil { | ||
// cannot create targetclient | ||
return sURLs.WithError(err) | ||
} | ||
_, err = targetClient.Stat(ctx, StatOptions{sse: tgtSSE}) | ||
if err == nil { | ||
if !sURLs.SourceContent.RetentionEnabled && !sURLs.SourceContent.LegalHoldEnabled { | ||
if !mj.opts.activeActive && !sURLs.SourceContent.RetentionEnabled && !sURLs.SourceContent.LegalHoldEnabled { |
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.
not related to --overwrite
|
Thank you for your contribution. |
fix #5192
Community Contribution License
All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.
Description
Motivation and Context
make sure mirror command overwrit same when the watch is used and when the watch command is not used.
How to test this PR?
Types of changes
Checklist:
commit-id
orPR #
here)