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
|
@ -12,10 +12,10 @@ import (
|
|||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func (cp *Processor) processSetEACL(e containerEvent.SetEACL) {
|
||||
func (cp *Processor) processSetEACL(e containerEvent.SetEACL) bool {
|
||||
if !cp.alphabetState.IsAlphabet() {
|
||||
cp.log.Info(logs.ContainerNonAlphabetModeIgnoreSetEACL)
|
||||
return
|
||||
return true
|
||||
}
|
||||
|
||||
err := cp.checkSetEACL(e)
|
||||
|
@ -24,10 +24,17 @@ func (cp *Processor) processSetEACL(e containerEvent.SetEACL) {
|
|||
zap.String("error", err.Error()),
|
||||
)
|
||||
|
||||
return
|
||||
return false
|
||||
}
|
||||
|
||||
cp.approveSetEACL(e)
|
||||
if err := cp.morphClient.NotarySignAndInvokeTX(e.NotaryRequest().MainTransaction); err != nil {
|
||||
cp.log.Error(logs.ContainerCouldNotApproveSetEACL,
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func (cp *Processor) checkSetEACL(e containerEvent.SetEACL) error {
|
||||
|
@ -73,11 +80,3 @@ func (cp *Processor) checkSetEACL(e containerEvent.SetEACL) error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cp *Processor) approveSetEACL(e containerEvent.SetEACL) {
|
||||
if err := cp.morphClient.NotarySignAndInvokeTX(e.NotaryRequest().MainTransaction); err != nil {
|
||||
cp.log.Error(logs.ContainerCouldNotApproveSetEACL,
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue