From 189e759e6ffbe60f5660786ff664a5749562a7f0 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Tue, 6 Jul 2021 21:12:10 +0300 Subject: [PATCH] [#668] pkg/audit: Skip audit for containers without SG Signed-off-by: Pavel Karpy --- pkg/innerring/processors/audit/process.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/innerring/processors/audit/process.go b/pkg/innerring/processors/audit/process.go index c9957aca1d..933b86a077 100644 --- a/pkg/innerring/processors/audit/process.go +++ b/pkg/innerring/processors/audit/process.go @@ -86,6 +86,12 @@ func (ap *Processor) processStartAudit(epoch uint64) { zap.Stringer("cid", containers[i]), zap.Int("amount", len(storageGroups))) + // skip audit for containers + // without storage groups + if len(storageGroups) == 0 { + continue + } + auditTask := new(audit.Task). WithReporter(&epochAuditReporter{ epoch: epoch,