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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
yihao.dai 2023-05-31 16:45:29 +08:00 committed by GitHub
parent 1c64d0618c
commit 19164ea753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -264,9 +264,9 @@ func (m *meta) GetCollectionBinlogSize() (int64, map[UniqueID]int64) {
if isSegmentHealthy(segment) {
total += 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
}

View File

@ -95,7 +95,7 @@ var (
Namespace: milvusNamespace,
Subsystem: typeutil.DataCoordRole,
Name: "stored_binlog_size",
Help: "binlog size of segments",
Help: "binlog size of healthy segments",
}, []string{
collectionIDLabelName,
segmentIDLabelName,