From 7c75db2f2d0caf9241c4bbf33215b492505cfa07 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 18 Apr 2023 12:56:23 +0300 Subject: [PATCH] [#59] netmap: Remove unused param from getSelection() Signed-off-by: Evgenii Stratonikov --- netmap/netmap.go | 2 +- netmap/selector.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/netmap/netmap.go b/netmap/netmap.go index 8343b89d..c839df86 100644 --- a/netmap/netmap.go +++ b/netmap/netmap.go @@ -189,7 +189,7 @@ func (m NetMap) ContainerNodes(p PlacementPolicy, pivot []byte) ([][]NodeInfo, e s.SetCount(p.replicas[i].GetCount()) s.SetFilter(mainFilterName) - nodes, err := c.getSelection(p, s) + nodes, err := c.getSelection(s) if err != nil { return nil, err } diff --git a/netmap/selector.go b/netmap/selector.go index 54223727..51ceb47d 100644 --- a/netmap/selector.go +++ b/netmap/selector.go @@ -23,7 +23,7 @@ func (c *context) processSelectors(p PlacementPolicy) error { c.processedSelectors[sName] = &p.selectors[i] - result, err := c.getSelection(p, p.selectors[i]) + result, err := c.getSelection(p.selectors[i]) if err != nil { return err } @@ -56,7 +56,7 @@ func calcBucketWeight(ns nodes, a aggregator, wf weightFunc) float64 { // getSelection returns nodes grouped by s.attribute. // Last argument specifies if more buckets can be used to fulfill CBF. -func (c *context) getSelection(p PlacementPolicy, s netmap.Selector) ([]nodes, error) { +func (c *context) getSelection(s netmap.Selector) ([]nodes, error) { bucketCount, nodesInBucket := calcNodesCount(s) buckets := c.getSelectionBase(s)