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 (
|
|||
"crypto/sha256"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event"
|
||||
containerEvent "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event/container"
|
||||
"github.com/mr-tron/base58"
|
||||
|
@ -20,7 +21,9 @@ func (cp *Processor) handlePut(ev event.Event) {
|
|||
|
||||
// send an event to the worker pool
|
||||
|
||||
err := cp.pool.Submit(func() { cp.processContainerPut(put) })
|
||||
err := processors.SubmitEvent(cp.pool, cp.metrics, "container_put", func() bool {
|
||||
return cp.processContainerPut(put)
|
||||
})
|
||||
if err != nil {
|
||||
// there system can be moved into controlled degradation stage
|
||||
cp.log.Warn(logs.ContainerContainerProcessorWorkerPoolDrained,
|
||||
|
@ -36,7 +39,9 @@ func (cp *Processor) handleDelete(ev event.Event) {
|
|||
|
||||
// send an event to the worker pool
|
||||
|
||||
err := cp.pool.Submit(func() { cp.processContainerDelete(del) })
|
||||
err := processors.SubmitEvent(cp.pool, cp.metrics, "container_delete", func() bool {
|
||||
return cp.processContainerDelete(del)
|
||||
})
|
||||
if err != nil {
|
||||
// there system can be moved into controlled degradation stage
|
||||
cp.log.Warn(logs.ContainerContainerProcessorWorkerPoolDrained,
|
||||
|
@ -53,8 +58,8 @@ func (cp *Processor) handleSetEACL(ev event.Event) {
|
|||
|
||||
// send an event to the worker pool
|
||||
|
||||
err := cp.pool.Submit(func() {
|
||||
cp.processSetEACL(e)
|
||||
err := processors.SubmitEvent(cp.pool, cp.metrics, "container_set_eacl", func() bool {
|
||||
return cp.processSetEACL(e)
|
||||
})
|
||||
if err != nil {
|
||||
// there system can be moved into controlled degradation stage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue