purge objects immediately with x-minio-force-delete in DeleteObject and DeleteBucket API (#15148)

This commit is contained in:
Praveen raj Mani
2022-07-11 21:45:54 +05:30
committed by GitHub
parent 00e235a1ee
commit b49fc33cb3
20 changed files with 220 additions and 79 deletions
+8 -2
View File
@@ -1367,8 +1367,14 @@ func (er erasureObjects) deletePrefix(ctx context.Context, bucket, prefix string
// Deletes
// - The prefix and its children
// - The prefix__XLDIR__
defer disks[index].Delete(ctx, bucket, dirPrefix, true)
return disks[index].Delete(ctx, bucket, prefix, true)
defer disks[index].Delete(ctx, bucket, dirPrefix, DeleteOptions{
Recursive: true,
Force: true,
})
return disks[index].Delete(ctx, bucket, prefix, DeleteOptions{
Recursive: true,
Force: true,
})
}, index)
}
for _, err := range g.Wait() {