Fix DeleteObject when only free versions remain (#16289)

This commit is contained in:
Krishnan Parthasarathi
2022-12-21 16:24:07 -08:00
committed by GitHub
parent 34167c51d5
commit 2fa35def2c
9 changed files with 95 additions and 13 deletions

View File

@@ -997,7 +997,8 @@ func (i *scannerItem) applyTierObjSweep(ctx context.Context, o ObjectLayer, oi O
// Remove this free version
_, err = o.DeleteObject(ctx, oi.Bucket, oi.Name, ObjectOptions{
VersionID: oi.VersionID,
VersionID: oi.VersionID,
InclFreeVersions: true,
})
if err == nil {
auditLogLifecycle(ctx, oi, ILMFreeVersionDelete)