mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
attempt delete marker replication after object is replicated (#15857)
Ensure delete marker replication success, especially since the recent optimizations to heal on HEAD, LIST and GET can force replication attempts on delete marker before underlying object version could have synced.
This commit is contained in:
@@ -740,6 +740,15 @@ func (api objectAPIHandlers) headObjectHandler(ctx context.Context, objectAPI Ob
|
||||
}
|
||||
QueueReplicationHeal(ctx, bucket, objInfo)
|
||||
}
|
||||
// do an additional verification whether object exists when opts.DeleteMarker is set by source
|
||||
// cluster as part of delete marker replication
|
||||
if opts.DeleteMarker && opts.ProxyHeaderSet {
|
||||
opts.VersionID = ""
|
||||
goi, gerr := getObjectInfo(ctx, bucket, object, opts)
|
||||
if gerr == nil || goi.VersionID != "" { // object layer returned more info because object is deleted
|
||||
w.Header().Set(xhttp.MinIOTargetReplicationReady, "true")
|
||||
}
|
||||
}
|
||||
writeErrorResponseHeadersOnly(w, toAPIError(ctx, err))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user