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