mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vminsert/netstorage: properly update vm_rpc_rerouted_rows_processed_total
metric
Previously this metric wasn't updated because of improper defer call. See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/955 Thanks to @xemxx for spotting the bug.
This commit is contained in:
parent
82d26d9dfe
commit
9e79fc27c8
1 changed files with 3 additions and 1 deletions
|
@ -585,7 +585,9 @@ func getHealthyStorageNodesBlocking(stopCh <-chan struct{}) []*storageNode {
|
|||
func spreadReroutedBufToStorageNodesBlocking(stopCh <-chan struct{}, br *bufRows) {
|
||||
var mr storage.MetricRow
|
||||
rowsProcessed := 0
|
||||
defer reroutedRowsProcessed.Add(rowsProcessed)
|
||||
defer func() {
|
||||
reroutedRowsProcessed.Add(rowsProcessed)
|
||||
}()
|
||||
|
||||
sns := getHealthyStorageNodesBlocking(stopCh)
|
||||
if len(sns) == 0 {
|
||||
|
|
Loading…
Reference in a new issue