mirror of https://github.com/milvus-io/milvus.git
Fix proxy unable to update cache (#16646)
Signed-off-by: yangxuan <xuan.yang@zilliz.com>pull/16659/head
parent
bc5e9ec929
commit
fbc7fe1cdc
|
@ -244,7 +244,7 @@ func (c *Client) ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmen
|
|||
|
||||
// Search performs replica search tasks in QueryNode.
|
||||
func (c *Client) Search(ctx context.Context, req *querypb.SearchRequest) (*internalpb.SearchResults, error) {
|
||||
ret, err := c.grpcClient.ReCall(ctx, func(client interface{}) (interface{}, error) {
|
||||
ret, err := c.grpcClient.Call(ctx, func(client interface{}) (interface{}, error) {
|
||||
if !funcutil.CheckCtxValid(ctx) {
|
||||
return nil, ctx.Err()
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ func (c *Client) Search(ctx context.Context, req *querypb.SearchRequest) (*inter
|
|||
|
||||
// Query performs replica query tasks in QueryNode.
|
||||
func (c *Client) Query(ctx context.Context, req *querypb.QueryRequest) (*internalpb.RetrieveResults, error) {
|
||||
ret, err := c.grpcClient.ReCall(ctx, func(client interface{}) (interface{}, error) {
|
||||
ret, err := c.grpcClient.Call(ctx, func(client interface{}) (interface{}, error) {
|
||||
if !funcutil.CheckCtxValid(ctx) {
|
||||
return nil, ctx.Err()
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package proxy
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
qnClient "github.com/milvus-io/milvus/internal/distributed/querynode/client"
|
||||
|
||||
|
@ -75,7 +74,11 @@ func roundRobinPolicy(ctx context.Context, getQueryNodePolicy getQueryNodePolicy
|
|||
}
|
||||
|
||||
if current == replicaNum && err != nil {
|
||||
return fmt.Errorf("no shard leaders available for channel: %s, leaders: %v, err: %s", leaders.GetChannelName(), leaders.GetNodeIds(), err.Error())
|
||||
log.Warn("no shard leaders available for channel",
|
||||
zap.String("channel name", leaders.GetChannelName()),
|
||||
zap.Int64s("leaders", leaders.GetNodeIds()), zap.Error(err))
|
||||
// needs to return the error from query
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@ func (t *queryTask) Execute(ctx context.Context) error {
|
|||
return executeQuery(WithoutCache)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("fail to search on all shard leaders, err=%s", err.Error())
|
||||
}
|
||||
|
||||
log.Info("Query Execute done.",
|
||||
|
|
|
@ -295,7 +295,7 @@ func (t *searchTask) Execute(ctx context.Context) error {
|
|||
return executeSearch(WithoutCache)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("fail to search on all shard leaders, err=%s", err.Error())
|
||||
}
|
||||
|
||||
log.Info("Search Execute done.",
|
||||
|
|
Loading…
Reference in New Issue