fix: remove useless log of quota center (#32307) (#32310)

/kind improvement
pr: #32307

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
pull/32327/head
Jiquan Long 2024-04-16 18:39:19 +08:00 committed by GitHub
parent 52cc1ed9d8
commit 0e5118b1ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 24 deletions

View File

@ -73,7 +73,7 @@ func (s *Server) getCollectionMetrics(ctx context.Context) *metricsinfo.DataCoor
ret.Collections[collectionID].IndexInfo = append(ret.Collections[collectionID].IndexInfo, &metricsinfo.DataCoordIndexInfo{
NumEntitiesIndexed: info.GetIndexedRows(),
IndexName: info.GetIndexName(),
FieldID: info.GetIndexID(),
FieldID: info.GetFieldID(),
})
}
}

View File

@ -208,11 +208,6 @@ func (q *QuotaCenter) reportNumEntitiesLoaded(numEntitiesLoaded map[int64]int64)
for collectionID, num := range numEntitiesLoaded {
info, err := q.meta.GetCollectionByID(context.Background(), "", collectionID, typeutil.MaxTimestamp, false)
if err != nil {
log.Warn("failed to get collection info by its id, ignore to report loaded num entities",
zap.Int64("collection", collectionID),
zap.Int64("num_entities_loaded", num),
zap.Error(err),
)
continue
}
metrics.RootCoordNumEntities.WithLabelValues(info.Name, metrics.LoadedLabel).Set(float64(num))
@ -223,22 +218,12 @@ func (q *QuotaCenter) reportDataCoordCollectionMetrics(dc *metricsinfo.DataCoord
for collectionID, collection := range dc.Collections {
info, err := q.meta.GetCollectionByID(context.Background(), "", collectionID, typeutil.MaxTimestamp, false)
if err != nil {
log.Warn("failed to get collection info by its id, ignore to report total_num_entities/indexed_entities",
zap.Int64("collection", collectionID),
zap.Int64("num_entities_total", collection.NumEntitiesTotal),
zap.Int("lenOfIndexedInfo", len(collection.IndexInfo)),
zap.Error(err),
)
continue
}
metrics.RootCoordNumEntities.WithLabelValues(info.Name, metrics.TotalLabel).Set(float64(collection.NumEntitiesTotal))
fields := lo.KeyBy(info.Fields, func(v *model.Field) int64 { return v.FieldID })
for _, indexInfo := range collection.IndexInfo {
if _, ok := fields[indexInfo.FieldID]; !ok {
log.Warn("field id not found, ignore to report indexed num entities",
zap.Int64("collection", collectionID),
zap.Int64("field", indexInfo.FieldID),
)
continue
}
field := fields[indexInfo.FieldID]
@ -934,18 +919,10 @@ func (q *QuotaCenter) recordMetrics() {
for collectionID, states := range q.quotaStates {
info, err := q.meta.GetCollectionByID(context.Background(), "", collectionID, typeutil.MaxTimestamp, false)
if err != nil {
log.Warn("failed to get collection info by its id, ignore to report quota states",
zap.Int64("collection", collectionID),
zap.Error(err),
)
continue
}
dbm, err := q.meta.GetDatabaseByID(context.Background(), info.DBID, typeutil.MaxTimestamp)
if err != nil {
log.Warn("failed to get database name info by its id, ignore to report quota states",
zap.Int64("collection", collectionID),
zap.Error(err),
)
continue
}