Fix describe segment if index not exist

Signed-off-by: neza2017 <yefu.chen@zilliz.com>
This commit is contained in:
neza2017 2021-03-10 14:45:35 +08:00 committed by yefu.chen
parent c875fdf913
commit 7b2d67242d
52 changed files with 623 additions and 582 deletions

View File

@ -84,7 +84,7 @@ func (ia *IDAllocator) syncID() bool {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
req := &masterpb.IDRequest{ req := &masterpb.IDRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kRequestID, MsgType: commonpb.MsgType_RequestID,
MsgID: 0, MsgID: 0,
Timestamp: 0, Timestamp: 0,
SourceID: ia.PeerID, SourceID: ia.PeerID,

View File

@ -104,7 +104,7 @@ func (ta *TimestampAllocator) syncTs() bool {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
req := &masterpb.TsoRequest{ req := &masterpb.TsoRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kRequestTSO, MsgType: commonpb.MsgType_RequestTSO,
MsgID: 0, MsgID: 0,
Timestamp: 0, Timestamp: 0,
SourceID: ta.PeerID, SourceID: ta.PeerID,

View File

@ -261,29 +261,28 @@ const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(
"STATE_FAILED\020\004\022\027\n\023INDEX_STATE_DELETED\020\005*" "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" "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" "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" "mentSealed\020\003\022\022\n\016SegmentFlushed\020\004*\365\005\n\007Msg"
"Type\022\t\n\005kNone\020\000\022\025\n\021kCreateCollection\020d\022\023" "Type\022\010\n\004None\020\000\022\024\n\020CreateCollection\020d\022\022\n\016"
"\n\017kDropCollection\020e\022\022\n\016kHasCollection\020f\022" "DropCollection\020e\022\021\n\rHasCollection\020f\022\026\n\022D"
"\027\n\023kDescribeCollection\020g\022\024\n\020kShowCollect" "escribeCollection\020g\022\023\n\017ShowCollections\020h"
"ions\020h\022\022\n\016kGetSysConfigs\020i\022\023\n\017kLoadColle" "\022\024\n\020GetSystemConfigs\020i\022\022\n\016LoadCollection"
"ction\020j\022\026\n\022kReleaseCollection\020k\022\025\n\020kCrea" "\020j\022\025\n\021ReleaseCollection\020k\022\024\n\017CreateParti"
"tePartition\020\310\001\022\023\n\016kDropPartition\020\311\001\022\022\n\rk" "tion\020\310\001\022\022\n\rDropPartition\020\311\001\022\021\n\014HasPartit"
"HasPartition\020\312\001\022\027\n\022kDescribePartition\020\313\001" "ion\020\312\001\022\026\n\021DescribePartition\020\313\001\022\023\n\016ShowPa"
"\022\024\n\017kShowPartitions\020\314\001\022\023\n\016kLoadPartition" "rtitions\020\314\001\022\023\n\016LoadPartitions\020\315\001\022\026\n\021Rele"
"\020\315\001\022\026\n\021kReleasePartition\020\316\001\022\021\n\014kShowSegm" "asePartitions\020\316\001\022\021\n\014ShowSegments\020\372\001\022\024\n\017D"
"ent\020\372\001\022\025\n\020kDescribeSegment\020\373\001\022\021\n\014kCreate" "escribeSegment\020\373\001\022\020\n\013CreateIndex\020\254\002\022\022\n\rD"
"Index\020\254\002\022\023\n\016kDescribeIndex\020\255\002\022\017\n\nkDropIn" "escribeIndex\020\255\002\022\016\n\tDropIndex\020\256\002\022\013\n\006Inser"
"dex\020\256\002\022\014\n\007kInsert\020\220\003\022\014\n\007kDelete\020\221\003\022\013\n\006kF" "t\020\220\003\022\013\n\006Delete\020\221\003\022\n\n\005Flush\020\222\003\022\013\n\006Search\020"
"lush\020\222\003\022\014\n\007kSearch\020\364\003\022\022\n\rkSearchResult\020\365" "\364\003\022\021\n\014SearchResult\020\365\003\022\022\n\rGetIndexState\020\366"
"\003\022\023\n\016kGetIndexState\020\366\003\022\035\n\030kGetCollection" "\003\022\034\n\027GetCollectionStatistics\020\367\003\022\033\n\026GetPa"
"Statistics\020\367\003\022\034\n\027kGetPartitionStatistics" "rtitionStatistics\020\370\003\022\020\n\013SegmentInfo\020\330\004\022\r"
"\020\370\003\022\021\n\014kSegmentInfo\020\330\004\022\016\n\tkTimeTick\020\260\t\022\024" "\n\010TimeTick\020\260\t\022\023\n\016QueryNodeStats\020\261\t\022\016\n\tLo"
"\n\017kQueryNodeStats\020\261\t\022\017\n\nkLoadIndex\020\262\t\022\017\n" "adIndex\020\262\t\022\016\n\tRequestID\020\263\t\022\017\n\nRequestTSO"
"\nkRequestID\020\263\t\022\020\n\013kRequestTSO\020\264\t\022\025\n\020kAll" "\020\264\t\022\024\n\017AllocateSegment\020\265\t\022\026\n\021SegmentStat"
"ocateSegment\020\265\t\022\027\n\022kSegmentStatistics\020\266\t" "istics\020\266\t\022\025\n\020SegmentFlushDone\020\267\tBBZ@gith"
"\022\026\n\021kSegmentFlushDone\020\267\tBBZ@github.com/z" "ub.com/zilliztech/milvus-distributed/int"
"illiztech/milvus-distributed/internal/pr" "ernal/proto/commonpbb\006proto3"
"oto/commonpbb\006proto3"
; ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_common_2eproto_deps[1] = { static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_common_2eproto_deps[1] = {
}; };
@ -299,7 +298,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_com
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_common_2eproto_once; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_common_2eproto_once;
static bool descriptor_table_common_2eproto_initialized = false; static bool descriptor_table_common_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_common_2eproto = { const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_common_2eproto = {
&descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 2420, &descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 2388,
&descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_sccs, descriptor_table_common_2eproto_deps, 7, 0, &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, 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, file_level_metadata_common_2eproto, 7, file_level_enum_descriptors_common_2eproto, file_level_service_descriptors_common_2eproto,

View File

@ -202,50 +202,50 @@ inline bool SegmentState_Parse(
SegmentState_descriptor(), name, value); SegmentState_descriptor(), name, value);
} }
enum MsgType : int { enum MsgType : int {
kNone = 0, None = 0,
kCreateCollection = 100, CreateCollection = 100,
kDropCollection = 101, DropCollection = 101,
kHasCollection = 102, HasCollection = 102,
kDescribeCollection = 103, DescribeCollection = 103,
kShowCollections = 104, ShowCollections = 104,
kGetSysConfigs = 105, GetSystemConfigs = 105,
kLoadCollection = 106, LoadCollection = 106,
kReleaseCollection = 107, ReleaseCollection = 107,
kCreatePartition = 200, CreatePartition = 200,
kDropPartition = 201, DropPartition = 201,
kHasPartition = 202, HasPartition = 202,
kDescribePartition = 203, DescribePartition = 203,
kShowPartitions = 204, ShowPartitions = 204,
kLoadPartition = 205, LoadPartitions = 205,
kReleasePartition = 206, ReleasePartitions = 206,
kShowSegment = 250, ShowSegments = 250,
kDescribeSegment = 251, DescribeSegment = 251,
kCreateIndex = 300, CreateIndex = 300,
kDescribeIndex = 301, DescribeIndex = 301,
kDropIndex = 302, DropIndex = 302,
kInsert = 400, Insert = 400,
kDelete = 401, Delete = 401,
kFlush = 402, Flush = 402,
kSearch = 500, Search = 500,
kSearchResult = 501, SearchResult = 501,
kGetIndexState = 502, GetIndexState = 502,
kGetCollectionStatistics = 503, GetCollectionStatistics = 503,
kGetPartitionStatistics = 504, GetPartitionStatistics = 504,
kSegmentInfo = 600, SegmentInfo = 600,
kTimeTick = 1200, TimeTick = 1200,
kQueryNodeStats = 1201, QueryNodeStats = 1201,
kLoadIndex = 1202, LoadIndex = 1202,
kRequestID = 1203, RequestID = 1203,
kRequestTSO = 1204, RequestTSO = 1204,
kAllocateSegment = 1205, AllocateSegment = 1205,
kSegmentStatistics = 1206, SegmentStatistics = 1206,
kSegmentFlushDone = 1207, SegmentFlushDone = 1207,
MsgType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), MsgType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
MsgType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() MsgType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
}; };
bool MsgType_IsValid(int value); bool MsgType_IsValid(int value);
constexpr MsgType MsgType_MIN = kNone; constexpr MsgType MsgType_MIN = None;
constexpr MsgType MsgType_MAX = kSegmentFlushDone; constexpr MsgType MsgType_MAX = SegmentFlushDone;
constexpr int MsgType_ARRAYSIZE = MsgType_MAX + 1; constexpr int MsgType_ARRAYSIZE = MsgType_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MsgType_descriptor(); const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MsgType_descriptor();

View File

@ -26,7 +26,7 @@ func (alloc *allocator) allocID() (UniqueID, error) {
ctx := context.TODO() ctx := context.TODO()
resp, err := alloc.masterService.AllocID(ctx, &masterpb.IDRequest{ resp, err := alloc.masterService.AllocID(ctx, &masterpb.IDRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kRequestID, MsgType: commonpb.MsgType_RequestID,
MsgID: 1, // GOOSE TODO MsgID: 1, // GOOSE TODO
Timestamp: 0, // GOOSE TODO Timestamp: 0, // GOOSE TODO
SourceID: Params.NodeID, SourceID: Params.NodeID,

View File

@ -95,7 +95,7 @@ func (node *DataNode) Init() error {
req := &datapb.RegisterNodeRequest{ req := &datapb.RegisterNodeRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kNone, MsgType: commonpb.MsgType_None,
SourceID: node.NodeID, SourceID: node.NodeID,
}, },
Address: &commonpb.Address{ Address: &commonpb.Address{

View File

@ -339,7 +339,7 @@ func (df *DataFactory) GetMsgStreamTsInsertMsgs(n int) (inMsgs []msgstream.TsMsg
}, },
InsertRequest: internalpb2.InsertRequest{ InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: 0, // GOOSE TODO MsgID: 0, // GOOSE TODO
Timestamp: Timestamp(i + 1000), Timestamp: Timestamp(i + 1000),
SourceID: 0, SourceID: 0,
@ -367,7 +367,7 @@ func (df *DataFactory) GetMsgStreamInsertMsgs(n int) (inMsgs []*msgstream.Insert
}, },
InsertRequest: internalpb2.InsertRequest{ InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: 0, // GOOSE TODO MsgID: 0, // GOOSE TODO
Timestamp: Timestamp(i + 1000), Timestamp: Timestamp(i + 1000),
SourceID: 0, SourceID: 0,

View File

@ -74,7 +74,7 @@ func TestDataSyncService_Start(t *testing.T) {
}, },
TimeTickMsg: internalpb2.TimeTickMsg{ TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: UniqueID(0), MsgID: UniqueID(0),
Timestamp: math.MaxUint64, Timestamp: math.MaxUint64,
SourceID: 0, SourceID: 0,

View File

@ -104,13 +104,13 @@ func (ddNode *ddNode) Operate(ctx context.Context, in []Msg) ([]Msg, context.Con
// do dd tasks // do dd tasks
for _, msg := range tsMessages { for _, msg := range tsMessages {
switch msg.Type() { switch msg.Type() {
case commonpb.MsgType_kCreateCollection: case commonpb.MsgType_CreateCollection:
ddNode.createCollection(msg.(*msgstream.CreateCollectionMsg)) ddNode.createCollection(msg.(*msgstream.CreateCollectionMsg))
case commonpb.MsgType_kDropCollection: case commonpb.MsgType_DropCollection:
ddNode.dropCollection(msg.(*msgstream.DropCollectionMsg)) ddNode.dropCollection(msg.(*msgstream.DropCollectionMsg))
case commonpb.MsgType_kCreatePartition: case commonpb.MsgType_CreatePartition:
ddNode.createPartition(msg.(*msgstream.CreatePartitionMsg)) ddNode.createPartition(msg.(*msgstream.CreatePartitionMsg))
case commonpb.MsgType_kDropPartition: case commonpb.MsgType_DropPartition:
ddNode.dropPartition(msg.(*msgstream.DropPartitionMsg)) ddNode.dropPartition(msg.(*msgstream.DropPartitionMsg))
default: default:
log.Error("Not supporting message type", zap.Any("Type", msg.Type())) log.Error("Not supporting message type", zap.Any("Type", msg.Type()))

View File

@ -45,7 +45,7 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
// create collection // create collection
createCollReq := internalpb2.CreateCollectionRequest{ createCollReq := internalpb2.CreateCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreateCollection, MsgType: commonpb.MsgType_CreateCollection,
MsgID: 1, MsgID: 1,
Timestamp: 1, Timestamp: 1,
SourceID: 1, SourceID: 1,
@ -68,7 +68,7 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
// drop collection // drop collection
dropCollReq := internalpb2.DropCollectionRequest{ dropCollReq := internalpb2.DropCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropCollection, MsgType: commonpb.MsgType_DropCollection,
MsgID: 2, MsgID: 2,
Timestamp: 2, Timestamp: 2,
SourceID: 2, SourceID: 2,
@ -92,7 +92,7 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
// create partition // create partition
createPartitionReq := internalpb2.CreatePartitionRequest{ createPartitionReq := internalpb2.CreatePartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreatePartition, MsgType: commonpb.MsgType_CreatePartition,
MsgID: 3, MsgID: 3,
Timestamp: 3, Timestamp: 3,
SourceID: 3, SourceID: 3,
@ -116,7 +116,7 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
// drop partition // drop partition
dropPartitionReq := internalpb2.DropPartitionRequest{ dropPartitionReq := internalpb2.DropPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropPartition, MsgType: commonpb.MsgType_DropPartition,
MsgID: 4, MsgID: 4,
Timestamp: 4, Timestamp: 4,
SourceID: 4, SourceID: 4,

View File

@ -56,7 +56,7 @@ func (fdmNode *filterDmNode) Operate(ctx context.Context, in []Msg) ([]Msg, cont
for _, msg := range msgStreamMsg.TsMessages() { for _, msg := range msgStreamMsg.TsMessages() {
switch msg.Type() { switch msg.Type() {
case commonpb.MsgType_kInsert: case commonpb.MsgType_Insert:
resMsg := fdmNode.filterInvalidInsertMessage(msg.(*msgstream.InsertMsg)) resMsg := fdmNode.filterInvalidInsertMessage(msg.(*msgstream.InsertMsg))
if resMsg != nil { if resMsg != nil {
iMsg.insertMessages = append(iMsg.insertMessages, resMsg) iMsg.insertMessages = append(iMsg.insertMessages, resMsg)

View File

@ -537,7 +537,7 @@ func (ibNode *insertBufferNode) completeFlush(segID UniqueID) error {
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
completeFlushMsg := internalpb2.SegmentFlushCompletedMsg{ completeFlushMsg := internalpb2.SegmentFlushCompletedMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSegmentFlushDone, MsgType: commonpb.MsgType_SegmentFlushDone,
MsgID: 0, // GOOSE TODO MsgID: 0, // GOOSE TODO
Timestamp: 0, // GOOSE TODO Timestamp: 0, // GOOSE TODO
SourceID: Params.NodeID, SourceID: Params.NodeID,
@ -565,7 +565,7 @@ func (ibNode *insertBufferNode) writeHardTimeTick(ts Timestamp) error {
}, },
TimeTickMsg: internalpb2.TimeTickMsg{ TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, // GOOSE TODO MsgID: 0, // GOOSE TODO
Timestamp: ts, // GOOSE TODO Timestamp: ts, // GOOSE TODO
SourceID: Params.NodeID, SourceID: Params.NodeID,
@ -592,7 +592,7 @@ func (ibNode *insertBufferNode) updateSegStatistics(segIDs []UniqueID, currentPo
segStats := internalpb2.SegmentStatistics{ segStats := internalpb2.SegmentStatistics{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSegmentStatistics, MsgType: commonpb.MsgType_SegmentStatistics,
MsgID: UniqueID(0), // GOOSE TODO MsgID: UniqueID(0), // GOOSE TODO
Timestamp: Timestamp(0), // GOOSE TODO Timestamp: Timestamp(0), // GOOSE TODO
SourceID: Params.NodeID, SourceID: Params.NodeID,

View File

@ -56,7 +56,7 @@ func (mService *metaService) loadCollections(ctx context.Context) error {
func (mService *metaService) getCollectionNames(ctx context.Context) ([]string, error) { func (mService *metaService) getCollectionNames(ctx context.Context) ([]string, error) {
req := &milvuspb.ShowCollectionRequest{ req := &milvuspb.ShowCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowCollections, MsgType: commonpb.MsgType_ShowCollections,
MsgID: 0, //GOOSE TODO MsgID: 0, //GOOSE TODO
Timestamp: 0, // GOOSE TODO Timestamp: 0, // GOOSE TODO
SourceID: Params.NodeID, SourceID: Params.NodeID,
@ -75,7 +75,7 @@ func (mService *metaService) createCollection(ctx context.Context, name string)
log.Debug("Describing collections") log.Debug("Describing collections")
req := &milvuspb.DescribeCollectionRequest{ req := &milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection, MsgType: commonpb.MsgType_DescribeCollection,
MsgID: 0, //GOOSE TODO MsgID: 0, //GOOSE TODO
Timestamp: 0, // GOOSE TODO Timestamp: 0, // GOOSE TODO
SourceID: Params.NodeID, SourceID: Params.NodeID,

View File

@ -28,7 +28,7 @@ func (allocator *allocator) allocTimestamp() (Timestamp, error) {
ctx := context.TODO() ctx := context.TODO()
resp, err := allocator.masterClient.AllocTimestamp(ctx, &masterpb.TsoRequest{ resp, err := allocator.masterClient.AllocTimestamp(ctx, &masterpb.TsoRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowCollections, MsgType: commonpb.MsgType_ShowCollections,
MsgID: -1, // todo add msg id MsgID: -1, // todo add msg id
Timestamp: 0, // todo Timestamp: 0, // todo
SourceID: Params.NodeID, SourceID: Params.NodeID,
@ -45,7 +45,7 @@ func (allocator *allocator) allocID() (UniqueID, error) {
ctx := context.TODO() ctx := context.TODO()
resp, err := allocator.masterClient.AllocID(ctx, &masterpb.IDRequest{ resp, err := allocator.masterClient.AllocID(ctx, &masterpb.IDRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowCollections, MsgType: commonpb.MsgType_ShowCollections,
MsgID: -1, // todo add msg id MsgID: -1, // todo add msg id
Timestamp: 0, // todo Timestamp: 0, // todo
SourceID: Params.NodeID, SourceID: Params.NodeID,

View File

@ -92,7 +92,7 @@ func (c *dataNodeCluster) WatchInsertChannels(channels []string) {
for i, group := range groups { for i, group := range groups {
resp, err := c.nodes[i].client.WatchDmChannels(ctx, &datapb.WatchDmChannelRequest{ resp, err := c.nodes[i].client.WatchDmChannels(ctx, &datapb.WatchDmChannelRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection, MsgType: commonpb.MsgType_DescribeCollection,
MsgID: -1, // todo MsgID: -1, // todo
Timestamp: 0, // todo Timestamp: 0, // todo
SourceID: Params.NodeID, SourceID: Params.NodeID,

View File

@ -22,16 +22,16 @@ func newDDHandler(meta *meta, allocator segmentAllocatorInterface) *ddHandler {
func (handler *ddHandler) HandleDDMsg(msg msgstream.TsMsg) error { func (handler *ddHandler) HandleDDMsg(msg msgstream.TsMsg) error {
switch msg.Type() { switch msg.Type() {
case commonpb.MsgType_kCreateCollection: case commonpb.MsgType_CreateCollection:
realMsg := msg.(*msgstream.CreateCollectionMsg) realMsg := msg.(*msgstream.CreateCollectionMsg)
return handler.handleCreateCollection(realMsg) return handler.handleCreateCollection(realMsg)
case commonpb.MsgType_kDropCollection: case commonpb.MsgType_DropCollection:
realMsg := msg.(*msgstream.DropCollectionMsg) realMsg := msg.(*msgstream.DropCollectionMsg)
return handler.handleDropCollection(realMsg) return handler.handleDropCollection(realMsg)
case commonpb.MsgType_kCreatePartition: case commonpb.MsgType_CreatePartition:
realMsg := msg.(*msgstream.CreatePartitionMsg) realMsg := msg.(*msgstream.CreatePartitionMsg)
return handler.handleCreatePartition(realMsg) return handler.handleCreatePartition(realMsg)
case commonpb.MsgType_kDropPartition: case commonpb.MsgType_DropPartition:
realMsg := msg.(*msgstream.DropPartitionMsg) realMsg := msg.(*msgstream.DropPartitionMsg)
return handler.handleDropPartition(realMsg) return handler.handleDropPartition(realMsg)
default: default:

View File

@ -204,7 +204,7 @@ func (s *Server) loadMetaFromMaster() error {
} }
collections, err := s.masterClient.ShowCollections(ctx, &milvuspb.ShowCollectionRequest{ collections, err := s.masterClient.ShowCollections(ctx, &milvuspb.ShowCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowCollections, MsgType: commonpb.MsgType_ShowCollections,
MsgID: -1, // todo add msg id MsgID: -1, // todo add msg id
Timestamp: 0, // todo Timestamp: 0, // todo
SourceID: Params.NodeID, SourceID: Params.NodeID,
@ -217,7 +217,7 @@ func (s *Server) loadMetaFromMaster() error {
for _, collectionName := range collections.CollectionNames { for _, collectionName := range collections.CollectionNames {
collection, err := s.masterClient.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{ collection, err := s.masterClient.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection, MsgType: commonpb.MsgType_DescribeCollection,
MsgID: -1, // todo MsgID: -1, // todo
Timestamp: 0, // todo Timestamp: 0, // todo
SourceID: Params.NodeID, SourceID: Params.NodeID,
@ -231,7 +231,7 @@ func (s *Server) loadMetaFromMaster() error {
} }
partitions, err := s.masterClient.ShowPartitions(ctx, &milvuspb.ShowPartitionRequest{ partitions, err := s.masterClient.ShowPartitions(ctx, &milvuspb.ShowPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowPartitions, MsgType: commonpb.MsgType_ShowPartitions,
MsgID: -1, // todo MsgID: -1, // todo
Timestamp: 0, // todo Timestamp: 0, // todo
SourceID: Params.NodeID, SourceID: Params.NodeID,
@ -338,7 +338,7 @@ func (s *Server) startSegmentFlushChannel(ctx context.Context) {
} }
msgPack, _ := flushStream.Consume() msgPack, _ := flushStream.Consume()
for _, msg := range msgPack.Msgs { for _, msg := range msgPack.Msgs {
if msg.Type() != commonpb.MsgType_kSegmentFlushDone { if msg.Type() != commonpb.MsgType_SegmentFlushDone {
continue continue
} }
realMsg := msg.(*msgstream.FlushCompletedMsg) realMsg := msg.(*msgstream.FlushCompletedMsg)
@ -576,7 +576,7 @@ func (s *Server) loadCollectionFromMaster(collectionID int64) error {
ctx := context.TODO() ctx := context.TODO()
resp, err := s.masterClient.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{ resp, err := s.masterClient.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection, MsgType: commonpb.MsgType_DescribeCollection,
SourceID: Params.NodeID, SourceID: Params.NodeID,
}, },
DbName: "", DbName: "",
@ -613,7 +613,7 @@ func (s *Server) openNewSegment(collectionID UniqueID, partitionID UniqueID, cha
}, },
SegmentMsg: datapb.SegmentMsg{ SegmentMsg: datapb.SegmentMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSegmentInfo, MsgType: commonpb.MsgType_SegmentInfo,
MsgID: 0, MsgID: 0,
Timestamp: 0, Timestamp: 0,
SourceID: Params.NodeID, SourceID: Params.NodeID,

View File

@ -98,7 +98,7 @@ func (watcher *dataNodeTimeTickWatcher) handleTimeTickMsg(msg *msgstream.TimeTic
} }
watcher.cluster.FlushSegment(&datapb.FlushSegRequest{ watcher.cluster.FlushSegment(&datapb.FlushSegRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kFlush, MsgType: commonpb.MsgType_Flush,
MsgID: -1, // todo add msg id MsgID: -1, // todo add msg id
Timestamp: 0, // todo Timestamp: 0, // todo
SourceID: Params.NodeID, SourceID: Params.NodeID,

View File

@ -84,7 +84,7 @@ func TestDataNodeTTWatcher(t *testing.T) {
}, },
TimeTickMsg: internalpb2.TimeTickMsg{ TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
Timestamp: ts, Timestamp: ts,
}, },
}, },

View File

@ -186,7 +186,7 @@ func TestGrpcService(t *testing.T) {
req := &milvuspb.CreateCollectionRequest{ req := &milvuspb.CreateCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreateCollection, MsgType: commonpb.MsgType_CreateCollection,
MsgID: 100, MsgID: 100,
Timestamp: 100, Timestamp: 100,
SourceID: 100, SourceID: 100,
@ -201,7 +201,7 @@ func TestGrpcService(t *testing.T) {
assert.Equal(t, len(createCollectionArray), 1) assert.Equal(t, len(createCollectionArray), 1)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_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].Base.MsgType, commonpb.MsgType_CreateCollection)
assert.Equal(t, createCollectionArray[0].CollectionName, "testColl") assert.Equal(t, createCollectionArray[0].CollectionName, "testColl")
req.Base.MsgID = 101 req.Base.MsgID = 101
@ -230,7 +230,7 @@ func TestGrpcService(t *testing.T) {
assert.Nil(t, err) assert.Nil(t, err)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS) assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_SUCCESS)
assert.Equal(t, len(createCollectionArray), 2) assert.Equal(t, len(createCollectionArray), 2)
assert.Equal(t, createCollectionArray[1].Base.MsgType, commonpb.MsgType_kCreateCollection) assert.Equal(t, createCollectionArray[1].Base.MsgType, commonpb.MsgType_CreateCollection)
assert.Equal(t, createCollectionArray[1].CollectionName, "testColl-again") assert.Equal(t, createCollectionArray[1].CollectionName, "testColl-again")
//time stamp go back //time stamp go back
@ -253,7 +253,7 @@ func TestGrpcService(t *testing.T) {
t.Run("has collection", func(t *testing.T) { t.Run("has collection", func(t *testing.T) {
req := &milvuspb.HasCollectionRequest{ req := &milvuspb.HasCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kHasCollection, MsgType: commonpb.MsgType_HasCollection,
MsgID: 110, MsgID: 110,
Timestamp: 110, Timestamp: 110,
SourceID: 110, SourceID: 110,
@ -268,7 +268,7 @@ func TestGrpcService(t *testing.T) {
req = &milvuspb.HasCollectionRequest{ req = &milvuspb.HasCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kHasCollection, MsgType: commonpb.MsgType_HasCollection,
MsgID: 111, MsgID: 111,
Timestamp: 111, Timestamp: 111,
SourceID: 111, SourceID: 111,
@ -284,7 +284,7 @@ func TestGrpcService(t *testing.T) {
// test time stamp go back // test time stamp go back
req = &milvuspb.HasCollectionRequest{ req = &milvuspb.HasCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kHasCollection, MsgType: commonpb.MsgType_HasCollection,
MsgID: 111, MsgID: 111,
Timestamp: 111, Timestamp: 111,
SourceID: 111, SourceID: 111,
@ -303,7 +303,7 @@ func TestGrpcService(t *testing.T) {
assert.Nil(t, err) assert.Nil(t, err)
req := &milvuspb.DescribeCollectionRequest{ req := &milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection, MsgType: commonpb.MsgType_DescribeCollection,
MsgID: 120, MsgID: 120,
Timestamp: 120, Timestamp: 120,
SourceID: 120, SourceID: 120,
@ -321,7 +321,7 @@ func TestGrpcService(t *testing.T) {
t.Run("show collection", func(t *testing.T) { t.Run("show collection", func(t *testing.T) {
req := &milvuspb.ShowCollectionRequest{ req := &milvuspb.ShowCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowCollections, MsgType: commonpb.MsgType_ShowCollections,
MsgID: 130, MsgID: 130,
Timestamp: 130, Timestamp: 130,
SourceID: 130, SourceID: 130,
@ -338,7 +338,7 @@ func TestGrpcService(t *testing.T) {
t.Run("create partition", func(t *testing.T) { t.Run("create partition", func(t *testing.T) {
req := &milvuspb.CreatePartitionRequest{ req := &milvuspb.CreatePartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreatePartition, MsgType: commonpb.MsgType_CreatePartition,
MsgID: 140, MsgID: 140,
Timestamp: 140, Timestamp: 140,
SourceID: 140, SourceID: 140,
@ -362,7 +362,7 @@ func TestGrpcService(t *testing.T) {
t.Run("has partition", func(t *testing.T) { t.Run("has partition", func(t *testing.T) {
req := &milvuspb.HasPartitionRequest{ req := &milvuspb.HasPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kHasPartition, MsgType: commonpb.MsgType_HasPartition,
MsgID: 150, MsgID: 150,
Timestamp: 150, Timestamp: 150,
SourceID: 150, SourceID: 150,
@ -382,7 +382,7 @@ func TestGrpcService(t *testing.T) {
assert.Nil(t, err) assert.Nil(t, err)
req := &milvuspb.ShowPartitionRequest{ req := &milvuspb.ShowPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowPartitions, MsgType: commonpb.MsgType_ShowPartitions,
MsgID: 160, MsgID: 160,
Timestamp: 160, Timestamp: 160,
SourceID: 160, SourceID: 160,
@ -418,7 +418,7 @@ func TestGrpcService(t *testing.T) {
req := &milvuspb.ShowSegmentRequest{ req := &milvuspb.ShowSegmentRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowSegment, MsgType: commonpb.MsgType_ShowSegments,
MsgID: 170, MsgID: 170,
Timestamp: 170, Timestamp: 170,
SourceID: 170, SourceID: 170,
@ -436,7 +436,7 @@ func TestGrpcService(t *testing.T) {
t.Run("create index", func(t *testing.T) { t.Run("create index", func(t *testing.T) {
req := &milvuspb.CreateIndexRequest{ req := &milvuspb.CreateIndexRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreateIndex, MsgType: commonpb.MsgType_CreateIndex,
MsgID: 180, MsgID: 180,
Timestamp: 180, Timestamp: 180,
SourceID: 180, SourceID: 180,
@ -478,7 +478,7 @@ func TestGrpcService(t *testing.T) {
req := &milvuspb.DescribeSegmentRequest{ req := &milvuspb.DescribeSegmentRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeSegment, MsgType: commonpb.MsgType_DescribeSegment,
MsgID: 190, MsgID: 190,
Timestamp: 190, Timestamp: 190,
SourceID: 190, SourceID: 190,
@ -495,7 +495,7 @@ func TestGrpcService(t *testing.T) {
t.Run("describe index", func(t *testing.T) { t.Run("describe index", func(t *testing.T) {
req := &milvuspb.DescribeIndexRequest{ req := &milvuspb.DescribeIndexRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeIndex, MsgType: commonpb.MsgType_DescribeIndex,
MsgID: 200, MsgID: 200,
Timestamp: 200, Timestamp: 200,
SourceID: 200, SourceID: 200,
@ -534,7 +534,7 @@ func TestGrpcService(t *testing.T) {
req := &milvuspb.DescribeIndexRequest{ req := &milvuspb.DescribeIndexRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeIndex, MsgType: commonpb.MsgType_DescribeIndex,
MsgID: 210, MsgID: 210,
Timestamp: 210, Timestamp: 210,
SourceID: 210, SourceID: 210,
@ -555,7 +555,7 @@ func TestGrpcService(t *testing.T) {
t.Run("drop index", func(t *testing.T) { t.Run("drop index", func(t *testing.T) {
req := &milvuspb.DropIndexRequest{ req := &milvuspb.DropIndexRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropIndex, MsgType: commonpb.MsgType_DropIndex,
MsgID: 215, MsgID: 215,
Timestamp: 215, Timestamp: 215,
SourceID: 215, SourceID: 215,
@ -582,7 +582,7 @@ func TestGrpcService(t *testing.T) {
t.Run("drop partition", func(t *testing.T) { t.Run("drop partition", func(t *testing.T) {
req := &milvuspb.DropPartitionRequest{ req := &milvuspb.DropPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropPartition, MsgType: commonpb.MsgType_DropPartition,
MsgID: 220, MsgID: 220,
Timestamp: 220, Timestamp: 220,
SourceID: 220, SourceID: 220,
@ -605,7 +605,7 @@ func TestGrpcService(t *testing.T) {
t.Run("drop collection", func(t *testing.T) { t.Run("drop collection", func(t *testing.T) {
req := &milvuspb.DropCollectionRequest{ req := &milvuspb.DropCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropCollection, MsgType: commonpb.MsgType_DropCollection,
MsgID: 230, MsgID: 230,
Timestamp: 230, Timestamp: 230,
SourceID: 230, SourceID: 230,
@ -618,14 +618,14 @@ func TestGrpcService(t *testing.T) {
assert.Nil(t, err) assert.Nil(t, err)
assert.Equal(t, len(dropCollectionArray), 1) assert.Equal(t, len(dropCollectionArray), 1)
assert.Equal(t, status.ErrorCode, commonpb.ErrorCode_ERROR_CODE_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].Base.MsgType, commonpb.MsgType_DropCollection)
assert.Equal(t, dropCollectionArray[0].CollectionName, "testColl") assert.Equal(t, dropCollectionArray[0].CollectionName, "testColl")
assert.Equal(t, len(collectionMetaCache), 1) assert.Equal(t, len(collectionMetaCache), 1)
assert.Equal(t, collectionMetaCache[0], "testColl") assert.Equal(t, collectionMetaCache[0], "testColl")
req = &milvuspb.DropCollectionRequest{ req = &milvuspb.DropCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropCollection, MsgType: commonpb.MsgType_DropCollection,
MsgID: 231, MsgID: 231,
Timestamp: 231, Timestamp: 231,
SourceID: 231, SourceID: 231,

View File

@ -323,11 +323,16 @@ func (c *Core) startSegmentFlushCompletedLoop() {
if !ok { if !ok {
log.Debug("data node segment flush completed chan has colsed, exit loop") log.Debug("data node segment flush completed chan has colsed, exit loop")
} }
log.Debug("flush segment", zap.Int64("id", seg))
coll, err := c.MetaTable.GetCollectionBySegmentID(seg) coll, err := c.MetaTable.GetCollectionBySegmentID(seg)
if err != nil { if err != nil {
log.Warn("GetCollectionBySegmentID", zap.String("error", err.Error())) log.Warn("GetCollectionBySegmentID error", zap.Error(err))
break break
} }
err = c.MetaTable.AddFlushedSegment(seg)
if err != nil {
log.Warn("AddFlushedSegment error", zap.Error(err))
}
for _, f := range coll.FieldIndexes { for _, f := range coll.FieldIndexes {
idxInfo, err := c.MetaTable.GetIndexByID(f.IndexID) idxInfo, err := c.MetaTable.GetIndexByID(f.IndexID)
if err != nil { if err != nil {
@ -343,7 +348,7 @@ func (c *Core) startSegmentFlushCompletedLoop() {
indexName: idxInfo.IndexName, indexName: idxInfo.IndexName,
indexID: idxInfo.IndexID, indexID: idxInfo.IndexID,
fieldSchema: fieldSch, fieldSchema: fieldSch,
indexParams: nil, indexParams: idxInfo.IndexParams,
} }
c.indexTaskQueue <- t c.indexTaskQueue <- t
} }
@ -428,7 +433,7 @@ func (c *Core) setMsgStreams() error {
} }
timeTickResult := internalpb2.TimeTickMsg{ timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, MsgID: 0,
Timestamp: t, Timestamp: t,
SourceID: int64(Params.NodeID), SourceID: int64(Params.NodeID),
@ -725,7 +730,7 @@ func (c *Core) SetQueryService(ctx context.Context, s types.QueryService) error
c.ReleaseCollection = func(ts typeutil.Timestamp, dbID typeutil.UniqueID, collectionID typeutil.UniqueID) error { c.ReleaseCollection = func(ts typeutil.Timestamp, dbID typeutil.UniqueID, collectionID typeutil.UniqueID) error {
req := &querypb.ReleaseCollectionRequest{ req := &querypb.ReleaseCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kReleaseCollection, MsgType: commonpb.MsgType_ReleaseCollection,
MsgID: 0, //TODO, msg ID MsgID: 0, //TODO, msg ID
Timestamp: ts, Timestamp: ts,
SourceID: int64(Params.NodeID), SourceID: int64(Params.NodeID),

View File

@ -262,7 +262,7 @@ func TestMasterService(t *testing.T) {
} }
timeTickResult := internalpb2.TimeTickMsg{ timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, MsgID: 0,
Timestamp: timeTick, Timestamp: timeTick,
SourceID: 0, SourceID: 0,
@ -318,7 +318,7 @@ func TestMasterService(t *testing.T) {
req := &milvuspb.CreateCollectionRequest{ req := &milvuspb.CreateCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreateCollection, MsgType: commonpb.MsgType_CreateCollection,
MsgID: 100, MsgID: 100,
Timestamp: 100, Timestamp: 100,
SourceID: 100, SourceID: 100,
@ -394,7 +394,7 @@ func TestMasterService(t *testing.T) {
t.Run("has collection", func(t *testing.T) { t.Run("has collection", func(t *testing.T) {
req := &milvuspb.HasCollectionRequest{ req := &milvuspb.HasCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kHasCollection, MsgType: commonpb.MsgType_HasCollection,
MsgID: 110, MsgID: 110,
Timestamp: 110, Timestamp: 110,
SourceID: 110, SourceID: 110,
@ -409,7 +409,7 @@ func TestMasterService(t *testing.T) {
req = &milvuspb.HasCollectionRequest{ req = &milvuspb.HasCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kHasCollection, MsgType: commonpb.MsgType_HasCollection,
MsgID: 111, MsgID: 111,
Timestamp: 111, Timestamp: 111,
SourceID: 111, SourceID: 111,
@ -425,7 +425,7 @@ func TestMasterService(t *testing.T) {
// test time stamp go back // test time stamp go back
req = &milvuspb.HasCollectionRequest{ req = &milvuspb.HasCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kHasCollection, MsgType: commonpb.MsgType_HasCollection,
MsgID: 111, MsgID: 111,
Timestamp: 111, Timestamp: 111,
SourceID: 111, SourceID: 111,
@ -444,7 +444,7 @@ func TestMasterService(t *testing.T) {
assert.Nil(t, err) assert.Nil(t, err)
req := &milvuspb.DescribeCollectionRequest{ req := &milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection, MsgType: commonpb.MsgType_DescribeCollection,
MsgID: 120, MsgID: 120,
Timestamp: 120, Timestamp: 120,
SourceID: 120, SourceID: 120,
@ -463,7 +463,7 @@ func TestMasterService(t *testing.T) {
t.Run("show collection", func(t *testing.T) { t.Run("show collection", func(t *testing.T) {
req := &milvuspb.ShowCollectionRequest{ req := &milvuspb.ShowCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowCollections, MsgType: commonpb.MsgType_ShowCollections,
MsgID: 130, MsgID: 130,
Timestamp: 130, Timestamp: 130,
SourceID: 130, SourceID: 130,
@ -480,7 +480,7 @@ func TestMasterService(t *testing.T) {
t.Run("create partition", func(t *testing.T) { t.Run("create partition", func(t *testing.T) {
req := &milvuspb.CreatePartitionRequest{ req := &milvuspb.CreatePartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreatePartition, MsgType: commonpb.MsgType_CreatePartition,
MsgID: 140, MsgID: 140,
Timestamp: 140, Timestamp: 140,
SourceID: 140, SourceID: 140,
@ -512,7 +512,7 @@ func TestMasterService(t *testing.T) {
t.Run("has partition", func(t *testing.T) { t.Run("has partition", func(t *testing.T) {
req := &milvuspb.HasPartitionRequest{ req := &milvuspb.HasPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kHasPartition, MsgType: commonpb.MsgType_HasPartition,
MsgID: 150, MsgID: 150,
Timestamp: 150, Timestamp: 150,
SourceID: 150, SourceID: 150,
@ -532,7 +532,7 @@ func TestMasterService(t *testing.T) {
assert.Nil(t, err) assert.Nil(t, err)
req := &milvuspb.ShowPartitionRequest{ req := &milvuspb.ShowPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowPartitions, MsgType: commonpb.MsgType_ShowCollections,
MsgID: 160, MsgID: 160,
Timestamp: 160, Timestamp: 160,
SourceID: 160, SourceID: 160,
@ -572,7 +572,7 @@ func TestMasterService(t *testing.T) {
BaseMsg: baseMsg, BaseMsg: baseMsg,
SegmentMsg: datapb.SegmentMsg{ SegmentMsg: datapb.SegmentMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSegmentInfo, MsgType: commonpb.MsgType_SegmentInfo,
MsgID: 0, MsgID: 0,
Timestamp: 0, Timestamp: 0,
SourceID: 0, SourceID: 0,
@ -591,7 +591,7 @@ func TestMasterService(t *testing.T) {
req := &milvuspb.ShowSegmentRequest{ req := &milvuspb.ShowSegmentRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowSegment, MsgType: commonpb.MsgType_ShowSegments,
MsgID: 170, MsgID: 170,
Timestamp: 170, Timestamp: 170,
SourceID: 170, SourceID: 170,
@ -609,7 +609,7 @@ func TestMasterService(t *testing.T) {
t.Run("create index", func(t *testing.T) { t.Run("create index", func(t *testing.T) {
req := &milvuspb.CreateIndexRequest{ req := &milvuspb.CreateIndexRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreateIndex, MsgType: commonpb.MsgType_CreateIndex,
MsgID: 180, MsgID: 180,
Timestamp: 180, Timestamp: 180,
SourceID: 180, SourceID: 180,
@ -654,7 +654,7 @@ func TestMasterService(t *testing.T) {
req := &milvuspb.DescribeSegmentRequest{ req := &milvuspb.DescribeSegmentRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeSegment, MsgType: commonpb.MsgType_DescribeSegment,
MsgID: 190, MsgID: 190,
Timestamp: 190, Timestamp: 190,
SourceID: 190, SourceID: 190,
@ -671,7 +671,7 @@ func TestMasterService(t *testing.T) {
t.Run("describe index", func(t *testing.T) { t.Run("describe index", func(t *testing.T) {
req := &milvuspb.DescribeIndexRequest{ req := &milvuspb.DescribeIndexRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeIndex, MsgType: commonpb.MsgType_DescribeIndex,
MsgID: 200, MsgID: 200,
Timestamp: 200, Timestamp: 200,
SourceID: 200, SourceID: 200,
@ -691,7 +691,7 @@ func TestMasterService(t *testing.T) {
t.Run("describe index not exist", func(t *testing.T) { t.Run("describe index not exist", func(t *testing.T) {
req := &milvuspb.DescribeIndexRequest{ req := &milvuspb.DescribeIndexRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeIndex, MsgType: commonpb.MsgType_DescribeIndex,
MsgID: 200, MsgID: 200,
Timestamp: 200, Timestamp: 200,
SourceID: 200, SourceID: 200,
@ -731,7 +731,7 @@ func TestMasterService(t *testing.T) {
BaseMsg: baseMsg, BaseMsg: baseMsg,
SegmentMsg: datapb.SegmentMsg{ SegmentMsg: datapb.SegmentMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSegmentInfo, MsgType: commonpb.MsgType_SegmentInfo,
MsgID: 0, MsgID: 0,
Timestamp: 0, Timestamp: 0,
SourceID: 0, SourceID: 0,
@ -752,7 +752,7 @@ func TestMasterService(t *testing.T) {
BaseMsg: baseMsg, BaseMsg: baseMsg,
SegmentFlushCompletedMsg: internalpb2.SegmentFlushCompletedMsg{ SegmentFlushCompletedMsg: internalpb2.SegmentFlushCompletedMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSegmentFlushDone, MsgType: commonpb.MsgType_SegmentFlushDone,
MsgID: 0, MsgID: 0,
Timestamp: 0, Timestamp: 0,
SourceID: 0, SourceID: 0,
@ -767,7 +767,7 @@ func TestMasterService(t *testing.T) {
req := &milvuspb.DescribeIndexRequest{ req := &milvuspb.DescribeIndexRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeIndex, MsgType: commonpb.MsgType_DescribeIndex,
MsgID: 210, MsgID: 210,
Timestamp: 210, Timestamp: 210,
SourceID: 210, SourceID: 210,
@ -787,7 +787,7 @@ func TestMasterService(t *testing.T) {
t.Run("drop index", func(t *testing.T) { t.Run("drop index", func(t *testing.T) {
req := &milvuspb.DropIndexRequest{ req := &milvuspb.DropIndexRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropIndex, MsgType: commonpb.MsgType_DropIndex,
MsgID: 215, MsgID: 215,
Timestamp: 215, Timestamp: 215,
SourceID: 215, SourceID: 215,
@ -818,7 +818,7 @@ func TestMasterService(t *testing.T) {
t.Run("drop partition", func(t *testing.T) { t.Run("drop partition", func(t *testing.T) {
req := &milvuspb.DropPartitionRequest{ req := &milvuspb.DropPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropPartition, MsgType: commonpb.MsgType_DropPartition,
MsgID: 220, MsgID: 220,
Timestamp: 220, Timestamp: 220,
SourceID: 220, SourceID: 220,
@ -852,7 +852,7 @@ func TestMasterService(t *testing.T) {
t.Run("drop collection", func(t *testing.T) { t.Run("drop collection", func(t *testing.T) {
req := &milvuspb.DropCollectionRequest{ req := &milvuspb.DropCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropCollection, MsgType: commonpb.MsgType_DropCollection,
MsgID: 230, MsgID: 230,
Timestamp: 230, Timestamp: 230,
SourceID: 230, SourceID: 230,
@ -884,7 +884,7 @@ func TestMasterService(t *testing.T) {
req = &milvuspb.DropCollectionRequest{ req = &milvuspb.DropCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropCollection, MsgType: commonpb.MsgType_DropCollection,
MsgID: 231, MsgID: 231,
Timestamp: 231, Timestamp: 231,
SourceID: 231, SourceID: 231,

View File

@ -42,6 +42,7 @@ type metaTable struct {
indexID2Meta map[typeutil.UniqueID]pb.IndexInfo // collection_id/index_id -> meta indexID2Meta map[typeutil.UniqueID]pb.IndexInfo // collection_id/index_id -> meta
segID2CollID map[typeutil.UniqueID]typeutil.UniqueID // segment id -> collection id segID2CollID map[typeutil.UniqueID]typeutil.UniqueID // segment id -> collection id
segID2PartitionID map[typeutil.UniqueID]typeutil.UniqueID // segment id -> partition id segID2PartitionID map[typeutil.UniqueID]typeutil.UniqueID // segment id -> partition id
flushedSegID map[typeutil.UniqueID]bool // flushed segment id
partitionID2CollID map[typeutil.UniqueID]typeutil.UniqueID // partition id -> collection id partitionID2CollID map[typeutil.UniqueID]typeutil.UniqueID // partition id -> collection id
tenantLock sync.RWMutex tenantLock sync.RWMutex
@ -75,6 +76,7 @@ func (mt *metaTable) reloadFromKV() error {
mt.partitionID2CollID = make(map[typeutil.UniqueID]typeutil.UniqueID) mt.partitionID2CollID = make(map[typeutil.UniqueID]typeutil.UniqueID)
mt.segID2CollID = make(map[typeutil.UniqueID]typeutil.UniqueID) mt.segID2CollID = make(map[typeutil.UniqueID]typeutil.UniqueID)
mt.segID2PartitionID = make(map[typeutil.UniqueID]typeutil.UniqueID) mt.segID2PartitionID = make(map[typeutil.UniqueID]typeutil.UniqueID)
mt.flushedSegID = make(map[typeutil.UniqueID]bool)
_, values, err := mt.client.LoadWithPrefix(TenantMetaPrefix) _, values, err := mt.client.LoadWithPrefix(TenantMetaPrefix)
if err != nil { if err != nil {
@ -141,6 +143,7 @@ func (mt *metaTable) reloadFromKV() error {
for _, segID := range partitionInfo.SegmentIDs { for _, segID := range partitionInfo.SegmentIDs {
mt.segID2CollID[segID] = collID mt.segID2CollID[segID] = collID
mt.segID2PartitionID[segID] = partitionInfo.PartitionID mt.segID2PartitionID[segID] = partitionInfo.PartitionID
mt.flushedSegID[segID] = true
} }
} }
@ -246,6 +249,9 @@ func (mt *metaTable) DeleteCollection(collID typeutil.UniqueID) error {
} }
delete(mt.partitionID2Meta, partID) delete(mt.partitionID2Meta, partID)
for _, segID := range partMeta.SegmentIDs { for _, segID := range partMeta.SegmentIDs {
delete(mt.segID2CollID, segID)
delete(mt.segID2PartitionID, segID)
delete(mt.flushedSegID, segID)
_, ok := mt.segID2IndexMeta[segID] _, ok := mt.segID2IndexMeta[segID]
if !ok { if !ok {
log.Warn("segment id not exist", zap.Int64("segment id", segID)) log.Warn("segment id not exist", zap.Int64("segment id", segID))
@ -447,6 +453,10 @@ func (mt *metaTable) DeletePartition(collID typeutil.UniqueID, partitionName str
mt.collID2Meta[collID] = collMeta mt.collID2Meta[collID] = collMeta
for _, segID := range partMeta.SegmentIDs { for _, segID := range partMeta.SegmentIDs {
delete(mt.segID2CollID, segID)
delete(mt.segID2PartitionID, segID)
delete(mt.flushedSegID, segID)
_, ok := mt.segID2IndexMeta[segID] _, ok := mt.segID2IndexMeta[segID]
if !ok { if !ok {
log.Warn("segment has no index meta", zap.Int64("segment id", segID)) log.Warn("segment has no index meta", zap.Int64("segment id", segID))
@ -574,6 +584,11 @@ func (mt *metaTable) AddIndex(seg *pb.SegmentIndexInfo) error {
_ = mt.reloadFromKV() _ = mt.reloadFromKV()
return err return err
} }
if _, ok := mt.flushedSegID[seg.SegmentID]; !ok {
mt.flushedSegID[seg.SegmentID] = true
}
return nil return nil
} }
@ -658,9 +673,20 @@ func (mt *metaTable) GetSegmentIndexInfoByID(segID typeutil.UniqueID, filedID in
mt.ddLock.RLock() mt.ddLock.RLock()
defer mt.ddLock.RUnlock() defer mt.ddLock.RUnlock()
_, ok := mt.flushedSegID[segID]
if !ok {
return pb.SegmentIndexInfo{}, fmt.Errorf("segment id %d hasn't flused, there is no index meta", segID)
}
segIdxMap, ok := mt.segID2IndexMeta[segID] segIdxMap, ok := mt.segID2IndexMeta[segID]
if !ok { if !ok {
return pb.SegmentIndexInfo{}, fmt.Errorf("segment id %d not has any index", segID) return pb.SegmentIndexInfo{
SegmentID: segID,
FieldID: filedID,
IndexID: 0,
BuildID: 0,
EnableIndex: false,
}, nil
} }
if len(*segIdxMap) == 0 { if len(*segIdxMap) == 0 {
return pb.SegmentIndexInfo{}, fmt.Errorf("segment id %d not has any index", segID) return pb.SegmentIndexInfo{}, fmt.Errorf("segment id %d not has any index", segID)
@ -872,3 +898,15 @@ func (mt *metaTable) GetIndexByID(indexID typeutil.UniqueID) (*pb.IndexInfo, err
} }
return &indexInfo, nil return &indexInfo, nil
} }
func (mt *metaTable) AddFlushedSegment(segID typeutil.UniqueID) error {
mt.ddLock.Lock()
defer mt.ddLock.Unlock()
_, ok := mt.flushedSegID[segID]
if ok {
return fmt.Errorf("segment id = %d exist", segID)
}
mt.flushedSegID[segID] = true
return nil
}

View File

@ -166,7 +166,7 @@ func (t *CreateCollectionReqTask) Execute() error {
ddPart := internalpb2.CreatePartitionRequest{ ddPart := internalpb2.CreatePartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreatePartition, MsgType: commonpb.MsgType_CreatePartition,
MsgID: t.Req.Base.MsgID, //TODO, msg id MsgID: t.Req.Base.MsgID, //TODO, msg id
Timestamp: t.Req.Base.Timestamp + 1, Timestamp: t.Req.Base.Timestamp + 1,
SourceID: t.Req.Base.SourceID, SourceID: t.Req.Base.SourceID,

View File

@ -51,7 +51,7 @@ func (tt *InsertTask) Unmarshal(input MarshalType) (msgstream.TsMsg, error) {
func newRepackFunc(tsMsgs []msgstream.TsMsg, hashKeys [][]int32) (map[int32]*msgstream.MsgPack, error) { func newRepackFunc(tsMsgs []msgstream.TsMsg, hashKeys [][]int32) (map[int32]*msgstream.MsgPack, error) {
result := make(map[int32]*msgstream.MsgPack) result := make(map[int32]*msgstream.MsgPack)
for i, request := range tsMsgs { for i, request := range tsMsgs {
if request.Type() != commonpb.MsgType_kInsert { if request.Type() != commonpb.MsgType_Insert {
return nil, errors.New("msg's must be Insert") return nil, errors.New("msg's must be Insert")
} }
insertRequest := request.(*InsertTask).InsertRequest insertRequest := request.(*InsertTask).InsertRequest
@ -74,7 +74,7 @@ func newRepackFunc(tsMsgs []msgstream.TsMsg, hashKeys [][]int32) (map[int32]*msg
sliceRequest := internalpb2.InsertRequest{ sliceRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: insertRequest.Base.MsgID, MsgID: insertRequest.Base.MsgID,
Timestamp: insertRequest.Timestamps[index], Timestamp: insertRequest.Timestamps[index],
SourceID: insertRequest.Base.SourceID, SourceID: insertRequest.Base.SourceID,
@ -106,7 +106,7 @@ func getInsertTask(reqID msgstream.UniqueID, hashValue uint32) msgstream.TsMsg {
} }
insertRequest := internalpb2.InsertRequest{ insertRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: reqID, MsgID: reqID,
Timestamp: 1, Timestamp: 1,
SourceID: 1, SourceID: 1,
@ -151,7 +151,7 @@ func TestStream_task_Insert(t *testing.T) {
dispatcher := factory.NewUnmarshalDispatcher() dispatcher := factory.NewUnmarshalDispatcher()
outputStream, _ := newPulsarMsgStream(context.Background(), pulsarAddress, 100, 100, dispatcher) outputStream, _ := newPulsarMsgStream(context.Background(), pulsarAddress, 100, 100, dispatcher)
testTask := InsertTask{} testTask := InsertTask{}
dispatcher.AddMsgTemplate(commonpb.MsgType_kInsert, testTask.Unmarshal) dispatcher.AddMsgTemplate(commonpb.MsgType_Insert, testTask.Unmarshal)
outputStream.AsConsumer(consumerChannels, consumerSubName) outputStream.AsConsumer(consumerChannels, consumerSubName)
outputStream.Start() outputStream.Start()

View File

@ -199,7 +199,7 @@ func (ms *PulsarMsgStream) Produce(ctx context.Context, msgPack *MsgPack) error
hashValues := tsMsg.HashKeys() hashValues := tsMsg.HashKeys()
bucketValues := make([]int32, len(hashValues)) bucketValues := make([]int32, len(hashValues))
for index, hashValue := range hashValues { for index, hashValue := range hashValues {
if tsMsg.Type() == commonpb.MsgType_kSearchResult { if tsMsg.Type() == commonpb.MsgType_SearchResult {
searchResult := tsMsg.(*msgstream.SearchResultMsg) searchResult := tsMsg.(*msgstream.SearchResultMsg)
channelID := searchResult.ResultChannelID channelID := searchResult.ResultChannelID
channelIDInt, _ := strconv.ParseInt(channelID, 10, 64) channelIDInt, _ := strconv.ParseInt(channelID, 10, 64)
@ -221,9 +221,9 @@ func (ms *PulsarMsgStream) Produce(ctx context.Context, msgPack *MsgPack) error
} else { } else {
msgType := (tsMsgs[0]).Type() msgType := (tsMsgs[0]).Type()
switch msgType { switch msgType {
case commonpb.MsgType_kInsert: case commonpb.MsgType_Insert:
result, err = util.InsertRepackFunc(tsMsgs, reBucketValues) result, err = util.InsertRepackFunc(tsMsgs, reBucketValues)
case commonpb.MsgType_kDelete: case commonpb.MsgType_Delete:
result, err = util.DeleteRepackFunc(tsMsgs, reBucketValues) result, err = util.DeleteRepackFunc(tsMsgs, reBucketValues)
default: default:
result, err = util.DefaultRepackFunc(tsMsgs, reBucketValues) result, err = util.DefaultRepackFunc(tsMsgs, reBucketValues)
@ -621,7 +621,7 @@ func (ms *PulsarTtMsgStream) bufMsgPackToChannel() {
tempBuffer := make([]TsMsg, 0) tempBuffer := make([]TsMsg, 0)
var timeTickMsg TsMsg var timeTickMsg TsMsg
for _, v := range msgs { for _, v := range msgs {
if v.Type() == commonpb.MsgType_kTimeTick { if v.Type() == commonpb.MsgType_TimeTick {
timeTickMsg = v timeTickMsg = v
continue continue
} }
@ -705,7 +705,7 @@ func (ms *PulsarTtMsgStream) findTimeTick(consumer Consumer,
ms.unsolvedBuf[consumer] = append(ms.unsolvedBuf[consumer], tsMsg) ms.unsolvedBuf[consumer] = append(ms.unsolvedBuf[consumer], tsMsg)
ms.unsolvedMutex.Unlock() ms.unsolvedMutex.Unlock()
if headerMsg.Base.MsgType == commonpb.MsgType_kTimeTick { if headerMsg.Base.MsgType == commonpb.MsgType_TimeTick {
findMapMutex.Lock() findMapMutex.Lock()
eofMsgMap[consumer] = tsMsg.(*TimeTickMsg).Base.Timestamp eofMsgMap[consumer] = tsMsg.(*TimeTickMsg).Base.Timestamp
findMapMutex.Unlock() findMapMutex.Unlock()
@ -767,7 +767,7 @@ func (ms *PulsarTtMsgStream) Seek(mp *internalpb2.MsgPosition) error {
if err != nil { if err != nil {
log.Error("Failed to unmarshal tsMsg", zap.Error(err)) log.Error("Failed to unmarshal tsMsg", zap.Error(err))
} }
if tsMsg.Type() == commonpb.MsgType_kTimeTick { if tsMsg.Type() == commonpb.MsgType_TimeTick {
if tsMsg.BeginTs() >= mp.Timestamp { if tsMsg.BeginTs() >= mp.Timestamp {
ms.unsolvedMutex.Unlock() ms.unsolvedMutex.Unlock()
return nil return nil

View File

@ -48,10 +48,10 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
HashValues: []uint32{hashValue}, HashValues: []uint32{hashValue},
} }
switch msgType { switch msgType {
case commonpb.MsgType_kInsert: case commonpb.MsgType_Insert:
insertRequest := internalpb2.InsertRequest{ insertRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: reqID, MsgID: reqID,
Timestamp: 11, Timestamp: 11,
SourceID: reqID, SourceID: reqID,
@ -69,10 +69,10 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
InsertRequest: insertRequest, InsertRequest: insertRequest,
} }
return insertMsg return insertMsg
case commonpb.MsgType_kDelete: case commonpb.MsgType_Delete:
deleteRequest := internalpb2.DeleteRequest{ deleteRequest := internalpb2.DeleteRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDelete, MsgType: commonpb.MsgType_Delete,
MsgID: reqID, MsgID: reqID,
Timestamp: 11, Timestamp: 11,
SourceID: reqID, SourceID: reqID,
@ -87,10 +87,10 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
DeleteRequest: deleteRequest, DeleteRequest: deleteRequest,
} }
return deleteMsg return deleteMsg
case commonpb.MsgType_kSearch: case commonpb.MsgType_Search:
searchRequest := internalpb2.SearchRequest{ searchRequest := internalpb2.SearchRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearch, MsgType: commonpb.MsgType_Search,
MsgID: reqID, MsgID: reqID,
Timestamp: 11, Timestamp: 11,
SourceID: reqID, SourceID: reqID,
@ -103,10 +103,10 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
SearchRequest: searchRequest, SearchRequest: searchRequest,
} }
return searchMsg return searchMsg
case commonpb.MsgType_kSearchResult: case commonpb.MsgType_SearchResult:
searchResult := internalpb2.SearchResults{ searchResult := internalpb2.SearchResults{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearchResult, MsgType: commonpb.MsgType_SearchResult,
MsgID: reqID, MsgID: reqID,
Timestamp: 1, Timestamp: 1,
SourceID: reqID, SourceID: reqID,
@ -119,10 +119,10 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
SearchResults: searchResult, SearchResults: searchResult,
} }
return searchResultMsg return searchResultMsg
case commonpb.MsgType_kTimeTick: case commonpb.MsgType_TimeTick:
timeTickResult := internalpb2.TimeTickMsg{ timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: reqID, MsgID: reqID,
Timestamp: 1, Timestamp: 1,
SourceID: reqID, SourceID: reqID,
@ -133,10 +133,10 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
TimeTickMsg: timeTickResult, TimeTickMsg: timeTickResult,
} }
return timeTickMsg return timeTickMsg
case commonpb.MsgType_kQueryNodeStats: case commonpb.MsgType_QueryNodeStats:
queryNodeSegStats := internalpb2.QueryNodeStats{ queryNodeSegStats := internalpb2.QueryNodeStats{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kQueryNodeStats, MsgType: commonpb.MsgType_QueryNodeStats,
SourceID: reqID, SourceID: reqID,
}, },
} }
@ -157,7 +157,7 @@ func getTimeTickMsg(reqID UniqueID, hashValue uint32, time uint64) TsMsg {
} }
timeTickResult := internalpb2.TimeTickMsg{ timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: reqID, MsgID: reqID,
Timestamp: time, Timestamp: time,
SourceID: reqID, SourceID: reqID,
@ -246,8 +246,8 @@ func TestStream_PulsarMsgStream_Insert(t *testing.T) {
consumerSubName := funcutil.RandomString(8) consumerSubName := funcutil.RandomString(8)
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kInsert, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Insert, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kInsert, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Insert, 3, 3))
inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName) inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName)
err := inputStream.Produce(ctx, &msgPack) err := inputStream.Produce(ctx, &msgPack)
@ -269,8 +269,8 @@ func TestStream_PulsarMsgStream_Delete(t *testing.T) {
consumerChannels := []string{c} consumerChannels := []string{c}
consumerSubName := funcutil.RandomString(8) consumerSubName := funcutil.RandomString(8)
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kDelete, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Delete, 1, 1))
//msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kDelete, 3, 3)) //msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Delete, 3, 3))
inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName) inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName)
err := inputStream.Produce(ctx, &msgPack) err := inputStream.Produce(ctx, &msgPack)
@ -291,8 +291,8 @@ func TestStream_PulsarMsgStream_Search(t *testing.T) {
consumerSubName := funcutil.RandomString(8) consumerSubName := funcutil.RandomString(8)
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kSearch, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Search, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kSearch, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Search, 3, 3))
inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName) inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName)
err := inputStream.Produce(ctx, &msgPack) err := inputStream.Produce(ctx, &msgPack)
@ -312,8 +312,8 @@ func TestStream_PulsarMsgStream_SearchResult(t *testing.T) {
consumerChannels := []string{c} consumerChannels := []string{c}
consumerSubName := funcutil.RandomString(8) consumerSubName := funcutil.RandomString(8)
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kSearchResult, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_SearchResult, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kSearchResult, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_SearchResult, 3, 3))
inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName) inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName)
err := inputStream.Produce(ctx, &msgPack) err := inputStream.Produce(ctx, &msgPack)
@ -333,8 +333,8 @@ func TestStream_PulsarMsgStream_TimeTick(t *testing.T) {
consumerChannels := []string{c} consumerChannels := []string{c}
consumerSubName := funcutil.RandomString(8) consumerSubName := funcutil.RandomString(8)
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kTimeTick, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_TimeTick, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kTimeTick, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_TimeTick, 3, 3))
inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName) inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName)
err := inputStream.Produce(ctx, &msgPack) err := inputStream.Produce(ctx, &msgPack)
@ -355,8 +355,8 @@ func TestStream_PulsarMsgStream_BroadCast(t *testing.T) {
consumerSubName := funcutil.RandomString(8) consumerSubName := funcutil.RandomString(8)
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kTimeTick, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_TimeTick, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kTimeTick, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_TimeTick, 3, 3))
inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName) inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName)
err := inputStream.Broadcast(ctx, &msgPack) err := inputStream.Broadcast(ctx, &msgPack)
@ -377,8 +377,8 @@ func TestStream_PulsarMsgStream_RepackFunc(t *testing.T) {
consumerSubName := funcutil.RandomString(8) consumerSubName := funcutil.RandomString(8)
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kInsert, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Insert, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kInsert, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Insert, 3, 3))
inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName, repackFunc) inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName, repackFunc)
err := inputStream.Produce(ctx, &msgPack) err := inputStream.Produce(ctx, &msgPack)
@ -405,7 +405,7 @@ func TestStream_PulsarMsgStream_InsertRepackFunc(t *testing.T) {
insertRequest := internalpb2.InsertRequest{ insertRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: 1, MsgID: 1,
Timestamp: 1, Timestamp: 1,
SourceID: 1, SourceID: 1,
@ -461,7 +461,7 @@ func TestStream_PulsarMsgStream_DeleteRepackFunc(t *testing.T) {
deleteRequest := internalpb2.DeleteRequest{ deleteRequest := internalpb2.DeleteRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDelete, MsgType: commonpb.MsgType_Delete,
MsgID: 1, MsgID: 1,
Timestamp: 1, Timestamp: 1,
SourceID: 1, SourceID: 1,
@ -507,10 +507,10 @@ func TestStream_PulsarMsgStream_DefaultRepackFunc(t *testing.T) {
consumerSubName := funcutil.RandomString(8) consumerSubName := funcutil.RandomString(8)
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kTimeTick, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_TimeTick, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kSearch, 2, 2)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Search, 2, 2))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kSearchResult, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_SearchResult, 3, 3))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kQueryNodeStats, 4, 4)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_QueryNodeStats, 4, 4))
factory := msgstream.ProtoUDFactory{} factory := msgstream.ProtoUDFactory{}
inputStream, _ := newPulsarMsgStream(context.Background(), pulsarAddress, 100, 100, factory.NewUnmarshalDispatcher()) inputStream, _ := newPulsarMsgStream(context.Background(), pulsarAddress, 100, 100, factory.NewUnmarshalDispatcher())
@ -542,8 +542,8 @@ func TestStream_PulsarTtMsgStream_Insert(t *testing.T) {
msgPack0.Msgs = append(msgPack0.Msgs, getTimeTickMsg(0, 0, 0)) msgPack0.Msgs = append(msgPack0.Msgs, getTimeTickMsg(0, 0, 0))
msgPack1 := msgstream.MsgPack{} msgPack1 := msgstream.MsgPack{}
msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_kInsert, 1, 1)) msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_Insert, 1, 1))
msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_kInsert, 3, 3)) msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_Insert, 3, 3))
msgPack2 := msgstream.MsgPack{} msgPack2 := msgstream.MsgPack{}
msgPack2.Msgs = append(msgPack2.Msgs, getTimeTickMsg(5, 5, 5)) msgPack2.Msgs = append(msgPack2.Msgs, getTimeTickMsg(5, 5, 5))
@ -578,15 +578,15 @@ func TestStream_PulsarTtMsgStream_Seek(t *testing.T) {
msgPack0.Msgs = append(msgPack0.Msgs, getTimeTickMsg(0, 0, 0)) msgPack0.Msgs = append(msgPack0.Msgs, getTimeTickMsg(0, 0, 0))
msgPack1 := MsgPack{} msgPack1 := MsgPack{}
msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_kInsert, 1, 1)) msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_Insert, 1, 1))
msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_kInsert, 19, 19)) msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_Insert, 19, 19))
msgPack2 := MsgPack{} msgPack2 := MsgPack{}
msgPack2.Msgs = append(msgPack2.Msgs, getTimeTickMsg(5, 5, 5)) msgPack2.Msgs = append(msgPack2.Msgs, getTimeTickMsg(5, 5, 5))
msgPack3 := MsgPack{} msgPack3 := MsgPack{}
msgPack3.Msgs = append(msgPack3.Msgs, getTsMsg(commonpb.MsgType_kInsert, 14, 14)) msgPack3.Msgs = append(msgPack3.Msgs, getTsMsg(commonpb.MsgType_Insert, 14, 14))
msgPack3.Msgs = append(msgPack3.Msgs, getTsMsg(commonpb.MsgType_kInsert, 9, 9)) msgPack3.Msgs = append(msgPack3.Msgs, getTsMsg(commonpb.MsgType_Insert, 9, 9))
msgPack4 := MsgPack{} msgPack4 := MsgPack{}
msgPack4.Msgs = append(msgPack4.Msgs, getTimeTickMsg(11, 11, 11)) msgPack4.Msgs = append(msgPack4.Msgs, getTimeTickMsg(11, 11, 11))
@ -633,8 +633,8 @@ func TestStream_PulsarTtMsgStream_UnMarshalHeader(t *testing.T) {
msgPack0.Msgs = append(msgPack0.Msgs, getTimeTickMsg(0, 0, 0)) msgPack0.Msgs = append(msgPack0.Msgs, getTimeTickMsg(0, 0, 0))
msgPack1 := msgstream.MsgPack{} msgPack1 := msgstream.MsgPack{}
msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_kInsert, 1, 1)) msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_Insert, 1, 1))
msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_kInsert, 3, 3)) msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_Insert, 3, 3))
msgPack2 := msgstream.MsgPack{} msgPack2 := msgstream.MsgPack{}
msgPack2.Msgs = append(msgPack2.Msgs, getTimeTickMsg(5, 5, 5)) msgPack2.Msgs = append(msgPack2.Msgs, getTimeTickMsg(5, 5, 5))

View File

@ -140,7 +140,7 @@ func (ms *RmqMsgStream) Produce(ctx context.Context, pack *msgstream.MsgPack) er
hashValues := tsMsg.HashKeys() hashValues := tsMsg.HashKeys()
bucketValues := make([]int32, len(hashValues)) bucketValues := make([]int32, len(hashValues))
for index, hashValue := range hashValues { for index, hashValue := range hashValues {
if tsMsg.Type() == commonpb.MsgType_kSearchResult { if tsMsg.Type() == commonpb.MsgType_SearchResult {
searchResult := tsMsg.(*msgstream.SearchResultMsg) searchResult := tsMsg.(*msgstream.SearchResultMsg)
channelID := searchResult.ResultChannelID channelID := searchResult.ResultChannelID
channelIDInt, _ := strconv.ParseInt(channelID, 10, 64) channelIDInt, _ := strconv.ParseInt(channelID, 10, 64)
@ -162,9 +162,9 @@ func (ms *RmqMsgStream) Produce(ctx context.Context, pack *msgstream.MsgPack) er
} else { } else {
msgType := (tsMsgs[0]).Type() msgType := (tsMsgs[0]).Type()
switch msgType { switch msgType {
case commonpb.MsgType_kInsert: case commonpb.MsgType_Insert:
result, err = util.InsertRepackFunc(tsMsgs, reBucketValues) result, err = util.InsertRepackFunc(tsMsgs, reBucketValues)
case commonpb.MsgType_kDelete: case commonpb.MsgType_Delete:
result, err = util.DeleteRepackFunc(tsMsgs, reBucketValues) result, err = util.DeleteRepackFunc(tsMsgs, reBucketValues)
default: default:
result, err = util.DefaultRepackFunc(tsMsgs, reBucketValues) result, err = util.DefaultRepackFunc(tsMsgs, reBucketValues)
@ -389,7 +389,7 @@ func (ms *RmqTtMsgStream) bufMsgPackToChannel() {
tempBuffer := make([]TsMsg, 0) tempBuffer := make([]TsMsg, 0)
var timeTickMsg TsMsg var timeTickMsg TsMsg
for _, v := range msgs { for _, v := range msgs {
if v.Type() == commonpb.MsgType_kTimeTick { if v.Type() == commonpb.MsgType_TimeTick {
timeTickMsg = v timeTickMsg = v
continue continue
} }
@ -475,7 +475,7 @@ func (ms *RmqTtMsgStream) findTimeTick(consumer rocksmq.Consumer,
ms.unsolvedBuf[consumer] = append(ms.unsolvedBuf[consumer], tsMsg) ms.unsolvedBuf[consumer] = append(ms.unsolvedBuf[consumer], tsMsg)
ms.unsolvedMutex.Unlock() ms.unsolvedMutex.Unlock()
if headerMsg.Base.MsgType == commonpb.MsgType_kTimeTick { if headerMsg.Base.MsgType == commonpb.MsgType_TimeTick {
findMapMutex.Lock() findMapMutex.Lock()
eofMsgMap[consumer] = tsMsg.(*TimeTickMsg).Base.Timestamp eofMsgMap[consumer] = tsMsg.(*TimeTickMsg).Base.Timestamp
findMapMutex.Unlock() findMapMutex.Unlock()
@ -537,7 +537,7 @@ func (ms *RmqTtMsgStream) Seek(mp *msgstream.MsgPosition) error {
return err return err
} }
if headerMsg.Base.MsgType == commonpb.MsgType_kTimeTick { if headerMsg.Base.MsgType == commonpb.MsgType_TimeTick {
if tsMsg.BeginTs() >= mp.Timestamp { if tsMsg.BeginTs() >= mp.Timestamp {
ms.unsolvedMutex.Unlock() ms.unsolvedMutex.Unlock()
return nil return nil

View File

@ -41,10 +41,10 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
HashValues: []uint32{hashValue}, HashValues: []uint32{hashValue},
} }
switch msgType { switch msgType {
case commonpb.MsgType_kInsert: case commonpb.MsgType_Insert:
insertRequest := internalpb2.InsertRequest{ insertRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: reqID, MsgID: reqID,
Timestamp: 11, Timestamp: 11,
SourceID: reqID, SourceID: reqID,
@ -62,10 +62,10 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
InsertRequest: insertRequest, InsertRequest: insertRequest,
} }
return insertMsg return insertMsg
case commonpb.MsgType_kDelete: case commonpb.MsgType_Delete:
deleteRequest := internalpb2.DeleteRequest{ deleteRequest := internalpb2.DeleteRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDelete, MsgType: commonpb.MsgType_Delete,
MsgID: reqID, MsgID: reqID,
Timestamp: 11, Timestamp: 11,
SourceID: reqID, SourceID: reqID,
@ -80,10 +80,10 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
DeleteRequest: deleteRequest, DeleteRequest: deleteRequest,
} }
return deleteMsg return deleteMsg
case commonpb.MsgType_kSearch: case commonpb.MsgType_Search:
searchRequest := internalpb2.SearchRequest{ searchRequest := internalpb2.SearchRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearch, MsgType: commonpb.MsgType_Search,
MsgID: reqID, MsgID: reqID,
Timestamp: 11, Timestamp: 11,
SourceID: reqID, SourceID: reqID,
@ -96,10 +96,10 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
SearchRequest: searchRequest, SearchRequest: searchRequest,
} }
return searchMsg return searchMsg
case commonpb.MsgType_kSearchResult: case commonpb.MsgType_SearchResult:
searchResult := internalpb2.SearchResults{ searchResult := internalpb2.SearchResults{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearchResult, MsgType: commonpb.MsgType_SearchResult,
MsgID: reqID, MsgID: reqID,
Timestamp: 1, Timestamp: 1,
SourceID: reqID, SourceID: reqID,
@ -112,10 +112,10 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
SearchResults: searchResult, SearchResults: searchResult,
} }
return searchResultMsg return searchResultMsg
case commonpb.MsgType_kTimeTick: case commonpb.MsgType_TimeTick:
timeTickResult := internalpb2.TimeTickMsg{ timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: reqID, MsgID: reqID,
Timestamp: 1, Timestamp: 1,
SourceID: reqID, SourceID: reqID,
@ -126,10 +126,10 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
TimeTickMsg: timeTickResult, TimeTickMsg: timeTickResult,
} }
return timeTickMsg return timeTickMsg
case commonpb.MsgType_kQueryNodeStats: case commonpb.MsgType_QueryNodeStats:
queryNodeSegStats := internalpb2.QueryNodeStats{ queryNodeSegStats := internalpb2.QueryNodeStats{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kQueryNodeStats, MsgType: commonpb.MsgType_QueryNodeStats,
SourceID: reqID, SourceID: reqID,
}, },
} }
@ -150,7 +150,7 @@ func getTimeTickMsg(reqID UniqueID, hashValue uint32, time uint64) TsMsg {
} }
timeTickResult := internalpb2.TimeTickMsg{ timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: reqID, MsgID: reqID,
Timestamp: time, Timestamp: time,
SourceID: reqID, SourceID: reqID,
@ -260,8 +260,8 @@ func TestStream_RmqMsgStream_Insert(t *testing.T) {
consumerGroupName := "InsertGroup" consumerGroupName := "InsertGroup"
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kInsert, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Insert, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kInsert, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Insert, 3, 3))
rocksdbName := "/tmp/rocksmq_insert" rocksdbName := "/tmp/rocksmq_insert"
etcdKV := initRmq(rocksdbName) etcdKV := initRmq(rocksdbName)
@ -282,7 +282,7 @@ func TestStream_RmqMsgStream_Delete(t *testing.T) {
consumerSubName := "subDelete" consumerSubName := "subDelete"
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kDelete, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Delete, 1, 1))
rocksdbName := "/tmp/rocksmq_delete" rocksdbName := "/tmp/rocksmq_delete"
etcdKV := initRmq(rocksdbName) etcdKV := initRmq(rocksdbName)
@ -302,8 +302,8 @@ func TestStream_RmqMsgStream_Search(t *testing.T) {
consumerSubName := "subSearch" consumerSubName := "subSearch"
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kSearch, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Search, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kSearch, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Search, 3, 3))
rocksdbName := "/tmp/rocksmq_search" rocksdbName := "/tmp/rocksmq_search"
etcdKV := initRmq(rocksdbName) etcdKV := initRmq(rocksdbName)
@ -324,8 +324,8 @@ func TestStream_RmqMsgStream_SearchResult(t *testing.T) {
consumerSubName := "subSearchResult" consumerSubName := "subSearchResult"
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kSearchResult, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_SearchResult, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kSearchResult, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_SearchResult, 3, 3))
rocksdbName := "/tmp/rocksmq_searchresult" rocksdbName := "/tmp/rocksmq_searchresult"
etcdKV := initRmq(rocksdbName) etcdKV := initRmq(rocksdbName)
@ -345,8 +345,8 @@ func TestStream_RmqMsgStream_TimeTick(t *testing.T) {
consumerSubName := "subTimeTick" consumerSubName := "subTimeTick"
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kTimeTick, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_TimeTick, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kTimeTick, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_TimeTick, 3, 3))
rocksdbName := "/tmp/rocksmq_timetick" rocksdbName := "/tmp/rocksmq_timetick"
etcdKV := initRmq(rocksdbName) etcdKV := initRmq(rocksdbName)
@ -366,8 +366,8 @@ func TestStream_RmqMsgStream_BroadCast(t *testing.T) {
consumerSubName := "subInsert" consumerSubName := "subInsert"
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kTimeTick, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_TimeTick, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kTimeTick, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_TimeTick, 3, 3))
rocksdbName := "/tmp/rocksmq_broadcast" rocksdbName := "/tmp/rocksmq_broadcast"
etcdKV := initRmq(rocksdbName) etcdKV := initRmq(rocksdbName)
@ -388,8 +388,8 @@ func TestStream_RmqMsgStream_RepackFunc(t *testing.T) {
consumerSubName := "subInsert" consumerSubName := "subInsert"
msgPack := msgstream.MsgPack{} msgPack := msgstream.MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kInsert, 1, 1)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Insert, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kInsert, 3, 3)) msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_Insert, 3, 3))
rocksdbName := "/tmp/rocksmq_repackfunc" rocksdbName := "/tmp/rocksmq_repackfunc"
etcdKV := initRmq(rocksdbName) etcdKV := initRmq(rocksdbName)
@ -413,8 +413,8 @@ func TestStream_PulsarTtMsgStream_Insert(t *testing.T) {
msgPack0.Msgs = append(msgPack0.Msgs, getTimeTickMsg(0, 0, 0)) msgPack0.Msgs = append(msgPack0.Msgs, getTimeTickMsg(0, 0, 0))
msgPack1 := msgstream.MsgPack{} msgPack1 := msgstream.MsgPack{}
msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_kInsert, 1, 1)) msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_Insert, 1, 1))
msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_kInsert, 3, 3)) msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_Insert, 3, 3))
msgPack2 := msgstream.MsgPack{} msgPack2 := msgstream.MsgPack{}
msgPack2.Msgs = append(msgPack2.Msgs, getTimeTickMsg(5, 5, 5)) msgPack2.Msgs = append(msgPack2.Msgs, getTimeTickMsg(5, 5, 5))

View File

@ -56,21 +56,21 @@ func (pudf *ProtoUDFactory) NewUnmarshalDispatcher() *ProtoUnmarshalDispatcher {
p := &ProtoUnmarshalDispatcher{} p := &ProtoUnmarshalDispatcher{}
p.TempMap = make(map[commonpb.MsgType]UnmarshalFunc) p.TempMap = make(map[commonpb.MsgType]UnmarshalFunc)
p.TempMap[commonpb.MsgType_kInsert] = insertMsg.Unmarshal p.TempMap[commonpb.MsgType_Insert] = insertMsg.Unmarshal
p.TempMap[commonpb.MsgType_kDelete] = deleteMsg.Unmarshal p.TempMap[commonpb.MsgType_Delete] = deleteMsg.Unmarshal
p.TempMap[commonpb.MsgType_kSearch] = searchMsg.Unmarshal p.TempMap[commonpb.MsgType_Search] = searchMsg.Unmarshal
p.TempMap[commonpb.MsgType_kSearchResult] = searchResultMsg.Unmarshal p.TempMap[commonpb.MsgType_SearchResult] = searchResultMsg.Unmarshal
p.TempMap[commonpb.MsgType_kTimeTick] = timeTickMsg.Unmarshal p.TempMap[commonpb.MsgType_TimeTick] = timeTickMsg.Unmarshal
p.TempMap[commonpb.MsgType_kQueryNodeStats] = queryNodeSegStatsMsg.Unmarshal p.TempMap[commonpb.MsgType_QueryNodeStats] = queryNodeSegStatsMsg.Unmarshal
p.TempMap[commonpb.MsgType_kCreateCollection] = createCollectionMsg.Unmarshal p.TempMap[commonpb.MsgType_CreateCollection] = createCollectionMsg.Unmarshal
p.TempMap[commonpb.MsgType_kDropCollection] = dropCollectionMsg.Unmarshal p.TempMap[commonpb.MsgType_DropCollection] = dropCollectionMsg.Unmarshal
p.TempMap[commonpb.MsgType_kCreatePartition] = createPartitionMsg.Unmarshal p.TempMap[commonpb.MsgType_CreatePartition] = createPartitionMsg.Unmarshal
p.TempMap[commonpb.MsgType_kDropPartition] = dropPartitionMsg.Unmarshal p.TempMap[commonpb.MsgType_DropPartition] = dropPartitionMsg.Unmarshal
p.TempMap[commonpb.MsgType_kLoadIndex] = loadIndexMsg.Unmarshal p.TempMap[commonpb.MsgType_LoadIndex] = loadIndexMsg.Unmarshal
p.TempMap[commonpb.MsgType_kFlush] = flushMsg.Unmarshal p.TempMap[commonpb.MsgType_Flush] = flushMsg.Unmarshal
p.TempMap[commonpb.MsgType_kSegmentInfo] = segmentInfoMsg.Unmarshal p.TempMap[commonpb.MsgType_SegmentInfo] = segmentInfoMsg.Unmarshal
p.TempMap[commonpb.MsgType_kSegmentFlushDone] = flushCompletedMsg.Unmarshal p.TempMap[commonpb.MsgType_SegmentFlushDone] = flushCompletedMsg.Unmarshal
p.TempMap[commonpb.MsgType_kSegmentStatistics] = segmentStatisticsMsg.Unmarshal p.TempMap[commonpb.MsgType_SegmentStatistics] = segmentStatisticsMsg.Unmarshal
return p return p
} }

View File

@ -35,7 +35,7 @@ func TestStream_unmarshal_Insert(t *testing.T) {
}, },
InsertRequest: internalpb2.InsertRequest{ InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: 1, MsgID: 1,
Timestamp: 11, Timestamp: 11,
SourceID: 1, SourceID: 1,

View File

@ -16,7 +16,7 @@ type BaseMsg = msgstream.BaseMsg
func InsertRepackFunc(tsMsgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, error) { func InsertRepackFunc(tsMsgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, error) {
result := make(map[int32]*MsgPack) result := make(map[int32]*MsgPack)
for i, request := range tsMsgs { for i, request := range tsMsgs {
if request.Type() != commonpb.MsgType_kInsert { if request.Type() != commonpb.MsgType_Insert {
return nil, errors.New("msg's must be Insert") return nil, errors.New("msg's must be Insert")
} }
insertRequest := request.(*msgstream.InsertMsg) insertRequest := request.(*msgstream.InsertMsg)
@ -39,7 +39,7 @@ func InsertRepackFunc(tsMsgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, e
sliceRequest := internalpb2.InsertRequest{ sliceRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: insertRequest.Base.MsgID, MsgID: insertRequest.Base.MsgID,
Timestamp: insertRequest.Timestamps[index], Timestamp: insertRequest.Timestamps[index],
SourceID: insertRequest.Base.SourceID, SourceID: insertRequest.Base.SourceID,
@ -68,7 +68,7 @@ func InsertRepackFunc(tsMsgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, e
func DeleteRepackFunc(tsMsgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, error) { func DeleteRepackFunc(tsMsgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, error) {
result := make(map[int32]*MsgPack) result := make(map[int32]*MsgPack)
for i, request := range tsMsgs { for i, request := range tsMsgs {
if request.Type() != commonpb.MsgType_kDelete { if request.Type() != commonpb.MsgType_Delete {
return nil, errors.New("msg's must be Delete") return nil, errors.New("msg's must be Delete")
} }
deleteRequest := request.(*msgstream.DeleteMsg) deleteRequest := request.(*msgstream.DeleteMsg)
@ -91,7 +91,7 @@ func DeleteRepackFunc(tsMsgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, e
sliceRequest := internalpb2.DeleteRequest{ sliceRequest := internalpb2.DeleteRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDelete, MsgType: commonpb.MsgType_Delete,
MsgID: deleteRequest.Base.MsgID, MsgID: deleteRequest.Base.MsgID,
Timestamp: deleteRequest.Timestamps[index], Timestamp: deleteRequest.Timestamps[index],
SourceID: deleteRequest.Base.SourceID, SourceID: deleteRequest.Base.SourceID,

View File

@ -77,59 +77,59 @@ message Address {
} }
enum MsgType { enum MsgType {
kNone = 0; None = 0;
/* Definition Requests: collection */ /* DEFINITION REQUESTS: COLLECTION */
kCreateCollection = 100; CreateCollection = 100;
kDropCollection = 101; DropCollection = 101;
kHasCollection = 102; HasCollection = 102;
kDescribeCollection = 103; DescribeCollection = 103;
kShowCollections = 104; ShowCollections = 104;
kGetSysConfigs = 105; GetSystemConfigs = 105;
kLoadCollection = 106; LoadCollection = 106;
kReleaseCollection = 107; ReleaseCollection = 107;
/* Definition Requests: partition */ /* DEFINITION REQUESTS: PARTITION */
kCreatePartition = 200; CreatePartition = 200;
kDropPartition = 201; DropPartition = 201;
kHasPartition = 202; HasPartition = 202;
kDescribePartition = 203; DescribePartition = 203;
kShowPartitions = 204; ShowPartitions = 204;
kLoadPartition = 205; LoadPartitions = 205;
kReleasePartition = 206; ReleasePartitions = 206;
/* Define Requests: segment */ /* DEFINE REQUESTS: SEGMENT */
kShowSegment = 250; ShowSegments = 250;
kDescribeSegment = 251; DescribeSegment = 251;
/* Definition Requests: Index */ /* DEFINITION REQUESTS: INDEX */
kCreateIndex = 300; CreateIndex = 300;
kDescribeIndex = 301; DescribeIndex = 301;
kDropIndex = 302; DropIndex = 302;
/* Manipulation Requests */ /* MANIPULATION REQUESTS */
kInsert = 400; Insert = 400;
kDelete = 401; Delete = 401;
kFlush = 402; Flush = 402;
/* Query */ /* QUERY */
kSearch = 500; Search = 500;
kSearchResult = 501; SearchResult = 501;
kGetIndexState = 502; GetIndexState = 502;
kGetCollectionStatistics = 503; GetCollectionStatistics = 503;
kGetPartitionStatistics = 504; GetPartitionStatistics = 504;
/* Data Service */ /* DATA SERVICE */
kSegmentInfo = 600; SegmentInfo = 600;
/* System Control */ /* SYSTEM CONTROL */
kTimeTick = 1200; TimeTick = 1200;
kQueryNodeStats = 1201; // GOOSE TODO: Remove kQueryNodeStats QueryNodeStats = 1201; // GOOSE TODO: Remove kQueryNodeStats
kLoadIndex = 1202; LoadIndex = 1202;
kRequestID = 1203; RequestID = 1203;
kRequestTSO = 1204; RequestTSO = 1204;
kAllocateSegment = 1205; AllocateSegment = 1205;
kSegmentStatistics = 1206; SegmentStatistics = 1206;
kSegmentFlushDone = 1207; SegmentFlushDone = 1207;
} }
message MsgBase { message MsgBase {

View File

@ -192,134 +192,134 @@ func (SegmentState) EnumDescriptor() ([]byte, []int) {
type MsgType int32 type MsgType int32
const ( const (
MsgType_kNone MsgType = 0 MsgType_None MsgType = 0
// Definition Requests: collection // DEFINITION REQUESTS: COLLECTION
MsgType_kCreateCollection MsgType = 100 MsgType_CreateCollection MsgType = 100
MsgType_kDropCollection MsgType = 101 MsgType_DropCollection MsgType = 101
MsgType_kHasCollection MsgType = 102 MsgType_HasCollection MsgType = 102
MsgType_kDescribeCollection MsgType = 103 MsgType_DescribeCollection MsgType = 103
MsgType_kShowCollections MsgType = 104 MsgType_ShowCollections MsgType = 104
MsgType_kGetSysConfigs MsgType = 105 MsgType_GetSystemConfigs MsgType = 105
MsgType_kLoadCollection MsgType = 106 MsgType_LoadCollection MsgType = 106
MsgType_kReleaseCollection MsgType = 107 MsgType_ReleaseCollection MsgType = 107
// Definition Requests: partition // DEFINITION REQUESTS: PARTITION
MsgType_kCreatePartition MsgType = 200 MsgType_CreatePartition MsgType = 200
MsgType_kDropPartition MsgType = 201 MsgType_DropPartition MsgType = 201
MsgType_kHasPartition MsgType = 202 MsgType_HasPartition MsgType = 202
MsgType_kDescribePartition MsgType = 203 MsgType_DescribePartition MsgType = 203
MsgType_kShowPartitions MsgType = 204 MsgType_ShowPartitions MsgType = 204
MsgType_kLoadPartition MsgType = 205 MsgType_LoadPartitions MsgType = 205
MsgType_kReleasePartition MsgType = 206 MsgType_ReleasePartitions MsgType = 206
// Define Requests: segment // DEFINE REQUESTS: SEGMENT
MsgType_kShowSegment MsgType = 250 MsgType_ShowSegments MsgType = 250
MsgType_kDescribeSegment MsgType = 251 MsgType_DescribeSegment MsgType = 251
// Definition Requests: Index // DEFINITION REQUESTS: INDEX
MsgType_kCreateIndex MsgType = 300 MsgType_CreateIndex MsgType = 300
MsgType_kDescribeIndex MsgType = 301 MsgType_DescribeIndex MsgType = 301
MsgType_kDropIndex MsgType = 302 MsgType_DropIndex MsgType = 302
// Manipulation Requests // MANIPULATION REQUESTS
MsgType_kInsert MsgType = 400 MsgType_Insert MsgType = 400
MsgType_kDelete MsgType = 401 MsgType_Delete MsgType = 401
MsgType_kFlush MsgType = 402 MsgType_Flush MsgType = 402
// Query // QUERY
MsgType_kSearch MsgType = 500 MsgType_Search MsgType = 500
MsgType_kSearchResult MsgType = 501 MsgType_SearchResult MsgType = 501
MsgType_kGetIndexState MsgType = 502 MsgType_GetIndexState MsgType = 502
MsgType_kGetCollectionStatistics MsgType = 503 MsgType_GetCollectionStatistics MsgType = 503
MsgType_kGetPartitionStatistics MsgType = 504 MsgType_GetPartitionStatistics MsgType = 504
// Data Service // DATA SERVICE
MsgType_kSegmentInfo MsgType = 600 MsgType_SegmentInfo MsgType = 600
// System Control // SYSTEM CONTROL
MsgType_kTimeTick MsgType = 1200 MsgType_TimeTick MsgType = 1200
MsgType_kQueryNodeStats MsgType = 1201 MsgType_QueryNodeStats MsgType = 1201
MsgType_kLoadIndex MsgType = 1202 MsgType_LoadIndex MsgType = 1202
MsgType_kRequestID MsgType = 1203 MsgType_RequestID MsgType = 1203
MsgType_kRequestTSO MsgType = 1204 MsgType_RequestTSO MsgType = 1204
MsgType_kAllocateSegment MsgType = 1205 MsgType_AllocateSegment MsgType = 1205
MsgType_kSegmentStatistics MsgType = 1206 MsgType_SegmentStatistics MsgType = 1206
MsgType_kSegmentFlushDone MsgType = 1207 MsgType_SegmentFlushDone MsgType = 1207
) )
var MsgType_name = map[int32]string{ var MsgType_name = map[int32]string{
0: "kNone", 0: "None",
100: "kCreateCollection", 100: "CreateCollection",
101: "kDropCollection", 101: "DropCollection",
102: "kHasCollection", 102: "HasCollection",
103: "kDescribeCollection", 103: "DescribeCollection",
104: "kShowCollections", 104: "ShowCollections",
105: "kGetSysConfigs", 105: "GetSystemConfigs",
106: "kLoadCollection", 106: "LoadCollection",
107: "kReleaseCollection", 107: "ReleaseCollection",
200: "kCreatePartition", 200: "CreatePartition",
201: "kDropPartition", 201: "DropPartition",
202: "kHasPartition", 202: "HasPartition",
203: "kDescribePartition", 203: "DescribePartition",
204: "kShowPartitions", 204: "ShowPartitions",
205: "kLoadPartition", 205: "LoadPartitions",
206: "kReleasePartition", 206: "ReleasePartitions",
250: "kShowSegment", 250: "ShowSegments",
251: "kDescribeSegment", 251: "DescribeSegment",
300: "kCreateIndex", 300: "CreateIndex",
301: "kDescribeIndex", 301: "DescribeIndex",
302: "kDropIndex", 302: "DropIndex",
400: "kInsert", 400: "Insert",
401: "kDelete", 401: "Delete",
402: "kFlush", 402: "Flush",
500: "kSearch", 500: "Search",
501: "kSearchResult", 501: "SearchResult",
502: "kGetIndexState", 502: "GetIndexState",
503: "kGetCollectionStatistics", 503: "GetCollectionStatistics",
504: "kGetPartitionStatistics", 504: "GetPartitionStatistics",
600: "kSegmentInfo", 600: "SegmentInfo",
1200: "kTimeTick", 1200: "TimeTick",
1201: "kQueryNodeStats", 1201: "QueryNodeStats",
1202: "kLoadIndex", 1202: "LoadIndex",
1203: "kRequestID", 1203: "RequestID",
1204: "kRequestTSO", 1204: "RequestTSO",
1205: "kAllocateSegment", 1205: "AllocateSegment",
1206: "kSegmentStatistics", 1206: "SegmentStatistics",
1207: "kSegmentFlushDone", 1207: "SegmentFlushDone",
} }
var MsgType_value = map[string]int32{ var MsgType_value = map[string]int32{
"kNone": 0, "None": 0,
"kCreateCollection": 100, "CreateCollection": 100,
"kDropCollection": 101, "DropCollection": 101,
"kHasCollection": 102, "HasCollection": 102,
"kDescribeCollection": 103, "DescribeCollection": 103,
"kShowCollections": 104, "ShowCollections": 104,
"kGetSysConfigs": 105, "GetSystemConfigs": 105,
"kLoadCollection": 106, "LoadCollection": 106,
"kReleaseCollection": 107, "ReleaseCollection": 107,
"kCreatePartition": 200, "CreatePartition": 200,
"kDropPartition": 201, "DropPartition": 201,
"kHasPartition": 202, "HasPartition": 202,
"kDescribePartition": 203, "DescribePartition": 203,
"kShowPartitions": 204, "ShowPartitions": 204,
"kLoadPartition": 205, "LoadPartitions": 205,
"kReleasePartition": 206, "ReleasePartitions": 206,
"kShowSegment": 250, "ShowSegments": 250,
"kDescribeSegment": 251, "DescribeSegment": 251,
"kCreateIndex": 300, "CreateIndex": 300,
"kDescribeIndex": 301, "DescribeIndex": 301,
"kDropIndex": 302, "DropIndex": 302,
"kInsert": 400, "Insert": 400,
"kDelete": 401, "Delete": 401,
"kFlush": 402, "Flush": 402,
"kSearch": 500, "Search": 500,
"kSearchResult": 501, "SearchResult": 501,
"kGetIndexState": 502, "GetIndexState": 502,
"kGetCollectionStatistics": 503, "GetCollectionStatistics": 503,
"kGetPartitionStatistics": 504, "GetPartitionStatistics": 504,
"kSegmentInfo": 600, "SegmentInfo": 600,
"kTimeTick": 1200, "TimeTick": 1200,
"kQueryNodeStats": 1201, "QueryNodeStats": 1201,
"kLoadIndex": 1202, "LoadIndex": 1202,
"kRequestID": 1203, "RequestID": 1203,
"kRequestTSO": 1204, "RequestTSO": 1204,
"kAllocateSegment": 1205, "AllocateSegment": 1205,
"kSegmentStatistics": 1206, "SegmentStatistics": 1206,
"kSegmentFlushDone": 1207, "SegmentFlushDone": 1207,
} }
func (x MsgType) String() string { func (x MsgType) String() string {
@ -580,7 +580,7 @@ func (m *MsgBase) GetMsgType() MsgType {
if m != nil { if m != nil {
return m.MsgType return m.MsgType
} }
return MsgType_kNone return MsgType_None
} }
func (m *MsgBase) GetMsgID() int64 { func (m *MsgBase) GetMsgID() int64 {
@ -661,86 +661,85 @@ func init() {
func init() { proto.RegisterFile("common.proto", fileDescriptor_555bd8c177793206) } func init() { proto.RegisterFile("common.proto", fileDescriptor_555bd8c177793206) }
var fileDescriptor_555bd8c177793206 = []byte{ var fileDescriptor_555bd8c177793206 = []byte{
// 1285 bytes of a gzipped FileDescriptorProto // 1278 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0xcb, 0x6e, 0xdb, 0x46, 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, 0x0e, 0x25, 0xf9, 0xc2, 0xe3, 0xdb, 0x78, 0xec, 0xd8, 0x4a, 0xe2, 0x24, 0xfe, 0xf5, 0x17,
0x17, 0x45, 0x60, 0x20, 0x76, 0xd1, 0x02, 0xed, 0x2a, 0x40, 0x65, 0x72, 0x64, 0x13, 0xa1, 0x48, 0x45, 0x60, 0x20, 0x76, 0xd1, 0x02, 0xed, 0x2a, 0x40, 0x65, 0x72, 0x24, 0x13, 0xa1, 0x48, 0x65,
0x65, 0x48, 0xa5, 0x49, 0x37, 0x04, 0x25, 0x4d, 0x64, 0x56, 0x94, 0xa8, 0x72, 0xa8, 0x24, 0xca, 0x48, 0xa5, 0x49, 0x37, 0x04, 0x25, 0x4d, 0x64, 0x36, 0x94, 0xa8, 0x72, 0x46, 0x49, 0x94, 0xa7,
0x53, 0xb4, 0x01, 0xfa, 0x06, 0x5d, 0xb6, 0x45, 0xef, 0x7d, 0x85, 0xde, 0xd7, 0x7d, 0x84, 0x02, 0x68, 0xf3, 0x0c, 0x5d, 0xb6, 0x45, 0xef, 0x7d, 0x85, 0xde, 0xd7, 0x7d, 0x84, 0x02, 0xdd, 0x36,
0xdd, 0xf6, 0x86, 0x76, 0x53, 0xcc, 0x50, 0x17, 0x5a, 0x50, 0x76, 0xfc, 0xce, 0xf9, 0xe6, 0xcc, 0x6d, 0xd1, 0x6e, 0x8a, 0x21, 0x29, 0x8b, 0x16, 0xe4, 0x1d, 0xcf, 0x77, 0xce, 0xf9, 0xce, 0x77,
0xf9, 0xce, 0x70, 0x48, 0x28, 0xb5, 0xa3, 0x7e, 0x3f, 0x1a, 0x1c, 0x0e, 0xe3, 0x28, 0x89, 0xf0, 0xbe, 0x19, 0x92, 0xb0, 0xda, 0x89, 0xfa, 0xfd, 0x68, 0x70, 0x38, 0x8c, 0x23, 0x11, 0xe1, 0xad,
0x56, 0x3f, 0x08, 0x1f, 0x8f, 0x78, 0x5a, 0x1d, 0xa6, 0x54, 0xa5, 0x08, 0x2b, 0xa4, 0x3f, 0x4c, 0x7e, 0x10, 0x3e, 0x19, 0xf1, 0x34, 0x3a, 0x4c, 0x53, 0x95, 0x25, 0x58, 0x20, 0xfd, 0xa1, 0x18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 0x67, 0x47, 0xe9, 0x8f, 0xfd, 0x76, 0x27, 0xe0, 0x49, 0x1c, 0xb4, 0x46, 0x8f, 0xfb, 0x76, 0x37, 0xe0, 0x22, 0x0e, 0xda, 0x23, 0xc1, 0xba, 0x47, 0xc1, 0x40, 0xb0, 0x78,
0x09, 0xeb, 0x1c, 0x05, 0x83, 0x84, 0xc5, 0x03, 0x3f, 0x3c, 0x92, 0x7f, 0xfb, 0xa3, 0xf4, 0x6f, 0xe0, 0x87, 0x47, 0xc9, 0xdf, 0xfc, 0x28, 0xfd, 0x9b, 0x0f, 0xdb, 0xed, 0xc5, 0x24, 0x7e, 0xe3,
0x3f, 0x6c, 0xb5, 0x56, 0x65, 0xfd, 0xda, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x2b, 0xf4, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x3e, 0x02, 0x01, 0xb0, 0x09, 0x00, 0x00,
0x53, 0xd0, 0x09, 0x00, 0x00,
} }

View File

@ -596,7 +596,7 @@ func (node *ProxyNode) Insert(ctx context.Context, request *milvuspb.InsertReque
}, },
InsertRequest: internalpb2.InsertRequest{ InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: 0, MsgID: 0,
}, },
CollectionName: request.CollectionName, CollectionName: request.CollectionName,
@ -640,7 +640,7 @@ func (node *ProxyNode) Search(ctx context.Context, request *milvuspb.SearchReque
Condition: NewTaskCondition(ctx), Condition: NewTaskCondition(ctx),
SearchRequest: &internalpb2.SearchRequest{ SearchRequest: &internalpb2.SearchRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearch, MsgType: commonpb.MsgType_Search,
SourceID: Params.ProxyID, SourceID: Params.ProxyID,
}, },
ResultChannelID: strconv.FormatInt(Params.ProxyID, 10), ResultChannelID: strconv.FormatInt(Params.ProxyID, 10),
@ -718,7 +718,7 @@ func (node *ProxyNode) GetPersistentSegmentInfo(ctx context.Context, req *milvus
} }
infoResp, err := node.dataService.GetSegmentInfo(ctx, &datapb.SegmentInfoRequest{ infoResp, err := node.dataService.GetSegmentInfo(ctx, &datapb.SegmentInfoRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSegmentInfo, MsgType: commonpb.MsgType_SegmentInfo,
MsgID: 0, MsgID: 0,
Timestamp: 0, Timestamp: 0,
SourceID: Params.ProxyID, SourceID: Params.ProxyID,
@ -765,7 +765,7 @@ func (node *ProxyNode) GetQuerySegmentInfo(ctx context.Context, req *milvuspb.Qu
} }
infoResp, err := node.queryService.GetSegmentInfo(ctx, &querypb.SegmentInfoRequest{ infoResp, err := node.queryService.GetSegmentInfo(ctx, &querypb.SegmentInfoRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSegmentInfo, MsgType: commonpb.MsgType_SegmentInfo,
MsgID: 0, MsgID: 0,
Timestamp: 0, Timestamp: 0,
SourceID: Params.ProxyID, SourceID: Params.ProxyID,
@ -800,7 +800,7 @@ func (node *ProxyNode) GetQuerySegmentInfo(ctx context.Context, req *milvuspb.Qu
func (node *ProxyNode) getSegmentsOfCollection(ctx context.Context, dbName string, collectionName string) ([]UniqueID, error) { func (node *ProxyNode) getSegmentsOfCollection(ctx context.Context, dbName string, collectionName string) ([]UniqueID, error) {
describeCollectionResponse, err := node.masterService.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{ describeCollectionResponse, err := node.masterService.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection, MsgType: commonpb.MsgType_DescribeCollection,
MsgID: 0, MsgID: 0,
Timestamp: 0, Timestamp: 0,
SourceID: Params.ProxyID, SourceID: Params.ProxyID,
@ -817,7 +817,7 @@ func (node *ProxyNode) getSegmentsOfCollection(ctx context.Context, dbName strin
collectionID := describeCollectionResponse.CollectionID collectionID := describeCollectionResponse.CollectionID
showPartitionsResp, err := node.masterService.ShowPartitions(ctx, &milvuspb.ShowPartitionRequest{ showPartitionsResp, err := node.masterService.ShowPartitions(ctx, &milvuspb.ShowPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowPartitions, MsgType: commonpb.MsgType_ShowPartitions,
MsgID: 0, MsgID: 0,
Timestamp: 0, Timestamp: 0,
SourceID: Params.ProxyID, SourceID: Params.ProxyID,
@ -837,7 +837,7 @@ func (node *ProxyNode) getSegmentsOfCollection(ctx context.Context, dbName strin
for _, partitionID := range showPartitionsResp.PartitionIDs { for _, partitionID := range showPartitionsResp.PartitionIDs {
showSegmentResponse, err := node.masterService.ShowSegments(ctx, &milvuspb.ShowSegmentRequest{ showSegmentResponse, err := node.masterService.ShowSegments(ctx, &milvuspb.ShowSegmentRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowSegment, MsgType: commonpb.MsgType_ShowSegments,
MsgID: 0, MsgID: 0,
Timestamp: 0, Timestamp: 0,
SourceID: Params.ProxyID, SourceID: Params.ProxyID,

View File

@ -100,7 +100,7 @@ func (m *MetaCache) GetCollectionID(ctx context.Context, collectionName string)
req := &milvuspb.DescribeCollectionRequest{ req := &milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection, MsgType: commonpb.MsgType_DescribeCollection,
}, },
CollectionName: collectionName, CollectionName: collectionName,
} }
@ -131,7 +131,7 @@ func (m *MetaCache) GetCollectionSchema(ctx context.Context, collectionName stri
req := &milvuspb.DescribeCollectionRequest{ req := &milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection, MsgType: commonpb.MsgType_DescribeCollection,
}, },
CollectionName: collectionName, CollectionName: collectionName,
} }
@ -163,7 +163,7 @@ func (m *MetaCache) GetPartitionID(ctx context.Context, collectionName string, p
req := &milvuspb.ShowPartitionRequest{ req := &milvuspb.ShowPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowPartitions, MsgType: commonpb.MsgType_ShowPartitions,
}, },
CollectionName: collectionName, CollectionName: collectionName,
} }

View File

@ -25,7 +25,7 @@ func insertRepackFunc(tsMsgs []msgstream.TsMsg,
channelNamesMap := make(map[UniqueID][]string) // collectionID --> channelNames channelNamesMap := make(map[UniqueID][]string) // collectionID --> channelNames
for i, request := range tsMsgs { for i, request := range tsMsgs {
if request.Type() != commonpb.MsgType_kInsert { if request.Type() != commonpb.MsgType_Insert {
return nil, errors.New("msg's must be Insert") return nil, errors.New("msg's must be Insert")
} }
insertRequest, ok := request.(*msgstream.InsertMsg) insertRequest, ok := request.(*msgstream.InsertMsg)
@ -241,7 +241,7 @@ func insertRepackFunc(tsMsgs []msgstream.TsMsg,
channelID := channelNames[int(key)%len(channelNames)] channelID := channelNames[int(key)%len(channelNames)]
sliceRequest := internalpb2.InsertRequest{ sliceRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: reqID, MsgID: reqID,
Timestamp: ts, Timestamp: ts,
SourceID: proxyID, SourceID: proxyID,

View File

@ -119,7 +119,7 @@ func (it *InsertTask) OnEnqueue() error {
} }
func (it *InsertTask) PreExecute(ctx context.Context) error { func (it *InsertTask) PreExecute(ctx context.Context) error {
it.Base.MsgType = commonpb.MsgType_kInsert it.Base.MsgType = commonpb.MsgType_Insert
it.Base.SourceID = Params.ProxyID it.Base.SourceID = Params.ProxyID
collectionName := it.BaseInsertTask.CollectionName collectionName := it.BaseInsertTask.CollectionName
@ -201,9 +201,9 @@ func (it *InsertTask) Execute(ctx context.Context) error {
if err != nil { if err != nil {
resp, _ := it.dataService.GetInsertChannels(ctx, &datapb.InsertChannelRequest{ resp, _ := it.dataService.GetInsertChannels(ctx, &datapb.InsertChannelRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, // todo MsgType: commonpb.MsgType_Insert, // todo
MsgID: it.Base.MsgID, // todo MsgID: it.Base.MsgID, // todo
Timestamp: 0, // todo Timestamp: 0, // todo
SourceID: Params.ProxyID, SourceID: Params.ProxyID,
}, },
DbID: 0, // todo DbID: 0, // todo
@ -289,7 +289,7 @@ func (cct *CreateCollectionTask) OnEnqueue() error {
} }
func (cct *CreateCollectionTask) PreExecute(ctx context.Context) error { func (cct *CreateCollectionTask) PreExecute(ctx context.Context) error {
cct.Base.MsgType = commonpb.MsgType_kCreateCollection cct.Base.MsgType = commonpb.MsgType_CreateCollection
cct.Base.SourceID = Params.ProxyID cct.Base.SourceID = Params.ProxyID
cct.schema = &schemapb.CollectionSchema{} cct.schema = &schemapb.CollectionSchema{}
@ -365,9 +365,9 @@ func (cct *CreateCollectionTask) Execute(ctx context.Context) error {
} }
resp, _ := cct.dataServiceClient.GetInsertChannels(ctx, &datapb.InsertChannelRequest{ resp, _ := cct.dataServiceClient.GetInsertChannels(ctx, &datapb.InsertChannelRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, // todo MsgType: commonpb.MsgType_Insert, // todo
MsgID: cct.Base.MsgID, // todo MsgID: cct.Base.MsgID, // todo
Timestamp: 0, // todo Timestamp: 0, // todo
SourceID: Params.ProxyID, SourceID: Params.ProxyID,
}, },
DbID: 0, // todo DbID: 0, // todo
@ -437,7 +437,7 @@ func (dct *DropCollectionTask) OnEnqueue() error {
} }
func (dct *DropCollectionTask) PreExecute(ctx context.Context) error { func (dct *DropCollectionTask) PreExecute(ctx context.Context) error {
dct.Base.MsgType = commonpb.MsgType_kDropCollection dct.Base.MsgType = commonpb.MsgType_DropCollection
dct.Base.SourceID = Params.ProxyID dct.Base.SourceID = Params.ProxyID
if err := ValidateCollectionName(dct.CollectionName); err != nil { if err := ValidateCollectionName(dct.CollectionName); err != nil {
@ -517,7 +517,7 @@ func (st *SearchTask) OnEnqueue() error {
} }
func (st *SearchTask) PreExecute(ctx context.Context) error { func (st *SearchTask) PreExecute(ctx context.Context) error {
st.Base.MsgType = commonpb.MsgType_kSearch st.Base.MsgType = commonpb.MsgType_Search
st.Base.SourceID = Params.ProxyID st.Base.SourceID = Params.ProxyID
collectionName := st.query.CollectionName collectionName := st.query.CollectionName
@ -535,7 +535,7 @@ func (st *SearchTask) PreExecute(ctx context.Context) error {
return err return err
} }
} }
st.Base.MsgType = commonpb.MsgType_kSearch st.Base.MsgType = commonpb.MsgType_Search
queryBytes, err := proto.Marshal(st.query) queryBytes, err := proto.Marshal(st.query)
if err != nil { if err != nil {
return err return err
@ -787,7 +787,7 @@ func (hct *HasCollectionTask) OnEnqueue() error {
} }
func (hct *HasCollectionTask) PreExecute(ctx context.Context) error { func (hct *HasCollectionTask) PreExecute(ctx context.Context) error {
hct.Base.MsgType = commonpb.MsgType_kHasCollection hct.Base.MsgType = commonpb.MsgType_HasCollection
hct.Base.SourceID = Params.ProxyID hct.Base.SourceID = Params.ProxyID
if err := ValidateCollectionName(hct.CollectionName); err != nil { if err := ValidateCollectionName(hct.CollectionName); err != nil {
@ -858,7 +858,7 @@ func (dct *DescribeCollectionTask) OnEnqueue() error {
} }
func (dct *DescribeCollectionTask) PreExecute(ctx context.Context) error { func (dct *DescribeCollectionTask) PreExecute(ctx context.Context) error {
dct.Base.MsgType = commonpb.MsgType_kDescribeCollection dct.Base.MsgType = commonpb.MsgType_DescribeCollection
dct.Base.SourceID = Params.ProxyID dct.Base.SourceID = Params.ProxyID
if err := ValidateCollectionName(dct.CollectionName); err != nil { if err := ValidateCollectionName(dct.CollectionName); err != nil {
@ -929,7 +929,7 @@ func (g *GetCollectionsStatisticsTask) OnEnqueue() error {
} }
func (g *GetCollectionsStatisticsTask) PreExecute(ctx context.Context) error { func (g *GetCollectionsStatisticsTask) PreExecute(ctx context.Context) error {
g.Base.MsgType = commonpb.MsgType_kGetCollectionStatistics g.Base.MsgType = commonpb.MsgType_GetCollectionStatistics
g.Base.SourceID = Params.ProxyID g.Base.SourceID = Params.ProxyID
return nil return nil
} }
@ -941,7 +941,7 @@ func (g *GetCollectionsStatisticsTask) Execute(ctx context.Context) error {
} }
req := &datapb.CollectionStatsRequest{ req := &datapb.CollectionStatsRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kGetCollectionStatistics, MsgType: commonpb.MsgType_GetCollectionStatistics,
MsgID: g.Base.MsgID, MsgID: g.Base.MsgID,
Timestamp: g.Base.Timestamp, Timestamp: g.Base.Timestamp,
SourceID: g.Base.SourceID, SourceID: g.Base.SourceID,
@ -1016,7 +1016,7 @@ func (sct *ShowCollectionsTask) OnEnqueue() error {
} }
func (sct *ShowCollectionsTask) PreExecute(ctx context.Context) error { func (sct *ShowCollectionsTask) PreExecute(ctx context.Context) error {
sct.Base.MsgType = commonpb.MsgType_kShowCollections sct.Base.MsgType = commonpb.MsgType_ShowCollections
sct.Base.SourceID = Params.ProxyID sct.Base.SourceID = Params.ProxyID
return nil return nil
@ -1084,7 +1084,7 @@ func (cpt *CreatePartitionTask) OnEnqueue() error {
} }
func (cpt *CreatePartitionTask) PreExecute(ctx context.Context) error { func (cpt *CreatePartitionTask) PreExecute(ctx context.Context) error {
cpt.Base.MsgType = commonpb.MsgType_kCreatePartition cpt.Base.MsgType = commonpb.MsgType_CreatePartition
cpt.Base.SourceID = Params.ProxyID cpt.Base.SourceID = Params.ProxyID
collName, partitionTag := cpt.CollectionName, cpt.PartitionName collName, partitionTag := cpt.CollectionName, cpt.PartitionName
@ -1161,7 +1161,7 @@ func (dpt *DropPartitionTask) OnEnqueue() error {
} }
func (dpt *DropPartitionTask) PreExecute(ctx context.Context) error { func (dpt *DropPartitionTask) PreExecute(ctx context.Context) error {
dpt.Base.MsgType = commonpb.MsgType_kDropPartition dpt.Base.MsgType = commonpb.MsgType_DropPartition
dpt.Base.SourceID = Params.ProxyID dpt.Base.SourceID = Params.ProxyID
collName, partitionTag := dpt.CollectionName, dpt.PartitionName collName, partitionTag := dpt.CollectionName, dpt.PartitionName
@ -1238,7 +1238,7 @@ func (hpt *HasPartitionTask) OnEnqueue() error {
} }
func (hpt *HasPartitionTask) PreExecute(ctx context.Context) error { func (hpt *HasPartitionTask) PreExecute(ctx context.Context) error {
hpt.Base.MsgType = commonpb.MsgType_kHasPartition hpt.Base.MsgType = commonpb.MsgType_HasPartition
hpt.Base.SourceID = Params.ProxyID hpt.Base.SourceID = Params.ProxyID
collName, partitionTag := hpt.CollectionName, hpt.PartitionName collName, partitionTag := hpt.CollectionName, hpt.PartitionName
@ -1314,7 +1314,7 @@ func (spt *ShowPartitionsTask) OnEnqueue() error {
} }
func (spt *ShowPartitionsTask) PreExecute(ctx context.Context) error { func (spt *ShowPartitionsTask) PreExecute(ctx context.Context) error {
spt.Base.MsgType = commonpb.MsgType_kShowPartitions spt.Base.MsgType = commonpb.MsgType_ShowPartitions
spt.Base.SourceID = Params.ProxyID spt.Base.SourceID = Params.ProxyID
if err := ValidateCollectionName(spt.CollectionName); err != nil { if err := ValidateCollectionName(spt.CollectionName); err != nil {
@ -1385,7 +1385,7 @@ func (cit *CreateIndexTask) OnEnqueue() error {
} }
func (cit *CreateIndexTask) PreExecute(ctx context.Context) error { func (cit *CreateIndexTask) PreExecute(ctx context.Context) error {
cit.Base.MsgType = commonpb.MsgType_kCreateIndex cit.Base.MsgType = commonpb.MsgType_CreateIndex
cit.Base.SourceID = Params.ProxyID cit.Base.SourceID = Params.ProxyID
collName, fieldName := cit.CollectionName, cit.FieldName collName, fieldName := cit.CollectionName, cit.FieldName
@ -1463,7 +1463,7 @@ func (dit *DescribeIndexTask) OnEnqueue() error {
} }
func (dit *DescribeIndexTask) PreExecute(ctx context.Context) error { func (dit *DescribeIndexTask) PreExecute(ctx context.Context) error {
dit.Base.MsgType = commonpb.MsgType_kDescribeIndex dit.Base.MsgType = commonpb.MsgType_DescribeIndex
dit.Base.SourceID = Params.ProxyID dit.Base.SourceID = Params.ProxyID
collName, fieldName := dit.CollectionName, dit.FieldName collName, fieldName := dit.CollectionName, dit.FieldName
@ -1546,7 +1546,7 @@ func (dit *DropIndexTask) OnEnqueue() error {
} }
func (dit *DropIndexTask) PreExecute(ctx context.Context) error { func (dit *DropIndexTask) PreExecute(ctx context.Context) error {
dit.Base.MsgType = commonpb.MsgType_kDropIndex dit.Base.MsgType = commonpb.MsgType_DropIndex
dit.Base.SourceID = Params.ProxyID dit.Base.SourceID = Params.ProxyID
collName, fieldName := dit.CollectionName, dit.FieldName collName, fieldName := dit.CollectionName, dit.FieldName
@ -1625,7 +1625,7 @@ func (gist *GetIndexStateTask) OnEnqueue() error {
} }
func (gist *GetIndexStateTask) PreExecute(ctx context.Context) error { func (gist *GetIndexStateTask) PreExecute(ctx context.Context) error {
gist.Base.MsgType = commonpb.MsgType_kGetIndexState gist.Base.MsgType = commonpb.MsgType_GetIndexState
gist.Base.SourceID = Params.ProxyID gist.Base.SourceID = Params.ProxyID
collName, fieldName := gist.CollectionName, gist.FieldName collName, fieldName := gist.CollectionName, gist.FieldName
@ -1650,7 +1650,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
showPartitionRequest := &milvuspb.ShowPartitionRequest{ showPartitionRequest := &milvuspb.ShowPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowPartitions, MsgType: commonpb.MsgType_ShowPartitions,
MsgID: gist.Base.MsgID, MsgID: gist.Base.MsgID,
Timestamp: gist.Base.Timestamp, Timestamp: gist.Base.Timestamp,
SourceID: Params.ProxyID, SourceID: Params.ProxyID,
@ -1670,7 +1670,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
describeIndexReq := milvuspb.DescribeIndexRequest{ describeIndexReq := milvuspb.DescribeIndexRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeIndex, MsgType: commonpb.MsgType_DescribeIndex,
MsgID: gist.Base.MsgID, MsgID: gist.Base.MsgID,
Timestamp: gist.Base.Timestamp, Timestamp: gist.Base.Timestamp,
SourceID: Params.ProxyID, SourceID: Params.ProxyID,
@ -1703,7 +1703,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
for _, partitionID := range partitions.PartitionIDs { for _, partitionID := range partitions.PartitionIDs {
showSegmentsRequest := &milvuspb.ShowSegmentRequest{ showSegmentsRequest := &milvuspb.ShowSegmentRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowSegment, MsgType: commonpb.MsgType_ShowSegments,
MsgID: gist.Base.MsgID, MsgID: gist.Base.MsgID,
Timestamp: gist.Base.Timestamp, Timestamp: gist.Base.Timestamp,
SourceID: Params.ProxyID, SourceID: Params.ProxyID,
@ -1730,7 +1730,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
for _, segmentID := range allSegmentIDs { for _, segmentID := range allSegmentIDs {
describeSegmentRequest := &milvuspb.DescribeSegmentRequest{ describeSegmentRequest := &milvuspb.DescribeSegmentRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeSegment, MsgType: commonpb.MsgType_DescribeSegment,
MsgID: gist.Base.MsgID, MsgID: gist.Base.MsgID,
Timestamp: gist.Base.Timestamp, Timestamp: gist.Base.Timestamp,
SourceID: Params.ProxyID, SourceID: Params.ProxyID,
@ -1856,7 +1856,7 @@ func (ft *FlushTask) OnEnqueue() error {
} }
func (ft *FlushTask) PreExecute(ctx context.Context) error { func (ft *FlushTask) PreExecute(ctx context.Context) error {
ft.Base.MsgType = commonpb.MsgType_kFlush ft.Base.MsgType = commonpb.MsgType_Flush
ft.Base.SourceID = Params.ProxyID ft.Base.SourceID = Params.ProxyID
return nil return nil
} }
@ -1869,7 +1869,7 @@ func (ft *FlushTask) Execute(ctx context.Context) error {
} }
flushReq := &datapb.FlushRequest{ flushReq := &datapb.FlushRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kFlush, MsgType: commonpb.MsgType_Flush,
MsgID: ft.Base.MsgID, MsgID: ft.Base.MsgID,
Timestamp: ft.Base.Timestamp, Timestamp: ft.Base.Timestamp,
SourceID: ft.Base.SourceID, SourceID: ft.Base.SourceID,
@ -1942,7 +1942,7 @@ func (lct *LoadCollectionTask) OnEnqueue() error {
} }
func (lct *LoadCollectionTask) PreExecute(ctx context.Context) error { func (lct *LoadCollectionTask) PreExecute(ctx context.Context) error {
lct.Base.MsgType = commonpb.MsgType_kLoadCollection lct.Base.MsgType = commonpb.MsgType_LoadCollection
lct.Base.SourceID = Params.ProxyID lct.Base.SourceID = Params.ProxyID
collName := lct.CollectionName collName := lct.CollectionName
@ -1966,7 +1966,7 @@ func (lct *LoadCollectionTask) Execute(ctx context.Context) (err error) {
request := &querypb.LoadCollectionRequest{ request := &querypb.LoadCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kLoadCollection, MsgType: commonpb.MsgType_LoadCollection,
MsgID: lct.Base.MsgID, MsgID: lct.Base.MsgID,
Timestamp: lct.Base.Timestamp, Timestamp: lct.Base.Timestamp,
SourceID: lct.Base.SourceID, SourceID: lct.Base.SourceID,
@ -2029,7 +2029,7 @@ func (rct *ReleaseCollectionTask) OnEnqueue() error {
} }
func (rct *ReleaseCollectionTask) PreExecute(ctx context.Context) error { func (rct *ReleaseCollectionTask) PreExecute(ctx context.Context) error {
rct.Base.MsgType = commonpb.MsgType_kReleaseCollection rct.Base.MsgType = commonpb.MsgType_ReleaseCollection
rct.Base.SourceID = Params.ProxyID rct.Base.SourceID = Params.ProxyID
collName := rct.CollectionName collName := rct.CollectionName
@ -2048,7 +2048,7 @@ func (rct *ReleaseCollectionTask) Execute(ctx context.Context) (err error) {
} }
request := &querypb.ReleaseCollectionRequest{ request := &querypb.ReleaseCollectionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kReleaseCollection, MsgType: commonpb.MsgType_ReleaseCollection,
MsgID: rct.Base.MsgID, MsgID: rct.Base.MsgID,
Timestamp: rct.Base.Timestamp, Timestamp: rct.Base.Timestamp,
SourceID: rct.Base.SourceID, SourceID: rct.Base.SourceID,
@ -2106,7 +2106,7 @@ func (lpt *LoadPartitionTask) OnEnqueue() error {
} }
func (lpt *LoadPartitionTask) PreExecute(ctx context.Context) error { func (lpt *LoadPartitionTask) PreExecute(ctx context.Context) error {
lpt.Base.MsgType = commonpb.MsgType_kLoadPartition lpt.Base.MsgType = commonpb.MsgType_LoadPartitions
lpt.Base.SourceID = Params.ProxyID lpt.Base.SourceID = Params.ProxyID
collName := lpt.CollectionName collName := lpt.CollectionName
@ -2137,7 +2137,7 @@ func (lpt *LoadPartitionTask) Execute(ctx context.Context) error {
} }
request := &querypb.LoadPartitionRequest{ request := &querypb.LoadPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kLoadPartition, MsgType: commonpb.MsgType_LoadPartitions,
MsgID: lpt.Base.MsgID, MsgID: lpt.Base.MsgID,
Timestamp: lpt.Base.Timestamp, Timestamp: lpt.Base.Timestamp,
SourceID: lpt.Base.SourceID, SourceID: lpt.Base.SourceID,
@ -2201,7 +2201,7 @@ func (rpt *ReleasePartitionTask) OnEnqueue() error {
} }
func (rpt *ReleasePartitionTask) PreExecute(ctx context.Context) error { func (rpt *ReleasePartitionTask) PreExecute(ctx context.Context) error {
rpt.Base.MsgType = commonpb.MsgType_kReleasePartition rpt.Base.MsgType = commonpb.MsgType_ReleasePartitions
rpt.Base.SourceID = Params.ProxyID rpt.Base.SourceID = Params.ProxyID
collName := rpt.CollectionName collName := rpt.CollectionName
@ -2228,7 +2228,7 @@ func (rpt *ReleasePartitionTask) Execute(ctx context.Context) (err error) {
} }
request := &querypb.ReleasePartitionRequest{ request := &querypb.ReleasePartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kReleasePartition, MsgType: commonpb.MsgType_ReleasePartitions,
MsgID: rpt.Base.MsgID, MsgID: rpt.Base.MsgID,
Timestamp: rpt.Base.Timestamp, Timestamp: rpt.Base.Timestamp,
SourceID: rpt.Base.SourceID, SourceID: rpt.Base.SourceID,

View File

@ -78,7 +78,7 @@ func (tt *timeTick) tick() error {
}, },
TimeTickMsg: internalpb2.TimeTickMsg{ TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, MsgID: 0,
Timestamp: tt.currentTick, Timestamp: tt.currentTick,
SourceID: tt.peerID, SourceID: tt.peerID,

View File

@ -43,7 +43,7 @@ func (tt *TimeTick) Start() error {
}, },
TimeTickMsg: internalpb2.TimeTickMsg{ TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, MsgID: 0,
Timestamp: current, Timestamp: current,
SourceID: 0, SourceID: 0,

View File

@ -59,7 +59,7 @@ func TestDataSyncService_Start(t *testing.T) {
}, },
InsertRequest: internalpb2.InsertRequest{ InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: 0, MsgID: 0,
Timestamp: uint64(i + 1000), Timestamp: uint64(i + 1000),
SourceID: 0, SourceID: 0,
@ -94,7 +94,7 @@ func TestDataSyncService_Start(t *testing.T) {
} }
timeTickResult := internalpb2.TimeTickMsg{ timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, MsgID: 0,
Timestamp: math.MaxUint64, Timestamp: math.MaxUint64,
SourceID: 0, SourceID: 0,

View File

@ -42,7 +42,7 @@ func (fdmNode *filterDmNode) Operate(ctx context.Context, in []Msg) ([]Msg, cont
} }
for _, msg := range msgStreamMsg.TsMessages() { for _, msg := range msgStreamMsg.TsMessages() {
switch msg.Type() { switch msg.Type() {
case commonpb.MsgType_kInsert: case commonpb.MsgType_Insert:
resMsg := fdmNode.filterInvalidInsertMessage(msg.(*msgstream.InsertMsg)) resMsg := fdmNode.filterInvalidInsertMessage(msg.(*msgstream.InsertMsg))
if resMsg != nil { if resMsg != nil {
iMsg.insertMessages = append(iMsg.insertMessages, resMsg) iMsg.insertMessages = append(iMsg.insertMessages, resMsg)

View File

@ -60,7 +60,7 @@ func (stNode *serviceTimeNode) sendTimeTick(ts Timestamp) error {
}, },
TimeTickMsg: internalpb2.TimeTickMsg{ TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, MsgID: 0,
Timestamp: ts, Timestamp: ts,
SourceID: Params.QueryNodeID, SourceID: Params.QueryNodeID,

View File

@ -312,7 +312,7 @@ func (loader *indexLoader) getIndexInfo(collectionID UniqueID, segmentID UniqueI
ctx := context.TODO() ctx := context.TODO()
req := &milvuspb.DescribeSegmentRequest{ req := &milvuspb.DescribeSegmentRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeSegment, MsgType: commonpb.MsgType_DescribeSegment,
}, },
CollectionID: collectionID, CollectionID: collectionID,
SegmentID: segmentID, SegmentID: segmentID,

View File

@ -964,7 +964,7 @@ func doInsert(ctx context.Context, collectionID UniqueID, partitionID UniqueID,
}, },
InsertRequest: internalpb2.InsertRequest{ InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: 0, MsgID: 0,
Timestamp: uint64(i + 1000), Timestamp: uint64(i + 1000),
SourceID: 0, SourceID: 0,
@ -998,7 +998,7 @@ func doInsert(ctx context.Context, collectionID UniqueID, partitionID UniqueID,
} }
timeTickResult := internalpb2.TimeTickMsg{ timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, MsgID: 0,
Timestamp: 1000, Timestamp: 1000,
SourceID: 0, SourceID: 0,
@ -1064,7 +1064,7 @@ func sentTimeTick(ctx context.Context) error {
} }
timeTickResult := internalpb2.TimeTickMsg{ timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, MsgID: 0,
Timestamp: math.MaxUint64, Timestamp: math.MaxUint64,
SourceID: 0, SourceID: 0,

View File

@ -108,7 +108,7 @@ func (node *QueryNode) Init() error {
ctx := context.Background() ctx := context.Background()
registerReq := &queryPb.RegisterNodeRequest{ registerReq := &queryPb.RegisterNodeRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kNone, MsgType: commonpb.MsgType_None,
SourceID: Params.QueryNodeID, SourceID: Params.QueryNodeID,
}, },
Address: &commonpb.Address{ Address: &commonpb.Address{

View File

@ -299,7 +299,7 @@ func (ss *searchService) search(msg msgstream.TsMsg) error {
BaseMsg: msgstream.BaseMsg{HashValues: []uint32{uint32(resultChannelInt)}}, BaseMsg: msgstream.BaseMsg{HashValues: []uint32{uint32(resultChannelInt)}},
SearchResults: internalpb2.SearchResults{ SearchResults: internalpb2.SearchResults{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearchResult, MsgType: commonpb.MsgType_SearchResult,
MsgID: searchMsg.Base.MsgID, MsgID: searchMsg.Base.MsgID,
Timestamp: searchTimestamp, Timestamp: searchTimestamp,
SourceID: searchMsg.Base.SourceID, SourceID: searchMsg.Base.SourceID,
@ -361,7 +361,7 @@ func (ss *searchService) search(msg msgstream.TsMsg) error {
BaseMsg: msgstream.BaseMsg{HashValues: []uint32{uint32(resultChannelInt)}}, BaseMsg: msgstream.BaseMsg{HashValues: []uint32{uint32(resultChannelInt)}},
SearchResults: internalpb2.SearchResults{ SearchResults: internalpb2.SearchResults{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearchResult, MsgType: commonpb.MsgType_SearchResult,
MsgID: searchMsg.Base.MsgID, MsgID: searchMsg.Base.MsgID,
Timestamp: searchTimestamp, Timestamp: searchTimestamp,
SourceID: searchMsg.Base.SourceID, SourceID: searchMsg.Base.SourceID,
@ -422,7 +422,7 @@ func (ss *searchService) publishFailedSearchResult(msg msgstream.TsMsg, errMsg s
BaseMsg: msgstream.BaseMsg{HashValues: []uint32{uint32(resultChannelInt)}}, BaseMsg: msgstream.BaseMsg{HashValues: []uint32{uint32(resultChannelInt)}},
SearchResults: internalpb2.SearchResults{ SearchResults: internalpb2.SearchResults{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearchResult, MsgType: commonpb.MsgType_SearchResult,
MsgID: searchMsg.Base.MsgID, MsgID: searchMsg.Base.MsgID,
Timestamp: searchMsg.Base.Timestamp, Timestamp: searchMsg.Base.Timestamp,
SourceID: searchMsg.Base.SourceID, SourceID: searchMsg.Base.SourceID,

View File

@ -82,7 +82,7 @@ func TestSearch_Search(t *testing.T) {
}, },
SearchRequest: internalpb2.SearchRequest{ SearchRequest: internalpb2.SearchRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearch, MsgType: commonpb.MsgType_Search,
MsgID: 1, MsgID: 1,
Timestamp: uint64(10 + 1000), Timestamp: uint64(10 + 1000),
SourceID: 1, SourceID: 1,
@ -138,7 +138,7 @@ func TestSearch_Search(t *testing.T) {
}, },
InsertRequest: internalpb2.InsertRequest{ InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: int64(i), MsgID: int64(i),
Timestamp: uint64(10 + 1000), Timestamp: uint64(10 + 1000),
SourceID: 0, SourceID: 0,
@ -172,7 +172,7 @@ func TestSearch_Search(t *testing.T) {
} }
timeTickResult := internalpb2.TimeTickMsg{ timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, MsgID: 0,
Timestamp: math.MaxUint64, Timestamp: math.MaxUint64,
SourceID: 0, SourceID: 0,
@ -288,7 +288,7 @@ func TestSearch_SearchMultiSegments(t *testing.T) {
}, },
SearchRequest: internalpb2.SearchRequest{ SearchRequest: internalpb2.SearchRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearch, MsgType: commonpb.MsgType_Search,
MsgID: 1, MsgID: 1,
Timestamp: uint64(10 + 1000), Timestamp: uint64(10 + 1000),
SourceID: 1, SourceID: 1,
@ -340,7 +340,7 @@ func TestSearch_SearchMultiSegments(t *testing.T) {
}, },
InsertRequest: internalpb2.InsertRequest{ InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert, MsgType: commonpb.MsgType_Insert,
MsgID: int64(i), MsgID: int64(i),
Timestamp: uint64(i + 1000), Timestamp: uint64(i + 1000),
SourceID: 0, SourceID: 0,
@ -374,7 +374,7 @@ func TestSearch_SearchMultiSegments(t *testing.T) {
} }
timeTickResult := internalpb2.TimeTickMsg{ timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, MsgID: 0,
Timestamp: math.MaxUint64, Timestamp: math.MaxUint64,
SourceID: 0, SourceID: 0,

View File

@ -74,7 +74,7 @@ func (sService *statsService) publicStatistic(fieldStats []*internalpb2.FieldSta
queryNodeStats := internalpb2.QueryNodeStats{ queryNodeStats := internalpb2.QueryNodeStats{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kQueryNodeStats, MsgType: commonpb.MsgType_QueryNodeStats,
SourceID: Params.QueryNodeID, SourceID: Params.QueryNodeID,
}, },
SegStats: segStats, SegStats: segStats,

View File

@ -279,7 +279,7 @@ func (qs *QueryService) LoadCollection(ctx context.Context, req *querypb.LoadCol
// get partitionIDs // get partitionIDs
showPartitionRequest := &milvuspb.ShowPartitionRequest{ showPartitionRequest := &milvuspb.ShowPartitionRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowPartitions, MsgType: commonpb.MsgType_ShowPartitions,
}, },
CollectionID: collectionID, CollectionID: collectionID,
} }
@ -442,7 +442,7 @@ func (qs *QueryService) LoadPartitions(ctx context.Context, req *querypb.LoadPar
showSegmentRequest := &milvuspb.ShowSegmentRequest{ showSegmentRequest := &milvuspb.ShowSegmentRequest{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowSegment, MsgType: commonpb.MsgType_ShowSegments,
}, },
CollectionID: collectionID, CollectionID: collectionID,
PartitionID: partitionID, PartitionID: partitionID,

View File

@ -48,7 +48,7 @@ func (producer *MsgProducer) broadcastMsg() {
} }
timeTickResult := internalpb2.TimeTickMsg{ timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{ Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick, MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, MsgID: 0,
Timestamp: tt, Timestamp: tt,
SourceID: 0, SourceID: 0,

View File

@ -187,9 +187,9 @@ func allowTrace(in interface{}) bool {
} }
switch res := in.(type) { switch res := in.(type) {
case msgstream.TsMsg: case msgstream.TsMsg:
return !(res.Type() == commonpb.MsgType_kTimeTick || return !(res.Type() == commonpb.MsgType_TimeTick ||
res.Type() == commonpb.MsgType_kQueryNodeStats || res.Type() == commonpb.MsgType_QueryNodeStats ||
res.Type() == commonpb.MsgType_kLoadIndex) res.Type() == commonpb.MsgType_LoadIndex)
default: default:
return false return false
} }