mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 10:59:32 +08:00
enhance: Reduce the frequency of index ralted logs (#33050)
issue: #33001 Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
This commit is contained in:
parent
b2d83d3354
commit
4382cf5283
@ -600,7 +600,7 @@ func (s *Server) completeIndexInfo(indexInfo *indexpb.IndexInfo, index *model.In
|
||||
indexInfo.State = commonpb.IndexState_Finished
|
||||
}
|
||||
|
||||
log.Info("completeIndexInfo success", zap.Int64("collectionID", index.CollectionID), zap.Int64("indexID", index.IndexID),
|
||||
log.RatedInfo(60, "completeIndexInfo success", zap.Int64("collectionID", index.CollectionID), zap.Int64("indexID", index.IndexID),
|
||||
zap.Int64("totalRows", indexInfo.TotalRows), zap.Int64("indexRows", indexInfo.IndexedRows),
|
||||
zap.Int64("pendingIndexRows", indexInfo.PendingIndexRows),
|
||||
zap.String("state", indexInfo.State.String()), zap.String("failReason", indexInfo.IndexStateFailReason))
|
||||
@ -678,11 +678,8 @@ func (s *Server) DescribeIndex(ctx context.Context, req *indexpb.DescribeIndexRe
|
||||
log := log.Ctx(ctx).With(
|
||||
zap.Int64("collectionID", req.GetCollectionID()),
|
||||
zap.String("indexName", req.GetIndexName()),
|
||||
)
|
||||
log.Info("receive DescribeIndex request",
|
||||
zap.Uint64("timestamp", req.GetTimestamp()),
|
||||
)
|
||||
|
||||
if err := merr.CheckHealthy(s.GetStateCode()); err != nil {
|
||||
log.Warn(msgDataCoordIsUnhealthy(paramtable.GetNodeID()), zap.Error(err))
|
||||
return &indexpb.DescribeIndexResponse{
|
||||
@ -701,7 +698,7 @@ func (s *Server) DescribeIndex(ctx context.Context, req *indexpb.DescribeIndexRe
|
||||
|
||||
// The total rows of all indexes should be based on the current perspective
|
||||
segments := s.selectSegmentIndexesStats(WithCollection(req.GetCollectionID()), SegmentFilterFunc(func(info *SegmentInfo) bool {
|
||||
return (isFlush(info) || info.GetState() == commonpb.SegmentState_Dropped)
|
||||
return isFlush(info) || info.GetState() == commonpb.SegmentState_Dropped
|
||||
}))
|
||||
|
||||
indexInfos := make([]*indexpb.IndexInfo, 0)
|
||||
@ -727,7 +724,6 @@ func (s *Server) DescribeIndex(ctx context.Context, req *indexpb.DescribeIndexRe
|
||||
s.completeIndexInfo(indexInfo, index, segments, false, createTs)
|
||||
indexInfos = append(indexInfos, indexInfo)
|
||||
}
|
||||
log.Info("DescribeIndex success")
|
||||
return &indexpb.DescribeIndexResponse{
|
||||
Status: merr.Success(),
|
||||
IndexInfos: indexInfos,
|
||||
|
Loading…
Reference in New Issue
Block a user