heal: Add support of healing particular pool/set (#20024)

This commit is contained in:
Anis Eleuch
2024-07-01 23:02:25 +01:00
committed by GitHub
parent e404abf103
commit b35acb3dbc
3 changed files with 9 additions and 1 deletions

View File

@@ -2343,12 +2343,18 @@ func (z *erasureServerPools) HealObjects(ctx context.Context, bucket, prefix str
var poolErrs [][]error
for idx, erasureSet := range z.serverPools {
if opts.Pool != nil && *opts.Pool != idx {
continue
}
if z.IsSuspended(idx) {
continue
}
errs := make([]error, len(erasureSet.sets))
var wg sync.WaitGroup
for idx, set := range erasureSet.sets {
if opts.Set != nil && *opts.Set != idx {
continue
}
wg.Add(1)
go func(idx int, set *erasureObjects) {
defer wg.Done()