node: Add metrics for the error counter in the engine #418
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#418
Loading…
Reference in a new issue
No description provided.
Delete branch "acid-ant/frostfs-node:feature/372-add-err-counter-shard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Close #372
Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com
@ -174,6 +186,8 @@ func (e *StorageEngine) removeShards(ids ...string) {
continue
}
sh.DeleteErrorCounter()
Scenario: There were 5 shards, one of them did not work due to errors. I deleted that shard so the server would continue to work normal. After that, I decided to investigate, but there is no metrics for this shard.
So i think we should not delete metrics when delete shard.
@ -132,6 +132,7 @@ func (e *StorageEngine) reportShardErrorBackground(id string, msg string, err er
}
errCount := sh.errorCount.Add(1)
sh.Shard.AddToErrorCounter(1)
consider using
Inc
if it's always 1Thanks, renamed.
Sorry, what I meant was that if the increment is always one, we can simply remove the delta everywhere and use the
Inc
method, e.g.:But up to you, whether we will need the
delta
later.Agree, renamed in all places.
@ -71,0 +73,4 @@
m.errCounter += delta
}
func (m *metricsStore) ClearErrorCounter() {
do we really need two functions that do the same with different names?
It is in tests, and it is necessary to implement two methods
ClearErrorCounter
andDeleteErrorCounter
for typemetricsStore
somehow.9268c1a3d4
to0272740848
0272740848
tof12e080310
f12e080310
to92de822be1
92de822be1
to05bf2a885e
05bf2a885e
to7f8f7702fa