mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
fix: binlog count use correct value (#44830)
Related to #44789 --------- Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
4b84ba2189
commit
92910117a8
@ -477,7 +477,7 @@ func (m *meta) GetQuotaInfo() *metricsinfo.DataCoordQuotaMetrics {
|
||||
segments := m.segments.GetSegments()
|
||||
var total int64
|
||||
storedBinlogSize := make(map[string]map[string]int64) // map[collectionID]map[segment_state]size
|
||||
binlogFileSize := make(map[string]int64) // map[collectionID]size
|
||||
binlogFileCount := make(map[string]int64) // map[collectionID]count
|
||||
coll2DbName := make(map[string]string)
|
||||
|
||||
for _, segment := range segments {
|
||||
@ -502,7 +502,7 @@ func (m *meta) GetQuotaInfo() *metricsinfo.DataCoordQuotaMetrics {
|
||||
}
|
||||
|
||||
storedBinlogSize[collIDStr][segment.GetState().String()] += segmentSize
|
||||
binlogFileSize[collIDStr] += segmentSize
|
||||
binlogFileCount[collIDStr] += int64(getBinlogFileCount(segment.SegmentInfo))
|
||||
} else {
|
||||
log.Ctx(context.TODO()).Warn("not found database name", zap.Int64("collectionID", segment.GetCollectionID()))
|
||||
}
|
||||
@ -527,7 +527,7 @@ func (m *meta) GetQuotaInfo() *metricsinfo.DataCoordQuotaMetrics {
|
||||
}
|
||||
// Reset to remove dropped collection
|
||||
metrics.DataCoordSegmentBinLogFileCount.Reset()
|
||||
for collectionID, size := range binlogFileSize {
|
||||
for collectionID, size := range binlogFileCount {
|
||||
metrics.DataCoordSegmentBinLogFileCount.WithLabelValues(collectionID).Set(float64(size))
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user