From 7174abcc7ccb22a1e2ae0a06ddd950685b5a2f3d Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Fri, 25 Dec 2020 10:45:59 +0300 Subject: [PATCH] [#281] service/audit: Fix typos Signed-off-by: Alex Vanin --- cmd/neofs-ir/defaults.go | 2 +- pkg/innerring/innerring.go | 2 +- pkg/services/audit/auditor/por.go | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/neofs-ir/defaults.go b/cmd/neofs-ir/defaults.go index 08228236d..8b13caac3 100644 --- a/cmd/neofs-ir/defaults.go +++ b/cmd/neofs-ir/defaults.go @@ -99,5 +99,5 @@ func defaultConfiguration(cfg *viper.Viper) { cfg.SetDefault("audit.timeout.search", "10s") cfg.SetDefault("audit.pdp.max_sleep_interval", "5s") cfg.SetDefault("audit.pdp.pairs_pool_size", "10") - cfg.SetDefault("audit.por.pairs_pool_size", "10") + cfg.SetDefault("audit.por.pool_size", "10") } diff --git a/pkg/innerring/innerring.go b/pkg/innerring/innerring.go index a7578e894..8ad75e488 100644 --- a/pkg/innerring/innerring.go +++ b/pkg/innerring/innerring.go @@ -226,7 +226,7 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error }) pdpPoolSize := cfg.GetInt("audit.pdp.pairs_pool_size") - porPoolSize := cfg.GetInt("audit.por.pairs_pool_size") + porPoolSize := cfg.GetInt("audit.por.pool_size") auditTaskManager := audittask.New( audittask.WithQueueCapacity(cfg.GetUint32("audit.task.queue_capacity")), diff --git a/pkg/services/audit/auditor/por.go b/pkg/services/audit/auditor/por.go index 0902e16e8..afb88278d 100644 --- a/pkg/services/audit/auditor/por.go +++ b/pkg/services/audit/auditor/por.go @@ -71,16 +71,16 @@ func (c *Context) checkStorageGroupPoR(ind int, sg *object.ID) { flat[i], flat[j] = flat[j], flat[i] }) - for i := range flat { + for j := range flat { accRequests++ - if i > 0 { // in best case audit get object header on first iteration + if j > 0 { // in best case audit get object header on first iteration accRetries++ } - hdr, err := c.cnrCom.GetHeader(c.task, flat[i], members[i], true) + hdr, err := c.cnrCom.GetHeader(c.task, flat[j], members[i], true) if err != nil { c.log.Debug("can't head object", - zap.String("remote_node", flat[i].Address()), + zap.String("remote_node", flat[j].Address()), zap.Stringer("oid", members[i])) continue