mirror of
https://github.com/minio/minio.git
synced 2025-01-12 23:43:22 -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,
|
bucket: bucket,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path := baseDirFromPrefix(prefix)
|
||||||
|
if path == "" {
|
||||||
|
path = prefix
|
||||||
|
}
|
||||||
|
|
||||||
if err := listPathRaw(ctx, listPathRawOptions{
|
if err := listPathRaw(ctx, listPathRawOptions{
|
||||||
disks: disks,
|
disks: disks,
|
||||||
bucket: bucket,
|
bucket: bucket,
|
||||||
path: baseDirFromPrefix(prefix),
|
path: path,
|
||||||
recursive: true,
|
recursive: true,
|
||||||
forwardTo: "",
|
forwardTo: "",
|
||||||
minDisks: 1,
|
minDisks: 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user