mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
feat: Ignore reporting index metrics for non-existent indexes (#41294)
feat: Ignore reporting index metrics for non-existent indexes Remove the reporting of index metrics for non-existent indexes in the `getCollectionMetrics` function. This change improves the code by skipping unnecessary operations and reduces log noise. issue: https://github.com/milvus-io/milvus/issues/41280 Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
This commit is contained in:
parent
d50781c8cc
commit
c43f8f7944
@ -70,6 +70,13 @@ func (s *Server) getCollectionMetrics(ctx context.Context) *metricsinfo.DataCoor
|
||||
IndexName: "",
|
||||
Timestamp: 0,
|
||||
})
|
||||
if err == merr.ErrIndexNotFound {
|
||||
log.Ctx(ctx).Debug("index not found, ignore to report index metrics",
|
||||
zap.Int64("collection", collectionID),
|
||||
zap.Error(err),
|
||||
)
|
||||
continue
|
||||
}
|
||||
if err := merr.CheckRPCCall(indexInfo, err); err != nil {
|
||||
log.Ctx(ctx).Warn("failed to describe index, ignore to report index metrics",
|
||||
zap.Int64("collection", collectionID),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user