未验证 提交 6e521dd4 编写于 作者: J Jiquan Long 提交者: GitHub

Optimize GetLoadingProgress to save RPC (#21493)

Signed-off-by: Nlongjiquan <jiquan.long@zilliz.com>
上级 e5f408dc
......@@ -1460,12 +1460,6 @@ func (node *Proxy) GetLoadingProgress(ctx context.Context, request *milvuspb.Get
return getErrResponse(err), nil
}
if statesResp, err := node.queryCoord.GetComponentStates(ctx); err != nil {
return getErrResponse(err), nil
} else if statesResp.State == nil || statesResp.State.StateCode != commonpb.StateCode_Healthy {
return getErrResponse(fmt.Errorf("the querycoord server isn't healthy, state: %v", statesResp.State)), nil
}
msgBase := commonpbutil.NewMsgBase(
commonpbutil.WithMsgType(commonpb.MsgType_SystemInfo),
commonpbutil.WithMsgID(0),
......@@ -1537,6 +1531,8 @@ func (node *Proxy) GetLoadState(ctx context.Context, request *milvuspb.GetLoadSt
return getErrResponse(err), nil
}
// TODO(longjiquan): https://github.com/milvus-io/milvus/issues/21485, Remove `GetComponentStates` after error code
// is ready to distinguish case whether the querycoord is not healthy or the collection is not even loaded.
if statesResp, err := node.queryCoord.GetComponentStates(ctx); err != nil {
return getErrResponse(err), nil
} else if statesResp.State == nil || statesResp.State.StateCode != commonpb.StateCode_Healthy {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册