mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
optimize deletePrefix, use direct set location via object name (#17827)
* optimize deletePrefix, use direct set location via object name instead of fanning out the calls for an object force delete we can assume the set location and not do fan-out calls * Apply suggestions from code review Co-authored-by: Krishnan Parthasarathi <krisis@users.noreply.github.com> --------- Co-authored-by: Krishnan Parthasarathi <krisis@users.noreply.github.com>
This commit is contained in:
+2
-1
@@ -97,7 +97,8 @@ func listServerConfigHistory(ctx context.Context, objAPI ObjectLayer, withData b
|
||||
func delServerConfigHistory(ctx context.Context, objAPI ObjectLayer, uuidKV string) error {
|
||||
historyFile := pathJoin(minioConfigHistoryPrefix, uuidKV+kvPrefix)
|
||||
_, err := objAPI.DeleteObject(ctx, minioMetaBucket, historyFile, ObjectOptions{
|
||||
DeletePrefix: true,
|
||||
DeletePrefix: true,
|
||||
DeletePrefixObject: true, // use prefix delete on exact object (this is an optimization to avoid fan-out calls)
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user