Optimize GetLoadingProgress to save RPC (#21493) (#21629)

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
pull/21646/head
Jiquan Long 2023-01-11 10:09:39 +08:00 committed by GitHub
parent 6ebb2b1e07
commit ffbfce6ed4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1898,6 +1898,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 {