mirror of
https://github.com/minio/minio.git
synced 2025-03-13 05:00:11 -04:00
fix: avoid fan-out DeletePrefix calls for batch-expire and ILM (#19365)
This commit is contained in:
parent
3e38fa54a5
commit
c61dd16a1e
@ -429,6 +429,7 @@ func batchObjsForDelete(ctx context.Context, r *BatchJobExpire, ri *batchJobInfo
|
|||||||
stopFn := globalBatchJobsMetrics.trace(batchJobMetricExpire, ri.JobID, attempts)
|
stopFn := globalBatchJobsMetrics.trace(batchJobMetricExpire, ri.JobID, attempts)
|
||||||
_, err := api.DeleteObject(ctx, exp.Bucket, encodeDirObject(exp.Name), ObjectOptions{
|
_, err := api.DeleteObject(ctx, exp.Bucket, encodeDirObject(exp.Name), ObjectOptions{
|
||||||
DeletePrefix: true,
|
DeletePrefix: true,
|
||||||
|
DeletePrefixObject: true, // use prefix delete on exact object (this is an optimization to avoid fan-out calls)
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
stopFn(exp, err)
|
stopFn(exp, err)
|
||||||
|
@ -1221,6 +1221,8 @@ func applyExpiryOnNonTransitionedObjects(ctx context.Context, objLayer ObjectLay
|
|||||||
|
|
||||||
if lcEvent.Action.DeleteAll() {
|
if lcEvent.Action.DeleteAll() {
|
||||||
opts.DeletePrefix = true
|
opts.DeletePrefix = true
|
||||||
|
// use prefix delete on exact object (this is an optimization to avoid fan-out calls)
|
||||||
|
opts.DeletePrefixObject = true
|
||||||
}
|
}
|
||||||
var (
|
var (
|
||||||
dobj ObjectInfo
|
dobj ObjectInfo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user