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
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/hex"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors"
|
||||
timerEvent "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/timers"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event"
|
||||
netmapEvent "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event/netmap"
|
||||
|
@ -16,7 +17,7 @@ func (np *Processor) HandleNewEpochTick(ev event.Event) {
|
|||
|
||||
// send an event to the worker pool
|
||||
|
||||
err := np.pool.Submit(func() { np.processNewEpochTick() })
|
||||
err := processors.SubmitEvent(np.pool, np.metrics, "netmap_new_epoch_tick", np.processNewEpochTick)
|
||||
if err != nil {
|
||||
// there system can be moved into controlled degradation stage
|
||||
np.log.Warn(logs.NetmapNetmapWorkerPoolDrained,
|
||||
|
@ -32,8 +33,8 @@ func (np *Processor) handleNewEpoch(ev event.Event) {
|
|||
|
||||
// send an event to the worker pool
|
||||
|
||||
err := np.pool.Submit(func() {
|
||||
np.processNewEpoch(epochEvent)
|
||||
err := processors.SubmitEvent(np.pool, np.metrics, "netmap_new_epoch", func() bool {
|
||||
return np.processNewEpoch(epochEvent)
|
||||
})
|
||||
if err != nil {
|
||||
// there system can be moved into controlled degradation stage
|
||||
|
@ -51,8 +52,8 @@ func (np *Processor) handleAddPeer(ev event.Event) {
|
|||
|
||||
// send an event to the worker pool
|
||||
|
||||
err := np.pool.Submit(func() {
|
||||
np.processAddPeer(newPeer)
|
||||
err := processors.SubmitEvent(np.pool, np.metrics, "netmap_add_peer", func() bool {
|
||||
return np.processAddPeer(newPeer)
|
||||
})
|
||||
if err != nil {
|
||||
// there system can be moved into controlled degradation stage
|
||||
|
@ -69,8 +70,8 @@ func (np *Processor) handleUpdateState(ev event.Event) {
|
|||
|
||||
// send event to the worker pool
|
||||
|
||||
err := np.pool.Submit(func() {
|
||||
np.processUpdatePeer(updPeer)
|
||||
err := processors.SubmitEvent(np.pool, np.metrics, "netmap_update_peer", func() bool {
|
||||
return np.processUpdatePeer(updPeer)
|
||||
})
|
||||
if err != nil {
|
||||
// there system can be moved into controlled degradation stage
|
||||
|
@ -91,8 +92,8 @@ func (np *Processor) handleCleanupTick(ev event.Event) {
|
|||
np.log.Info(logs.NetmapTick, zap.String("type", "netmap cleaner"))
|
||||
|
||||
// send event to the worker pool
|
||||
err := np.pool.Submit(func() {
|
||||
np.processNetmapCleanupTick(cleanup)
|
||||
err := processors.SubmitEvent(np.pool, np.metrics, "netmap_cleanup_tick", func() bool {
|
||||
return np.processNetmapCleanupTick(cleanup)
|
||||
})
|
||||
if err != nil {
|
||||
// there system can be moved into controlled degradation stage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue