[#1559] shard: Use Set prefix for parameter setting

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-07-13 15:43:04 +03:00 committed by fyrchik
parent 7b882b26d8
commit d8ba954aff
34 changed files with 114 additions and 142 deletions

View file

@ -87,8 +87,8 @@ func (e *StorageEngine) getRange(prm RngPrm) (RngRes, error) {
)
var shPrm shard.RngPrm
shPrm.WithAddress(prm.addr)
shPrm.WithRange(prm.off, prm.ln)
shPrm.SetAddress(prm.addr)
shPrm.SetRange(prm.off, prm.ln)
e.iterateOverSortedShards(prm.addr, func(_ int, sh hashedShard) (stop bool) {
res, err := sh.GetRange(shPrm)
@ -147,7 +147,7 @@ func (e *StorageEngine) getRange(prm RngPrm) (RngRes, error) {
// If the object is not found but is present in metabase,
// try to fetch it from blobstor directly. If it is found in any
// blobstor, increase the error counter for the shard which contains the meta.
shPrm.WithIgnoreMeta(true)
shPrm.SetIgnoreMeta(true)
e.iterateOverSortedShards(prm.addr, func(_ int, sh hashedShard) (stop bool) {
res, err := sh.GetRange(shPrm)