mirror of https://github.com/milvus-io/milvus.git
Get rid of memory panic
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>pull/4973/head^2
parent
350e0df5f7
commit
21ffc660b0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue