fix: keep decommission in a go-routine (#17496)

This was removed by mistake in #17491
This commit is contained in:
Harshavardhana
2023-06-23 12:29:32 -07:00
committed by GitHub
parent d8dad5c9ea
commit eefa047974

View File

@@ -1114,11 +1114,13 @@ func (z *erasureServerPools) Decommission(ctx context.Context, indices ...int) e
return err
}
for _, idx := range indices {
// decommission all pools serially one after
// the other.
z.doDecommissionInRoutine(ctx, idx)
}
go func() {
for _, idx := range indices {
// decommission all pools serially one after
// the other.
z.doDecommissionInRoutine(ctx, idx)
}
}()
// Successfully started decommissioning.
return nil