Remove grpc returned error (#12537)

Signed-off-by: godchen <qingxiang.chen@zilliz.com>
pull/12578/head
godchen 2021-12-01 22:17:46 +08:00 committed by GitHub
parent a76f490f12
commit 5e3e3b3b41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 7 deletions

View File

@ -693,7 +693,7 @@ func (s *Server) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest
s.metricsCacheManager.UpdateSystemInfoMetrics(metrics)
return metrics, err
return metrics, nil
}
log.Debug("DataCoord.GetMetrics failed, request metric type is not implemented yet",

View File

@ -724,7 +724,7 @@ func (node *DataNode) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRe
zap.Any("systemInfoMetrics", systemInfoMetrics), // TODO(dragondriver): necessary? may be very large
zap.Error(err))
return systemInfoMetrics, err
return systemInfoMetrics, nil
}
log.Debug("DataNode.GetMetrics failed, request metric type is not implemented yet",

View File

@ -501,7 +501,12 @@ func (i *IndexCoord) GetIndexFilePaths(ctx context.Context, req *indexpb.GetInde
for _, indexID := range req.IndexBuildIDs {
indexPathInfo, err := i.metaTable.GetIndexFilePathInfo(indexID)
if err != nil {
return nil, err
return &indexpb.GetIndexFilePathsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: err.Error(),
},
}, nil
}
indexPaths = append(indexPaths, indexPathInfo)
}
@ -577,7 +582,7 @@ func (i *IndexCoord) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsReq
i.metricsCacheManager.UpdateSystemInfoMetrics(metrics)
return metrics, err
return metrics, nil
}
log.Debug("IndexCoord.GetMetrics failed, request metric type is not implemented yet",

View File

@ -389,7 +389,7 @@ func (i *IndexNode) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequ
zap.Any("metrics", metrics), // TODO(dragondriver): necessary? may be very large
zap.Error(err))
return metrics, err
return metrics, nil
}
log.Warn("IndexNode.GetMetrics failed, request metric type is not implemented yet",

View File

@ -65,7 +65,7 @@ func (node *Proxy) GetComponentStates(ctx context.Context) (*internalpb.Componen
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: errMsg,
}
return stats, errors.New(errMsg)
return stats, nil
}
nodeID := common.NotRegisteredID
if node.session != nil && node.session.Registered() {
@ -2771,7 +2771,7 @@ func (node *Proxy) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsReque
node.metricsCacheManager.UpdateSystemInfoMetrics(metrics)
return metrics, err
return metrics, nil
}
log.Debug("Proxy.GetMetrics failed, request metric type is not implemented yet",