提交 455cc59d 编写于 作者: Q quicksilver 提交者: yefu.chen

Update publish-test-images.yaml

Signed-off-by: Nquicksilver <zhifeng.zhang@zilliz.com>
上级 b91696c6
......@@ -6,12 +6,12 @@ on:
push:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/env/**'
- 'build/docker/test/**'
- '.github/workflows/publish-test-images.yaml'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/env/**'
- 'build/docker/test/**'
- '.github/workflows/publish-test-images.yaml'
jobs:
......
......@@ -232,51 +232,58 @@ const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(
"\010msg_type\030\001 \001(\0162\034.milvus.proto.common.Ms"
"gType\022\r\n\005msgID\030\002 \001(\003\022\021\n\ttimestamp\030\003 \001(\004\022"
"\020\n\010sourceID\030\004 \001(\003\"7\n\tMsgHeader\022*\n\004base\030\001"
" \001(\0132\034.milvus.proto.common.MsgBase*\315\004\n\tE"
"rrorCode\022\013\n\007SUCCESS\020\000\022\024\n\020UNEXPECTED_ERRO"
"R\020\001\022\022\n\016CONNECT_FAILED\020\002\022\025\n\021PERMISSION_DE"
"NIED\020\003\022\031\n\025COLLECTION_NOT_EXISTS\020\004\022\024\n\020ILL"
"EGAL_ARGUMENT\020\005\022\025\n\021ILLEGAL_DIMENSION\020\007\022\026"
"\n\022ILLEGAL_INDEX_TYPE\020\010\022\033\n\027ILLEGAL_COLLEC"
"TION_NAME\020\t\022\020\n\014ILLEGAL_TOPK\020\n\022\025\n\021ILLEGAL"
"_ROWRECORD\020\013\022\025\n\021ILLEGAL_VECTOR_ID\020\014\022\031\n\025I"
"LLEGAL_SEARCH_RESULT\020\r\022\022\n\016FILE_NOT_FOUND"
"\020\016\022\017\n\013META_FAILED\020\017\022\020\n\014CACHE_FAILED\020\020\022\030\n"
"\024CANNOT_CREATE_FOLDER\020\021\022\026\n\022CANNOT_CREATE"
"_FILE\020\022\022\030\n\024CANNOT_DELETE_FOLDER\020\023\022\026\n\022CAN"
"NOT_DELETE_FILE\020\024\022\025\n\021BUILD_INDEX_ERROR\020\025"
"\022\021\n\rILLEGAL_NLIST\020\026\022\027\n\023ILLEGAL_METRIC_TY"
"PE\020\027\022\021\n\rOUT_OF_MEMORY\020\030\022\023\n\017INDEX_NOT_EXI"
"ST\020\031\022\024\n\017DD_REQUEST_RACE\020\350\007*\244\001\n\nIndexStat"
"e\022\024\n\020INDEX_STATE_NONE\020\000\022\030\n\024INDEX_STATE_U"
"NISSUED\020\001\022\033\n\027INDEX_STATE_IN_PROGRESS\020\002\022\030"
"\n\024INDEX_STATE_FINISHED\020\003\022\026\n\022INDEX_STATE_"
"FAILED\020\004\022\027\n\023INDEX_STATE_DELETED\020\005*o\n\014Seg"
"mentState\022\017\n\013SegmentNone\020\000\022\023\n\017SegmentNot"
"Exist\020\001\022\022\n\016SegmentGrowing\020\002\022\021\n\rSegmentSe"
"aled\020\003\022\022\n\016SegmentFlushed\020\004*\225\006\n\007MsgType\022\t"
"\n\005kNone\020\000\022\025\n\021kCreateCollection\020d\022\023\n\017kDro"
"pCollection\020e\022\022\n\016kHasCollection\020f\022\027\n\023kDe"
"scribeCollection\020g\022\024\n\020kShowCollections\020h"
"\022\022\n\016kGetSysConfigs\020i\022\023\n\017kLoadCollection\020"
"j\022\026\n\022kReleaseCollection\020k\022\025\n\020kCreatePart"
"ition\020\310\001\022\023\n\016kDropPartition\020\311\001\022\022\n\rkHasPar"
"tition\020\312\001\022\027\n\022kDescribePartition\020\313\001\022\024\n\017kS"
"howPartitions\020\314\001\022\023\n\016kLoadPartition\020\315\001\022\026\n"
"\021kReleasePartition\020\316\001\022\021\n\014kShowSegment\020\372\001"
"\022\025\n\020kDescribeSegment\020\373\001\022\021\n\014kCreateIndex\020"
"\254\002\022\023\n\016kDescribeIndex\020\255\002\022\017\n\nkDropIndex\020\256\002"
"\022\014\n\007kInsert\020\220\003\022\014\n\007kDelete\020\221\003\022\013\n\006kFlush\020\222"
"\003\022\014\n\007kSearch\020\364\003\022\022\n\rkSearchResult\020\365\003\022\023\n\016k"
"GetIndexState\020\366\003\022\035\n\030kGetCollectionStatis"
"tics\020\367\003\022\034\n\027kGetPartitionStatistics\020\370\003\022\021\n"
"\014kSegmentInfo\020\330\004\022\016\n\tkTimeTick\020\260\t\022\024\n\017kQue"
"ryNodeStats\020\261\t\022\017\n\nkLoadIndex\020\262\t\022\017\n\nkRequ"
"estID\020\263\t\022\020\n\013kRequestTSO\020\264\t\022\025\n\020kAllocateS"
"egment\020\265\t\022\027\n\022kSegmentStatistics\020\266\t\022\026\n\021kS"
"egmentFlushDone\020\267\tBBZ@github.com/zillizt"
"ech/milvus-distributed/internal/proto/co"
"mmonpbb\006proto3"
" \001(\0132\034.milvus.proto.common.MsgBase*\353\006\n\tE"
"rrorCode\022\026\n\022ERROR_CODE_SUCCESS\020\000\022\037\n\033ERRO"
"R_CODE_UNEXPECTED_ERROR\020\001\022\035\n\031ERROR_CODE_"
"CONNECT_FAILED\020\002\022 \n\034ERROR_CODE_PERMISSIO"
"N_DENIED\020\003\022$\n ERROR_CODE_COLLECTION_NOT_"
"EXISTS\020\004\022\037\n\033ERROR_CODE_ILLEGAL_ARGUMENT\020"
"\005\022 \n\034ERROR_CODE_ILLEGAL_DIMENSION\020\007\022!\n\035E"
"RROR_CODE_ILLEGAL_INDEX_TYPE\020\010\022&\n\"ERROR_"
"CODE_ILLEGAL_COLLECTION_NAME\020\t\022\033\n\027ERROR_"
"CODE_ILLEGAL_TOPK\020\n\022 \n\034ERROR_CODE_ILLEGA"
"L_ROWRECORD\020\013\022 \n\034ERROR_CODE_ILLEGAL_VECT"
"OR_ID\020\014\022$\n ERROR_CODE_ILLEGAL_SEARCH_RES"
"ULT\020\r\022\035\n\031ERROR_CODE_FILE_NOT_FOUND\020\016\022\032\n\026"
"ERROR_CODE_META_FAILED\020\017\022\033\n\027ERROR_CODE_C"
"ACHE_FAILED\020\020\022#\n\037ERROR_CODE_CANNOT_CREAT"
"E_FOLDER\020\021\022!\n\035ERROR_CODE_CANNOT_CREATE_F"
"ILE\020\022\022#\n\037ERROR_CODE_CANNOT_DELETE_FOLDER"
"\020\023\022!\n\035ERROR_CODE_CANNOT_DELETE_FILE\020\024\022 \n"
"\034ERROR_CODE_BUILD_INDEX_ERROR\020\025\022\034\n\030ERROR"
"_CODE_ILLEGAL_NLIST\020\026\022\"\n\036ERROR_CODE_ILLE"
"GAL_METRIC_TYPE\020\027\022\034\n\030ERROR_CODE_OUT_OF_M"
"EMORY\020\030\022\036\n\032ERROR_CODE_INDEX_NOT_EXIST\020\031\022"
"\037\n\032ERROR_CODE_DD_REQUEST_RACE\020\350\007*\244\001\n\nInd"
"exState\022\024\n\020INDEX_STATE_NONE\020\000\022\030\n\024INDEX_S"
"TATE_UNISSUED\020\001\022\033\n\027INDEX_STATE_IN_PROGRE"
"SS\020\002\022\030\n\024INDEX_STATE_FINISHED\020\003\022\026\n\022INDEX_"
"STATE_FAILED\020\004\022\027\n\023INDEX_STATE_DELETED\020\005*"
"o\n\014SegmentState\022\017\n\013SegmentNone\020\000\022\023\n\017Segm"
"entNotExist\020\001\022\022\n\016SegmentGrowing\020\002\022\021\n\rSeg"
"mentSealed\020\003\022\022\n\016SegmentFlushed\020\004*\225\006\n\007Msg"
"Type\022\t\n\005kNone\020\000\022\025\n\021kCreateCollection\020d\022\023"
"\n\017kDropCollection\020e\022\022\n\016kHasCollection\020f\022"
"\027\n\023kDescribeCollection\020g\022\024\n\020kShowCollect"
"ions\020h\022\022\n\016kGetSysConfigs\020i\022\023\n\017kLoadColle"
"ction\020j\022\026\n\022kReleaseCollection\020k\022\025\n\020kCrea"
"tePartition\020\310\001\022\023\n\016kDropPartition\020\311\001\022\022\n\rk"
"HasPartition\020\312\001\022\027\n\022kDescribePartition\020\313\001"
"\022\024\n\017kShowPartitions\020\314\001\022\023\n\016kLoadPartition"
"\020\315\001\022\026\n\021kReleasePartition\020\316\001\022\021\n\014kShowSegm"
"ent\020\372\001\022\025\n\020kDescribeSegment\020\373\001\022\021\n\014kCreate"
"Index\020\254\002\022\023\n\016kDescribeIndex\020\255\002\022\017\n\nkDropIn"
"dex\020\256\002\022\014\n\007kInsert\020\220\003\022\014\n\007kDelete\020\221\003\022\013\n\006kF"
"lush\020\222\003\022\014\n\007kSearch\020\364\003\022\022\n\rkSearchResult\020\365"
"\003\022\023\n\016kGetIndexState\020\366\003\022\035\n\030kGetCollection"
"Statistics\020\367\003\022\034\n\027kGetPartitionStatistics"
"\020\370\003\022\021\n\014kSegmentInfo\020\330\004\022\016\n\tkTimeTick\020\260\t\022\024"
"\n\017kQueryNodeStats\020\261\t\022\017\n\nkLoadIndex\020\262\t\022\017\n"
"\nkRequestID\020\263\t\022\020\n\013kRequestTSO\020\264\t\022\025\n\020kAll"
"ocateSegment\020\265\t\022\027\n\022kSegmentStatistics\020\266\t"
"\022\026\n\021kSegmentFlushDone\020\267\tBBZ@github.com/z"
"illiztech/milvus-distributed/internal/pr"
"oto/commonpbb\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_common_2eproto_deps[1] = {
};
......@@ -292,7 +299,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_com
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_common_2eproto_once;
static bool descriptor_table_common_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_common_2eproto = {
&descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 2134,
&descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 2420,
&descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_sccs, descriptor_table_common_2eproto_deps, 7, 0,
schemas, file_default_instances, TableStruct_common_2eproto::offsets,
file_level_metadata_common_2eproto, 7, file_level_enum_descriptors_common_2eproto, file_level_service_descriptors_common_2eproto,
......
......@@ -96,38 +96,38 @@ namespace proto {
namespace common {
enum ErrorCode : int {
SUCCESS = 0,
UNEXPECTED_ERROR = 1,
CONNECT_FAILED = 2,
PERMISSION_DENIED = 3,
COLLECTION_NOT_EXISTS = 4,
ILLEGAL_ARGUMENT = 5,
ILLEGAL_DIMENSION = 7,
ILLEGAL_INDEX_TYPE = 8,
ILLEGAL_COLLECTION_NAME = 9,
ILLEGAL_TOPK = 10,
ILLEGAL_ROWRECORD = 11,
ILLEGAL_VECTOR_ID = 12,
ILLEGAL_SEARCH_RESULT = 13,
FILE_NOT_FOUND = 14,
META_FAILED = 15,
CACHE_FAILED = 16,
CANNOT_CREATE_FOLDER = 17,
CANNOT_CREATE_FILE = 18,
CANNOT_DELETE_FOLDER = 19,
CANNOT_DELETE_FILE = 20,
BUILD_INDEX_ERROR = 21,
ILLEGAL_NLIST = 22,
ILLEGAL_METRIC_TYPE = 23,
OUT_OF_MEMORY = 24,
INDEX_NOT_EXIST = 25,
DD_REQUEST_RACE = 1000,
ERROR_CODE_SUCCESS = 0,
ERROR_CODE_UNEXPECTED_ERROR = 1,
ERROR_CODE_CONNECT_FAILED = 2,
ERROR_CODE_PERMISSION_DENIED = 3,
ERROR_CODE_COLLECTION_NOT_EXISTS = 4,
ERROR_CODE_ILLEGAL_ARGUMENT = 5,
ERROR_CODE_ILLEGAL_DIMENSION = 7,
ERROR_CODE_ILLEGAL_INDEX_TYPE = 8,
ERROR_CODE_ILLEGAL_COLLECTION_NAME = 9,
ERROR_CODE_ILLEGAL_TOPK = 10,
ERROR_CODE_ILLEGAL_ROWRECORD = 11,
ERROR_CODE_ILLEGAL_VECTOR_ID = 12,
ERROR_CODE_ILLEGAL_SEARCH_RESULT = 13,
ERROR_CODE_FILE_NOT_FOUND = 14,
ERROR_CODE_META_FAILED = 15,
ERROR_CODE_CACHE_FAILED = 16,
ERROR_CODE_CANNOT_CREATE_FOLDER = 17,
ERROR_CODE_CANNOT_CREATE_FILE = 18,
ERROR_CODE_CANNOT_DELETE_FOLDER = 19,
ERROR_CODE_CANNOT_DELETE_FILE = 20,
ERROR_CODE_BUILD_INDEX_ERROR = 21,
ERROR_CODE_ILLEGAL_NLIST = 22,
ERROR_CODE_ILLEGAL_METRIC_TYPE = 23,
ERROR_CODE_OUT_OF_MEMORY = 24,
ERROR_CODE_INDEX_NOT_EXIST = 25,
ERROR_CODE_DD_REQUEST_RACE = 1000,
ErrorCode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
ErrorCode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
};
bool ErrorCode_IsValid(int value);
constexpr ErrorCode ErrorCode_MIN = SUCCESS;
constexpr ErrorCode ErrorCode_MAX = DD_REQUEST_RACE;
constexpr ErrorCode ErrorCode_MIN = ERROR_CODE_SUCCESS;
constexpr ErrorCode ErrorCode_MAX = ERROR_CODE_DD_REQUEST_RACE;
constexpr int ErrorCode_ARRAYSIZE = ErrorCode_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ErrorCode_descriptor();
......
......@@ -161,7 +161,7 @@ func (node *DataNode) UpdateStateCode(code internalpb2.StateCode) {
func (node *DataNode) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelRequest) (*commonpb.Status, error) {
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
}
switch {
......@@ -176,7 +176,7 @@ func (node *DataNode) WatchDmChannels(ctx context.Context, in *datapb.WatchDmCha
default:
Params.InsertChannelNames = in.GetChannelNames()
status.ErrorCode = commonpb.ErrorCode_SUCCESS
status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
node.watchDm <- struct{}{}
return status, nil
}
......@@ -191,7 +191,7 @@ func (node *DataNode) GetComponentStates(ctx context.Context) (*internalpb2.Comp
StateCode: node.State.Load().(internalpb2.StateCode),
},
SubcomponentStates: make([]*internalpb2.ComponentInfo, 0),
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS},
}
return states, nil
}
......@@ -228,7 +228,7 @@ func (node *DataNode) Stop() error {
func (node *DataNode) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Value: "",
......@@ -238,7 +238,7 @@ func (node *DataNode) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringR
func (node *DataNode) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Value: "",
......
......@@ -449,7 +449,7 @@ func (m *MasterServiceFactory) GetComponentStates(ctx context.Context) (*interna
State: &internalpb2.ComponentInfo{},
SubcomponentStates: make([]*internalpb2.ComponentInfo, 0),
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
}, nil
}
......@@ -77,11 +77,11 @@ func newMockDataNodeClient() *mockDataNodeClient {
}
func (c *mockDataNodeClient) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelRequest) (*commonpb.Status, error) {
return &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS}, nil
return &commonpb.Status{ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS}, nil
}
func (c *mockDataNodeClient) FlushSegments(ctx context.Context, in *datapb.FlushSegRequest) (*commonpb.Status, error) {
return &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS}, nil
return &commonpb.Status{ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS}, nil
}
func (c *mockDataNodeClient) Stop() error {
......
......@@ -412,7 +412,7 @@ func (s *Server) GetComponentStates(ctx context.Context) (*internalpb2.Component
StateCode: s.state.Load().(internalpb2.StateCode),
},
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
}
dataNodeStates, err := s.cluster.GetDataNodeStates(ctx)
......@@ -421,14 +421,14 @@ func (s *Server) GetComponentStates(ctx context.Context) (*internalpb2.Component
return resp, nil
}
resp.SubcomponentStates = dataNodeStates
resp.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
resp.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
return resp, nil
}
func (s *Server) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
Value: Params.TimeTickChannelName,
}, nil
......@@ -437,7 +437,7 @@ func (s *Server) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringRespon
func (s *Server) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
Value: Params.StatisticsChannelName,
}, nil
......@@ -446,7 +446,7 @@ func (s *Server) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResp
func (s *Server) RegisterNode(ctx context.Context, req *datapb.RegisterNodeRequest) (*datapb.RegisterNodeResponse, error) {
ret := &datapb.RegisterNodeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
}
log.Debug("DataService: RegisterNode:", zap.String("IP", req.Address.Ip), zap.Int64("Port", req.Address.Port))
......@@ -465,7 +465,7 @@ func (s *Server) RegisterNode(ctx context.Context, req *datapb.RegisterNodeReque
}
s.ddChannelName = resp.Value
}
ret.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
ret.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
ret.InitParams = &internalpb2.InitParams{
NodeID: Params.NodeID,
StartParams: []*commonpb.KeyValuePair{
......@@ -501,25 +501,25 @@ func (s *Server) newDataNode(ip string, port int64, id UniqueID) (*dataNode, err
func (s *Server) Flush(ctx context.Context, req *datapb.FlushRequest) (*commonpb.Status, error) {
if !s.checkStateIsHealthy() {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "server is initializing",
}, nil
}
s.segAllocator.SealAllSegments(req.CollectionID)
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}, nil
}
func (s *Server) AssignSegmentID(ctx context.Context, req *datapb.AssignSegIDRequest) (*datapb.AssignSegIDResponse, error) {
resp := &datapb.AssignSegIDResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
SegIDAssignments: make([]*datapb.SegIDAssignment, 0),
}
if !s.checkStateIsHealthy() {
resp.Status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
resp.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
resp.Status.Reason = "server is initializing"
return resp, nil
}
......@@ -532,7 +532,7 @@ func (s *Server) AssignSegmentID(ctx context.Context, req *datapb.AssignSegIDReq
}
result := &datapb.SegIDAssignment{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
}
segmentID, retCount, expireTs, err := s.segAllocator.AllocSegment(r.CollectionID, r.PartitionID, r.ChannelName, int(r.Count))
......@@ -560,7 +560,7 @@ func (s *Server) AssignSegmentID(ctx context.Context, req *datapb.AssignSegIDReq
}
}
result.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
result.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
result.CollectionID = r.CollectionID
result.SegID = segmentID
result.PartitionID = r.PartitionID
......@@ -633,7 +633,7 @@ func (s *Server) openNewSegment(collectionID UniqueID, partitionID UniqueID, cha
func (s *Server) ShowSegments(ctx context.Context, req *datapb.ShowSegmentRequest) (*datapb.ShowSegmentResponse, error) {
resp := &datapb.ShowSegmentResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
}
if !s.checkStateIsHealthy() {
......@@ -641,7 +641,7 @@ func (s *Server) ShowSegments(ctx context.Context, req *datapb.ShowSegmentReques
return resp, nil
}
ids := s.meta.GetSegmentsOfPartition(req.CollectionID, req.PartitionID)
resp.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
resp.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
resp.SegmentIDs = ids
return resp, nil
}
......@@ -649,7 +649,7 @@ func (s *Server) ShowSegments(ctx context.Context, req *datapb.ShowSegmentReques
func (s *Server) GetSegmentStates(ctx context.Context, req *datapb.SegmentStatesRequest) (*datapb.SegmentStatesResponse, error) {
resp := &datapb.SegmentStatesResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
}
if !s.checkStateIsHealthy() {
......@@ -664,10 +664,10 @@ func (s *Server) GetSegmentStates(ctx context.Context, req *datapb.SegmentStates
}
segmentInfo, err := s.meta.GetSegment(segmentID)
if err != nil {
state.Status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
state.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
state.Status.Reason = "get segment states error: " + err.Error()
} else {
state.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
state.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
state.State = segmentInfo.State
state.CreateTime = segmentInfo.OpenTime
state.SealedTime = segmentInfo.SealedTime
......@@ -677,7 +677,7 @@ func (s *Server) GetSegmentStates(ctx context.Context, req *datapb.SegmentStates
}
resp.States = append(resp.States, state)
}
resp.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
resp.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
return resp, nil
}
......@@ -685,7 +685,7 @@ func (s *Server) GetSegmentStates(ctx context.Context, req *datapb.SegmentStates
func (s *Server) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertBinlogPathRequest) (*datapb.InsertBinlogPathsResponse, error) {
resp := &datapb.InsertBinlogPathsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
}
p := path.Join(Params.SegmentFlushMetaPath, strconv.FormatInt(req.SegmentID, 10))
......@@ -706,7 +706,7 @@ func (s *Server) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertBin
fields[i] = field.FieldID
paths[i] = &internalpb2.StringList{Values: field.BinlogPaths}
}
resp.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
resp.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
resp.FieldIDs = fields
resp.Paths = paths
return resp, nil
......@@ -715,7 +715,7 @@ func (s *Server) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertBin
func (s *Server) GetInsertChannels(ctx context.Context, req *datapb.InsertChannelRequest) (*internalpb2.StringList, error) {
return &internalpb2.StringList{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
Values: s.insertChannels,
}, nil
......@@ -724,7 +724,7 @@ func (s *Server) GetInsertChannels(ctx context.Context, req *datapb.InsertChanne
func (s *Server) GetCollectionStatistics(ctx context.Context, req *datapb.CollectionStatsRequest) (*datapb.CollectionStatsResponse, error) {
resp := &datapb.CollectionStatsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
}
nums, err := s.meta.GetNumRowsOfCollection(req.CollectionID)
......@@ -732,7 +732,7 @@ func (s *Server) GetCollectionStatistics(ctx context.Context, req *datapb.Collec
resp.Status.Reason = err.Error()
return resp, nil
}
resp.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
resp.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
resp.Stats = append(resp.Stats, &commonpb.KeyValuePair{Key: "row_count", Value: strconv.FormatInt(nums, 10)})
return resp, nil
}
......@@ -745,7 +745,7 @@ func (s *Server) GetPartitionStatistics(ctx context.Context, req *datapb.Partiti
func (s *Server) GetSegmentInfoChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
Value: Params.SegmentInfoChannelName,
}, nil
......@@ -754,7 +754,7 @@ func (s *Server) GetSegmentInfoChannel(ctx context.Context) (*milvuspb.StringRes
func (s *Server) GetSegmentInfo(ctx context.Context, req *datapb.SegmentInfoRequest) (*datapb.SegmentInfoResponse, error) {
resp := &datapb.SegmentInfoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
}
if !s.checkStateIsHealthy() {
......@@ -770,7 +770,7 @@ func (s *Server) GetSegmentInfo(ctx context.Context, req *datapb.SegmentInfoRequ
}
infos[i] = segmentInfo
}
resp.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
resp.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
resp.Infos = infos
return resp, nil
}
......@@ -19,11 +19,11 @@ func VerifyResponse(response interface{}, err error) error {
}
switch resp := response.(type) {
case Response:
if resp.GetStatus().ErrorCode != commonpb.ErrorCode_SUCCESS {
if resp.GetStatus().ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(resp.GetStatus().Reason)
}
case *commonpb.Status:
if resp.ErrorCode != commonpb.ErrorCode_SUCCESS {
if resp.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(resp.Reason)
}
default:
......
......@@ -238,11 +238,11 @@ func (s *Server) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelR
func (s *Server) FlushSegments(ctx context.Context, in *datapb.FlushSegRequest) (*commonpb.Status, error) {
if s.datanode.State.Load().(internalpb2.StateCode) != internalpb2.StateCode_HEALTHY {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "DataNode isn't healthy.",
}, errors.New("DataNode is not ready yet")
}
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}, s.datanode.FlushSegments(ctx, in)
}
......@@ -61,7 +61,7 @@ func (c *Client) GetComponentStates(ctx context.Context) (*internalpb2.Component
func (c *Client) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
}, nil
}
......@@ -69,7 +69,7 @@ func (c *Client) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringRespon
func (c *Client) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
}, nil
}
......
......@@ -200,7 +200,7 @@ func TestGrpcService(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, len(createCollectionArray), 1)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, createCollectionArray[0].Base.MsgType, commonpb.MsgType_kCreateCollection)
assert.Equal(t, createCollectionArray[0].CollectionName, "testColl")
......@@ -209,7 +209,7 @@ func TestGrpcService(t *testing.T) {
req.Base.SourceID = 101
status, err = cli.CreateCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_UNEXPECTED_ERROR)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR)
req.Base.MsgID = 102
req.Base.Timestamp = 102
......@@ -217,7 +217,7 @@ func TestGrpcService(t *testing.T) {
req.CollectionName = "testColl-again"
status, err = cli.CreateCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_UNEXPECTED_ERROR)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR)
schema.Name = req.CollectionName
sbf, err = proto.Marshal(&schema)
......@@ -228,7 +228,7 @@ func TestGrpcService(t *testing.T) {
req.Base.SourceID = 103
status, err = cli.CreateCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, len(createCollectionArray), 2)
assert.Equal(t, createCollectionArray[1].Base.MsgType, commonpb.MsgType_kCreateCollection)
assert.Equal(t, createCollectionArray[1].CollectionName, "testColl-again")
......@@ -244,7 +244,7 @@ func TestGrpcService(t *testing.T) {
req.Base.SourceID = 103
status, err = cli.CreateCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_UNEXPECTED_ERROR)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR)
matched, err := regexp.MatchString("input timestamp = [0-9]+, last dd time stamp = [0-9]+", status.Reason)
assert.Nil(t, err)
assert.True(t, matched)
......@@ -263,7 +263,7 @@ func TestGrpcService(t *testing.T) {
}
rsp, err := cli.HasCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, rsp.Value, true)
req = &milvuspb.HasCollectionRequest{
......@@ -278,7 +278,7 @@ func TestGrpcService(t *testing.T) {
}
rsp, err = cli.HasCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, rsp.Value, false)
// test time stamp go back
......@@ -294,7 +294,7 @@ func TestGrpcService(t *testing.T) {
}
rsp, err = cli.HasCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, rsp.Value, false)
})
......@@ -313,7 +313,7 @@ func TestGrpcService(t *testing.T) {
}
rsp, err := cli.DescribeCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, rsp.Schema.Name, "testColl")
assert.Equal(t, rsp.CollectionID, collMeta.ID)
})
......@@ -330,7 +330,7 @@ func TestGrpcService(t *testing.T) {
}
rsp, err := cli.ShowCollections(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.ElementsMatch(t, rsp.CollectionNames, []string{"testColl", "testColl-again"})
assert.Equal(t, len(rsp.CollectionNames), 2)
})
......@@ -349,7 +349,7 @@ func TestGrpcService(t *testing.T) {
}
status, err := cli.CreatePartition(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
collMeta, err := core.MetaTable.GetCollectionByName("testColl")
assert.Nil(t, err)
assert.Equal(t, len(collMeta.PartitionIDs), 2)
......@@ -373,7 +373,7 @@ func TestGrpcService(t *testing.T) {
}
rsp, err := cli.HasPartition(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, rsp.Value, true)
})
......@@ -393,7 +393,7 @@ func TestGrpcService(t *testing.T) {
}
rsp, err := cli.ShowPartitions(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, len(rsp.PartitionNames), 2)
assert.Equal(t, len(rsp.PartitionIDs), 2)
})
......@@ -428,7 +428,7 @@ func TestGrpcService(t *testing.T) {
}
rsp, err := cli.ShowSegments(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, rsp.SegmentIDs[0], int64(1000))
assert.Equal(t, len(rsp.SegmentIDs), 1)
})
......@@ -456,7 +456,7 @@ func TestGrpcService(t *testing.T) {
assert.Equal(t, len(collMeta.FieldIndexes), 0)
rsp, err := cli.CreateIndex(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
collMeta, err = core.MetaTable.GetCollectionByName("testColl")
assert.Nil(t, err)
assert.Equal(t, len(collMeta.FieldIndexes), 1)
......@@ -469,7 +469,7 @@ func TestGrpcService(t *testing.T) {
req.FieldName = "no field"
rsp, err = cli.CreateIndex(ctx, req)
assert.Nil(t, err)
assert.NotEqual(t, rsp.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.NotEqual(t, rsp.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
})
t.Run("describe segment", func(t *testing.T) {
......@@ -488,7 +488,7 @@ func TestGrpcService(t *testing.T) {
}
rsp, err := cli.DescribeSegment(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
t.Logf("index id = %d", rsp.IndexID)
})
......@@ -507,7 +507,7 @@ func TestGrpcService(t *testing.T) {
}
rsp, err := cli.DescribeIndex(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, len(rsp.IndexDescriptions), 1)
assert.Equal(t, rsp.IndexDescriptions[0].IndexName, cms.Params.DefaultIndexName)
})
......@@ -546,7 +546,7 @@ func TestGrpcService(t *testing.T) {
}
rsp, err := cli.DescribeIndex(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, len(rsp.IndexDescriptions), 1)
assert.Equal(t, rsp.IndexDescriptions[0].IndexName, cms.Params.DefaultIndexName)
......@@ -570,7 +570,7 @@ func TestGrpcService(t *testing.T) {
assert.Equal(t, len(idx), 1)
rsp, err := cli.DropIndex(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
dropIDLock.Lock()
assert.Equal(t, len(dropID), 1)
......@@ -593,7 +593,7 @@ func TestGrpcService(t *testing.T) {
}
status, err := cli.DropPartition(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
collMeta, err := core.MetaTable.GetCollectionByName("testColl")
assert.Nil(t, err)
assert.Equal(t, len(collMeta.PartitionIDs), 1)
......@@ -617,7 +617,7 @@ func TestGrpcService(t *testing.T) {
status, err := cli.DropCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, len(dropCollectionArray), 1)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, dropCollectionArray[0].Base.MsgType, commonpb.MsgType_kDropCollection)
assert.Equal(t, dropCollectionArray[0].CollectionName, "testColl")
assert.Equal(t, len(collectionMetaCache), 1)
......@@ -636,7 +636,7 @@ func TestGrpcService(t *testing.T) {
status, err = cli.DropCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, len(dropCollectionArray), 1)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_UNEXPECTED_ERROR)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR)
})
err = cli.Stop()
......
......@@ -69,7 +69,7 @@ func (c *Client) GetComponentStates(ctx context.Context) (*internalpb2.Component
func (c *Client) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
}, nil
}
......
......@@ -91,7 +91,7 @@ func (m *MasterServiceMock) DescribeSegment(in *milvuspb.DescribeSegmentRequest)
}
rsp := &milvuspb.DescribeSegmentResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
IndexID: in.SegmentID, // use index id as segment id
BuildID: in.SegmentID,
......@@ -169,13 +169,13 @@ func (index *IndexServiceMock) GetIndexFilePaths(req *indexpb.IndexFilePathsRequ
indexPathInfo := make([]*indexpb.IndexFilePathInfo, 1)
indexPathInfo[0] = &indexpb.IndexFilePathInfo{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
IndexFilePaths: []string{indexPaths1, indexPaths2},
}
rsp := &indexpb.IndexFilePathsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
FilePaths: indexPathInfo,
}
......@@ -187,7 +187,7 @@ type queryServiceMock struct{}
func (q *queryServiceMock) RegisterNode(req *querypb.RegisterNodeRequest) (*querypb.RegisterNodeResponse, error) {
return &querypb.RegisterNodeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
InitParams: &internalPb.InitParams{
NodeID: int64(0),
......
......@@ -298,7 +298,7 @@ func (s *Server) GetTimeTickChannel(ctx context.Context, in *commonpb.Empty) (*m
}
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
Value: channel,
}, nil
......@@ -312,7 +312,7 @@ func (s *Server) GetStatsChannel(ctx context.Context, in *commonpb.Empty) (*milv
}
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
Value: channel,
}, nil
......
......@@ -85,7 +85,7 @@ func (i *IndexNode) Init() error {
return err2
}
if resp.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if resp.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(resp.Status.Reason)
}
......@@ -174,12 +174,12 @@ func (i *IndexNode) BuildIndex(ctx context.Context, request *indexpb.BuildIndexC
}
ret := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}
err := i.sched.IndexBuildQueue.Enqueue(t)
if err != nil {
ret.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
ret.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
ret.Reason = err.Error()
return ret, nil
}
......@@ -190,7 +190,7 @@ func (i *IndexNode) BuildIndex(ctx context.Context, request *indexpb.BuildIndexC
func (i *IndexNode) DropIndex(ctx context.Context, request *indexpb.DropIndexRequest) (*commonpb.Status, error) {
i.sched.IndexBuildQueue.tryToRemoveUselessIndexBuildTask(request.IndexID)
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}, nil
}
......@@ -217,7 +217,7 @@ func (i *IndexNode) GetComponentStates(ctx context.Context) (*internalpb2.Compon
State: stateInfo,
SubcomponentStates: nil, // todo add subcomponents states
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
}
return ret, nil
......@@ -226,7 +226,7 @@ func (i *IndexNode) GetComponentStates(ctx context.Context) (*internalpb2.Compon
func (i *IndexNode) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
}, nil
}
......@@ -234,7 +234,7 @@ func (i *IndexNode) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringRes
func (i *IndexNode) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
}, nil
}
......@@ -121,14 +121,14 @@ func (it *IndexBuildTask) PostExecute(ctx context.Context) error {
nty := &indexpb.BuildIndexNotification{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
IndexBuildID: it.cmd.IndexBuildID,
NodeID: it.nodeID,
IndexFilePaths: it.savePaths,
}
if it.err != nil {
nty.Status.ErrorCode = commonpb.ErrorCode_BUILD_INDEX_ERROR
nty.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_BUILD_INDEX_ERROR
}
ctx = context.TODO()
......@@ -138,7 +138,7 @@ func (it *IndexBuildTask) PostExecute(ctx context.Context) error {
return err
}
if resp.ErrorCode != commonpb.ErrorCode_SUCCESS {
if resp.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
err = errors.New(resp.Reason)
}
log.Println("[IndexBuildTask][PostExecute] err", err)
......
......@@ -164,7 +164,7 @@ func (i *IndexService) GetComponentStates(ctx context.Context) (*internalpb2.Com
State: stateInfo,
SubcomponentStates: nil, // todo add subcomponents states
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
}
return ret, nil
......@@ -173,7 +173,7 @@ func (i *IndexService) GetComponentStates(ctx context.Context) (*internalpb2.Com
func (i *IndexService) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Value: "",
......@@ -183,7 +183,7 @@ func (i *IndexService) GetTimeTickChannel(ctx context.Context) (*milvuspb.String
func (i *IndexService) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Value: "",
......@@ -194,7 +194,7 @@ func (i *IndexService) BuildIndex(ctx context.Context, req *indexpb.BuildIndexRe
fmt.Println("builder building index ..., indexName = ", req.IndexName, "indexID = ", req.IndexID, "dataPath = ", req.DataPaths)
ret := &indexpb.BuildIndexResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
}
t := &IndexAddTask{
......@@ -229,18 +229,18 @@ func (i *IndexService) BuildIndex(ctx context.Context, req *indexpb.BuildIndexRe
err := fn()
if err != nil {
ret.Status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
ret.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
ret.Status.Reason = err.Error()
return ret, nil
}
err = t.WaitToFinish()
if err != nil {
ret.Status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
ret.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
ret.Status.Reason = err.Error()
return ret, nil
}
ret.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
ret.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
ret.IndexBuildID = t.indexBuildID
return ret, nil
}
......@@ -256,7 +256,7 @@ func (i *IndexService) GetIndexStates(ctx context.Context, req *indexpb.IndexSta
}
ret := &indexpb.IndexStatesResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
States: indexStates,
}
......@@ -269,7 +269,7 @@ func (i *IndexService) DropIndex(ctx context.Context, req *indexpb.DropIndexRequ
err := i.metaTable.MarkIndexAsDeleted(req.IndexID)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -288,7 +288,7 @@ func (i *IndexService) DropIndex(ctx context.Context, req *indexpb.DropIndexRequ
}()
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}, nil
}
......@@ -305,7 +305,7 @@ func (i *IndexService) GetIndexFilePaths(ctx context.Context, req *indexpb.Index
ret := &indexpb.IndexFilePathsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
FilePaths: indexPaths,
}
......@@ -314,11 +314,11 @@ func (i *IndexService) GetIndexFilePaths(ctx context.Context, req *indexpb.Index
func (i *IndexService) NotifyBuildIndex(ctx context.Context, nty *indexpb.BuildIndexNotification) (*commonpb.Status, error) {
ret := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}
log.Println("[IndexService][NotifyBuildIndex]", nty.String())
if err := i.metaTable.NotifyBuildIndex(nty); err != nil {
ret.ErrorCode = commonpb.ErrorCode_BUILD_INDEX_ERROR
ret.ErrorCode = commonpb.ErrorCode_ERROR_CODE_BUILD_INDEX_ERROR
ret.Reason = err.Error()
log.Println("[IndexService][NotifyBuildIndex][metaTable][NotifyBuildIndex]", err)
......
......@@ -113,7 +113,7 @@ func (mt *metaTable) NotifyBuildIndex(nty *indexpb.BuildIndexNotification) error
return fmt.Errorf("index not exists with ID = %d", indexBuildID)
}
if nty.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if nty.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
meta.State = commonpb.IndexState_INDEX_STATE_FAILED
meta.FailReason = nty.Status.Reason
} else {
......
......@@ -60,7 +60,7 @@ func (i *IndexService) prepareNodeInitParams() []*commonpb.KeyValuePair {
func (i *IndexService) RegisterNode(ctx context.Context, req *indexpb.RegisterNodeRequest) (*indexpb.RegisterNodeResponse, error) {
ret := &indexpb.RegisterNodeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
}
......@@ -76,7 +76,7 @@ func (i *IndexService) RegisterNode(ctx context.Context, req *indexpb.RegisterNo
return ret, nil
}
ret.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
ret.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
params := i.prepareNodeInitParams()
ret.InitParams = &internalpb2.InitParams{
NodeID: nodeID,
......
......@@ -121,7 +121,7 @@ func (it *IndexAddTask) Execute(ctx context.Context) error {
return err
}
log.Println("build index finish, err = ", err)
if resp.ErrorCode != commonpb.ErrorCode_SUCCESS {
if resp.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(resp.Reason)
}
it.nodeClients.IncPriority(it.buildClientNodeID, 1)
......
......@@ -610,7 +610,7 @@ func (c *Core) SetProxyService(ctx context.Context, s types.ProxyService) error
if status == nil {
return errors.New("invalidate collection metacache resp is nil")
}
if status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(status.Reason)
}
return nil
......@@ -643,7 +643,7 @@ func (c *Core) SetDataService(ctx context.Context, s types.DataService) error {
if err != nil {
return nil, err
}
if binlog.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if binlog.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return nil, fmt.Errorf("GetInsertBinlogPaths from data service failed, error = %s", binlog.Status.Reason)
}
for i := range binlog.FieldIDs {
......@@ -671,7 +671,7 @@ func (c *Core) SetDataService(ctx context.Context, s types.DataService) error {
if err != nil {
return 0, err
}
if segInfo.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if segInfo.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return 0, fmt.Errorf("GetSegmentInfo from data service failed, error = %s", segInfo.Status.Reason)
}
if len(segInfo.Infos) != 1 {
......@@ -699,7 +699,7 @@ func (c *Core) SetIndexService(ctx context.Context, s types.IndexService) error
if err != nil {
return 0, err
}
if rsp.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if rsp.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return 0, fmt.Errorf("BuildIndex from index service failed, error = %s", rsp.Status.Reason)
}
return rsp.IndexBuildID, nil
......@@ -712,7 +712,7 @@ func (c *Core) SetIndexService(ctx context.Context, s types.IndexService) error
if err != nil {
return err
}
if rsp.ErrorCode != commonpb.ErrorCode_SUCCESS {
if rsp.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(rsp.Reason)
}
return nil
......@@ -737,7 +737,7 @@ func (c *Core) SetQueryService(ctx context.Context, s types.QueryService) error
if err != nil {
return err
}
if rsp.ErrorCode != commonpb.ErrorCode_SUCCESS {
if rsp.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return fmt.Errorf("ReleaseCollection from query service failed, error = %s", rsp.Reason)
}
return nil
......@@ -817,7 +817,7 @@ func (c *Core) GetComponentStates(ctx context.Context) (*internalpb2.ComponentSt
ExtraInfo: nil,
},
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
SubcomponentStates: []*internalpb2.ComponentInfo{
......@@ -834,7 +834,7 @@ func (c *Core) GetComponentStates(ctx context.Context) (*internalpb2.ComponentSt
func (c *Core) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Value: Params.TimeTickChannel,
......@@ -844,7 +844,7 @@ func (c *Core) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse
func (c *Core) GetDdChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Value: Params.DdChannel,
......@@ -854,7 +854,7 @@ func (c *Core) GetDdChannel(ctx context.Context) (*milvuspb.StringResponse, erro
func (c *Core) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Value: Params.StatisticsChannel,
......@@ -865,7 +865,7 @@ func (c *Core) CreateCollection(ctx context.Context, in *milvuspb.CreateCollecti
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_HEALTHY {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
}, nil
}
......@@ -882,13 +882,13 @@ func (c *Core) CreateCollection(ctx context.Context, in *milvuspb.CreateCollecti
if err != nil {
log.Debug("CreateCollection failed", zap.String("name", in.CollectionName))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "Create collection failed: " + err.Error(),
}, nil
}
log.Debug("CreateCollection Success", zap.String("name", in.CollectionName))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}, nil
}
......@@ -897,7 +897,7 @@ func (c *Core) DropCollection(ctx context.Context, in *milvuspb.DropCollectionRe
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_HEALTHY {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
}, nil
}
......@@ -914,13 +914,13 @@ func (c *Core) DropCollection(ctx context.Context, in *milvuspb.DropCollectionRe
if err != nil {
log.Debug("DropCollection Failed", zap.String("name", in.CollectionName))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "Drop collection failed: " + err.Error(),
}, nil
}
log.Debug("DropCollection Success", zap.String("name", in.CollectionName))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}, nil
}
......@@ -930,7 +930,7 @@ func (c *Core) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequ
if code != internalpb2.StateCode_HEALTHY {
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
},
Value: false,
......@@ -951,7 +951,7 @@ func (c *Core) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequ
log.Debug("HasCollection Failed", zap.String("name", in.CollectionName))
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "Has collection failed: " + err.Error(),
},
Value: false,
......@@ -960,7 +960,7 @@ func (c *Core) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequ
log.Debug("HasCollection Success", zap.String("name", in.CollectionName))
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Value: t.HasCollection,
......@@ -972,7 +972,7 @@ func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeColl
if code != internalpb2.StateCode_HEALTHY {
return &milvuspb.DescribeCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
},
Schema: nil,
......@@ -994,7 +994,7 @@ func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeColl
log.Debug("DescribeCollection Failed", zap.String("name", in.CollectionName))
return &milvuspb.DescribeCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "describe collection failed: " + err.Error(),
},
Schema: nil,
......@@ -1002,7 +1002,7 @@ func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeColl
}
log.Debug("DescribeCollection Success", zap.String("name", in.CollectionName))
t.Rsp.Status = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}
return t.Rsp, nil
......@@ -1013,7 +1013,7 @@ func (c *Core) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionR
if code != internalpb2.StateCode_HEALTHY {
return &milvuspb.ShowCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
},
CollectionNames: nil,
......@@ -1037,14 +1037,14 @@ func (c *Core) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionR
return &milvuspb.ShowCollectionResponse{
CollectionNames: nil,
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "ShowCollections failed: " + err.Error(),
},
}, nil
}
log.Debug("ShowCollections Success", zap.String("dbname", in.DbName), zap.Strings("collection names", t.Rsp.CollectionNames))
t.Rsp.Status = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}
return t.Rsp, nil
......@@ -1054,7 +1054,7 @@ func (c *Core) CreatePartition(ctx context.Context, in *milvuspb.CreatePartition
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_HEALTHY {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
}, nil
}
......@@ -1071,13 +1071,13 @@ func (c *Core) CreatePartition(ctx context.Context, in *milvuspb.CreatePartition
if err != nil {
log.Debug("CreatePartition Failed", zap.String("collection name", in.CollectionName), zap.String("partition name", in.PartitionName))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "create partition failed: " + err.Error(),
}, nil
}
log.Debug("CreatePartition Success", zap.String("collection name", in.CollectionName), zap.String("partition name", in.PartitionName))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}, nil
}
......@@ -1086,7 +1086,7 @@ func (c *Core) DropPartition(ctx context.Context, in *milvuspb.DropPartitionRequ
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_HEALTHY {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
}, nil
}
......@@ -1103,13 +1103,13 @@ func (c *Core) DropPartition(ctx context.Context, in *milvuspb.DropPartitionRequ
if err != nil {
log.Debug("DropPartition Failed", zap.String("collection name", in.CollectionName), zap.String("partition name", in.PartitionName))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "DropPartition failed: " + err.Error(),
}, nil
}
log.Debug("DropPartition Success", zap.String("collection name", in.CollectionName), zap.String("partition name", in.PartitionName))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}, nil
}
......@@ -1119,7 +1119,7 @@ func (c *Core) HasPartition(ctx context.Context, in *milvuspb.HasPartitionReques
if code != internalpb2.StateCode_HEALTHY {
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
},
Value: false,
......@@ -1140,7 +1140,7 @@ func (c *Core) HasPartition(ctx context.Context, in *milvuspb.HasPartitionReques
log.Debug("HasPartition Failed", zap.String("collection name", in.CollectionName), zap.String("partition name", in.PartitionName))
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "HasPartition failed: " + err.Error(),
},
Value: false,
......@@ -1149,7 +1149,7 @@ func (c *Core) HasPartition(ctx context.Context, in *milvuspb.HasPartitionReques
log.Debug("HasPartition Success", zap.String("collection name", in.CollectionName), zap.String("partition name", in.PartitionName))
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Value: t.HasPartition,
......@@ -1161,7 +1161,7 @@ func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionReq
if code != internalpb2.StateCode_HEALTHY {
return &milvuspb.ShowPartitionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
},
PartitionNames: nil,
......@@ -1186,14 +1186,14 @@ func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionReq
return &milvuspb.ShowPartitionResponse{
PartitionNames: nil,
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "ShowPartitions failed: " + err.Error(),
},
}, nil
}
log.Debug("ShowPartitions Success", zap.String("collection name", in.CollectionName), zap.Strings("partition names", t.Rsp.PartitionNames), zap.Int64s("partition ids", t.Rsp.PartitionIDs))
t.Rsp.Status = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}
return t.Rsp, nil
......@@ -1203,7 +1203,7 @@ func (c *Core) CreateIndex(ctx context.Context, in *milvuspb.CreateIndexRequest)
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_HEALTHY {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
}, nil
}
......@@ -1220,13 +1220,13 @@ func (c *Core) CreateIndex(ctx context.Context, in *milvuspb.CreateIndexRequest)
if err != nil {
log.Debug("CreateIndex Failed", zap.String("collection name", in.CollectionName), zap.String("field name", in.FieldName))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "CreateIndex failed, error = " + err.Error(),
}, nil
}
log.Debug("CreateIndex Success", zap.String("collection name", in.CollectionName), zap.String("field name", in.FieldName))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}, nil
}
......@@ -1236,7 +1236,7 @@ func (c *Core) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRequ
if code != internalpb2.StateCode_HEALTHY {
return &milvuspb.DescribeIndexResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
},
IndexDescriptions: nil,
......@@ -1259,7 +1259,7 @@ func (c *Core) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRequ
if err != nil {
return &milvuspb.DescribeIndexResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "DescribeIndex failed, error = " + err.Error(),
},
IndexDescriptions: nil,
......@@ -1272,12 +1272,12 @@ func (c *Core) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRequ
log.Debug("DescribeIndex Success", zap.String("collection name", in.CollectionName), zap.String("field name", in.FieldName), zap.Strings("index names", idxNames))
if len(t.Rsp.IndexDescriptions) == 0 {
t.Rsp.Status = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_INDEX_NOT_EXIST,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_INDEX_NOT_EXIST,
Reason: "index not exist",
}
} else {
t.Rsp.Status = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}
}
......@@ -1288,7 +1288,7 @@ func (c *Core) DropIndex(ctx context.Context, in *milvuspb.DropIndexRequest) (*c
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_HEALTHY {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
}, nil
}
......@@ -1305,13 +1305,13 @@ func (c *Core) DropIndex(ctx context.Context, in *milvuspb.DropIndexRequest) (*c
if err != nil {
log.Debug("DropIndex Failed", zap.String("collection name", in.CollectionName), zap.String("field name", in.FieldName), zap.String("index name", in.IndexName))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "DropIndex failed, error = " + err.Error(),
}, nil
}
log.Debug("DropIndex Success", zap.String("collection name", in.CollectionName), zap.String("field name", in.FieldName), zap.String("index name", in.IndexName))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}, nil
}
......@@ -1321,7 +1321,7 @@ func (c *Core) DescribeSegment(ctx context.Context, in *milvuspb.DescribeSegment
if code != internalpb2.StateCode_HEALTHY {
return &milvuspb.DescribeSegmentResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
},
IndexID: 0,
......@@ -1345,7 +1345,7 @@ func (c *Core) DescribeSegment(ctx context.Context, in *milvuspb.DescribeSegment
log.Debug("DescribeSegment Failed", zap.Int64("collection id", in.CollectionID), zap.Int64("segment id", in.SegmentID))
return &milvuspb.DescribeSegmentResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "DescribeSegment failed, error = " + err.Error(),
},
IndexID: 0,
......@@ -1353,7 +1353,7 @@ func (c *Core) DescribeSegment(ctx context.Context, in *milvuspb.DescribeSegment
}
log.Debug("DescribeSegment Success", zap.Int64("collection id", in.CollectionID), zap.Int64("segment id", in.SegmentID))
t.Rsp.Status = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}
return t.Rsp, nil
......@@ -1364,7 +1364,7 @@ func (c *Core) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentRequest
if code != internalpb2.StateCode_HEALTHY {
return &milvuspb.ShowSegmentResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
},
SegmentIDs: nil,
......@@ -1387,7 +1387,7 @@ func (c *Core) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentRequest
if err != nil {
return &milvuspb.ShowSegmentResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "ShowSegments failed, error: " + err.Error(),
},
SegmentIDs: nil,
......@@ -1395,7 +1395,7 @@ func (c *Core) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentRequest
}
log.Debug("ShowSegments Success", zap.Int64("collection id", in.CollectionID), zap.Int64("partition id", in.PartitionID), zap.Int64s("segments ids", t.Rsp.SegmentIDs))
t.Rsp.Status = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}
return t.Rsp, nil
......@@ -1406,7 +1406,7 @@ func (c *Core) AllocTimestamp(ctx context.Context, in *masterpb.TsoRequest) (*ma
if err != nil {
return &masterpb.TsoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "AllocTimestamp failed: " + err.Error(),
},
Timestamp: 0,
......@@ -1416,7 +1416,7 @@ func (c *Core) AllocTimestamp(ctx context.Context, in *masterpb.TsoRequest) (*ma
// log.Printf("AllocTimestamp : %d", ts)
return &masterpb.TsoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Timestamp: ts,
......@@ -1429,7 +1429,7 @@ func (c *Core) AllocID(ctx context.Context, in *masterpb.IDRequest) (*masterpb.I
if err != nil {
return &masterpb.IDResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "AllocID failed: " + err.Error(),
},
ID: 0,
......@@ -1439,7 +1439,7 @@ func (c *Core) AllocID(ctx context.Context, in *masterpb.IDRequest) (*masterpb.I
log.Debug("AllocID", zap.Int64("id start", start), zap.Uint32("count", in.Count))
return &masterpb.IDResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
ID: start,
......
......@@ -34,7 +34,7 @@ type proxyMock struct {
func (p *proxyMock) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
Value: fmt.Sprintf("proxy-time-tick-%d", p.randVal),
}, nil
......@@ -44,7 +44,7 @@ func (p *proxyMock) InvalidateCollectionMetaCache(ctx context.Context, request *
defer p.mutex.Unlock()
p.collArray = append(p.collArray, request.CollectionName)
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}, nil
}
func (p *proxyMock) GetCollArray() []string {
......@@ -65,7 +65,7 @@ func (d *dataMock) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertB
FieldIDs: []int64{},
Paths: []*internalpb2.StringList{},
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
}
......@@ -74,7 +74,7 @@ func (d *dataMock) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertB
path := &internalpb2.StringList{
Values: []string{fmt.Sprintf("file0-%d", i), fmt.Sprintf("file1-%d", i), fmt.Sprintf("file2-%d", i)},
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
}
......@@ -86,7 +86,7 @@ func (d *dataMock) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertB
func (d *dataMock) GetSegmentInfo(ctx context.Context, req *datapb.SegmentInfoRequest) (*datapb.SegmentInfoResponse, error) {
return &datapb.SegmentInfoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Infos: []*datapb.SegmentInfo{
......@@ -109,7 +109,7 @@ func (q *queryMock) ReleaseCollection(ctx context.Context, req *querypb.ReleaseC
defer q.mutex.Unlock()
q.collID = append(q.collID, req.CollectionID)
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}, nil
}
......@@ -117,7 +117,7 @@ func (q *queryMock) ReleaseCollection(ctx context.Context, req *querypb.ReleaseC
func (d *dataMock) GetSegmentInfoChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
Value: fmt.Sprintf("segment-info-channel-%d", d.randVal),
}, nil
......@@ -140,7 +140,7 @@ func (idx *indexMock) BuildIndex(ctx context.Context, req *indexpb.BuildIndexReq
idx.idxID = append(idx.idxID, req.IndexID)
return &indexpb.BuildIndexResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
IndexBuildID: idx.idxBuildID[len(idx.idxBuildID)-1],
......@@ -152,7 +152,7 @@ func (idx *indexMock) DropIndex(ctx context.Context, req *indexpb.DropIndexReque
defer idx.mutex.Unlock()
idx.idxDropID = append(idx.idxDropID, req.IndexID)
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}, nil
}
......@@ -329,7 +329,7 @@ func TestMasterService(t *testing.T) {
}
status, err := core.CreateCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
msg, ok := <-ddStream.Chan()
assert.True(t, ok)
......@@ -361,7 +361,7 @@ func TestMasterService(t *testing.T) {
req.Base.SourceID = 101
status, err = core.CreateCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_UNEXPECTED_ERROR)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR)
req.Base.MsgID = 102
req.Base.Timestamp = 102
......@@ -369,7 +369,7 @@ func TestMasterService(t *testing.T) {
req.CollectionName = "testColl-again"
status, err = core.CreateCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_UNEXPECTED_ERROR)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR)
schema.Name = req.CollectionName
sbf, err = proto.Marshal(&schema)
......@@ -380,7 +380,7 @@ func TestMasterService(t *testing.T) {
req.Base.SourceID = 103
status, err = core.CreateCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
msg, ok = <-ddStream.Chan()
assert.True(t, ok)
......@@ -404,7 +404,7 @@ func TestMasterService(t *testing.T) {
}
rsp, err := core.HasCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, rsp.Value, true)
req = &milvuspb.HasCollectionRequest{
......@@ -419,7 +419,7 @@ func TestMasterService(t *testing.T) {
}
rsp, err = core.HasCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, rsp.Value, false)
// test time stamp go back
......@@ -435,7 +435,7 @@ func TestMasterService(t *testing.T) {
}
rsp, err = core.HasCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, rsp.Value, true)
})
......@@ -454,7 +454,7 @@ func TestMasterService(t *testing.T) {
}
rsp, err := core.DescribeCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, rsp.Schema.Name, "testColl")
assert.Equal(t, rsp.CollectionID, collMeta.ID)
......@@ -472,7 +472,7 @@ func TestMasterService(t *testing.T) {
}
rsp, err := core.ShowCollections(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.ElementsMatch(t, rsp.CollectionNames, []string{"testColl", "testColl-again"})
assert.Equal(t, len(rsp.CollectionNames), 2)
})
......@@ -492,7 +492,7 @@ func TestMasterService(t *testing.T) {
consumeMsgChan(time.Second, ddStream.Chan())
status, err := core.CreatePartition(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
collMeta, err := core.MetaTable.GetCollectionByName("testColl")
assert.Nil(t, err)
assert.Equal(t, len(collMeta.PartitionIDs), 2)
......@@ -523,7 +523,7 @@ func TestMasterService(t *testing.T) {
}
rsp, err := core.HasPartition(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, rsp.Value, true)
})
......@@ -543,7 +543,7 @@ func TestMasterService(t *testing.T) {
}
rsp, err := core.ShowPartitions(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, len(rsp.PartitionNames), 2)
assert.Equal(t, len(rsp.PartitionIDs), 2)
})
......@@ -601,7 +601,7 @@ func TestMasterService(t *testing.T) {
}
rsp, err := core.ShowSegments(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, rsp.SegmentIDs[0], int64(1000))
assert.Equal(t, len(rsp.SegmentIDs), 1)
})
......@@ -630,7 +630,7 @@ func TestMasterService(t *testing.T) {
rsp, err := core.CreateIndex(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
time.Sleep(time.Second)
files := im.getFileArray()
assert.Equal(t, 3, len(files))
......@@ -645,7 +645,7 @@ func TestMasterService(t *testing.T) {
req.FieldName = "no field"
rsp, err = core.CreateIndex(ctx, req)
assert.Nil(t, err)
assert.NotEqual(t, rsp.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.NotEqual(t, rsp.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
})
t.Run("describe segment", func(t *testing.T) {
......@@ -664,7 +664,7 @@ func TestMasterService(t *testing.T) {
}
rsp, err := core.DescribeSegment(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
t.Logf("index id = %d", rsp.IndexID)
})
......@@ -683,7 +683,7 @@ func TestMasterService(t *testing.T) {
}
rsp, err := core.DescribeIndex(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, len(rsp.IndexDescriptions), 1)
assert.Equal(t, rsp.IndexDescriptions[0].IndexName, Params.DefaultIndexName)
})
......@@ -703,7 +703,7 @@ func TestMasterService(t *testing.T) {
}
rsp, err := core.DescribeIndex(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_INDEX_NOT_EXIST)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_INDEX_NOT_EXIST)
assert.Equal(t, len(rsp.IndexDescriptions), 0)
})
......@@ -779,7 +779,7 @@ func TestMasterService(t *testing.T) {
}
rsp, err := core.DescribeIndex(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, len(rsp.IndexDescriptions), 1)
assert.Equal(t, rsp.IndexDescriptions[0].IndexName, Params.DefaultIndexName)
})
......@@ -803,7 +803,7 @@ func TestMasterService(t *testing.T) {
rsp, err := core.DropIndex(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
im.mutex.Lock()
assert.Equal(t, len(im.idxDropID), 1)
......@@ -832,7 +832,7 @@ func TestMasterService(t *testing.T) {
dropPartID := collMeta.PartitionIDs[1]
status, err := core.DropPartition(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
collMeta, err = core.MetaTable.GetCollectionByName("testColl")
assert.Nil(t, err)
assert.Equal(t, len(collMeta.PartitionIDs), 1)
......@@ -864,7 +864,7 @@ func TestMasterService(t *testing.T) {
assert.Nil(t, err)
status, err := core.DropCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
msg, ok := <-ddStream.Chan()
assert.True(t, ok)
......@@ -894,7 +894,7 @@ func TestMasterService(t *testing.T) {
}
status, err = core.DropCollection(ctx, req)
assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_UNEXPECTED_ERROR)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR)
time.Sleep(time.Second)
assert.Zero(t, len(ddStream.Chan()))
collArray = pm.GetCollArray()
......
......@@ -111,7 +111,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
Timestamp: 1,
SourceID: reqID,
},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS},
ResultChannelID: "0",
}
searchResultMsg := &msgstream.SearchResultMsg{
......
......@@ -104,7 +104,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
Timestamp: 1,
SourceID: reqID,
},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS},
ResultChannelID: "0",
}
searchResultMsg := &msgstream.SearchResultMsg{
......
......@@ -4,34 +4,34 @@ package milvus.proto.common;
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/commonpb";
enum ErrorCode {
SUCCESS = 0;
UNEXPECTED_ERROR = 1;
CONNECT_FAILED = 2;
PERMISSION_DENIED = 3;
COLLECTION_NOT_EXISTS = 4;
ILLEGAL_ARGUMENT = 5;
ILLEGAL_DIMENSION = 7;
ILLEGAL_INDEX_TYPE = 8;
ILLEGAL_COLLECTION_NAME = 9;
ILLEGAL_TOPK = 10;
ILLEGAL_ROWRECORD = 11;
ILLEGAL_VECTOR_ID = 12;
ILLEGAL_SEARCH_RESULT = 13;
FILE_NOT_FOUND = 14;
META_FAILED = 15;
CACHE_FAILED = 16;
CANNOT_CREATE_FOLDER = 17;
CANNOT_CREATE_FILE = 18;
CANNOT_DELETE_FOLDER = 19;
CANNOT_DELETE_FILE = 20;
BUILD_INDEX_ERROR = 21;
ILLEGAL_NLIST = 22;
ILLEGAL_METRIC_TYPE = 23;
OUT_OF_MEMORY = 24;
INDEX_NOT_EXIST = 25;
ERROR_CODE_SUCCESS = 0;
ERROR_CODE_UNEXPECTED_ERROR = 1;
ERROR_CODE_CONNECT_FAILED = 2;
ERROR_CODE_PERMISSION_DENIED = 3;
ERROR_CODE_COLLECTION_NOT_EXISTS = 4;
ERROR_CODE_ILLEGAL_ARGUMENT = 5;
ERROR_CODE_ILLEGAL_DIMENSION = 7;
ERROR_CODE_ILLEGAL_INDEX_TYPE = 8;
ERROR_CODE_ILLEGAL_COLLECTION_NAME = 9;
ERROR_CODE_ILLEGAL_TOPK = 10;
ERROR_CODE_ILLEGAL_ROWRECORD = 11;
ERROR_CODE_ILLEGAL_VECTOR_ID = 12;
ERROR_CODE_ILLEGAL_SEARCH_RESULT = 13;
ERROR_CODE_FILE_NOT_FOUND = 14;
ERROR_CODE_META_FAILED = 15;
ERROR_CODE_CACHE_FAILED = 16;
ERROR_CODE_CANNOT_CREATE_FOLDER = 17;
ERROR_CODE_CANNOT_CREATE_FILE = 18;
ERROR_CODE_CANNOT_DELETE_FOLDER = 19;
ERROR_CODE_CANNOT_DELETE_FILE = 20;
ERROR_CODE_BUILD_INDEX_ERROR = 21;
ERROR_CODE_ILLEGAL_NLIST = 22;
ERROR_CODE_ILLEGAL_METRIC_TYPE = 23;
ERROR_CODE_OUT_OF_MEMORY = 24;
ERROR_CODE_INDEX_NOT_EXIST = 25;
// internal error code.
DD_REQUEST_RACE = 1000;
ERROR_CODE_DD_REQUEST_RACE = 1000;
}
enum IndexState {
......
......@@ -23,91 +23,91 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type ErrorCode int32
const (
ErrorCode_SUCCESS ErrorCode = 0
ErrorCode_UNEXPECTED_ERROR ErrorCode = 1
ErrorCode_CONNECT_FAILED ErrorCode = 2
ErrorCode_PERMISSION_DENIED ErrorCode = 3
ErrorCode_COLLECTION_NOT_EXISTS ErrorCode = 4
ErrorCode_ILLEGAL_ARGUMENT ErrorCode = 5
ErrorCode_ILLEGAL_DIMENSION ErrorCode = 7
ErrorCode_ILLEGAL_INDEX_TYPE ErrorCode = 8
ErrorCode_ILLEGAL_COLLECTION_NAME ErrorCode = 9
ErrorCode_ILLEGAL_TOPK ErrorCode = 10
ErrorCode_ILLEGAL_ROWRECORD ErrorCode = 11
ErrorCode_ILLEGAL_VECTOR_ID ErrorCode = 12
ErrorCode_ILLEGAL_SEARCH_RESULT ErrorCode = 13
ErrorCode_FILE_NOT_FOUND ErrorCode = 14
ErrorCode_META_FAILED ErrorCode = 15
ErrorCode_CACHE_FAILED ErrorCode = 16
ErrorCode_CANNOT_CREATE_FOLDER ErrorCode = 17
ErrorCode_CANNOT_CREATE_FILE ErrorCode = 18
ErrorCode_CANNOT_DELETE_FOLDER ErrorCode = 19
ErrorCode_CANNOT_DELETE_FILE ErrorCode = 20
ErrorCode_BUILD_INDEX_ERROR ErrorCode = 21
ErrorCode_ILLEGAL_NLIST ErrorCode = 22
ErrorCode_ILLEGAL_METRIC_TYPE ErrorCode = 23
ErrorCode_OUT_OF_MEMORY ErrorCode = 24
ErrorCode_INDEX_NOT_EXIST ErrorCode = 25
ErrorCode_ERROR_CODE_SUCCESS ErrorCode = 0
ErrorCode_ERROR_CODE_UNEXPECTED_ERROR ErrorCode = 1
ErrorCode_ERROR_CODE_CONNECT_FAILED ErrorCode = 2
ErrorCode_ERROR_CODE_PERMISSION_DENIED ErrorCode = 3
ErrorCode_ERROR_CODE_COLLECTION_NOT_EXISTS ErrorCode = 4
ErrorCode_ERROR_CODE_ILLEGAL_ARGUMENT ErrorCode = 5
ErrorCode_ERROR_CODE_ILLEGAL_DIMENSION ErrorCode = 7
ErrorCode_ERROR_CODE_ILLEGAL_INDEX_TYPE ErrorCode = 8
ErrorCode_ERROR_CODE_ILLEGAL_COLLECTION_NAME ErrorCode = 9
ErrorCode_ERROR_CODE_ILLEGAL_TOPK ErrorCode = 10
ErrorCode_ERROR_CODE_ILLEGAL_ROWRECORD ErrorCode = 11
ErrorCode_ERROR_CODE_ILLEGAL_VECTOR_ID ErrorCode = 12
ErrorCode_ERROR_CODE_ILLEGAL_SEARCH_RESULT ErrorCode = 13
ErrorCode_ERROR_CODE_FILE_NOT_FOUND ErrorCode = 14
ErrorCode_ERROR_CODE_META_FAILED ErrorCode = 15
ErrorCode_ERROR_CODE_CACHE_FAILED ErrorCode = 16
ErrorCode_ERROR_CODE_CANNOT_CREATE_FOLDER ErrorCode = 17
ErrorCode_ERROR_CODE_CANNOT_CREATE_FILE ErrorCode = 18
ErrorCode_ERROR_CODE_CANNOT_DELETE_FOLDER ErrorCode = 19
ErrorCode_ERROR_CODE_CANNOT_DELETE_FILE ErrorCode = 20
ErrorCode_ERROR_CODE_BUILD_INDEX_ERROR ErrorCode = 21
ErrorCode_ERROR_CODE_ILLEGAL_NLIST ErrorCode = 22
ErrorCode_ERROR_CODE_ILLEGAL_METRIC_TYPE ErrorCode = 23
ErrorCode_ERROR_CODE_OUT_OF_MEMORY ErrorCode = 24
ErrorCode_ERROR_CODE_INDEX_NOT_EXIST ErrorCode = 25
// internal error code.
ErrorCode_DD_REQUEST_RACE ErrorCode = 1000
ErrorCode_ERROR_CODE_DD_REQUEST_RACE ErrorCode = 1000
)
var ErrorCode_name = map[int32]string{
0: "SUCCESS",
1: "UNEXPECTED_ERROR",
2: "CONNECT_FAILED",
3: "PERMISSION_DENIED",
4: "COLLECTION_NOT_EXISTS",
5: "ILLEGAL_ARGUMENT",
7: "ILLEGAL_DIMENSION",
8: "ILLEGAL_INDEX_TYPE",
9: "ILLEGAL_COLLECTION_NAME",
10: "ILLEGAL_TOPK",
11: "ILLEGAL_ROWRECORD",
12: "ILLEGAL_VECTOR_ID",
13: "ILLEGAL_SEARCH_RESULT",
14: "FILE_NOT_FOUND",
15: "META_FAILED",
16: "CACHE_FAILED",
17: "CANNOT_CREATE_FOLDER",
18: "CANNOT_CREATE_FILE",
19: "CANNOT_DELETE_FOLDER",
20: "CANNOT_DELETE_FILE",
21: "BUILD_INDEX_ERROR",
22: "ILLEGAL_NLIST",
23: "ILLEGAL_METRIC_TYPE",
24: "OUT_OF_MEMORY",
25: "INDEX_NOT_EXIST",
1000: "DD_REQUEST_RACE",
0: "ERROR_CODE_SUCCESS",
1: "ERROR_CODE_UNEXPECTED_ERROR",
2: "ERROR_CODE_CONNECT_FAILED",
3: "ERROR_CODE_PERMISSION_DENIED",
4: "ERROR_CODE_COLLECTION_NOT_EXISTS",
5: "ERROR_CODE_ILLEGAL_ARGUMENT",
7: "ERROR_CODE_ILLEGAL_DIMENSION",
8: "ERROR_CODE_ILLEGAL_INDEX_TYPE",
9: "ERROR_CODE_ILLEGAL_COLLECTION_NAME",
10: "ERROR_CODE_ILLEGAL_TOPK",
11: "ERROR_CODE_ILLEGAL_ROWRECORD",
12: "ERROR_CODE_ILLEGAL_VECTOR_ID",
13: "ERROR_CODE_ILLEGAL_SEARCH_RESULT",
14: "ERROR_CODE_FILE_NOT_FOUND",
15: "ERROR_CODE_META_FAILED",
16: "ERROR_CODE_CACHE_FAILED",
17: "ERROR_CODE_CANNOT_CREATE_FOLDER",
18: "ERROR_CODE_CANNOT_CREATE_FILE",
19: "ERROR_CODE_CANNOT_DELETE_FOLDER",
20: "ERROR_CODE_CANNOT_DELETE_FILE",
21: "ERROR_CODE_BUILD_INDEX_ERROR",
22: "ERROR_CODE_ILLEGAL_NLIST",
23: "ERROR_CODE_ILLEGAL_METRIC_TYPE",
24: "ERROR_CODE_OUT_OF_MEMORY",
25: "ERROR_CODE_INDEX_NOT_EXIST",
1000: "ERROR_CODE_DD_REQUEST_RACE",
}
var ErrorCode_value = map[string]int32{
"SUCCESS": 0,
"UNEXPECTED_ERROR": 1,
"CONNECT_FAILED": 2,
"PERMISSION_DENIED": 3,
"COLLECTION_NOT_EXISTS": 4,
"ILLEGAL_ARGUMENT": 5,
"ILLEGAL_DIMENSION": 7,
"ILLEGAL_INDEX_TYPE": 8,
"ILLEGAL_COLLECTION_NAME": 9,
"ILLEGAL_TOPK": 10,
"ILLEGAL_ROWRECORD": 11,
"ILLEGAL_VECTOR_ID": 12,
"ILLEGAL_SEARCH_RESULT": 13,
"FILE_NOT_FOUND": 14,
"META_FAILED": 15,
"CACHE_FAILED": 16,
"CANNOT_CREATE_FOLDER": 17,
"CANNOT_CREATE_FILE": 18,
"CANNOT_DELETE_FOLDER": 19,
"CANNOT_DELETE_FILE": 20,
"BUILD_INDEX_ERROR": 21,
"ILLEGAL_NLIST": 22,
"ILLEGAL_METRIC_TYPE": 23,
"OUT_OF_MEMORY": 24,
"INDEX_NOT_EXIST": 25,
"DD_REQUEST_RACE": 1000,
"ERROR_CODE_SUCCESS": 0,
"ERROR_CODE_UNEXPECTED_ERROR": 1,
"ERROR_CODE_CONNECT_FAILED": 2,
"ERROR_CODE_PERMISSION_DENIED": 3,
"ERROR_CODE_COLLECTION_NOT_EXISTS": 4,
"ERROR_CODE_ILLEGAL_ARGUMENT": 5,
"ERROR_CODE_ILLEGAL_DIMENSION": 7,
"ERROR_CODE_ILLEGAL_INDEX_TYPE": 8,
"ERROR_CODE_ILLEGAL_COLLECTION_NAME": 9,
"ERROR_CODE_ILLEGAL_TOPK": 10,
"ERROR_CODE_ILLEGAL_ROWRECORD": 11,
"ERROR_CODE_ILLEGAL_VECTOR_ID": 12,
"ERROR_CODE_ILLEGAL_SEARCH_RESULT": 13,
"ERROR_CODE_FILE_NOT_FOUND": 14,
"ERROR_CODE_META_FAILED": 15,
"ERROR_CODE_CACHE_FAILED": 16,
"ERROR_CODE_CANNOT_CREATE_FOLDER": 17,
"ERROR_CODE_CANNOT_CREATE_FILE": 18,
"ERROR_CODE_CANNOT_DELETE_FOLDER": 19,
"ERROR_CODE_CANNOT_DELETE_FILE": 20,
"ERROR_CODE_BUILD_INDEX_ERROR": 21,
"ERROR_CODE_ILLEGAL_NLIST": 22,
"ERROR_CODE_ILLEGAL_METRIC_TYPE": 23,
"ERROR_CODE_OUT_OF_MEMORY": 24,
"ERROR_CODE_INDEX_NOT_EXIST": 25,
"ERROR_CODE_DD_REQUEST_RACE": 1000,
}
func (x ErrorCode) String() string {
......@@ -398,7 +398,7 @@ func (m *Status) GetErrorCode() ErrorCode {
if m != nil {
return m.ErrorCode
}
return ErrorCode_SUCCESS
return ErrorCode_ERROR_CODE_SUCCESS
}
func (m *Status) GetReason() string {
......@@ -661,83 +661,86 @@ func init() {
func init() { proto.RegisterFile("common.proto", fileDescriptor_555bd8c177793206) }
var fileDescriptor_555bd8c177793206 = []byte{
// 1241 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0xdd, 0x8e, 0xdb, 0x44,
0x14, 0xae, 0x93, 0xec, 0xa6, 0x3e, 0x49, 0x77, 0x67, 0x67, 0xff, 0x52, 0x58, 0x50, 0xb5, 0x57,
0xd5, 0x4a, 0xdd, 0x45, 0x20, 0xc1, 0x55, 0x25, 0xb2, 0xf6, 0x64, 0xd7, 0xaa, 0x63, 0xa7, 0x63,
0xa7, 0xb4, 0xdc, 0x58, 0x4e, 0x32, 0x9b, 0x35, 0x71, 0xe2, 0xe0, 0x71, 0xda, 0xa6, 0x4f, 0x01,
0x95, 0x78, 0x03, 0x2e, 0x01, 0xf1, 0xcf, 0x2b, 0xf0, 0x57, 0xae, 0x79, 0x04, 0x1e, 0x80, 0x3f,
0xc1, 0x0d, 0x9a, 0x99, 0x38, 0xb1, 0xaa, 0x72, 0xe7, 0xf3, 0x9d, 0x39, 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74, 0xdd, 0x1a, 0x44,
0x3c, 0x4b, 0xa3, 0xde, 0x2c, 0x63, 0x83, 0x93, 0x68, 0x92, 0xb1, 0x74, 0x12, 0xc6, 0x27, 0xf2,
0x3d, 0x3b, 0x51, 0xef, 0xd9, 0xb4, 0xd7, 0x5b, 0x97, 0xf1, 0x1b, 0xff, 0x05, 0x00, 0x00, 0xff,
0xff, 0x61, 0x04, 0xa4, 0xec, 0xb2, 0x08, 0x00, 0x00,
// 1285 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0xcb, 0x6e, 0xdb, 0x46,
0x1b, 0x0d, 0x25, 0xd9, 0x0a, 0x3f, 0x2b, 0xf6, 0x78, 0xec, 0xd8, 0x4a, 0xe2, 0x24, 0xfe, 0xf5,
0x17, 0x45, 0x60, 0x20, 0x76, 0xd1, 0x02, 0xed, 0x2a, 0x40, 0x65, 0x72, 0x64, 0x13, 0xa1, 0x48,
0x65, 0x48, 0xa5, 0x49, 0x37, 0x04, 0x25, 0x4d, 0x64, 0x56, 0x94, 0xa8, 0x72, 0xa8, 0x24, 0xca,
0x53, 0xb4, 0x01, 0xfa, 0x06, 0x5d, 0xb6, 0x45, 0xef, 0x7d, 0x85, 0xde, 0xd7, 0x7d, 0x84, 0x02,
0xdd, 0xf6, 0x86, 0x76, 0x53, 0xcc, 0x50, 0x17, 0x5a, 0x50, 0x76, 0xfc, 0xce, 0xf9, 0xe6, 0xcc,
0xf9, 0xce, 0x70, 0x48, 0x28, 0xb5, 0xa3, 0x7e, 0x3f, 0x1a, 0x1c, 0x0e, 0xe3, 0x28, 0x89, 0xf0,
0x56, 0x3f, 0x08, 0x1f, 0x8f, 0x78, 0x5a, 0x1d, 0xa6, 0x54, 0xa5, 0x08, 0x2b, 0xa4, 0x3f, 0x4c,
0xc6, 0x15, 0x0f, 0x56, 0x9d, 0xc4, 0x4f, 0x46, 0x1c, 0xdf, 0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0x1c, 0xb4, 0x46,
0x09, 0xeb, 0x1c, 0x05, 0x83, 0x84, 0xc5, 0x03, 0x3f, 0x3c, 0x92, 0x7f, 0xfb, 0xa3, 0xf4, 0x6f,
0x3f, 0x6c, 0xb5, 0x56, 0x65, 0xfd, 0xda, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x2b, 0xf4,
0x53, 0xd0, 0x09, 0x00, 0x00,
}
......@@ -30,7 +30,7 @@ func (node *ProxyNode) InvalidateCollectionMetaCache(ctx context.Context, reques
collectionName := request.CollectionName
globalMetaCache.RemoveCollection(ctx, collectionName) // no need to return error, though collection may be not cached
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
}, nil
}
......@@ -49,7 +49,7 @@ func (node *ProxyNode) CreateCollection(ctx context.Context, request *milvuspb.C
err := node.sched.DdQueue.Enqueue(cct)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -57,7 +57,7 @@ func (node *ProxyNode) CreateCollection(ctx context.Context, request *milvuspb.C
err = cct.WaitToFinish()
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -78,7 +78,7 @@ func (node *ProxyNode) DropCollection(ctx context.Context, request *milvuspb.Dro
err := node.sched.DdQueue.Enqueue(dct)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -86,7 +86,7 @@ func (node *ProxyNode) DropCollection(ctx context.Context, request *milvuspb.Dro
err = dct.WaitToFinish()
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -108,7 +108,7 @@ func (node *ProxyNode) HasCollection(ctx context.Context, request *milvuspb.HasC
if err != nil {
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -118,7 +118,7 @@ func (node *ProxyNode) HasCollection(ctx context.Context, request *milvuspb.HasC
if err != nil {
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -142,7 +142,7 @@ func (node *ProxyNode) LoadCollection(ctx context.Context, request *milvuspb.Loa
err := node.sched.DdQueue.Enqueue(lct)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -150,7 +150,7 @@ func (node *ProxyNode) LoadCollection(ctx context.Context, request *milvuspb.Loa
err = lct.WaitToFinish()
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -171,7 +171,7 @@ func (node *ProxyNode) ReleaseCollection(ctx context.Context, request *milvuspb.
err := node.sched.DdQueue.Enqueue(rct)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -179,7 +179,7 @@ func (node *ProxyNode) ReleaseCollection(ctx context.Context, request *milvuspb.
err = rct.WaitToFinish()
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -201,7 +201,7 @@ func (node *ProxyNode) DescribeCollection(ctx context.Context, request *milvuspb
if err != nil {
return &milvuspb.DescribeCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -211,7 +211,7 @@ func (node *ProxyNode) DescribeCollection(ctx context.Context, request *milvuspb
if err != nil {
return &milvuspb.DescribeCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -233,7 +233,7 @@ func (node *ProxyNode) GetCollectionStatistics(ctx context.Context, request *mil
if err != nil {
return &milvuspb.CollectionStatsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -243,7 +243,7 @@ func (node *ProxyNode) GetCollectionStatistics(ctx context.Context, request *mil
if err != nil {
return &milvuspb.CollectionStatsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -265,7 +265,7 @@ func (node *ProxyNode) ShowCollections(ctx context.Context, request *milvuspb.Sh
if err != nil {
return &milvuspb.ShowCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -275,7 +275,7 @@ func (node *ProxyNode) ShowCollections(ctx context.Context, request *milvuspb.Sh
if err != nil {
return &milvuspb.ShowCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -297,14 +297,14 @@ func (node *ProxyNode) CreatePartition(ctx context.Context, request *milvuspb.Cr
err := node.sched.DdQueue.Enqueue(cpt)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
err = cpt.WaitToFinish()
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -325,14 +325,14 @@ func (node *ProxyNode) DropPartition(ctx context.Context, request *milvuspb.Drop
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
err = dpt.WaitToFinish()
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -354,7 +354,7 @@ func (node *ProxyNode) HasPartition(ctx context.Context, request *milvuspb.HasPa
if err != nil {
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
Value: false,
......@@ -364,7 +364,7 @@ func (node *ProxyNode) HasPartition(ctx context.Context, request *milvuspb.HasPa
if err != nil {
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
Value: false,
......@@ -386,7 +386,7 @@ func (node *ProxyNode) LoadPartitions(ctx context.Context, request *milvuspb.Loa
err := node.sched.DdQueue.Enqueue(lpt)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -394,7 +394,7 @@ func (node *ProxyNode) LoadPartitions(ctx context.Context, request *milvuspb.Loa
err = lpt.WaitToFinish()
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -415,7 +415,7 @@ func (node *ProxyNode) ReleasePartitions(ctx context.Context, request *milvuspb.
err := node.sched.DdQueue.Enqueue(rpt)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -423,7 +423,7 @@ func (node *ProxyNode) ReleasePartitions(ctx context.Context, request *milvuspb.
err = rpt.WaitToFinish()
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -450,7 +450,7 @@ func (node *ProxyNode) ShowPartitions(ctx context.Context, request *milvuspb.Sho
if err != nil {
return &milvuspb.ShowPartitionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -460,7 +460,7 @@ func (node *ProxyNode) ShowPartitions(ctx context.Context, request *milvuspb.Sho
if err != nil {
return &milvuspb.ShowPartitionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -480,7 +480,7 @@ func (node *ProxyNode) CreateIndex(ctx context.Context, request *milvuspb.Create
err := node.sched.DdQueue.Enqueue(cit)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -488,7 +488,7 @@ func (node *ProxyNode) CreateIndex(ctx context.Context, request *milvuspb.Create
err = cit.WaitToFinish()
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -509,7 +509,7 @@ func (node *ProxyNode) DescribeIndex(ctx context.Context, request *milvuspb.Desc
if err != nil {
return &milvuspb.DescribeIndexResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -539,14 +539,14 @@ func (node *ProxyNode) DropIndex(ctx context.Context, request *milvuspb.DropInde
err := node.sched.DdQueue.Enqueue(dit)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
err = dit.WaitToFinish()
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -566,7 +566,7 @@ func (node *ProxyNode) GetIndexState(ctx context.Context, request *milvuspb.Inde
if err != nil {
return &milvuspb.IndexStateResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -576,7 +576,7 @@ func (node *ProxyNode) GetIndexState(ctx context.Context, request *milvuspb.Inde
if err != nil {
return &milvuspb.IndexStateResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -615,7 +615,7 @@ func (node *ProxyNode) Insert(ctx context.Context, request *milvuspb.InsertReque
if err != nil {
return &milvuspb.InsertResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -625,7 +625,7 @@ func (node *ProxyNode) Insert(ctx context.Context, request *milvuspb.InsertReque
if err != nil {
return &milvuspb.InsertResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -654,7 +654,7 @@ func (node *ProxyNode) Search(ctx context.Context, request *milvuspb.SearchReque
if err != nil {
return &milvuspb.SearchResults{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -664,7 +664,7 @@ func (node *ProxyNode) Search(ctx context.Context, request *milvuspb.SearchReque
if err != nil {
return &milvuspb.SearchResults{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, nil
......@@ -685,7 +685,7 @@ func (node *ProxyNode) Flush(ctx context.Context, request *milvuspb.FlushRequest
err := node.sched.DdQueue.Enqueue(ft)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -693,7 +693,7 @@ func (node *ProxyNode) Flush(ctx context.Context, request *milvuspb.FlushRequest
err = ft.WaitToFinish()
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -708,7 +708,7 @@ func (node *ProxyNode) GetDdChannel(ctx context.Context, request *commonpb.Empty
func (node *ProxyNode) GetPersistentSegmentInfo(ctx context.Context, req *milvuspb.PersistentSegmentInfoRequest) (*milvuspb.PersistentSegmentInfoResponse, error) {
resp := &milvuspb.PersistentSegmentInfoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
}
segments, err := node.getSegmentsOfCollection(ctx, req.DbName, req.CollectionName)
......@@ -729,7 +729,7 @@ func (node *ProxyNode) GetPersistentSegmentInfo(ctx context.Context, req *milvus
resp.Status.Reason = err.Error()
return resp, nil
}
if infoResp.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if infoResp.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
resp.Status.Reason = infoResp.Status.Reason
return resp, nil
}
......@@ -747,7 +747,7 @@ func (node *ProxyNode) GetPersistentSegmentInfo(ctx context.Context, req *milvus
State: info.State,
}
}
resp.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
resp.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
resp.Infos = persistentInfos
return resp, nil
}
......@@ -755,7 +755,7 @@ func (node *ProxyNode) GetPersistentSegmentInfo(ctx context.Context, req *milvus
func (node *ProxyNode) GetQuerySegmentInfo(ctx context.Context, req *milvuspb.QuerySegmentInfoRequest) (*milvuspb.QuerySegmentInfoResponse, error) {
resp := &milvuspb.QuerySegmentInfoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
}
segments, err := node.getSegmentsOfCollection(ctx, req.DbName, req.CollectionName)
......@@ -776,7 +776,7 @@ func (node *ProxyNode) GetQuerySegmentInfo(ctx context.Context, req *milvuspb.Qu
resp.Status.Reason = err.Error()
return resp, nil
}
if infoResp.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if infoResp.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
resp.Status.Reason = infoResp.Status.Reason
return resp, nil
}
......@@ -792,7 +792,7 @@ func (node *ProxyNode) GetQuerySegmentInfo(ctx context.Context, req *milvuspb.Qu
IndexID: info.IndexID,
}
}
resp.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
resp.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_SUCCESS
resp.Infos = queryInfos
return resp, nil
}
......@@ -811,7 +811,7 @@ func (node *ProxyNode) getSegmentsOfCollection(ctx context.Context, dbName strin
if err != nil {
return nil, err
}
if describeCollectionResponse.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if describeCollectionResponse.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return nil, errors.New(describeCollectionResponse.Status.Reason)
}
collectionID := describeCollectionResponse.CollectionID
......@@ -829,7 +829,7 @@ func (node *ProxyNode) getSegmentsOfCollection(ctx context.Context, dbName strin
if err != nil {
return nil, err
}
if showPartitionsResp.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if showPartitionsResp.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return nil, errors.New(showPartitionsResp.Status.Reason)
}
......@@ -848,7 +848,7 @@ func (node *ProxyNode) getSegmentsOfCollection(ctx context.Context, dbName strin
if err != nil {
return nil, err
}
if showSegmentResponse.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if showSegmentResponse.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return nil, errors.New(showSegmentResponse.Status.Reason)
}
ret = append(ret, showSegmentResponse.SegmentIDs...)
......@@ -862,7 +862,7 @@ func (node *ProxyNode) RegisterLink(request *commonpb.Empty) (*milvuspb.Register
return &milvuspb.RegisterLinkResponse{
Address: nil,
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: "proxy node not healthy",
},
}, nil
......@@ -870,7 +870,7 @@ func (node *ProxyNode) RegisterLink(request *commonpb.Empty) (*milvuspb.Register
return &milvuspb.RegisterLinkResponse{
Address: nil,
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
}, nil
......
......@@ -108,7 +108,7 @@ func (m *MetaCache) GetCollectionID(ctx context.Context, collectionName string)
if err != nil {
return 0, err
}
if coll.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if coll.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return 0, errors.New(coll.Status.Reason)
}
......@@ -139,7 +139,7 @@ func (m *MetaCache) GetCollectionSchema(ctx context.Context, collectionName stri
if err != nil {
return nil, err
}
if coll.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if coll.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return nil, errors.New(coll.Status.Reason)
}
......@@ -171,7 +171,7 @@ func (m *MetaCache) GetPartitionID(ctx context.Context, collectionName string, p
if err != nil {
return 0, err
}
if partitions.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if partitions.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return 0, fmt.Errorf("%s", partitions.Status.Reason)
}
if len(partitions.PartitionIDs) != len(partitions.PartitionNames) {
......
......@@ -21,7 +21,7 @@ func (m *MockMasterClientInterface) ShowPartitions(ctx context.Context, in *milv
if in.CollectionName == "collection1" {
return &milvuspb.ShowPartitionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
PartitionIDs: []typeutil.UniqueID{1, 2},
PartitionNames: []string{"par1", "par2"},
......@@ -29,7 +29,7 @@ func (m *MockMasterClientInterface) ShowPartitions(ctx context.Context, in *milv
}
return &milvuspb.ShowPartitionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
PartitionIDs: []typeutil.UniqueID{},
PartitionNames: []string{},
......@@ -40,7 +40,7 @@ func (m *MockMasterClientInterface) DescribeCollection(ctx context.Context, in *
if in.CollectionName == "collection1" {
return &milvuspb.DescribeCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
CollectionID: typeutil.UniqueID(1),
Schema: &schemapb.CollectionSchema{
......@@ -50,7 +50,7 @@ func (m *MockMasterClientInterface) DescribeCollection(ctx context.Context, in *
}
return &milvuspb.DescribeCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
},
CollectionID: typeutil.UniqueID(0),
Schema: nil,
......
......@@ -91,7 +91,7 @@ func (node *ProxyNode) Init() error {
if err != nil {
return err
}
if response.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if response.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(response.Status.Reason)
}
......@@ -129,7 +129,7 @@ func (node *ProxyNode) Init() error {
if err != nil {
return err
}
if resp.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if resp.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(resp.Status.Reason)
}
......
......@@ -299,7 +299,7 @@ func (sa *SegIDAssigner) syncSegments() bool {
now := time.Now()
success := false
for _, info := range resp.SegIDAssignments {
if info.Status.GetErrorCode() != commonpb.ErrorCode_SUCCESS {
if info.Status.GetErrorCode() != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
log.Debug("proxynode", zap.String("SyncSegment Error", info.Status.Reason))
continue
}
......
......@@ -189,7 +189,7 @@ func (it *InsertTask) Execute(ctx context.Context) error {
it.result = &milvuspb.InsertResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
RowIDBegin: rowIDBegin,
RowIDEnd: rowIDEnd,
......@@ -212,7 +212,7 @@ func (it *InsertTask) Execute(ctx context.Context) error {
if resp == nil {
return errors.New("get insert channels resp is nil")
}
if resp.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if resp.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(resp.Status.Reason)
}
err = globalInsertChannelsMap.createInsertMsgStream(collID, resp.Values)
......@@ -222,14 +222,14 @@ func (it *InsertTask) Execute(ctx context.Context) error {
}
stream, err = globalInsertChannelsMap.getInsertMsgStream(collID)
if err != nil {
it.result.Status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
it.result.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
it.result.Status.Reason = err.Error()
return err
}
err = stream.Produce(ctx, msgPack)
if err != nil {
it.result.Status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
it.result.Status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
it.result.Status.Reason = err.Error()
return err
}
......@@ -358,7 +358,7 @@ func (cct *CreateCollectionTask) Execute(ctx context.Context) error {
if err != nil {
return err
}
if cct.result.ErrorCode == commonpb.ErrorCode_SUCCESS {
if cct.result.ErrorCode == commonpb.ErrorCode_ERROR_CODE_SUCCESS {
collID, err := globalMetaCache.GetCollectionID(ctx, cct.CollectionName)
if err != nil {
return err
......@@ -376,7 +376,7 @@ func (cct *CreateCollectionTask) Execute(ctx context.Context) error {
if resp == nil {
return errors.New("get insert channels resp is nil")
}
if resp.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if resp.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(resp.Status.Reason)
}
err = globalInsertChannelsMap.createInsertMsgStream(collID, resp.Values)
......@@ -599,7 +599,7 @@ func (st *SearchTask) PostExecute(ctx context.Context) error {
filterSearchResult := make([]*internalpb2.SearchResults, 0)
var filterReason string
for _, partialSearchResult := range searchResults {
if partialSearchResult.Status.ErrorCode == commonpb.ErrorCode_SUCCESS {
if partialSearchResult.Status.ErrorCode == commonpb.ErrorCode_ERROR_CODE_SUCCESS {
filterSearchResult = append(filterSearchResult, partialSearchResult)
// For debugging, please don't delete.
//for i := 0; i < len(partialSearchResult.Hits); i++ {
......@@ -620,7 +620,7 @@ func (st *SearchTask) PostExecute(ctx context.Context) error {
if availableQueryNodeNum <= 0 {
st.result = &milvuspb.SearchResults{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: filterReason,
},
}
......@@ -650,7 +650,7 @@ func (st *SearchTask) PostExecute(ctx context.Context) error {
if availableQueryNodeNum <= 0 {
st.result = &milvuspb.SearchResults{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: filterReason,
},
}
......@@ -661,7 +661,7 @@ func (st *SearchTask) PostExecute(ctx context.Context) error {
if nq <= 0 {
st.result = &milvuspb.SearchResults{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: filterReason,
},
}
......@@ -802,7 +802,7 @@ func (hct *HasCollectionTask) Execute(ctx context.Context) error {
if hct.result == nil {
return errors.New("has collection resp is nil")
}
if hct.result.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if hct.result.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(hct.result.Status.Reason)
}
return err
......@@ -873,7 +873,7 @@ func (dct *DescribeCollectionTask) Execute(ctx context.Context) error {
if dct.result == nil {
return errors.New("has collection resp is nil")
}
if dct.result.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if dct.result.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(dct.result.Status.Reason)
}
return err
......@@ -953,12 +953,12 @@ func (g *GetCollectionsStatisticsTask) Execute(ctx context.Context) error {
if result == nil {
return errors.New("get collection statistics resp is nil")
}
if result.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if result.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(result.Status.Reason)
}
g.result = &milvuspb.CollectionStatsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Stats: result.Stats,
......@@ -1028,7 +1028,7 @@ func (sct *ShowCollectionsTask) Execute(ctx context.Context) error {
if sct.result == nil {
return errors.New("get collection statistics resp is nil")
}
if sct.result.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if sct.result.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(sct.result.Status.Reason)
}
return err
......@@ -1105,7 +1105,7 @@ func (cpt *CreatePartitionTask) Execute(ctx context.Context) (err error) {
if cpt.result == nil {
return errors.New("get collection statistics resp is nil")
}
if cpt.result.ErrorCode != commonpb.ErrorCode_SUCCESS {
if cpt.result.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(cpt.result.Reason)
}
return err
......@@ -1182,7 +1182,7 @@ func (dpt *DropPartitionTask) Execute(ctx context.Context) (err error) {
if dpt.result == nil {
return errors.New("get collection statistics resp is nil")
}
if dpt.result.ErrorCode != commonpb.ErrorCode_SUCCESS {
if dpt.result.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(dpt.result.Reason)
}
return err
......@@ -1258,7 +1258,7 @@ func (hpt *HasPartitionTask) Execute(ctx context.Context) (err error) {
if hpt.result == nil {
return errors.New("get collection statistics resp is nil")
}
if hpt.result.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if hpt.result.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(hpt.result.Status.Reason)
}
return err
......@@ -1329,7 +1329,7 @@ func (spt *ShowPartitionsTask) Execute(ctx context.Context) error {
if spt.result == nil {
return errors.New("get collection statistics resp is nil")
}
if spt.result.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if spt.result.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(spt.result.Status.Reason)
}
return err
......@@ -1407,7 +1407,7 @@ func (cit *CreateIndexTask) Execute(ctx context.Context) error {
if cit.result == nil {
return errors.New("get collection statistics resp is nil")
}
if cit.result.ErrorCode != commonpb.ErrorCode_SUCCESS {
if cit.result.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(cit.result.Reason)
}
return err
......@@ -1490,7 +1490,7 @@ func (dit *DescribeIndexTask) Execute(ctx context.Context) error {
if dit.result == nil {
return errors.New("get collection statistics resp is nil")
}
if dit.result.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if dit.result.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(dit.result.Status.Reason)
}
return err
......@@ -1568,7 +1568,7 @@ func (dit *DropIndexTask) Execute(ctx context.Context) error {
if dit.result == nil {
return errors.New("drop index resp is nil")
}
if dit.result.ErrorCode != commonpb.ErrorCode_SUCCESS {
if dit.result.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(dit.result.Reason)
}
return err
......@@ -1715,7 +1715,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
if err != nil {
return err
}
if segments.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if segments.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(segments.Status.Reason)
}
allSegmentIDs = append(allSegmentIDs, segments.SegmentIDs...)
......@@ -1757,7 +1757,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
if len(allSegmentIDs) != len(indexBuildIDs) {
gist.result = &milvuspb.IndexStateResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
State: commonpb.IndexState_INDEX_STATE_IN_PROGRESS,
......@@ -1775,7 +1775,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
return err
}
if states.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if states.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
gist.result = &milvuspb.IndexStateResponse{
Status: states.Status,
State: commonpb.IndexState_INDEX_STATE_FAILED,
......@@ -1797,7 +1797,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
gist.result = &milvuspb.IndexStateResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
State: commonpb.IndexState_INDEX_STATE_FINISHED,
......@@ -1882,12 +1882,12 @@ func (ft *FlushTask) Execute(ctx context.Context) error {
if status == nil {
return errors.New("flush resp is nil")
}
if status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(status.Reason)
}
}
ft.result = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}
return nil
}
......
......@@ -170,7 +170,7 @@ func (s *ProxyService) GetComponentStates(ctx context.Context) (*internalpb2.Com
State: stateInfo,
SubcomponentStates: nil, // todo add subcomponents states
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
}
return ret, nil
......@@ -183,7 +183,7 @@ func (s *ProxyService) UpdateStateCode(code internalpb2.StateCode) {
func (s *ProxyService) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
Value: Params.ServiceTimeTickChannel,
}, nil
......@@ -208,7 +208,7 @@ func (s *ProxyService) RegisterLink(ctx context.Context) (*milvuspb.RegisterLink
if err != nil {
return &milvuspb.RegisterLinkResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
Address: nil,
......@@ -219,7 +219,7 @@ func (s *ProxyService) RegisterLink(ctx context.Context) (*milvuspb.RegisterLink
if err != nil {
return &milvuspb.RegisterLinkResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
Address: nil,
......@@ -246,7 +246,7 @@ func (s *ProxyService) RegisterNode(ctx context.Context, request *proxypb.Regist
if err != nil {
return &proxypb.RegisterNodeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
InitParams: nil,
......@@ -257,7 +257,7 @@ func (s *ProxyService) RegisterNode(ctx context.Context, request *proxypb.Regist
if err != nil {
return &proxypb.RegisterNodeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
InitParams: nil,
......@@ -282,7 +282,7 @@ func (s *ProxyService) InvalidateCollectionMetaCache(ctx context.Context, reques
err = s.sched.InvalidateCollectionMetaCacheTaskQueue.Enqueue(t)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......@@ -290,7 +290,7 @@ func (s *ProxyService) InvalidateCollectionMetaCache(ctx context.Context, reques
err = t.WaitToFinish()
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, nil
}
......
......@@ -100,7 +100,7 @@ func (t *RegisterLinkTask) Execute(ctx context.Context) error {
Port: info.port,
},
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
}
......@@ -147,7 +147,7 @@ func (t *RegisterNodeTask) Execute(ctx context.Context) error {
// TODO: fill init params
t.response = &proxypb.RegisterNodeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
InitParams: &internalpb2.InitParams{
......@@ -197,12 +197,12 @@ func (t *InvalidateCollectionMetaCacheTask) Execute(ctx context.Context) error {
if status == nil {
return errors.New("invalidate collection meta cache error")
}
if status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(status.Reason)
}
}
t.response = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}
return nil
}
......
......@@ -24,13 +24,13 @@ func (s *Segment) buildIndex(collection *Collection) commonpb.Status {
*/
var status = C.BuildIndex(collection.collectionPtr, s.segmentPtr)
if status != 0 {
return commonpb.Status{ErrorCode: commonpb.ErrorCode_BUILD_INDEX_ERROR}
return commonpb.Status{ErrorCode: commonpb.ErrorCode_ERROR_CODE_BUILD_INDEX_ERROR}
}
return commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS}
return commonpb.Status{ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS}
}
func (s *Segment) dropIndex(fieldID int64) commonpb.Status {
// WARN: Not support yet
return commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS}
return commonpb.Status{ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS}
}
......@@ -321,7 +321,7 @@ func (loader *indexLoader) getIndexInfo(collectionID UniqueID, segmentID UniqueI
if err != nil {
return 0, 0, err
}
if response.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if response.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return -1, -1, errors.New(response.Status.Reason)
}
return response.IndexID, response.BuildID, nil
......@@ -337,7 +337,7 @@ func (loader *indexLoader) getIndexPaths(indexBuildID UniqueID) ([]string, error
IndexBuildIDs: []UniqueID{indexBuildID},
}
pathResponse, err := loader.indexService.GetIndexFilePaths(ctx, indexFilePathRequest)
if err != nil || pathResponse.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if err != nil || pathResponse.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return nil, err
}
......
......@@ -121,7 +121,7 @@ func (node *QueryNode) Init() error {
if err != nil {
panic(err)
}
if resp.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if resp.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
panic(resp.Status.Reason)
}
......@@ -248,14 +248,14 @@ func (node *QueryNode) SetDataService(data types.DataService) error {
func (node *QueryNode) GetComponentStates() (*internalpb2.ComponentStates, error) {
stats := &internalpb2.ComponentStates{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
}
code, ok := node.stateCode.Load().(internalpb2.StateCode)
if !ok {
errMsg := "unexpected error in type assertion"
stats.Status = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: errMsg,
}
return stats, errors.New(errMsg)
......@@ -281,7 +281,7 @@ func (node *QueryNode) AddQueryChannel(in *queryPb.AddQueryChannelsRequest) (*co
if node.searchService == nil || node.searchService.searchMsgStream == nil {
errMsg := "null search service or null search message stream"
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: errMsg,
}
......@@ -300,7 +300,7 @@ func (node *QueryNode) AddQueryChannel(in *queryPb.AddQueryChannelsRequest) (*co
log.Debug("querynode AsProducer: " + strings.Join(producerChannels, ", "))
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}
return status, nil
}
......@@ -309,7 +309,7 @@ func (node *QueryNode) RemoveQueryChannel(in *queryPb.RemoveQueryChannelsRequest
if node.searchService == nil || node.searchService.searchMsgStream == nil {
errMsg := "null search service or null search result message stream"
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: errMsg,
}
......@@ -320,7 +320,7 @@ func (node *QueryNode) RemoveQueryChannel(in *queryPb.RemoveQueryChannelsRequest
if !ok {
errMsg := "type assertion failed for search message stream"
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: errMsg,
}
......@@ -331,7 +331,7 @@ func (node *QueryNode) RemoveQueryChannel(in *queryPb.RemoveQueryChannelsRequest
if !ok {
errMsg := "type assertion failed for search result message stream"
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: errMsg,
}
......@@ -350,7 +350,7 @@ func (node *QueryNode) RemoveQueryChannel(in *queryPb.RemoveQueryChannelsRequest
resultStream.AsProducer(producerChannels)
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}
return status, nil
}
......@@ -359,7 +359,7 @@ func (node *QueryNode) WatchDmChannels(in *queryPb.WatchDmChannelsRequest) (*com
if node.dataSyncService == nil || node.dataSyncService.dmStream == nil {
errMsg := "null data sync service or null data manipulation stream"
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: errMsg,
}
......@@ -373,7 +373,7 @@ func (node *QueryNode) WatchDmChannels(in *queryPb.WatchDmChannelsRequest) (*com
_ = t
errMsg := "type assertion failed for dm message stream"
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: errMsg,
}
......@@ -387,7 +387,7 @@ func (node *QueryNode) WatchDmChannels(in *queryPb.WatchDmChannelsRequest) (*com
log.Debug("querynode AsConsumer: " + strings.Join(consumeChannels, ", ") + " : " + consumeSubName)
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}
return status, nil
}
......@@ -403,14 +403,14 @@ func (node *QueryNode) LoadSegments(in *queryPb.LoadSegmentRequest) (*commonpb.S
log.Debug("query node load segment", zap.String("loadSegmentRequest", fmt.Sprintln(in)))
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}
hasCollection := node.replica.hasCollection(collectionID)
hasPartition := node.replica.hasPartition(partitionID)
if !hasCollection {
err := node.replica.addCollection(collectionID, schema)
if err != nil {
status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
status.Reason = err.Error()
return status, err
}
......@@ -418,14 +418,14 @@ func (node *QueryNode) LoadSegments(in *queryPb.LoadSegmentRequest) (*commonpb.S
if !hasPartition {
err := node.replica.addPartition(collectionID, partitionID)
if err != nil {
status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
status.Reason = err.Error()
return status, err
}
}
err := node.replica.enablePartition(partitionID)
if err != nil {
status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
status.Reason = err.Error()
return status, err
}
......@@ -436,7 +436,7 @@ func (node *QueryNode) LoadSegments(in *queryPb.LoadSegmentRequest) (*commonpb.S
if len(in.SegmentIDs) != len(in.SegmentStates) {
err := errors.New("len(segmentIDs) should equal to len(segmentStates)")
status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
status.Reason = err.Error()
return status, err
}
......@@ -460,7 +460,7 @@ func (node *QueryNode) LoadSegments(in *queryPb.LoadSegmentRequest) (*commonpb.S
err = node.dataSyncService.seekSegment(position)
if err != nil {
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}
return status, err
......@@ -468,7 +468,7 @@ func (node *QueryNode) LoadSegments(in *queryPb.LoadSegmentRequest) (*commonpb.S
err = node.loadService.loadSegment(collectionID, partitionID, segmentIDs, fieldIDs)
if err != nil {
status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
status.Reason = err.Error()
return status, err
}
......@@ -479,26 +479,26 @@ func (node *QueryNode) ReleaseCollection(in *queryPb.ReleaseCollectionRequest) (
err := node.replica.removeCollection(in.CollectionID)
if err != nil {
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}
return status, err
}
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}, nil
}
func (node *QueryNode) ReleasePartitions(in *queryPb.ReleasePartitionRequest) (*commonpb.Status, error) {
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}
for _, id := range in.PartitionIDs {
err := node.loadService.segLoader.replica.removePartition(id)
if err != nil {
// not return, try to release all partitions
status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
status.Reason = err.Error()
}
}
......@@ -507,13 +507,13 @@ func (node *QueryNode) ReleasePartitions(in *queryPb.ReleasePartitionRequest) (*
func (node *QueryNode) ReleaseSegments(in *queryPb.ReleaseSegmentRequest) (*commonpb.Status, error) {
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}
for _, id := range in.SegmentIDs {
err2 := node.loadService.segLoader.replica.removeSegment(id)
if err2 != nil {
// not return, try to release all segments
status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
status.ErrorCode = commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR
status.Reason = err2.Error()
}
}
......@@ -540,7 +540,7 @@ func (node *QueryNode) GetSegmentInfo(in *queryPb.SegmentInfoRequest) (*queryPb.
}
return &queryPb.SegmentInfoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
Infos: infos,
}, nil
......
......@@ -196,7 +196,7 @@ func refreshChannelNames() {
func (q *queryServiceMock) RegisterNode(ctx context.Context, req *querypb.RegisterNodeRequest) (*querypb.RegisterNodeResponse, error) {
return &querypb.RegisterNodeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
InitParams: &internalpb2.InitParams{
NodeID: int64(1),
......
......@@ -304,7 +304,7 @@ func (ss *searchService) search(msg msgstream.TsMsg) error {
Timestamp: searchTimestamp,
SourceID: searchMsg.Base.SourceID,
},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS},
ResultChannelID: searchMsg.ResultChannelID,
Hits: nilHits,
MetricType: plan.getMetricType(),
......@@ -366,7 +366,7 @@ func (ss *searchService) search(msg msgstream.TsMsg) error {
Timestamp: searchTimestamp,
SourceID: searchMsg.Base.SourceID,
},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS},
ResultChannelID: searchMsg.ResultChannelID,
Hits: hits,
MetricType: plan.getMetricType(),
......@@ -427,7 +427,7 @@ func (ss *searchService) publishFailedSearchResult(msg msgstream.TsMsg, errMsg s
Timestamp: searchMsg.Base.Timestamp,
SourceID: searchMsg.Base.SourceID,
},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR, Reason: errMsg},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR, Reason: errMsg},
ResultChannelID: searchMsg.ResultChannelID,
Hits: [][]byte{},
},
......
......@@ -26,10 +26,10 @@ import (
)
const (
segTypeInvalid = 0
segTypeGrowing = 1
segTypeSealed = 2
segTypeIndexing = 3
segTypeInvalid = iota
segTypeGrowing
segTypeSealed
segTypeIndexing
)
type segmentType = int
......
......@@ -42,7 +42,7 @@ func (loader *segmentLoader) getInsertBinlogPaths(segmentID UniqueID) ([]*intern
}
pathResponse, err := loader.dataService.GetInsertBinlogPaths(ctx, insertBinlogPathRequest)
if err != nil || pathResponse.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if err != nil || pathResponse.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return nil, nil, err
}
......@@ -63,7 +63,7 @@ func (loader *segmentLoader) GetSegmentStates(segmentID UniqueID) (*datapb.Segme
SegmentIDs: []int64{segmentID},
}
statesResponse, err := loader.dataService.GetSegmentStates(ctx, segmentStatesRequest)
if err != nil || statesResponse.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if err != nil || statesResponse.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return nil, err
}
if len(statesResponse.States) != 1 {
......
......@@ -56,7 +56,7 @@ func (master *MasterMock) ShowPartitions(ctx context.Context, in *milvuspb.ShowP
}
response := &milvuspb.ShowPartitionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
PartitionIDs: partitionIDs,
}
......@@ -75,7 +75,7 @@ func (master *MasterMock) ShowSegments(ctx context.Context, in *milvuspb.ShowSeg
if partition == partitionID {
return &milvuspb.ShowSegmentResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
//SegmentIDs: master.Partition2segment[partition],
}, nil
......@@ -102,7 +102,7 @@ func NewDataMock() *DataMock {
fillStates := func(segmentID UniqueID, time uint64, position *internalpb2.MsgPosition) *datapb.SegmentStateInfo {
return &datapb.SegmentStateInfo{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
SegmentID: segmentID,
State: commonpb.SegmentState_SegmentFlushed,
......@@ -127,7 +127,7 @@ func NewDataMock() *DataMock {
func (data *DataMock) GetSegmentStates(ctx context.Context, req *datapb.SegmentStatesRequest) (*datapb.SegmentStatesResponse, error) {
ret := &datapb.SegmentStatesResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
}
for _, segID := range req.SegmentIDs {
......@@ -147,7 +147,7 @@ func (data *DataMock) GetSegmentStates(ctx context.Context, req *datapb.SegmentS
func (data *DataMock) GetInsertChannels(ctx context.Context, req *datapb.InsertChannelRequest) (*internalpb2.StringList, error) {
return &internalpb2.StringList{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
Values: []string{"insert-0", "insert-1", "insert-2", "insert-3"},
}, nil
......
......@@ -135,7 +135,7 @@ func (qs *QueryService) GetComponentStates(ctx context.Context) (*internalpb2.Co
}
return &internalpb2.ComponentStates{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
State: serviceComponentInfo,
SubcomponentStates: subComponentInfos,
......@@ -145,7 +145,7 @@ func (qs *QueryService) GetComponentStates(ctx context.Context) (*internalpb2.Co
func (qs *QueryService) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Value: Params.TimeTickChannelName,
......@@ -155,7 +155,7 @@ func (qs *QueryService) GetTimeTickChannel(ctx context.Context) (*milvuspb.Strin
func (qs *QueryService) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: "",
},
Value: Params.StatsChannelName,
......@@ -170,7 +170,7 @@ func (qs *QueryService) RegisterNode(ctx context.Context, req *querypb.RegisterN
err := errors.New("nodeID already exists")
return &querypb.RegisterNodeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: err.Error(),
},
}, err
......@@ -181,7 +181,7 @@ func (qs *QueryService) RegisterNode(ctx context.Context, req *querypb.RegisterN
if err := client.Init(); err != nil {
return &querypb.RegisterNodeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
InitParams: new(internalpb2.InitParams),
}, err
......@@ -211,7 +211,7 @@ func (qs *QueryService) RegisterNode(ctx context.Context, req *querypb.RegisterN
return &querypb.RegisterNodeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
InitParams: &internalpb2.InitParams{
NodeID: nodeID,
......@@ -231,7 +231,7 @@ func (qs *QueryService) ShowCollections(ctx context.Context, req *querypb.ShowCo
if err != nil {
return &querypb.ShowCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
Reason: err.Error(),
},
}, err
......@@ -239,7 +239,7 @@ func (qs *QueryService) ShowCollections(ctx context.Context, req *querypb.ShowCo
log.Debug("show collection end")
return &querypb.ShowCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
CollectionIDs: collectionIDs,
}, nil
......@@ -252,12 +252,12 @@ func (qs *QueryService) LoadCollection(ctx context.Context, req *querypb.LoadCol
fn := func(err error) *commonpb.Status {
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}
}
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}
}
......@@ -288,7 +288,7 @@ func (qs *QueryService) LoadCollection(ctx context.Context, req *querypb.LoadCol
if err != nil {
return fn(err), err
}
if showPartitionResponse.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if showPartitionResponse.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return showPartitionResponse.Status, err
}
partitionIDs := showPartitionResponse.PartitionIDs
......@@ -333,7 +333,7 @@ func (qs *QueryService) ReleaseCollection(ctx context.Context, req *querypb.Rele
if err != nil {
log.Error("release collection end, query service don't have the log of", zap.String("collectionID", fmt.Sprintln(collectionID)))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}, nil
}
......@@ -348,7 +348,7 @@ func (qs *QueryService) ReleaseCollection(ctx context.Context, req *querypb.Rele
err = qs.replica.releaseCollection(dbID, collectionID)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, err
}
......@@ -356,7 +356,7 @@ func (qs *QueryService) ReleaseCollection(ctx context.Context, req *querypb.Rele
log.Debug("release collection end")
//TODO:: queryNode cancel subscribe dmChannels
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}, nil
}
......@@ -371,14 +371,14 @@ func (qs *QueryService) ShowPartitions(ctx context.Context, req *querypb.ShowPar
if err != nil {
return &querypb.ShowPartitionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, err
}
return &querypb.ShowPartitionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
PartitionIDs: partitionIDs,
}, nil
......@@ -394,12 +394,12 @@ func (qs *QueryService) LoadPartitions(ctx context.Context, req *querypb.LoadPar
fn := func(err error) *commonpb.Status {
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}
}
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}
}
log.Debug("load partitions start", zap.String("partitionIDs", fmt.Sprintln(partitionIDs)))
......@@ -514,7 +514,7 @@ func (qs *QueryService) LoadPartitions(ctx context.Context, req *querypb.LoadPar
log.Debug("load partitions end", zap.String("partitionIDs", fmt.Sprintln(partitionIDs)))
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}, nil
}
......@@ -544,7 +544,7 @@ func (qs *QueryService) ReleasePartitions(ctx context.Context, req *querypb.Rele
err := qs.replica.releasePartition(dbID, collectionID, partitionID)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
}, err
}
......@@ -553,7 +553,7 @@ func (qs *QueryService) ReleasePartitions(ctx context.Context, req *querypb.Rele
log.Debug("start release partitions end")
//TODO:: queryNode cancel subscribe dmChannels
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
}, nil
}
......@@ -584,7 +584,7 @@ func (qs *QueryService) CreateQueryChannel(ctx context.Context) (*querypb.Create
qs.qcMutex.Unlock()
return &querypb.CreateQueryChannelResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, err
......@@ -594,7 +594,7 @@ func (qs *QueryService) CreateQueryChannel(ctx context.Context) (*querypb.Create
return &querypb.CreateQueryChannelResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
RequestChannel: allocatedQueryChannel,
ResultChannel: allocatedQueryResultChannel,
......@@ -606,7 +606,7 @@ func (qs *QueryService) GetPartitionStates(ctx context.Context, req *querypb.Par
if err != nil {
return &querypb.PartitionStatesResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
PartitionDescriptions: states,
......@@ -614,7 +614,7 @@ func (qs *QueryService) GetPartitionStates(ctx context.Context, req *querypb.Par
}
return &querypb.PartitionStatesResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
PartitionDescriptions: states,
}, nil
......@@ -627,7 +627,7 @@ func (qs *QueryService) GetSegmentInfo(ctx context.Context, req *querypb.Segment
if err != nil {
return &querypb.SegmentInfoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_UNEXPECTED_ERROR,
Reason: err.Error(),
},
}, err
......@@ -636,7 +636,7 @@ func (qs *QueryService) GetSegmentInfo(ctx context.Context, req *querypb.Segment
}
return &querypb.SegmentInfoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
ErrorCode: commonpb.ErrorCode_ERROR_CODE_SUCCESS,
},
Infos: segmentInfos,
}, nil
......
......@@ -61,7 +61,7 @@ func TestQueryService_load(t *testing.T) {
}
response, err := service.LoadCollection(ctx, loadCollectionRequest)
assert.Nil(t, err)
assert.Equal(t, response.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, response.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
})
t.Run("Test LoadPartition", func(t *testing.T) {
......@@ -71,6 +71,6 @@ func TestQueryService_load(t *testing.T) {
}
response, err := service.LoadPartitions(ctx, loadPartitionRequest)
assert.Nil(t, err)
assert.Equal(t, response.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, response.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
})
}
......@@ -168,7 +168,7 @@ func (w *PayloadWriter) AddBoolToPayload(msgs []bool) error {
status := C.AddBooleanToPayload(w.payloadWriterPtr, cMsgs, cLength)
errCode := commonpb.ErrorCode(status.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(status.error_msg)
defer C.free(unsafe.Pointer(status.error_msg))
return errors.New(msg)
......@@ -187,7 +187,7 @@ func (w *PayloadWriter) AddInt8ToPayload(msgs []int8) error {
status := C.AddInt8ToPayload(w.payloadWriterPtr, cMsgs, cLength)
errCode := commonpb.ErrorCode(status.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(status.error_msg)
defer C.free(unsafe.Pointer(status.error_msg))
return errors.New(msg)
......@@ -207,7 +207,7 @@ func (w *PayloadWriter) AddInt16ToPayload(msgs []int16) error {
status := C.AddInt16ToPayload(w.payloadWriterPtr, cMsgs, cLength)
errCode := commonpb.ErrorCode(status.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(status.error_msg)
defer C.free(unsafe.Pointer(status.error_msg))
return errors.New(msg)
......@@ -227,7 +227,7 @@ func (w *PayloadWriter) AddInt32ToPayload(msgs []int32) error {
status := C.AddInt32ToPayload(w.payloadWriterPtr, cMsgs, cLength)
errCode := commonpb.ErrorCode(status.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(status.error_msg)
defer C.free(unsafe.Pointer(status.error_msg))
return errors.New(msg)
......@@ -247,7 +247,7 @@ func (w *PayloadWriter) AddInt64ToPayload(msgs []int64) error {
status := C.AddInt64ToPayload(w.payloadWriterPtr, cMsgs, cLength)
errCode := commonpb.ErrorCode(status.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(status.error_msg)
defer C.free(unsafe.Pointer(status.error_msg))
return errors.New(msg)
......@@ -267,7 +267,7 @@ func (w *PayloadWriter) AddFloatToPayload(msgs []float32) error {
status := C.AddFloatToPayload(w.payloadWriterPtr, cMsgs, cLength)
errCode := commonpb.ErrorCode(status.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(status.error_msg)
defer C.free(unsafe.Pointer(status.error_msg))
return errors.New(msg)
......@@ -287,7 +287,7 @@ func (w *PayloadWriter) AddDoubleToPayload(msgs []float64) error {
status := C.AddDoubleToPayload(w.payloadWriterPtr, cMsgs, cLength)
errCode := commonpb.ErrorCode(status.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(status.error_msg)
defer C.free(unsafe.Pointer(status.error_msg))
return errors.New(msg)
......@@ -308,7 +308,7 @@ func (w *PayloadWriter) AddOneStringToPayload(msg string) error {
st := C.AddOneStringToPayload(w.payloadWriterPtr, cmsg, clength)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return errors.New(msg)
......@@ -333,7 +333,7 @@ func (w *PayloadWriter) AddBinaryVectorToPayload(binVec []byte, dim int) error {
st := C.AddBinaryVectorToPayload(w.payloadWriterPtr, cBinVec, cDim, cLength)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return errors.New(msg)
......@@ -358,7 +358,7 @@ func (w *PayloadWriter) AddFloatVectorToPayload(floatVec []float32, dim int) err
st := C.AddFloatVectorToPayload(w.payloadWriterPtr, cBinVec, cDim, cLength)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return errors.New(msg)
......@@ -369,7 +369,7 @@ func (w *PayloadWriter) AddFloatVectorToPayload(floatVec []float32, dim int) err
func (w *PayloadWriter) FinishPayloadWriter() error {
st := C.FinishPayloadWriter(w.payloadWriterPtr)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return errors.New(msg)
......@@ -397,7 +397,7 @@ func (w *PayloadWriter) GetPayloadLengthFromWriter() (int, error) {
func (w *PayloadWriter) ReleasePayloadWriter() error {
st := C.ReleasePayloadWriter(w.payloadWriterPtr)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return errors.New(msg)
......@@ -482,7 +482,7 @@ func (r *PayloadReader) GetDataFromPayload(idx ...int) (interface{}, int, error)
func (r *PayloadReader) ReleasePayloadReader() error {
st := C.ReleasePayloadReader(r.payloadReaderPtr)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return errors.New(msg)
......@@ -500,7 +500,7 @@ func (r *PayloadReader) GetBoolFromPayload() ([]bool, error) {
st := C.GetBoolFromPayload(r.payloadReaderPtr, &cMsg, &cSize)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return nil, errors.New(msg)
......@@ -520,7 +520,7 @@ func (r *PayloadReader) GetInt8FromPayload() ([]int8, error) {
st := C.GetInt8FromPayload(r.payloadReaderPtr, &cMsg, &cSize)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return nil, errors.New(msg)
......@@ -540,7 +540,7 @@ func (r *PayloadReader) GetInt16FromPayload() ([]int16, error) {
st := C.GetInt16FromPayload(r.payloadReaderPtr, &cMsg, &cSize)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return nil, errors.New(msg)
......@@ -560,7 +560,7 @@ func (r *PayloadReader) GetInt32FromPayload() ([]int32, error) {
st := C.GetInt32FromPayload(r.payloadReaderPtr, &cMsg, &cSize)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return nil, errors.New(msg)
......@@ -580,7 +580,7 @@ func (r *PayloadReader) GetInt64FromPayload() ([]int64, error) {
st := C.GetInt64FromPayload(r.payloadReaderPtr, &cMsg, &cSize)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return nil, errors.New(msg)
......@@ -600,7 +600,7 @@ func (r *PayloadReader) GetFloatFromPayload() ([]float32, error) {
st := C.GetFloatFromPayload(r.payloadReaderPtr, &cMsg, &cSize)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return nil, errors.New(msg)
......@@ -620,7 +620,7 @@ func (r *PayloadReader) GetDoubleFromPayload() ([]float64, error) {
st := C.GetDoubleFromPayload(r.payloadReaderPtr, &cMsg, &cSize)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return nil, errors.New(msg)
......@@ -641,7 +641,7 @@ func (r *PayloadReader) GetOneStringFromPayload(idx int) (string, error) {
st := C.GetOneStringFromPayload(r.payloadReaderPtr, C.int(idx), &cStr, &cSize)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return "", errors.New(msg)
......@@ -661,7 +661,7 @@ func (r *PayloadReader) GetBinaryVectorFromPayload() ([]byte, int, error) {
st := C.GetBinaryVectorFromPayload(r.payloadReaderPtr, &cMsg, &cDim, &cLen)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return nil, 0, errors.New(msg)
......@@ -684,7 +684,7 @@ func (r *PayloadReader) GetFloatVectorFromPayload() ([]float32, int, error) {
st := C.GetFloatVectorFromPayload(r.payloadReaderPtr, &cMsg, &cDim, &cLen)
errCode := commonpb.ErrorCode(st.error_code)
if errCode != commonpb.ErrorCode_SUCCESS {
if errCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
msg := C.GoString(st.error_msg)
defer C.free(unsafe.Pointer(st.error_msg))
return nil, 0, errors.New(msg)
......
......@@ -55,7 +55,7 @@ func WaitForComponentStates(ctx context.Context, service StateComponent, service
return err
}
if resp.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
if resp.Status.ErrorCode != commonpb.ErrorCode_ERROR_CODE_SUCCESS {
return errors.New(resp.Status.Reason)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册