[#668] pkg/audit: Skip audit for containers without SG

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-07-06 21:12:10 +03:00 committed by Leonard Lyubich
parent 3a7d7bdecd
commit 0bcc505682

View file

@ -86,6 +86,12 @@ func (ap *Processor) processStartAudit(epoch uint64) {
zap.Stringer("cid", containers[i]), zap.Stringer("cid", containers[i]),
zap.Int("amount", len(storageGroups))) zap.Int("amount", len(storageGroups)))
// skip audit for containers
// without storage groups
if len(storageGroups) == 0 {
continue
}
auditTask := new(audit.Task). auditTask := new(audit.Task).
WithReporter(&epochAuditReporter{ WithReporter(&epochAuditReporter{
epoch: epoch, epoch: epoch,