mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 03:48:37 +08:00
Fix proxy doesn't update shard leaders cache for some types of error (#21185)
Signed-off-by: yah01 <yang.cen@zilliz.com> Signed-off-by: yah01 <yang.cen@zilliz.com>
This commit is contained in:
parent
166e9f0da5
commit
9fa58968b0
@ -22,7 +22,6 @@ import (
|
||||
"github.com/milvus-io/milvus/internal/util/commonpbutil"
|
||||
"github.com/milvus-io/milvus/internal/util/distance"
|
||||
"github.com/milvus-io/milvus/internal/util/funcutil"
|
||||
"github.com/milvus-io/milvus/internal/util/grpcclient"
|
||||
"github.com/milvus-io/milvus/internal/util/paramtable"
|
||||
"github.com/milvus-io/milvus/internal/util/timerecord"
|
||||
"github.com/milvus-io/milvus/internal/util/trace"
|
||||
@ -407,10 +406,10 @@ func (t *searchTask) Execute(ctx context.Context) error {
|
||||
}
|
||||
|
||||
err := executeSearch(WithCache)
|
||||
if errors.Is(err, errInvalidShardLeaders) || funcutil.IsGrpcErr(err) || errors.Is(err, grpcclient.ErrConnect) {
|
||||
if err != nil {
|
||||
log.Ctx(ctx).Warn("first search failed, updating shardleader caches and retry search",
|
||||
zap.Error(err))
|
||||
return executeSearch(WithoutCache)
|
||||
err = executeSearch(WithoutCache)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("fail to search on all shard leaders, err=%v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user