2020-12-18 09:27:19 +00:00
|
|
|
package audit
|
|
|
|
|
|
|
|
import (
|
2023-03-07 13:38:26 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event"
|
2020-12-18 09:27:19 +00:00
|
|
|
"go.uber.org/zap"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (ap *Processor) handleNewAuditRound(ev event.Event) {
|
|
|
|
auditEvent := ev.(Start)
|
2020-12-29 15:50:41 +00:00
|
|
|
|
|
|
|
epoch := auditEvent.Epoch()
|
|
|
|
|
|
|
|
ap.log.Info("new round of audit", zap.Uint64("epoch", epoch))
|
2020-12-18 09:27:19 +00:00
|
|
|
|
2022-04-21 11:28:05 +00:00
|
|
|
// send an event to the worker pool
|
2020-12-18 09:27:19 +00:00
|
|
|
|
2020-12-29 15:50:41 +00:00
|
|
|
err := ap.pool.Submit(func() { ap.processStartAudit(epoch) })
|
2020-12-18 09:27:19 +00:00
|
|
|
if err != nil {
|
|
|
|
ap.log.Warn("previous round of audit prepare hasn't finished yet")
|
|
|
|
}
|
|
|
|
}
|