From 61a426bc6f9fd31a56a2b6eff0f0cacdd16904e1 Mon Sep 17 00:00:00 2001 From: XuanYang-cn Date: Fri, 9 Aug 2024 10:08:18 +0800 Subject: [PATCH] enhance: Init channel cp metric when DataCoord recover (#35353) Signed-off-by: yangxuan --- internal/datacoord/meta.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/datacoord/meta.go b/internal/datacoord/meta.go index 3438a5d53e..e768011e22 100644 --- a/internal/datacoord/meta.go +++ b/internal/datacoord/meta.go @@ -221,6 +221,9 @@ func (m *meta) reloadFromKV() error { // for 2.2.2 issue https://github.com/milvus-io/milvus/issues/22181 pos.ChannelName = vChannel m.channelCPs.checkpoints[vChannel] = pos + ts, _ := tsoutil.ParseTS(pos.Timestamp) + metrics.DataCoordCheckpointUnixSeconds.WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), vChannel). + Set(float64(ts.Unix())) } log.Info("DataCoord meta reloadFromKV done", zap.Duration("duration", record.ElapseSpan()))