Skip to content

Commit 6815e06

Browse files
lidezhuti-chi-bot
authored andcommitted
This is an automated cherry-pick of pingcap#3430
Signed-off-by: ti-chi-bot <[email protected]>
1 parent f001f1f commit 6815e06

File tree

8 files changed

+4010
-1338
lines changed

8 files changed

+4010
-1338
lines changed

logservice/eventstore/event_store.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ import (
4646
)
4747

4848
var (
49-
CounterKv = metrics.EventStoreReceivedEventCount.WithLabelValues("kv")
50-
CounterResolved = metrics.EventStoreReceivedEventCount.WithLabelValues("resolved")
49+
kvEventCount = metrics.EventStoreReceivedEventCount.WithLabelValues("kv")
50+
resolvedEventCount = metrics.EventStoreReceivedEventCount.WithLabelValues("resolved")
5151
scannedBytesMetrics = metrics.EventStoreScanBytes.WithLabelValues("scanned")
5252
skippedBytesMetrics = metrics.EventStoreScanBytes.WithLabelValues("skipped")
5353
)
@@ -612,7 +612,8 @@ func (e *eventStore) RegisterDispatcher(
612612
subscriber.notifyFunc(ts, subStat.maxEventCommitTs.Load())
613613
}
614614
}
615-
CounterResolved.Inc()
615+
resolvedEventCount.Inc()
616+
metrics.EventStoreNotifyDispatcherCount.Add(float64(len(subscribersData.subscribers)))
616617
metrics.EventStoreNotifyDispatcherDurationHist.Observe(float64(time.Since(start).Seconds()))
617618
}
618619
}
@@ -1150,7 +1151,7 @@ func (e *eventStore) writeEvents(db *pebble.DB, events []eventWithCallback, enco
11501151
}
11511152
}
11521153
}
1153-
CounterKv.Add(float64(kvCount))
1154+
kvEventCount.Add(float64(kvCount))
11541155
metrics.EventStoreWriteBatchEventsCountHist.Observe(float64(kvCount))
11551156
metrics.EventStoreWriteBatchSizeHist.Observe(float64(batch.Len()))
11561157
metrics.EventStoreWriteBytes.Add(float64(batch.Len()))

0 commit comments

Comments
 (0)