Skip to content

Commit 069c401

Browse files
authored
Don't tier directory objects (minio#19891)
Directory objects are used by applications that simulate the folder structure of an on-disk filesystem. These are zero-byte objects with names ending with '/'. They are only used to check whether a 'folder' exists in the namespace.
1 parent 2f6e03f commit 069c401

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cmd/bucket-lifecycle.go

+4
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,10 @@ func enqueueTransitionImmediate(obj ObjectInfo, src lcEventSrc) {
583583
if lc, err := globalLifecycleSys.Get(obj.Bucket); err == nil {
584584
switch event := lc.Eval(obj.ToLifecycleOpts()); event.Action {
585585
case lifecycle.TransitionAction, lifecycle.TransitionVersionAction:
586+
if obj.DeleteMarker || obj.IsDir {
587+
// nothing to transition
588+
return
589+
}
586590
globalTransitionState.queueTransitionTask(obj, event, src)
587591
}
588592
}

cmd/data-scanner.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ func evalActionFromLifecycle(ctx context.Context, lc lifecycle.Lifecycle, lr loc
12331233
}
12341234

12351235
func applyTransitionRule(event lifecycle.Event, src lcEventSrc, obj ObjectInfo) bool {
1236-
if obj.DeleteMarker {
1236+
if obj.DeleteMarker || obj.IsDir {
12371237
return false
12381238
}
12391239
globalTransitionState.queueTransitionTask(obj, event, src)

0 commit comments

Comments
 (0)