Skip to content

Commit

Permalink
node/put: fix wait group counter
Browse files Browse the repository at this point in the history
If `wg.Add` was called, `wg.Done` must be executed in any way.

Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Nov 14, 2024
1 parent b81555d commit 0f05dec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/services/object/put/distributed.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0f05dec

Please sign in to comment.