fix: avoid fan-out DeletePrefix calls for batch-expire and ILM (#19365)

This commit is contained in:
Harshavardhana
2024-03-27 20:18:15 -07:00
committed by GitHub
parent 3e38fa54a5
commit c61dd16a1e
2 changed files with 4 additions and 1 deletions

View File

@@ -428,7 +428,8 @@ func batchObjsForDelete(ctx context.Context, r *BatchJobExpire, ri *batchJobInfo
}
stopFn := globalBatchJobsMetrics.trace(batchJobMetricExpire, ri.JobID, attempts)
_, 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 {
stopFn(exp, err)