ignore VersionNotFound in addition to ObjectNotFound while replicating (#15814)

This commit is contained in:
Anis Elleuch 2022-10-08 00:11:41 +01:00 committed by GitHub
parent 6d6a731d6d
commit e856e10ac2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1068,7 +1068,7 @@ func (ri ReplicateObjectInfo) replicateObject(ctx context.Context, objectAPI Obj
VersionSuspended: versionSuspended, VersionSuspended: versionSuspended,
}) })
if err != nil { if err != nil {
if !isErrObjectNotFound(err) { if !isErrVersionNotFound(err) && !isErrObjectNotFound(err) {
sendEvent(eventArgs{ sendEvent(eventArgs{
EventName: event.ObjectReplicationNotTracked, EventName: event.ObjectReplicationNotTracked,
BucketName: bucket, BucketName: bucket,
@ -1216,7 +1216,7 @@ func (ri ReplicateObjectInfo) replicateAll(ctx context.Context, objectAPI Object
VersionSuspended: versionSuspended, VersionSuspended: versionSuspended,
}) })
if err != nil { if err != nil {
if !isErrObjectNotFound(err) { if !isErrVersionNotFound(err) && !isErrObjectNotFound(err) {
sendEvent(eventArgs{ sendEvent(eventArgs{
EventName: event.ObjectReplicationNotTracked, EventName: event.ObjectReplicationNotTracked,
BucketName: bucket, BucketName: bucket,