提交 21ffc660 编写于 作者: Z zhenshan.cao 提交者: yefu.chen

Get rid of memory panic

Signed-off-by: Nzhenshan.cao <zhenshan.cao@zilliz.com>
上级 350e0df5
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册