From 1d42133d44a3434fe6bf36f6009d9d6a7ecfe815 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Thu, 14 Jul 2022 07:21:26 -0700 Subject: [PATCH] listing: Expire object versions past expiry (#15287) We skip object versions which are past their ILM expiry. This change schedules them for expiry while at it. --- cmd/metacache-server-pool.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/metacache-server-pool.go b/cmd/metacache-server-pool.go index 25cb61c8f..8a3469123 100644 --- a/cmd/metacache-server-pool.go +++ b/cmd/metacache-server-pool.go @@ -667,8 +667,11 @@ func filterLifeCycle(ctx context.Context, bucket string, lc lifecycle.Lifecycle, action := evalActionFromLifecycle(ctx, lc, lr, objInfo, false) switch action { case lifecycle.DeleteVersionAction, lifecycle.DeleteAction: - fallthrough + globalExpiryState.enqueueByDays(objInfo, false, action == lifecycle.DeleteVersionAction) + // Skip this entry. + continue case lifecycle.DeleteRestoredAction, lifecycle.DeleteRestoredVersionAction: + globalExpiryState.enqueueByDays(objInfo, true, action == lifecycle.DeleteRestoredVersionAction) // Skip this entry. continue }