mirror of
https://github.com/minio/minio.git
synced 2025-11-07 04:42:56 -05:00
ilm: Remove object in HEAD/GET if having an applicable ILM rule (#11296)
Remove an object on the fly if there is a lifecycle rule with delete expiry action for the corresponding object.
This commit is contained in:
@@ -777,17 +777,13 @@ next:
|
||||
scheduleReplicationDelete(ctx, dobj, objectAPI, replicateSync)
|
||||
}
|
||||
if goi.TransitionStatus == lifecycle.TransitionComplete && err == nil && goi.VersionID == "" {
|
||||
action := lifecycle.DeleteAction
|
||||
if goi.VersionID != "" {
|
||||
action = lifecycle.DeleteVersionAction
|
||||
}
|
||||
deleteTransitionedObject(ctx, newObjectLayerFn(), args.BucketName, objectName, lifecycle.ObjectOpts{
|
||||
Name: objectName,
|
||||
UserTags: goi.UserTags,
|
||||
VersionID: goi.VersionID,
|
||||
DeleteMarker: goi.DeleteMarker,
|
||||
IsLatest: goi.IsLatest,
|
||||
}, action, true)
|
||||
}, false, true)
|
||||
}
|
||||
|
||||
logger.LogIf(ctx, err)
|
||||
|
||||
Reference in New Issue
Block a user