forked from TrueCloudLab/frostfs-node
[#223] sg: Refactor storage group parameters
Resolve containedctx linter for SearchSGPrm and GetSGPrm structs. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
6016d78a45
commit
ae86cda58c
3 changed files with 8 additions and 16 deletions
|
@ -153,12 +153,11 @@ func (ap *Processor) findStorageGroups(cnr cid.ID, shuffled netmapcore.Nodes) []
|
|||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), ap.searchTimeout)
|
||||
|
||||
prm.Context = ctx
|
||||
prm.NodeInfo = info
|
||||
|
||||
var dst storagegroup.SearchSGDst
|
||||
|
||||
err = ap.sgSrc.ListSG(&dst, prm)
|
||||
err = ap.sgSrc.ListSG(ctx, &dst, prm)
|
||||
|
||||
cancel()
|
||||
|
||||
|
@ -189,9 +188,8 @@ func (ap *Processor) filterExpiredSG(cid cid.ID, sgIDs []oid.ID,
|
|||
ctx, cancel := context.WithTimeout(context.Background(), ap.searchTimeout)
|
||||
|
||||
getSGPrm.OID = sgID
|
||||
getSGPrm.Context = ctx
|
||||
|
||||
sg, err := ap.sgSrc.GetSG(getSGPrm)
|
||||
sg, err := ap.sgSrc.GetSG(ctx, getSGPrm)
|
||||
|
||||
cancel()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue