ilm: Send delete marker creation event when appropriate (#10696)

Before this commit, the crawler ILM will always send object delete event
notification though this is wrong.
This commit is contained in:
Anis Elleuch
2020-10-17 05:22:12 +01:00
committed by GitHub
parent 0b53e30ecb
commit 284a2b9021
3 changed files with 26 additions and 29 deletions
+6 -1
View File
@@ -747,9 +747,14 @@ func (i *crawlItem) applyActions(ctx context.Context, o ObjectLayer, meta action
return size
}
eventName := event.ObjectRemovedDelete
if obj.DeleteMarker {
eventName = event.ObjectRemovedDeleteMarkerCreated
}
// Notify object deleted event.
sendEvent(eventArgs{
EventName: event.ObjectRemovedDelete,
EventName: eventName,
BucketName: i.bucket,
Object: obj,
Host: "Internal: [ILM-EXPIRY]",