From eefa047974a3618519a5c0ba0f460d90b9fc4806 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 23 Jun 2023 12:29:32 -0700 Subject: [PATCH] fix: keep decommission in a go-routine (#17496) This was removed by mistake in #17491 --- cmd/erasure-server-pool-decom.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/erasure-server-pool-decom.go b/cmd/erasure-server-pool-decom.go index 8f76cf448..9cd2c0416 100644 --- a/cmd/erasure-server-pool-decom.go +++ b/cmd/erasure-server-pool-decom.go @@ -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