[#1418] shard: Do not use pointers as parameters

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-05-20 21:08:59 +03:00 committed by fyrchik
parent e265ce2d52
commit 6e752f36dc
39 changed files with 205 additions and 161 deletions

View file

@ -73,8 +73,8 @@ func (e *StorageEngine) get(prm *GetPrm) (*GetRes, error) {
metaError error
)
shPrm := new(shard.GetPrm).
WithAddress(prm.addr)
var shPrm shard.GetPrm
shPrm.WithAddress(prm.addr)
e.iterateOverSortedShards(prm.addr, func(_ int, sh hashedShard) (stop bool) {
res, err := sh.Get(shPrm)
@ -131,7 +131,7 @@ func (e *StorageEngine) get(prm *GetPrm) (*GetRes, 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 = shPrm.WithIgnoreMeta(true)
shPrm.WithIgnoreMeta(true)
e.iterateOverSortedShards(prm.addr, func(_ int, sh hashedShard) (stop bool) {
res, err := sh.Get(shPrm)