forked from TrueCloudLab/frostfs-node
[#374] Add inner-ring event metrics
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
8dcd06c587
commit
ebcc8afbee
27 changed files with 287 additions and 113 deletions
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
// Process new epoch notification by setting global epoch value and resetting
|
||||
// local epoch timer.
|
||||
func (np *Processor) processNewEpoch(ev netmapEvent.NewEpoch) {
|
||||
func (np *Processor) processNewEpoch(ev netmapEvent.NewEpoch) bool {
|
||||
epoch := ev.EpochNumber()
|
||||
|
||||
epochDuration, err := np.netmapClient.EpochDuration()
|
||||
|
@ -41,7 +41,7 @@ func (np *Processor) processNewEpoch(ev netmapEvent.NewEpoch) {
|
|||
np.log.Warn(logs.NetmapCantGetNetmapSnapshotToPerformCleanup,
|
||||
zap.String("error", err.Error()))
|
||||
|
||||
return
|
||||
return false
|
||||
}
|
||||
|
||||
prm := cntClient.StartEstimationPrm{}
|
||||
|
@ -63,13 +63,15 @@ func (np *Processor) processNewEpoch(ev netmapEvent.NewEpoch) {
|
|||
np.handleCleanupTick(netmapCleanupTick{epoch: epoch, txHash: ev.TxHash()})
|
||||
np.handleAlphabetSync(governance.NewSyncEvent(ev.TxHash()))
|
||||
np.handleNotaryDeposit(ev)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// Process new epoch tick by invoking new epoch method in network map contract.
|
||||
func (np *Processor) processNewEpochTick() {
|
||||
func (np *Processor) processNewEpochTick() bool {
|
||||
if !np.alphabetState.IsAlphabet() {
|
||||
np.log.Info(logs.NetmapNonAlphabetModeIgnoreNewEpochTick)
|
||||
return
|
||||
return true
|
||||
}
|
||||
|
||||
nextEpoch := np.epochState.EpochCounter() + 1
|
||||
|
@ -78,5 +80,8 @@ func (np *Processor) processNewEpochTick() {
|
|||
err := np.netmapClient.NewEpoch(nextEpoch, false)
|
||||
if err != nil {
|
||||
np.log.Error(logs.NetmapCantInvokeNetmapNewEpoch, zap.Error(err))
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue