Skip to content

Commit

Permalink
object/put: try node for object distribution more
Browse files Browse the repository at this point in the history
If an object cannot be PUT due to local overload (i-th routine for (i-1)-length
worker pool), log the error and continue over other nodes, and even other
placement vectors. `errNotEnoughNodes` will be also returned as the natural
replication number handling in the outer `for`.

Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Nov 25, 2024
1 parent ea3e03b commit 9f67612
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/services/object/put/distributed.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,8 @@ func (x placementIterator) iterateNodesForObject(obj oid.ID, f func(nodeDesc) er
}
}); 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 {
err = fmt.Errorf("%w (last node error: %w)", err, e)
}
wg.Wait()
return errIncompletePut{singleErr: err}
svcutil.LogWorkerPoolError(x.log, "PUT", err)
}
}
wg.Wait()
Expand Down

0 comments on commit 9f67612

Please sign in to comment.