Get rid of memory panic

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
pull/4973/head^2
zhenshan.cao 2021-03-23 19:55:00 +08:00 committed by yefu.chen
parent 350e0df5f7
commit 21ffc660b0
1 changed files with 5 additions and 8 deletions

View File

@ -4,7 +4,6 @@ import (
"context"
"errors"
"strconv"
"time"
"go.uber.org/zap"
@ -19,10 +18,6 @@ import (
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
const (
reqTimeoutInterval = time.Second * 10
)
func (node *ProxyNode) UpdateStateCode(code internalpb.StateCode) {
node.stateCode.Store(code)
}
@ -218,8 +213,6 @@ func (node *ProxyNode) HasCollection(ctx context.Context, request *milvuspb.HasC
}
func (node *ProxyNode) LoadCollection(ctx context.Context, request *milvuspb.LoadCollectionRequest) (*commonpb.Status, error) {
//ctx, cancel := context.WithTimeout(ctx, reqTimeoutInterval)
//defer cancel()
lct := &LoadCollectionTask{
ctx: ctx,
@ -817,9 +810,13 @@ func (node *ProxyNode) DescribeIndex(ctx context.Context, request *milvuspb.Desc
err = dit.WaitToFinish()
if err != nil {
errCode := commonpb.ErrorCode_UnexpectedError
if dit.result != nil {
errCode = dit.result.Status.GetErrorCode()
}
return &milvuspb.DescribeIndexResponse{
Status: &commonpb.Status{
ErrorCode: dit.result.Status.GetErrorCode(),
ErrorCode: errCode,
Reason: err.Error(),
},
}, nil