未验证 提交 3fb9334b 编写于 作者: Y yihao.dai 提交者: GitHub

Make binlog size metric to collect healthy binlog only (#24558)

Signed-off-by: Nbigsheeper <yihao.dai@zilliz.com>
上级 483f5321
...@@ -251,9 +251,9 @@ func (m *meta) GetCollectionBinlogSize() (int64, map[UniqueID]int64) { ...@@ -251,9 +251,9 @@ func (m *meta) GetCollectionBinlogSize() (int64, map[UniqueID]int64) {
if isSegmentHealthy(segment) { if isSegmentHealthy(segment) {
total += segmentSize total += segmentSize
collectionBinlogSize[segment.GetCollectionID()] += segmentSize collectionBinlogSize[segment.GetCollectionID()] += segmentSize
metrics.DataCoordStoredBinlogSize.WithLabelValues(
fmt.Sprint(segment.GetCollectionID()), fmt.Sprint(segment.GetID())).Set(float64(segmentSize))
} }
metrics.DataCoordStoredBinlogSize.WithLabelValues(
fmt.Sprint(segment.GetCollectionID()), fmt.Sprint(segment.GetID())).Set(float64(segmentSize))
} }
return total, collectionBinlogSize return total, collectionBinlogSize
} }
......
...@@ -95,7 +95,7 @@ var ( ...@@ -95,7 +95,7 @@ var (
Namespace: milvusNamespace, Namespace: milvusNamespace,
Subsystem: typeutil.DataCoordRole, Subsystem: typeutil.DataCoordRole,
Name: "stored_binlog_size", Name: "stored_binlog_size",
Help: "binlog size of segments", Help: "binlog size of healthy segments",
}, []string{ }, []string{
collectionIDLabelName, collectionIDLabelName,
segmentIDLabelName, segmentIDLabelName,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册