diff --git a/pkg/services/policer/queue.go b/pkg/services/policer/queue.go index 88afaf7bf4..ac7c5336cf 100644 --- a/pkg/services/policer/queue.go +++ b/pkg/services/policer/queue.go @@ -3,6 +3,7 @@ package policer import ( "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine" + "github.com/nspcc-dev/neofs-node/pkg/util/rand" ) type jobQueue struct { @@ -19,6 +20,10 @@ func (q *jobQueue) Select(limit int) ([]*object.Address, error) { return nil, err } + rand.New().Shuffle(len(res), func(i, j int) { + res[i], res[j] = res[j], res[i] + }) + if len(res) < limit { return res, nil }