From 0f05dec169df4b80a3742de68697ec65401d97c1 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Wed, 13 Nov 2024 21:00:45 +0300 Subject: [PATCH] node/put: fix wait group counter If `wg.Add` was called, `wg.Done` must be executed in any way. Signed-off-by: Pavel Karpy --- pkg/services/object/put/distributed.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/services/object/put/distributed.go b/pkg/services/object/put/distributed.go index a8a08341f8..476bad12e7 100644 --- a/pkg/services/object/put/distributed.go +++ b/pkg/services/object/put/distributed.go @@ -325,6 +325,7 @@ func (x placementIterator) iterateNodesForObject(obj oid.ID, f func(nodeDesc) er return } }); err != nil { + wg.Done() svcutil.LogWorkerPoolError(x.log, "PUT", err) err = fmt.Errorf("submit next job to save an object to the worker pool: %w", err) if e, _ := lastRespErr.Load().(error); e != nil {