mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
Return NotShardLeader error code when dml channel is not watched (#18055)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
b31f937301
commit
d652fa567a
@ -519,6 +519,7 @@ func (node *QueryNode) Search(ctx context.Context, req *queryPb.SearchRequest) (
|
||||
//from Proxy
|
||||
cluster, ok := qs.clusterService.getShardCluster(req.GetDmlChannel())
|
||||
if !ok {
|
||||
failRet.Status.ErrorCode = commonpb.ErrorCode_NotShardLeader
|
||||
failRet.Status.Reason = fmt.Sprintf("channel %s leader is not here", req.GetDmlChannel())
|
||||
return failRet, nil
|
||||
}
|
||||
@ -663,6 +664,7 @@ func (node *QueryNode) Query(ctx context.Context, req *queryPb.QueryRequest) (*i
|
||||
|
||||
cluster, ok := qs.clusterService.getShardCluster(req.GetDmlChannel())
|
||||
if !ok {
|
||||
failRet.Status.ErrorCode = commonpb.ErrorCode_NotShardLeader
|
||||
failRet.Status.Reason = fmt.Sprintf("channel %s leader is not here", req.GetDmlChannel())
|
||||
return failRet, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user