Add interface of load and release collection and partition

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
pull/4973/head^2
cai.zhang 2021-02-04 15:31:02 +08:00 committed by yefu.chen
parent e3fadc45d4
commit 55634dc5f3
5 changed files with 437 additions and 98 deletions

View File

@ -251,26 +251,29 @@ const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(
"D\020\001\022\016\n\nINPROGRESS\020\002\022\014\n\010FINISHED\020\003\022\n\n\006FAI"
"LED\020\004*o\n\014SegmentState\022\017\n\013SegmentNone\020\000\022\023"
"\n\017SegmentNotExist\020\001\022\022\n\016SegmentGrowing\020\002\022"
"\021\n\rSegmentSealed\020\003\022\022\n\016SegmentFlushed\020\004*\252"
"\005\n\007MsgType\022\t\n\005kNone\020\000\022\025\n\021kCreateCollecti"
"\021\n\rSegmentSealed\020\003\022\022\n\016SegmentFlushed\020\004*\204"
"\006\n\007MsgType\022\t\n\005kNone\020\000\022\025\n\021kCreateCollecti"
"on\020d\022\023\n\017kDropCollection\020e\022\022\n\016kHasCollect"
"ion\020f\022\027\n\023kDescribeCollection\020g\022\024\n\020kShowC"
"ollections\020h\022\022\n\016kGetSysConfigs\020i\022\025\n\020kCre"
"atePartition\020\310\001\022\023\n\016kDropPartition\020\311\001\022\022\n\r"
"kHasPartition\020\312\001\022\027\n\022kDescribePartition\020\313"
"\001\022\024\n\017kShowPartitions\020\314\001\022\021\n\014kShowSegment\020"
"\372\001\022\025\n\020kDescribeSegment\020\373\001\022\021\n\014kCreateInde"
"x\020\254\002\022\023\n\016kDescribeIndex\020\255\002\022\014\n\007kInsert\020\220\003\022"
"\014\n\007kDelete\020\221\003\022\013\n\006kFlush\020\222\003\022\014\n\007kSearch\020\364\003"
"\022\022\n\rkSearchResult\020\365\003\022\023\n\016kGetIndexState\020\366"
"\003\022\035\n\030kGetCollectionStatistics\020\367\003\022\034\n\027kGet"
"PartitionStatistics\020\370\003\022\021\n\014kSegmentInfo\020\330"
"\004\022\016\n\tkTimeTick\020\260\t\022\024\n\017kQueryNodeStats\020\261\t\022"
"\017\n\nkLoadIndex\020\262\t\022\017\n\nkRequestID\020\263\t\022\020\n\013kRe"
"questTSO\020\264\t\022\025\n\020kAllocateSegment\020\265\t\022\027\n\022kS"
"egmentStatistics\020\266\t\022\026\n\021kSegmentFlushDone"
"\020\267\tBBZ@github.com/zilliztech/milvus-dist"
"ributed/internal/proto/commonpbb\006proto3"
"ollections\020h\022\022\n\016kGetSysConfigs\020i\022\023\n\017kLoa"
"dCollection\020j\022\026\n\022kReleaseCollection\020k\022\025\n"
"\020kCreatePartition\020\310\001\022\023\n\016kDropPartition\020\311"
"\001\022\022\n\rkHasPartition\020\312\001\022\027\n\022kDescribePartit"
"ion\020\313\001\022\024\n\017kShowPartitions\020\314\001\022\023\n\016kLoadPar"
"tition\020\315\001\022\026\n\021kReleasePartition\020\316\001\022\021\n\014kSh"
"owSegment\020\372\001\022\025\n\020kDescribeSegment\020\373\001\022\021\n\014k"
"CreateIndex\020\254\002\022\023\n\016kDescribeIndex\020\255\002\022\014\n\007k"
"Insert\020\220\003\022\014\n\007kDelete\020\221\003\022\013\n\006kFlush\020\222\003\022\014\n\007"
"kSearch\020\364\003\022\022\n\rkSearchResult\020\365\003\022\023\n\016kGetIn"
"dexState\020\366\003\022\035\n\030kGetCollectionStatistics\020"
"\367\003\022\034\n\027kGetPartitionStatistics\020\370\003\022\021\n\014kSeg"
"mentInfo\020\330\004\022\016\n\tkTimeTick\020\260\t\022\024\n\017kQueryNod"
"eStats\020\261\t\022\017\n\nkLoadIndex\020\262\t\022\017\n\nkRequestID"
"\020\263\t\022\020\n\013kRequestTSO\020\264\t\022\025\n\020kAllocateSegmen"
"t\020\265\t\022\027\n\022kSegmentStatistics\020\266\t\022\026\n\021kSegmen"
"tFlushDone\020\267\tBBZ@github.com/zilliztech/m"
"ilvus-distributed/internal/proto/commonp"
"bb\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_common_2eproto_deps[1] = {
};
@ -286,7 +289,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_com
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_common_2eproto_once;
static bool descriptor_table_common_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_common_2eproto = {
&descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 1919,
&descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 2009,
&descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_sccs, descriptor_table_common_2eproto_deps, 7, 0,
schemas, file_default_instances, TableStruct_common_2eproto::offsets,
file_level_metadata_common_2eproto, 7, file_level_enum_descriptors_common_2eproto, file_level_service_descriptors_common_2eproto,
@ -381,11 +384,15 @@ bool MsgType_IsValid(int value) {
case 103:
case 104:
case 105:
case 106:
case 107:
case 200:
case 201:
case 202:
case 203:
case 204:
case 205:
case 206:
case 250:
case 251:
case 300:

View File

@ -207,11 +207,15 @@ enum MsgType : int {
kDescribeCollection = 103,
kShowCollections = 104,
kGetSysConfigs = 105,
kLoadCollection = 106,
kReleaseCollection = 107,
kCreatePartition = 200,
kDropPartition = 201,
kHasPartition = 202,
kDescribePartition = 203,
kShowPartitions = 204,
kLoadPartition = 205,
kReleasePartition = 206,
kShowSegment = 250,
kDescribeSegment = 251,
kCreateIndex = 300,

View File

@ -83,6 +83,8 @@ enum MsgType {
kDescribeCollection = 103;
kShowCollections = 104;
kGetSysConfigs = 105;
kLoadCollection = 106;
kReleaseCollection = 107;
/* Definition Requests: partition */
kCreatePartition = 200;
@ -90,6 +92,8 @@ enum MsgType {
kHasPartition = 202;
kDescribePartition = 203;
kShowPartitions = 204;
kLoadPartition = 205;
kReleasePartition = 206;
/* Define Requests: segment */
kShowSegment = 250;

View File

@ -194,12 +194,16 @@ const (
MsgType_kDescribeCollection MsgType = 103
MsgType_kShowCollections MsgType = 104
MsgType_kGetSysConfigs MsgType = 105
MsgType_kLoadCollection MsgType = 106
MsgType_kReleaseCollection MsgType = 107
// Definition Requests: partition
MsgType_kCreatePartition MsgType = 200
MsgType_kDropPartition MsgType = 201
MsgType_kHasPartition MsgType = 202
MsgType_kDescribePartition MsgType = 203
MsgType_kShowPartitions MsgType = 204
MsgType_kLoadPartition MsgType = 205
MsgType_kReleasePartition MsgType = 206
// Define Requests: segment
MsgType_kShowSegment MsgType = 250
MsgType_kDescribeSegment MsgType = 251
@ -237,11 +241,15 @@ var MsgType_name = map[int32]string{
103: "kDescribeCollection",
104: "kShowCollections",
105: "kGetSysConfigs",
106: "kLoadCollection",
107: "kReleaseCollection",
200: "kCreatePartition",
201: "kDropPartition",
202: "kHasPartition",
203: "kDescribePartition",
204: "kShowPartitions",
205: "kLoadPartition",
206: "kReleasePartition",
250: "kShowSegment",
251: "kDescribeSegment",
300: "kCreateIndex",
@ -273,11 +281,15 @@ var MsgType_value = map[string]int32{
"kDescribeCollection": 103,
"kShowCollections": 104,
"kGetSysConfigs": 105,
"kLoadCollection": 106,
"kReleaseCollection": 107,
"kCreatePartition": 200,
"kDropPartition": 201,
"kHasPartition": 202,
"kDescribePartition": 203,
"kShowPartitions": 204,
"kLoadPartition": 205,
"kReleasePartition": 206,
"kShowSegment": 250,
"kDescribeSegment": 251,
"kCreateIndex": 300,
@ -640,79 +652,81 @@ func init() {
func init() { proto.RegisterFile("common.proto", fileDescriptor_555bd8c177793206) }
var fileDescriptor_555bd8c177793206 = []byte{
// 1175 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0xdb, 0x6e, 0xdb, 0x46,
0x13, 0x8e, 0x2c, 0xd9, 0x32, 0x47, 0x8a, 0xbc, 0x5e, 0x9f, 0xf4, 0xff, 0x75, 0x8b, 0xc0, 0x57,
0x81, 0x81, 0xd8, 0x45, 0x0b, 0xb4, 0x57, 0x01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0x2e, 0x58, 0x78, 0x1e, 0x4d, 0x05, 0xcb, 0xa6, 0x41, 0x72, 0xae, 0x1e, 0xfe, 0xf3,
0xfc, 0xe1, 0x9f, 0x0d, 0x87, 0x5b, 0x2a, 0x7e, 0xf3, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe2,
0xc3, 0x62, 0xa9, 0xdb, 0x07, 0x00, 0x00,
// 1205 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0xdd, 0x8e, 0xdb, 0x44,
0x14, 0x6e, 0x7e, 0x76, 0xb3, 0x3e, 0x49, 0xb3, 0xb3, 0xb3, 0x7f, 0x01, 0x16, 0x54, 0xed, 0x55,
0xb5, 0x52, 0x77, 0x11, 0x48, 0x70, 0x55, 0x89, 0xac, 0x3d, 0xd9, 0xb5, 0xea, 0xd8, 0xe9, 0xd8,
0x29, 0x2d, 0x37, 0x96, 0x93, 0x4c, 0xb3, 0x26, 0x4e, 0x1c, 0x3c, 0x93, 0xb6, 0xe9, 0x35, 0x0f,
0x00, 0x7d, 0x0e, 0x90, 0xf8, 0x87, 0x47, 0xe0, 0xff, 0x9a, 0x47, 0xe0, 0x01, 0xf8, 0x13, 0xdc,
0xa0, 0x19, 0xdb, 0x89, 0x85, 0xca, 0x9d, 0xcf, 0x77, 0xce, 0xf9, 0xe6, 0x7c, 0xe7, 0x9c, 0xf1,
0x40, 0x63, 0x18, 0x4f, 0xa7, 0xf1, 0xec, 0x74, 0x9e, 0xc4, 0x22, 0xc6, 0xbb, 0xd3, 0x30, 0x7a,
0xb4, 0xe0, 0xa9, 0x75, 0x9a, 0xba, 0x8e, 0x6b, 0xb0, 0x41, 0xa6, 0x73, 0xb1, 0x3c, 0xf6, 0x61,
0xd3, 0x15, 0x81, 0x58, 0x70, 0x7c, 0x1b, 0x80, 0x25, 0x49, 0x9c, 0xf8, 0xc3, 0x78, 0xc4, 0x5a,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 0xe1, 0x04, 0x7d, 0xa2, 0xa9, 0xa6, 0xde, 0x5d, 0xb0, 0x64, 0x69,
0xc7, 0x23, 0x26, 0xb3, 0x39, 0xfa, 0x54, 0xc3, 0xdb, 0x00, 0xaa, 0xa9, 0xa9, 0xcc, 0xcf, 0x52,
0x80, 0xb2, 0xf7, 0x16, 0x8c, 0x0b, 0xd3, 0x40, 0x9f, 0xcb, 0xff, 0x59, 0x3d, 0x07, 0x3c, 0xd7,
0x41, 0x5f, 0x68, 0xaa, 0x91, 0xed, 0x28, 0x8a, 0x87, 0x81, 0x58, 0x35, 0xf2, 0x4b, 0x4d, 0x8d,
0xb3, 0x70, 0x8f, 0xb2, 0xe2, 0xbe, 0xd2, 0xd4, 0x8c, 0x8a, 0x77, 0xc0, 0x90, 0xeb, 0xfe, 0xb5,
0x76, 0x7e, 0xfe, 0xce, 0x5b, 0xe3, 0x50, 0x5c, 0x2d, 0x06, 0xf2, 0x85, 0x38, 0x7b, 0x1a, 0x46,
0x51, 0xf8, 0x54, 0xb0, 0xe1, 0xd5, 0x59, 0xfa, 0x7a, 0xdc, 0x1a, 0x85, 0x5c, 0x24, 0xe1, 0x60,
0x21, 0xd8, 0xe8, 0x2c, 0x9c, 0x09, 0x96, 0xcc, 0x82, 0xe8, 0x4c, 0x3d, 0x29, 0x67, 0xe9, 0x93,
0x32, 0x1f, 0x0c, 0x36, 0x95, 0xfd, 0xfa, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x22, 0x65, 0x7d,
0x40, 0x35, 0x08, 0x00, 0x00,
}

View File

@ -1,21 +1,21 @@
package proxynode
import (
"context"
"errors"
"log"
"math"
"strconv"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/golang/protobuf/proto"
"github.com/zilliztech/milvus-distributed/internal/allocator"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/querypb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
@ -1513,3 +1513,313 @@ func (ft *FlushTask) Execute() error {
func (ft *FlushTask) PostExecute() error {
return nil
}
type LoadCollectionTask struct {
Condition
*milvuspb.LoadCollectionRequest
queryserviceClient QueryServiceClient
result *commonpb.Status
ctx context.Context
}
func (lct *LoadCollectionTask) OnEnqueue() error {
lct.Base = &commonpb.MsgBase{}
return nil
}
func (lct *LoadCollectionTask) ID() UniqueID {
return lct.Base.MsgID
}
func (lct *LoadCollectionTask) SetID(uid UniqueID) {
lct.Base.MsgID = uid
}
func (lct *LoadCollectionTask) Type() commonpb.MsgType {
return lct.Base.MsgType
}
func (lct *LoadCollectionTask) BeginTs() Timestamp {
return lct.Base.Timestamp
}
func (lct *LoadCollectionTask) EndTs() Timestamp {
return lct.Base.Timestamp
}
func (lct *LoadCollectionTask) SetTs(ts Timestamp) {
lct.Base.Timestamp = ts
}
func (lct *LoadCollectionTask) PreExecute() error {
lct.Base.MsgType = commonpb.MsgType_kLoadCollection
lct.Base.SourceID = Params.ProxyID
collName := lct.CollectionName
if err := ValidateCollectionName(collName); err != nil {
return err
}
return nil
}
func (lct *LoadCollectionTask) Execute() (err error) {
collID, err := globalMetaCache.GetCollectionID(lct.CollectionName)
if err != nil {
return err
}
request := &querypb.LoadCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kLoadCollection,
MsgID: lct.Base.MsgID,
Timestamp: lct.Base.Timestamp,
SourceID: lct.Base.SourceID,
},
DbID: 0,
CollectionID: collID,
}
lct.result, err = lct.queryserviceClient.LoadCollection(request)
return err
}
func (lct *LoadCollectionTask) PostExecute() error {
return nil
}
type ReleaseCollectionTask struct {
Condition
*milvuspb.ReleaseCollectionRequest
queryserviceClient QueryServiceClient
result *commonpb.Status
ctx context.Context
}
func (rct *ReleaseCollectionTask) OnEnqueue() error {
rct.Base = &commonpb.MsgBase{}
return nil
}
func (rct *ReleaseCollectionTask) ID() UniqueID {
return rct.Base.MsgID
}
func (rct *ReleaseCollectionTask) SetID(uid UniqueID) {
rct.Base.MsgID = uid
}
func (rct *ReleaseCollectionTask) Type() commonpb.MsgType {
return rct.Base.MsgType
}
func (rct *ReleaseCollectionTask) BeginTs() Timestamp {
return rct.Base.Timestamp
}
func (rct *ReleaseCollectionTask) EndTs() Timestamp {
return rct.Base.Timestamp
}
func (rct *ReleaseCollectionTask) SetTs(ts Timestamp) {
rct.Base.Timestamp = ts
}
func (rct *ReleaseCollectionTask) PreExecute() error {
rct.Base.MsgType = commonpb.MsgType_kReleaseCollection
rct.Base.SourceID = Params.ProxyID
collName := rct.CollectionName
if err := ValidateCollectionName(collName); err != nil {
return err
}
return nil
}
func (rct *ReleaseCollectionTask) Execute() (err error) {
collID, err := globalMetaCache.GetCollectionID(rct.CollectionName)
if err != nil {
return err
}
request := &querypb.ReleaseCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kReleaseCollection,
MsgID: rct.Base.MsgID,
Timestamp: rct.Base.Timestamp,
SourceID: rct.Base.SourceID,
},
DbID: 0,
CollectionID: collID,
}
rct.result, err = rct.queryserviceClient.ReleaseCollection(request)
return err
}
func (rct *ReleaseCollectionTask) PostExecute() error {
return nil
}
type LoadPartitionTask struct {
Condition
*milvuspb.LoadPartitonRequest
queryserviceClient QueryServiceClient
result *commonpb.Status
ctx context.Context
}
func (lpt *LoadPartitionTask) OnEnqueue() error {
lpt.Base = &commonpb.MsgBase{}
return nil
}
func (lpt *LoadPartitionTask) ID() UniqueID {
return lpt.Base.MsgID
}
func (lpt *LoadPartitionTask) SetID(uid UniqueID) {
lpt.Base.MsgID = uid
}
func (lpt *LoadPartitionTask) Type() commonpb.MsgType {
return lpt.Base.MsgType
}
func (lpt *LoadPartitionTask) BeginTs() Timestamp {
return lpt.Base.Timestamp
}
func (lpt *LoadPartitionTask) EndTs() Timestamp {
return lpt.Base.Timestamp
}
func (lpt *LoadPartitionTask) SetTs(ts Timestamp) {
lpt.Base.Timestamp = ts
}
func (lpt *LoadPartitionTask) PreExecute() error {
lpt.Base.MsgType = commonpb.MsgType_kLoadPartition
lpt.Base.SourceID = Params.ProxyID
collName := lpt.CollectionName
if err := ValidateCollectionName(collName); err != nil {
return err
}
return nil
}
func (lpt *LoadPartitionTask) Execute() (err error) {
var partitionIDs []int64
collID, err := globalMetaCache.GetCollectionID(lpt.CollectionName)
if err != nil {
return err
}
for _, partitionName := range lpt.PartitionNames {
partitionID, err := globalMetaCache.GetPartitionID(lpt.CollectionName, partitionName)
if err != nil {
return err
}
partitionIDs = append(partitionIDs, partitionID)
}
request := &querypb.LoadPartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kLoadPartition,
MsgID: lpt.Base.MsgID,
Timestamp: lpt.Base.Timestamp,
SourceID: lpt.Base.SourceID,
},
DbID: 0,
CollectionID: collID,
PartitionIDs: partitionIDs,
}
lpt.result, err = lpt.queryserviceClient.LoadPartitions(request)
return err
}
func (lpt *LoadPartitionTask) PostExecute() error {
return nil
}
type ReleasePartitionTask struct {
Condition
*milvuspb.ReleasePartitionRequest
queryserviceClient QueryServiceClient
result *commonpb.Status
ctx context.Context
}
func (rpt *ReleasePartitionTask) OnEnqueue() error {
rpt.Base = &commonpb.MsgBase{}
return nil
}
func (rpt *ReleasePartitionTask) ID() UniqueID {
return rpt.Base.MsgID
}
func (rpt *ReleasePartitionTask) SetID(uid UniqueID) {
rpt.Base.MsgID = uid
}
func (rpt *ReleasePartitionTask) Type() commonpb.MsgType {
return rpt.Base.MsgType
}
func (rpt *ReleasePartitionTask) BeginTs() Timestamp {
return rpt.Base.Timestamp
}
func (rpt *ReleasePartitionTask) EndTs() Timestamp {
return rpt.Base.Timestamp
}
func (rpt *ReleasePartitionTask) SetTs(ts Timestamp) {
rpt.Base.Timestamp = ts
}
func (rpt *ReleasePartitionTask) PreExecute() error {
rpt.Base.MsgType = commonpb.MsgType_kReleasePartition
rpt.Base.SourceID = Params.ProxyID
collName := rpt.CollectionName
if err := ValidateCollectionName(collName); err != nil {
return err
}
return nil
}
func (rpt *ReleasePartitionTask) Execute() (err error) {
var partitionIDs []int64
collID, err := globalMetaCache.GetCollectionID(rpt.CollectionName)
if err != nil {
return err
}
for _, partitionName := range rpt.PartitionNames {
partitionID, err := globalMetaCache.GetPartitionID(rpt.CollectionName, partitionName)
if err != nil {
return err
}
partitionIDs = append(partitionIDs, partitionID)
}
request := &querypb.ReleasePartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kReleasePartition,
MsgID: rpt.Base.MsgID,
Timestamp: rpt.Base.Timestamp,
SourceID: rpt.Base.SourceID,
},
DbID: 0,
CollectionID: collID,
PartitionIDs: partitionIDs,
}
rpt.result, err = rpt.queryserviceClient.ReleasePartitions(request)
return err
}
func (rpt *ReleasePartitionTask) PostExecute() error {
return nil
}