mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
avoid healObjects recursively healing at empty path (#11856)
baseDirFromPrefix(prefix) for object names without parent directory incorrectly uses empty path, leading to long listing at various paths that are not useful for healing - avoid this listing completely if "baseDir" returns empty simple use the "prefix" as is. this improves startup performance significantly
This commit is contained in:
parent
922c7b57f5
commit
da70e6ddf6
@ -1563,10 +1563,15 @@ func (z *erasureServerPools) HealObjects(ctx context.Context, bucket, prefix str
|
||||
bucket: bucket,
|
||||
}
|
||||
|
||||
path := baseDirFromPrefix(prefix)
|
||||
if path == "" {
|
||||
path = prefix
|
||||
}
|
||||
|
||||
if err := listPathRaw(ctx, listPathRawOptions{
|
||||
disks: disks,
|
||||
bucket: bucket,
|
||||
path: baseDirFromPrefix(prefix),
|
||||
path: path,
|
||||
recursive: true,
|
||||
forwardTo: "",
|
||||
minDisks: 1,
|
||||
|
Loading…
Reference in New Issue
Block a user