From 471467d3105fa38c9135c18f65987453985918c7 Mon Sep 17 00:00:00 2001 From: Poorna Date: Mon, 22 Aug 2022 15:59:06 -0700 Subject: [PATCH] fix: ensure metadata update happens after deletemarker replication (#15564) Fixes regression caused by #15521 --- cmd/erasure-object.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/erasure-object.go b/cmd/erasure-object.go index 34381cc54..423e96c2f 100644 --- a/cmd/erasure-object.go +++ b/cmd/erasure-object.go @@ -1502,10 +1502,11 @@ func (er erasureObjects) DeleteObject(ctx context.Context, bucket, object string modTime = UTCNow() } fvID := mustGetUUID() + if markDelete && (opts.Versioned || opts.VersionSuspended) { fi := FileInfo{ Name: object, - Deleted: deleteMarker, + Deleted: true, MarkDeleted: markDelete, ModTime: modTime, ReplicationState: opts.DeleteReplication,