mirror of
https://github.com/pgsty/minio.git
synced 2026-11-10 09:35:31 +03:00
fix(ilm): do not announce batch expiries the recheck rejected
The expiry worker now asks DeleteObjects to recheck ILM against all pools. A rejected entry keeps its version and returns errLifecycleNotApplicable, but the worker still wrote an ILMExpiry audit record, an ILM trace and an s3:ObjectRemoved:Delete event for it. Event delivery drops the error element, so consumers saw an ordinary removal, repeated on every scan while the versions stay split across pools. Skip rejected entries; eligible entries of the same batch are still reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
@@ -19,6 +19,7 @@ package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"regexp"
|
||||
@@ -471,6 +472,11 @@ func deleteObjectVersions(ctx context.Context, o ObjectLayer, bucket string, toD
|
||||
})
|
||||
|
||||
for i, dobj := range deletedObjs {
|
||||
if errors.Is(errs[i], errLifecycleNotApplicable) {
|
||||
// The recheck kept this version. Do not audit or announce a
|
||||
// removal that did not happen; the next scan re-evaluates it.
|
||||
continue
|
||||
}
|
||||
oi := ObjectInfo{
|
||||
Bucket: bucket,
|
||||
Name: dobj.ObjectName,
|
||||
|
||||
Reference in New Issue
Block a user