Add sealedSegment cgo unittest, fix growingSegment field id check

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
pull/4973/head^2
bigsheeper 2021-01-22 15:41:54 +08:00 committed by yefu.chen
parent 511aa419fa
commit 067c30c422
13 changed files with 735 additions and 357 deletions

View File

@ -187,64 +187,55 @@ func NewUnmarshalDispatcher() *UnmarshalDispatcher
RocksMQ is a RocksDB-based messaging/streaming library.
```go
```GO
// All the following UniqueIDs are 64-bit integer, which is combined with timestamp and increasing number
type ProducerMessage struct {
payload []byte
}
```
```go
type ConsumerMessage struct {
msgID MessageID
msgID UniqueID
payload []byte
}
```
```GO
type Channel struct {
beginOffset MessageID
endOffset MessageID
}
type ConsumerGroupContext struct {
currentOffset MessageID
type IDAllocator interface {
Alloc(count uint32) (UniqueID, UniqueID, error)
AllocOne() (UniqueID, error)
UpdateID() error
}
// Every collection has its RocksMQ
type RocksMQ struct {
channels map[string]Channel
cgCtxs map[string]ConsumerGroupContext
mu sync.Mutex
store *gorocksdb.DB
kv kv.Base
idAllocator IDAllocator
produceMu sync.Mutex
consumeMu sync.Mutex
}
func (rmq *RocksMQ) CreateChannel(channelName string) error // create channel, add record in meta-store
func (rmq *RocksMQ) DestroyChannel(channelName string) error // drop channel, delete record in meta-store
func (rmq *RocksMQ) CreateConsumerGroup(groupName string) error // create consumer group, add record in meta-store
func (rmq *RocksMQ) DestroyConsumerGroup(groupName string) error // drop consumer group, delete record in meta-store
func (rmq *RocksMQ) Produce(channelName string, messages []ProducerMessage) error // produce a batch of message, insert into rocksdb
func (rmq *RocksMQ) Consume(groupName string, channelName string, n int) ([]ConsumerMessage, error) // comsume up to n messages, modify current_id in Etcd
func (rmq *RocksMQ) Seek(groupName string, channelName string, msgID MessageID) error // modify current_id in Etcd
func (rmq *RocksMQ) CreateChannel(channelName string) error
func (rmq *RocksMQ) DestroyChannel(channelName string) error
func (rmq *RocksMQ) CreateConsumerGroup(groupName string) error
func (rmq *RocksMQ) DestroyConsumerGroup(groupName string) error
func (rmq *RocksMQ) Produce(channelName string, messages []ProducerMessage) error
func (rmq *RocksMQ) Consume(groupName string, channelName string, n int) ([]ConsumerMessage, error)
func (rmq *RocksMQ) Seek(groupName string, channelName string, msgID MessageID) error
func NewRocksMQ(name string, idAllocator IDAllocator) (*RocksMQ, error)
```
##### A.4.1 Meta (stored in Etcd)
* channel meta
```go
"$(channel_name)/begin_id", MessageID
"$(channel_name)/end_id", MessageID
```
// channel meta
"$(channel_name)/begin_id", UniqueID
"$(channel_name)/end_id", UniqueID
* consumer group meta
```go
"$(group_name)/$(channel_name)/current_id", MessageID
// consumer group meta
"$(group_name)/$(channel_name)/current_id", UniqueID
```

View File

@ -872,6 +872,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_milvus_2eproto::offsets[] PROT
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::milvus::proto::milvus::DescribeCollectionResponse, status_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::milvus::DescribeCollectionResponse, schema_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::milvus::DescribeCollectionResponse, collectionid_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::milvus::proto::milvus::LoadCollectionRequest, _internal_metadata_),
~0u, // no _extensions_
@ -1159,40 +1160,40 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB
{ 32, -1, sizeof(::milvus::proto::milvus::StringResponse)},
{ 39, -1, sizeof(::milvus::proto::milvus::DescribeCollectionRequest)},
{ 47, -1, sizeof(::milvus::proto::milvus::DescribeCollectionResponse)},
{ 54, -1, sizeof(::milvus::proto::milvus::LoadCollectionRequest)},
{ 62, -1, sizeof(::milvus::proto::milvus::ReleaseCollectionRequest)},
{ 70, -1, sizeof(::milvus::proto::milvus::CollectionStatsRequest)},
{ 78, -1, sizeof(::milvus::proto::milvus::CollectionStatsResponse)},
{ 85, -1, sizeof(::milvus::proto::milvus::ShowCollectionRequest)},
{ 92, -1, sizeof(::milvus::proto::milvus::ShowCollectionResponse)},
{ 99, -1, sizeof(::milvus::proto::milvus::CreatePartitionRequest)},
{ 108, -1, sizeof(::milvus::proto::milvus::DropPartitionRequest)},
{ 117, -1, sizeof(::milvus::proto::milvus::HasPartitionRequest)},
{ 126, -1, sizeof(::milvus::proto::milvus::LoadPartitonRequest)},
{ 135, -1, sizeof(::milvus::proto::milvus::ReleasePartitionRequest)},
{ 144, -1, sizeof(::milvus::proto::milvus::PartitionStatsRequest)},
{ 153, -1, sizeof(::milvus::proto::milvus::PartitionStatsResponse)},
{ 160, -1, sizeof(::milvus::proto::milvus::ShowPartitionRequest)},
{ 169, -1, sizeof(::milvus::proto::milvus::ShowPartitionResponse)},
{ 177, -1, sizeof(::milvus::proto::milvus::DescribeSegmentRequest)},
{ 185, -1, sizeof(::milvus::proto::milvus::DescribeSegmentResponse)},
{ 192, -1, sizeof(::milvus::proto::milvus::ShowSegmentRequest)},
{ 200, -1, sizeof(::milvus::proto::milvus::ShowSegmentResponse)},
{ 207, -1, sizeof(::milvus::proto::milvus::CreateIndexRequest)},
{ 217, -1, sizeof(::milvus::proto::milvus::DescribeIndexRequest)},
{ 227, -1, sizeof(::milvus::proto::milvus::IndexDescription)},
{ 234, -1, sizeof(::milvus::proto::milvus::DescribeIndexResponse)},
{ 241, -1, sizeof(::milvus::proto::milvus::IndexStateRequest)},
{ 251, -1, sizeof(::milvus::proto::milvus::IndexStateResponse)},
{ 258, -1, sizeof(::milvus::proto::milvus::InsertRequest)},
{ 269, -1, sizeof(::milvus::proto::milvus::InsertResponse)},
{ 277, -1, sizeof(::milvus::proto::milvus::PlaceholderValue)},
{ 285, -1, sizeof(::milvus::proto::milvus::PlaceholderGroup)},
{ 291, -1, sizeof(::milvus::proto::milvus::SearchRequest)},
{ 302, -1, sizeof(::milvus::proto::milvus::Hits)},
{ 310, -1, sizeof(::milvus::proto::milvus::SearchResults)},
{ 317, -1, sizeof(::milvus::proto::milvus::FlushRequest)},
{ 325, -1, sizeof(::milvus::proto::milvus::RegisterLinkResponse)},
{ 55, -1, sizeof(::milvus::proto::milvus::LoadCollectionRequest)},
{ 63, -1, sizeof(::milvus::proto::milvus::ReleaseCollectionRequest)},
{ 71, -1, sizeof(::milvus::proto::milvus::CollectionStatsRequest)},
{ 79, -1, sizeof(::milvus::proto::milvus::CollectionStatsResponse)},
{ 86, -1, sizeof(::milvus::proto::milvus::ShowCollectionRequest)},
{ 93, -1, sizeof(::milvus::proto::milvus::ShowCollectionResponse)},
{ 100, -1, sizeof(::milvus::proto::milvus::CreatePartitionRequest)},
{ 109, -1, sizeof(::milvus::proto::milvus::DropPartitionRequest)},
{ 118, -1, sizeof(::milvus::proto::milvus::HasPartitionRequest)},
{ 127, -1, sizeof(::milvus::proto::milvus::LoadPartitonRequest)},
{ 136, -1, sizeof(::milvus::proto::milvus::ReleasePartitionRequest)},
{ 145, -1, sizeof(::milvus::proto::milvus::PartitionStatsRequest)},
{ 154, -1, sizeof(::milvus::proto::milvus::PartitionStatsResponse)},
{ 161, -1, sizeof(::milvus::proto::milvus::ShowPartitionRequest)},
{ 170, -1, sizeof(::milvus::proto::milvus::ShowPartitionResponse)},
{ 178, -1, sizeof(::milvus::proto::milvus::DescribeSegmentRequest)},
{ 186, -1, sizeof(::milvus::proto::milvus::DescribeSegmentResponse)},
{ 193, -1, sizeof(::milvus::proto::milvus::ShowSegmentRequest)},
{ 201, -1, sizeof(::milvus::proto::milvus::ShowSegmentResponse)},
{ 208, -1, sizeof(::milvus::proto::milvus::CreateIndexRequest)},
{ 218, -1, sizeof(::milvus::proto::milvus::DescribeIndexRequest)},
{ 228, -1, sizeof(::milvus::proto::milvus::IndexDescription)},
{ 235, -1, sizeof(::milvus::proto::milvus::DescribeIndexResponse)},
{ 242, -1, sizeof(::milvus::proto::milvus::IndexStateRequest)},
{ 252, -1, sizeof(::milvus::proto::milvus::IndexStateResponse)},
{ 259, -1, sizeof(::milvus::proto::milvus::InsertRequest)},
{ 270, -1, sizeof(::milvus::proto::milvus::InsertResponse)},
{ 278, -1, sizeof(::milvus::proto::milvus::PlaceholderValue)},
{ 286, -1, sizeof(::milvus::proto::milvus::PlaceholderGroup)},
{ 292, -1, sizeof(::milvus::proto::milvus::SearchRequest)},
{ 303, -1, sizeof(::milvus::proto::milvus::Hits)},
{ 311, -1, sizeof(::milvus::proto::milvus::SearchResults)},
{ 318, -1, sizeof(::milvus::proto::milvus::FlushRequest)},
{ 326, -1, sizeof(::milvus::proto::milvus::RegisterLinkResponse)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
@ -1257,171 +1258,172 @@ const char descriptor_table_protodef_milvus_2eproto[] PROTOBUF_SECTION_VARIABLE(
"e\030\002 \001(\t\"q\n\031DescribeCollectionRequest\022*\n\004"
"base\030\001 \001(\0132\034.milvus.proto.common.MsgBase"
"\022\017\n\007db_name\030\002 \001(\t\022\027\n\017collection_name\030\003 \001"
"(\t\"\200\001\n\032DescribeCollectionResponse\022+\n\006sta"
"(\t\"\226\001\n\032DescribeCollectionResponse\022+\n\006sta"
"tus\030\001 \001(\0132\033.milvus.proto.common.Status\0225"
"\n\006schema\030\002 \001(\0132%.milvus.proto.schema.Col"
"lectionSchema\"m\n\025LoadCollectionRequest\022*"
"\n\004base\030\001 \001(\0132\034.milvus.proto.common.MsgBa"
"se\022\017\n\007db_name\030\002 \001(\t\022\027\n\017collection_name\030\003"
" \001(\t\"p\n\030ReleaseCollectionRequest\022*\n\004base"
"\030\001 \001(\0132\034.milvus.proto.common.MsgBase\022\017\n\007"
"db_name\030\002 \001(\t\022\027\n\017collection_name\030\003 \001(\t\"n"
"\n\026CollectionStatsRequest\022*\n\004base\030\001 \001(\0132\034"
".milvus.proto.common.MsgBase\022\017\n\007db_name\030"
"\002 \001(\t\022\027\n\017collection_name\030\003 \001(\t\"x\n\027Collec"
"tionStatsResponse\022+\n\006status\030\001 \001(\0132\033.milv"
"us.proto.common.Status\0220\n\005stats\030\002 \003(\0132!."
"milvus.proto.common.KeyValuePair\"T\n\025Show"
"CollectionRequest\022*\n\004base\030\001 \001(\0132\034.milvus"
".proto.common.MsgBase\022\017\n\007db_name\030\002 \001(\t\"_"
"\n\026ShowCollectionResponse\022+\n\006status\030\001 \001(\013"
"2\033.milvus.proto.common.Status\022\030\n\020collect"
"ion_names\030\002 \003(\t\"\206\001\n\026CreatePartitionReque"
"st\022*\n\004base\030\001 \001(\0132\034.milvus.proto.common.M"
"sgBase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017collection_na"
"me\030\003 \001(\t\022\026\n\016partition_name\030\004 \001(\t\"\204\001\n\024Dro"
"pPartitionRequest\022*\n\004base\030\001 \001(\0132\034.milvus"
".proto.common.MsgBase\022\017\n\007db_name\030\002 \001(\t\022\027"
"\n\017collection_name\030\003 \001(\t\022\026\n\016partition_nam"
"e\030\004 \001(\t\"\203\001\n\023HasPartitionRequest\022*\n\004base\030"
"\001 \001(\0132\034.milvus.proto.common.MsgBase\022\017\n\007d"
"b_name\030\002 \001(\t\022\027\n\017collection_name\030\003 \001(\t\022\026\n"
"\016partition_name\030\004 \001(\t\"\204\001\n\023LoadPartitonRe"
"quest\022*\n\004base\030\001 \001(\0132\034.milvus.proto.commo"
"n.MsgBase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017collection"
"_name\030\003 \001(\t\022\027\n\017partition_names\030\004 \003(\t\"\210\001\n"
"\027ReleasePartitionRequest\022*\n\004base\030\001 \001(\0132\034"
".milvus.proto.common.MsgBase\022\017\n\007db_name\030"
"\002 \001(\t\022\027\n\017collection_name\030\003 \001(\t\022\027\n\017partit"
"ion_names\030\004 \003(\t\"\205\001\n\025PartitionStatsReques"
"t\022*\n\004base\030\001 \001(\0132\034.milvus.proto.common.Ms"
"gBase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017collection_nam"
"e\030\003 \001(\t\022\026\n\016partition_name\030\004 \001(\t\"w\n\026Parti"
"tionStatsResponse\022+\n\006status\030\001 \001(\0132\033.milv"
"us.proto.common.Status\0220\n\005stats\030\002 \003(\0132!."
"milvus.proto.common.KeyValuePair\"\202\001\n\024Sho"
"wPartitionRequest\022*\n\004base\030\001 \001(\0132\034.milvus"
".proto.common.MsgBase\022\017\n\007db_name\030\002 \001(\t\022\027"
"\n\017collection_name\030\003 \001(\t\022\024\n\014collectionID\030"
"\004 \001(\003\"s\n\025ShowPartitionResponse\022+\n\006status"
"\030\001 \001(\0132\033.milvus.proto.common.Status\022\027\n\017p"
"artition_names\030\002 \003(\t\022\024\n\014partitionIDs\030\003 \003"
"(\003\"m\n\026DescribeSegmentRequest\022*\n\004base\030\001 \001"
"(\0132\034.milvus.proto.common.MsgBase\022\024\n\014coll"
"ectionID\030\002 \001(\003\022\021\n\tsegmentID\030\003 \001(\003\"W\n\027Des"
"cribeSegmentResponse\022+\n\006status\030\001 \001(\0132\033.m"
"ilvus.proto.common.Status\022\017\n\007indexID\030\002 \001"
"(\003\"k\n\022ShowSegmentRequest\022*\n\004base\030\001 \001(\0132\034"
".milvus.proto.common.MsgBase\022\024\n\014collecti"
"onID\030\002 \001(\003\022\023\n\013partitionID\030\003 \001(\003\"V\n\023ShowS"
"egmentResponse\022+\n\006status\030\001 \001(\0132\033.milvus."
"proto.common.Status\022\022\n\nsegmentIDs\030\002 \003(\003\""
"\267\001\n\022CreateIndexRequest\022*\n\004base\030\001 \001(\0132\034.m"
"ilvus.proto.common.MsgBase\022\017\n\007db_name\030\002 "
"\001(\t\022\027\n\017collection_name\030\003 \001(\t\022\022\n\nfield_na"
"me\030\004 \001(\t\0227\n\014extra_params\030\005 \003(\0132!.milvus."
"proto.common.KeyValuePair\"\224\001\n\024DescribeIn"
"dexRequest\022*\n\004base\030\001 \001(\0132\034.milvus.proto."
"common.MsgBase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017colle"
"ction_name\030\003 \001(\t\022\022\n\nfield_name\030\004 \001(\t\022\022\n\n"
"index_name\030\005 \001(\t\"Y\n\020IndexDescription\022\022\n\n"
"index_name\030\001 \001(\t\0221\n\006params\030\002 \003(\0132!.milvu"
"s.proto.common.KeyValuePair\"\207\001\n\025Describe"
"IndexResponse\022+\n\006status\030\001 \001(\0132\033.milvus.p"
"roto.common.Status\022A\n\022index_descriptions"
"\030\002 \003(\0132%.milvus.proto.milvus.IndexDescri"
"ption\"\221\001\n\021IndexStateRequest\022*\n\004base\030\001 \001("
"\0132\034.milvus.proto.common.MsgBase\022\017\n\007db_na"
"me\030\002 \001(\t\022\027\n\017collection_name\030\003 \001(\t\022\022\n\nfie"
"ld_name\030\004 \001(\t\022\022\n\nindex_name\030\005 \001(\t\"q\n\022Ind"
"exStateResponse\022+\n\006status\030\001 \001(\0132\033.milvus"
".proto.common.Status\022.\n\005state\030\002 \001(\0162\037.mi"
"lvus.proto.common.IndexState\"\275\001\n\rInsertR"
"lectionSchema\022\024\n\014collectionID\030\003 \001(\003\"m\n\025L"
"oadCollectionRequest\022*\n\004base\030\001 \001(\0132\034.mil"
"vus.proto.common.MsgBase\022\017\n\007db_name\030\002 \001("
"\t\022\027\n\017collection_name\030\003 \001(\t\"p\n\030ReleaseCol"
"lectionRequest\022*\n\004base\030\001 \001(\0132\034.milvus.pr"
"oto.common.MsgBase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017c"
"ollection_name\030\003 \001(\t\"n\n\026CollectionStatsR"
"equest\022*\n\004base\030\001 \001(\0132\034.milvus.proto.comm"
"on.MsgBase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017collectio"
"n_name\030\003 \001(\t\022\026\n\016partition_name\030\004 \001(\t\022+\n\010"
"row_data\030\005 \003(\0132\031.milvus.proto.common.Blo"
"b\022\021\n\thash_keys\030\006 \003(\r\"e\n\016InsertResponse\022+"
"\n\006status\030\001 \001(\0132\033.milvus.proto.common.Sta"
"tus\022\023\n\013rowID_begin\030\002 \001(\003\022\021\n\trowID_end\030\003 "
"\001(\003\"c\n\020PlaceholderValue\022\013\n\003tag\030\001 \001(\t\0222\n\004"
"type\030\002 \001(\0162$.milvus.proto.milvus.Placeho"
"lderType\022\016\n\006values\030\003 \003(\014\"O\n\020PlaceholderG"
"roup\022;\n\014placeholders\030\001 \003(\0132%.milvus.prot"
"o.milvus.PlaceholderValue\"\246\001\n\rSearchRequ"
"n_name\030\003 \001(\t\"x\n\027CollectionStatsResponse\022"
"+\n\006status\030\001 \001(\0132\033.milvus.proto.common.St"
"atus\0220\n\005stats\030\002 \003(\0132!.milvus.proto.commo"
"n.KeyValuePair\"T\n\025ShowCollectionRequest\022"
"*\n\004base\030\001 \001(\0132\034.milvus.proto.common.MsgB"
"ase\022\017\n\007db_name\030\002 \001(\t\"_\n\026ShowCollectionRe"
"sponse\022+\n\006status\030\001 \001(\0132\033.milvus.proto.co"
"mmon.Status\022\030\n\020collection_names\030\002 \003(\t\"\206\001"
"\n\026CreatePartitionRequest\022*\n\004base\030\001 \001(\0132\034"
".milvus.proto.common.MsgBase\022\017\n\007db_name\030"
"\002 \001(\t\022\027\n\017collection_name\030\003 \001(\t\022\026\n\016partit"
"ion_name\030\004 \001(\t\"\204\001\n\024DropPartitionRequest\022"
"*\n\004base\030\001 \001(\0132\034.milvus.proto.common.MsgB"
"ase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017collection_name\030"
"\003 \001(\t\022\026\n\016partition_name\030\004 \001(\t\"\203\001\n\023HasPar"
"titionRequest\022*\n\004base\030\001 \001(\0132\034.milvus.pro"
"to.common.MsgBase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017co"
"llection_name\030\003 \001(\t\022\026\n\016partition_name\030\004 "
"\001(\t\"\204\001\n\023LoadPartitonRequest\022*\n\004base\030\001 \001("
"\0132\034.milvus.proto.common.MsgBase\022\017\n\007db_na"
"me\030\002 \001(\t\022\027\n\017collection_name\030\003 \001(\t\022\027\n\017par"
"tition_names\030\004 \003(\t\"\210\001\n\027ReleasePartitionR"
"equest\022*\n\004base\030\001 \001(\0132\034.milvus.proto.comm"
"on.MsgBase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017collectio"
"n_name\030\003 \001(\t\022\027\n\017partition_names\030\004 \003(\t\"\205\001"
"\n\025PartitionStatsRequest\022*\n\004base\030\001 \001(\0132\034."
"milvus.proto.common.MsgBase\022\017\n\007db_name\030\002"
" \001(\t\022\027\n\017collection_name\030\003 \001(\t\022\026\n\016partiti"
"on_name\030\004 \001(\t\"w\n\026PartitionStatsResponse\022"
"+\n\006status\030\001 \001(\0132\033.milvus.proto.common.St"
"atus\0220\n\005stats\030\002 \003(\0132!.milvus.proto.commo"
"n.KeyValuePair\"\202\001\n\024ShowPartitionRequest\022"
"*\n\004base\030\001 \001(\0132\034.milvus.proto.common.MsgB"
"ase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017collection_name\030"
"\003 \001(\t\022\024\n\014collectionID\030\004 \001(\003\"s\n\025ShowParti"
"tionResponse\022+\n\006status\030\001 \001(\0132\033.milvus.pr"
"oto.common.Status\022\027\n\017partition_names\030\002 \003"
"(\t\022\024\n\014partitionIDs\030\003 \003(\003\"m\n\026DescribeSegm"
"entRequest\022*\n\004base\030\001 \001(\0132\034.milvus.proto."
"common.MsgBase\022\024\n\014collectionID\030\002 \001(\003\022\021\n\t"
"segmentID\030\003 \001(\003\"W\n\027DescribeSegmentRespon"
"se\022+\n\006status\030\001 \001(\0132\033.milvus.proto.common"
".Status\022\017\n\007indexID\030\002 \001(\003\"k\n\022ShowSegmentR"
"equest\022*\n\004base\030\001 \001(\0132\034.milvus.proto.comm"
"on.MsgBase\022\024\n\014collectionID\030\002 \001(\003\022\023\n\013part"
"itionID\030\003 \001(\003\"V\n\023ShowSegmentResponse\022+\n\006"
"status\030\001 \001(\0132\033.milvus.proto.common.Statu"
"s\022\022\n\nsegmentIDs\030\002 \003(\003\"\267\001\n\022CreateIndexReq"
"uest\022*\n\004base\030\001 \001(\0132\034.milvus.proto.common"
".MsgBase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017collection_"
"name\030\003 \001(\t\022\022\n\nfield_name\030\004 \001(\t\0227\n\014extra_"
"params\030\005 \003(\0132!.milvus.proto.common.KeyVa"
"luePair\"\224\001\n\024DescribeIndexRequest\022*\n\004base"
"\030\001 \001(\0132\034.milvus.proto.common.MsgBase\022\017\n\007"
"db_name\030\002 \001(\t\022\027\n\017collection_name\030\003 \001(\t\022\022"
"\n\nfield_name\030\004 \001(\t\022\022\n\nindex_name\030\005 \001(\t\"Y"
"\n\020IndexDescription\022\022\n\nindex_name\030\001 \001(\t\0221"
"\n\006params\030\002 \003(\0132!.milvus.proto.common.Key"
"ValuePair\"\207\001\n\025DescribeIndexResponse\022+\n\006s"
"tatus\030\001 \001(\0132\033.milvus.proto.common.Status"
"\022A\n\022index_descriptions\030\002 \003(\0132%.milvus.pr"
"oto.milvus.IndexDescription\"\221\001\n\021IndexSta"
"teRequest\022*\n\004base\030\001 \001(\0132\034.milvus.proto.c"
"ommon.MsgBase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017collec"
"tion_name\030\003 \001(\t\022\022\n\nfield_name\030\004 \001(\t\022\022\n\ni"
"ndex_name\030\005 \001(\t\"q\n\022IndexStateResponse\022+\n"
"\006status\030\001 \001(\0132\033.milvus.proto.common.Stat"
"us\022.\n\005state\030\002 \001(\0162\037.milvus.proto.common."
"IndexState\"\275\001\n\rInsertRequest\022*\n\004base\030\001 \001"
"(\0132\034.milvus.proto.common.MsgBase\022\017\n\007db_n"
"ame\030\002 \001(\t\022\027\n\017collection_name\030\003 \001(\t\022\026\n\016pa"
"rtition_name\030\004 \001(\t\022+\n\010row_data\030\005 \003(\0132\031.m"
"ilvus.proto.common.Blob\022\021\n\thash_keys\030\006 \003"
"(\r\"e\n\016InsertResponse\022+\n\006status\030\001 \001(\0132\033.m"
"ilvus.proto.common.Status\022\023\n\013rowID_begin"
"\030\002 \001(\003\022\021\n\trowID_end\030\003 \001(\003\"c\n\020Placeholder"
"Value\022\013\n\003tag\030\001 \001(\t\0222\n\004type\030\002 \001(\0162$.milvu"
"s.proto.milvus.PlaceholderType\022\016\n\006values"
"\030\003 \003(\014\"O\n\020PlaceholderGroup\022;\n\014placeholde"
"rs\030\001 \003(\0132%.milvus.proto.milvus.Placehold"
"erValue\"\246\001\n\rSearchRequest\022*\n\004base\030\001 \001(\0132"
"\034.milvus.proto.common.MsgBase\022\017\n\007db_name"
"\030\002 \001(\t\022\027\n\017collection_name\030\003 \001(\t\022\027\n\017parti"
"tion_names\030\004 \003(\t\022\013\n\003dsl\030\005 \001(\t\022\031\n\021placeho"
"lder_group\030\006 \001(\014\"5\n\004Hits\022\013\n\003IDs\030\001 \003(\003\022\020\n"
"\010row_data\030\002 \003(\014\022\016\n\006scores\030\003 \003(\002\"J\n\rSearc"
"hResults\022+\n\006status\030\001 \001(\0132\033.milvus.proto."
"common.Status\022\014\n\004hits\030\002 \003(\014\"d\n\014FlushRequ"
"est\022*\n\004base\030\001 \001(\0132\034.milvus.proto.common."
"MsgBase\022\017\n\007db_name\030\002 \001(\t\022\027\n\017collection_n"
"ame\030\003 \001(\t\022\027\n\017partition_names\030\004 \003(\t\022\013\n\003ds"
"l\030\005 \001(\t\022\031\n\021placeholder_group\030\006 \001(\014\"5\n\004Hi"
"ts\022\013\n\003IDs\030\001 \003(\003\022\020\n\010row_data\030\002 \003(\014\022\016\n\006sco"
"res\030\003 \003(\002\"J\n\rSearchResults\022+\n\006status\030\001 \001"
"(\0132\033.milvus.proto.common.Status\022\014\n\004hits\030"
"\002 \003(\014\"d\n\014FlushRequest\022*\n\004base\030\001 \001(\0132\034.mi"
"lvus.proto.common.MsgBase\022\017\n\007db_name\030\002 \001"
"(\t\022\027\n\017collection_name\030\003 \001(\t\"r\n\024RegisterL"
"inkResponse\022-\n\007address\030\001 \001(\0132\034.milvus.pr"
"oto.common.Address\022+\n\006status\030\002 \001(\0132\033.mil"
"vus.proto.common.Status*@\n\017PlaceholderTy"
"pe\022\010\n\004NONE\020\000\022\021\n\rVECTOR_BINARY\020d\022\020\n\014VECTO"
"R_FLOAT\020e2\357\020\n\rMilvusService\022_\n\020CreateCol"
"lection\022,.milvus.proto.milvus.CreateColl"
"ectionRequest\032\033.milvus.proto.common.Stat"
"us\"\000\022[\n\016DropCollection\022*.milvus.proto.mi"
"lvus.DropCollectionRequest\032\033.milvus.prot"
"o.common.Status\"\000\022_\n\rHasCollection\022).mil"
"vus.proto.milvus.HasCollectionRequest\032!."
"milvus.proto.milvus.BoolResponse\"\000\022[\n\016Lo"
"adCollection\022*.milvus.proto.milvus.LoadC"
"ollectionRequest\032\033.milvus.proto.common.S"
"tatus\"\000\022a\n\021ReleaseCollection\022-.milvus.pr"
"oto.milvus.ReleaseCollectionRequest\032\033.mi"
"lvus.proto.common.Status\"\000\022w\n\022DescribeCo"
"llection\022..milvus.proto.milvus.DescribeC"
"ollectionRequest\032/.milvus.proto.milvus.D"
"escribeCollectionResponse\"\000\022v\n\027GetCollec"
"tionStatistics\022+.milvus.proto.milvus.Col"
"lectionStatsRequest\032,.milvus.proto.milvu"
"s.CollectionStatsResponse\"\000\022l\n\017ShowColle"
"ctions\022*.milvus.proto.milvus.ShowCollect"
"ionRequest\032+.milvus.proto.milvus.ShowCol"
"lectionResponse\"\000\022]\n\017CreatePartition\022+.m"
"ilvus.proto.milvus.CreatePartitionReques"
"t\032\033.milvus.proto.common.Status\"\000\022Y\n\rDrop"
"Partition\022).milvus.proto.milvus.DropPart"
"itionRequest\032\033.milvus.proto.common.Statu"
"s\"\000\022]\n\014HasPartition\022(.milvus.proto.milvu"
"s.HasPartitionRequest\032!.milvus.proto.mil"
"vus.BoolResponse\"\000\022Y\n\016LoadPartitions\022(.m"
"ilvus.proto.milvus.LoadPartitonRequest\032\033"
".milvus.proto.common.Status\"\000\022`\n\021Release"
"Partitions\022,.milvus.proto.milvus.Release"
"PartitionRequest\032\033.milvus.proto.common.S"
"tatus\"\000\022s\n\026GetPartitionStatistics\022*.milv"
"us.proto.milvus.PartitionStatsRequest\032+."
"milvus.proto.milvus.PartitionStatsRespon"
"se\"\000\022i\n\016ShowPartitions\022).milvus.proto.mi"
"lvus.ShowPartitionRequest\032*.milvus.proto"
".milvus.ShowPartitionResponse\"\000\022U\n\013Creat"
"eIndex\022\'.milvus.proto.milvus.CreateIndex"
"Request\032\033.milvus.proto.common.Status\"\000\022h"
"\n\rDescribeIndex\022).milvus.proto.milvus.De"
"scribeIndexRequest\032*.milvus.proto.milvus"
".DescribeIndexResponse\"\000\022b\n\rGetIndexStat"
"e\022&.milvus.proto.milvus.IndexStateReques"
"t\032\'.milvus.proto.milvus.IndexStateRespon"
"se\"\000\022S\n\006Insert\022\".milvus.proto.milvus.Ins"
"ertRequest\032#.milvus.proto.milvus.InsertR"
"esponse\"\000\022R\n\006Search\022\".milvus.proto.milvu"
"s.SearchRequest\032\".milvus.proto.milvus.Se"
"archResults\"\000\022I\n\005Flush\022!.milvus.proto.mi"
"lvus.FlushRequest\032\033.milvus.proto.common."
"Status\"\000\022Q\n\014GetDdChannel\022\032.milvus.proto."
"common.Empty\032#.milvus.proto.milvus.Strin"
"gResponse\"\0002g\n\014ProxyService\022W\n\014RegisterL"
"ink\022\032.milvus.proto.common.Empty\032).milvus"
".proto.milvus.RegisterLinkResponse\"\000BBZ@"
"github.com/zilliztech/milvus-distributed"
"/internal/proto/milvuspbb\006proto3"
"ame\030\003 \001(\t\"r\n\024RegisterLinkResponse\022-\n\007add"
"ress\030\001 \001(\0132\034.milvus.proto.common.Address"
"\022+\n\006status\030\002 \001(\0132\033.milvus.proto.common.S"
"tatus*@\n\017PlaceholderType\022\010\n\004NONE\020\000\022\021\n\rVE"
"CTOR_BINARY\020d\022\020\n\014VECTOR_FLOAT\020e2\357\020\n\rMilv"
"usService\022_\n\020CreateCollection\022,.milvus.p"
"roto.milvus.CreateCollectionRequest\032\033.mi"
"lvus.proto.common.Status\"\000\022[\n\016DropCollec"
"tion\022*.milvus.proto.milvus.DropCollectio"
"nRequest\032\033.milvus.proto.common.Status\"\000\022"
"_\n\rHasCollection\022).milvus.proto.milvus.H"
"asCollectionRequest\032!.milvus.proto.milvu"
"s.BoolResponse\"\000\022[\n\016LoadCollection\022*.mil"
"vus.proto.milvus.LoadCollectionRequest\032\033"
".milvus.proto.common.Status\"\000\022a\n\021Release"
"Collection\022-.milvus.proto.milvus.Release"
"CollectionRequest\032\033.milvus.proto.common."
"Status\"\000\022w\n\022DescribeCollection\022..milvus."
"proto.milvus.DescribeCollectionRequest\032/"
".milvus.proto.milvus.DescribeCollectionR"
"esponse\"\000\022v\n\027GetCollectionStatistics\022+.m"
"ilvus.proto.milvus.CollectionStatsReques"
"t\032,.milvus.proto.milvus.CollectionStatsR"
"esponse\"\000\022l\n\017ShowCollections\022*.milvus.pr"
"oto.milvus.ShowCollectionRequest\032+.milvu"
"s.proto.milvus.ShowCollectionResponse\"\000\022"
"]\n\017CreatePartition\022+.milvus.proto.milvus"
".CreatePartitionRequest\032\033.milvus.proto.c"
"ommon.Status\"\000\022Y\n\rDropPartition\022).milvus"
".proto.milvus.DropPartitionRequest\032\033.mil"
"vus.proto.common.Status\"\000\022]\n\014HasPartitio"
"n\022(.milvus.proto.milvus.HasPartitionRequ"
"est\032!.milvus.proto.milvus.BoolResponse\"\000"
"\022Y\n\016LoadPartitions\022(.milvus.proto.milvus"
".LoadPartitonRequest\032\033.milvus.proto.comm"
"on.Status\"\000\022`\n\021ReleasePartitions\022,.milvu"
"s.proto.milvus.ReleasePartitionRequest\032\033"
".milvus.proto.common.Status\"\000\022s\n\026GetPart"
"itionStatistics\022*.milvus.proto.milvus.Pa"
"rtitionStatsRequest\032+.milvus.proto.milvu"
"s.PartitionStatsResponse\"\000\022i\n\016ShowPartit"
"ions\022).milvus.proto.milvus.ShowPartition"
"Request\032*.milvus.proto.milvus.ShowPartit"
"ionResponse\"\000\022U\n\013CreateIndex\022\'.milvus.pr"
"oto.milvus.CreateIndexRequest\032\033.milvus.p"
"roto.common.Status\"\000\022h\n\rDescribeIndex\022)."
"milvus.proto.milvus.DescribeIndexRequest"
"\032*.milvus.proto.milvus.DescribeIndexResp"
"onse\"\000\022b\n\rGetIndexState\022&.milvus.proto.m"
"ilvus.IndexStateRequest\032\'.milvus.proto.m"
"ilvus.IndexStateResponse\"\000\022S\n\006Insert\022\".m"
"ilvus.proto.milvus.InsertRequest\032#.milvu"
"s.proto.milvus.InsertResponse\"\000\022R\n\006Searc"
"h\022\".milvus.proto.milvus.SearchRequest\032\"."
"milvus.proto.milvus.SearchResults\"\000\022I\n\005F"
"lush\022!.milvus.proto.milvus.FlushRequest\032"
"\033.milvus.proto.common.Status\"\000\022Q\n\014GetDdC"
"hannel\022\032.milvus.proto.common.Empty\032#.mil"
"vus.proto.milvus.StringResponse\"\0002g\n\014Pro"
"xyService\022W\n\014RegisterLink\022\032.milvus.proto"
".common.Empty\032).milvus.proto.milvus.Regi"
"sterLinkResponse\"\000BBZ@github.com/zillizt"
"ech/milvus-distributed/internal/proto/mi"
"lvuspbb\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_milvus_2eproto_deps[2] = {
&::descriptor_table_common_2eproto,
@ -1473,7 +1475,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mil
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_milvus_2eproto_once;
static bool descriptor_table_milvus_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_milvus_2eproto = {
&descriptor_table_milvus_2eproto_initialized, descriptor_table_protodef_milvus_2eproto, "milvus.proto", 7272,
&descriptor_table_milvus_2eproto_initialized, descriptor_table_protodef_milvus_2eproto, "milvus.proto", 7294,
&descriptor_table_milvus_2eproto_once, descriptor_table_milvus_2eproto_sccs, descriptor_table_milvus_2eproto_deps, 41, 2,
schemas, file_default_instances, TableStruct_milvus_2eproto::offsets,
file_level_metadata_milvus_2eproto, 41, file_level_enum_descriptors_milvus_2eproto, file_level_service_descriptors_milvus_2eproto,
@ -3846,14 +3848,15 @@ DescribeCollectionResponse::DescribeCollectionResponse(const DescribeCollectionR
} else {
schema_ = nullptr;
}
collectionid_ = from.collectionid_;
// @@protoc_insertion_point(copy_constructor:milvus.proto.milvus.DescribeCollectionResponse)
}
void DescribeCollectionResponse::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DescribeCollectionResponse_milvus_2eproto.base);
::memset(&status_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&schema_) -
reinterpret_cast<char*>(&status_)) + sizeof(schema_));
reinterpret_cast<char*>(&collectionid_) -
reinterpret_cast<char*>(&status_)) + sizeof(collectionid_));
}
DescribeCollectionResponse::~DescribeCollectionResponse() {
@ -3889,6 +3892,7 @@ void DescribeCollectionResponse::Clear() {
delete schema_;
}
schema_ = nullptr;
collectionid_ = PROTOBUF_LONGLONG(0);
_internal_metadata_.Clear();
}
@ -3914,6 +3918,13 @@ const char* DescribeCollectionResponse::_InternalParse(const char* ptr, ::PROTOB
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 collectionID = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
collectionid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
@ -3966,6 +3977,19 @@ bool DescribeCollectionResponse::MergePartialFromCodedStream(
break;
}
// int64 collectionID = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &collectionid_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
@ -4005,6 +4029,11 @@ void DescribeCollectionResponse::SerializeWithCachedSizes(
2, _Internal::schema(this), output);
}
// int64 collectionID = 3;
if (this->collectionid() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->collectionid(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
@ -4032,6 +4061,11 @@ void DescribeCollectionResponse::SerializeWithCachedSizes(
2, _Internal::schema(this), target);
}
// int64 collectionID = 3;
if (this->collectionid() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->collectionid(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
@ -4067,6 +4101,13 @@ size_t DescribeCollectionResponse::ByteSizeLong() const {
*schema_);
}
// int64 collectionID = 3;
if (this->collectionid() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->collectionid());
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
@ -4100,6 +4141,9 @@ void DescribeCollectionResponse::MergeFrom(const DescribeCollectionResponse& fro
if (from.has_schema()) {
mutable_schema()->::milvus::proto::schema::CollectionSchema::MergeFrom(from.schema());
}
if (from.collectionid() != 0) {
set_collectionid(from.collectionid());
}
}
void DescribeCollectionResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
@ -4125,6 +4169,7 @@ void DescribeCollectionResponse::InternalSwap(DescribeCollectionResponse* other)
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(status_, other->status_);
swap(schema_, other->schema_);
swap(collectionid_, other->collectionid_);
}
::PROTOBUF_NAMESPACE_ID::Metadata DescribeCollectionResponse::GetMetadata() const {

View File

@ -1317,6 +1317,7 @@ class DescribeCollectionResponse :
enum : int {
kStatusFieldNumber = 1,
kSchemaFieldNumber = 2,
kCollectionIDFieldNumber = 3,
};
// .milvus.proto.common.Status status = 1;
bool has_status() const;
@ -1334,6 +1335,11 @@ class DescribeCollectionResponse :
::milvus::proto::schema::CollectionSchema* mutable_schema();
void set_allocated_schema(::milvus::proto::schema::CollectionSchema* schema);
// int64 collectionID = 3;
void clear_collectionid();
::PROTOBUF_NAMESPACE_ID::int64 collectionid() const;
void set_collectionid(::PROTOBUF_NAMESPACE_ID::int64 value);
// @@protoc_insertion_point(class_scope:milvus.proto.milvus.DescribeCollectionResponse)
private:
class _Internal;
@ -1341,6 +1347,7 @@ class DescribeCollectionResponse :
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::milvus::proto::common::Status* status_;
::milvus::proto::schema::CollectionSchema* schema_;
::PROTOBUF_NAMESPACE_ID::int64 collectionid_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_milvus_2eproto;
};
@ -7783,6 +7790,20 @@ inline void DescribeCollectionResponse::set_allocated_schema(::milvus::proto::sc
// @@protoc_insertion_point(field_set_allocated:milvus.proto.milvus.DescribeCollectionResponse.schema)
}
// int64 collectionID = 3;
inline void DescribeCollectionResponse::clear_collectionid() {
collectionid_ = PROTOBUF_LONGLONG(0);
}
inline ::PROTOBUF_NAMESPACE_ID::int64 DescribeCollectionResponse::collectionid() const {
// @@protoc_insertion_point(field_get:milvus.proto.milvus.DescribeCollectionResponse.collectionID)
return collectionid_;
}
inline void DescribeCollectionResponse::set_collectionid(::PROTOBUF_NAMESPACE_ID::int64 value) {
collectionid_ = value;
// @@protoc_insertion_point(field_set:milvus.proto.milvus.DescribeCollectionResponse.collectionID)
}
// -------------------------------------------------------------------
// LoadCollectionRequest

View File

@ -240,7 +240,7 @@ SegmentGrowingImpl::GetMemoryUsageInBytes() const {
Status
SegmentGrowingImpl::LoadIndexing(const LoadIndexInfo& info) {
auto field_offset = schema_->get_offset(FieldName(info.field_name));
auto field_offset = schema_->get_offset(FieldId(info.field_id));
Assert(info.index_params.count("metric_type"));
auto metric_type_str = info.index_params.at("metric_type");

View File

@ -32,7 +32,7 @@ namespace chrono = std::chrono;
using namespace milvus;
using namespace milvus::segcore;
//using namespace milvus::proto;
// using namespace milvus::proto;
using namespace milvus::knowhere;
TEST(CApiTest, CollectionTest) {
@ -937,7 +937,7 @@ TEST(CApiTest, UpdateSegmentIndex_Without_Predicate) {
AppendIndexParam(c_load_index_info, index_type_key.c_str(), index_type_value.c_str());
AppendIndexParam(c_load_index_info, index_mode_key.c_str(), index_mode_value.c_str());
AppendIndexParam(c_load_index_info, metric_type_key.c_str(), metric_type_value.c_str());
AppendFieldInfo(c_load_index_info, "fakevec", 0);
AppendFieldInfo(c_load_index_info, "fakevec", 100);
AppendIndex(c_load_index_info, (CBinarySet)&binary_set);
status = UpdateSegmentIndex(segment, c_load_index_info);
@ -1074,7 +1074,7 @@ TEST(CApiTest, UpdateSegmentIndex_With_float_Predicate_Range) {
AppendIndexParam(c_load_index_info, index_type_key.c_str(), index_type_value.c_str());
AppendIndexParam(c_load_index_info, index_mode_key.c_str(), index_mode_value.c_str());
AppendIndexParam(c_load_index_info, metric_type_key.c_str(), metric_type_value.c_str());
AppendFieldInfo(c_load_index_info, "fakevec", 0);
AppendFieldInfo(c_load_index_info, "fakevec", 100);
AppendIndex(c_load_index_info, (CBinarySet)&binary_set);
status = UpdateSegmentIndex(segment, c_load_index_info);
@ -1211,7 +1211,7 @@ TEST(CApiTest, UpdateSegmentIndex_With_float_Predicate_Term) {
AppendIndexParam(c_load_index_info, index_type_key.c_str(), index_type_value.c_str());
AppendIndexParam(c_load_index_info, index_mode_key.c_str(), index_mode_value.c_str());
AppendIndexParam(c_load_index_info, metric_type_key.c_str(), metric_type_value.c_str());
AppendFieldInfo(c_load_index_info, "fakevec", 0);
AppendFieldInfo(c_load_index_info, "fakevec", 100);
AppendIndex(c_load_index_info, (CBinarySet)&binary_set);
status = UpdateSegmentIndex(segment, c_load_index_info);
@ -1350,7 +1350,7 @@ TEST(CApiTest, UpdateSegmentIndex_With_binary_Predicate_Range) {
AppendIndexParam(c_load_index_info, index_type_key.c_str(), index_type_value.c_str());
AppendIndexParam(c_load_index_info, index_mode_key.c_str(), index_mode_value.c_str());
AppendIndexParam(c_load_index_info, metric_type_key.c_str(), metric_type_value.c_str());
AppendFieldInfo(c_load_index_info, "fakevec", 0);
AppendFieldInfo(c_load_index_info, "fakevec", 100);
AppendIndex(c_load_index_info, (CBinarySet)&binary_set);
status = UpdateSegmentIndex(segment, c_load_index_info);
@ -1488,7 +1488,7 @@ TEST(CApiTest, UpdateSegmentIndex_With_binary_Predicate_Term) {
AppendIndexParam(c_load_index_info, index_type_key.c_str(), index_type_value.c_str());
AppendIndexParam(c_load_index_info, index_mode_key.c_str(), index_mode_value.c_str());
AppendIndexParam(c_load_index_info, metric_type_key.c_str(), metric_type_value.c_str());
AppendFieldInfo(c_load_index_info, "fakevec", 0);
AppendFieldInfo(c_load_index_info, "fakevec", 100);
AppendIndex(c_load_index_info, (CBinarySet)&binary_set);
status = UpdateSegmentIndex(segment, c_load_index_info);
@ -1559,12 +1559,157 @@ TEST(CApiTest, SealedSegmentTest) {
auto load_info = CLoadFieldDataInfo{101, blob, N};
// TODO: open load test
// auto res = LoadFieldData(segment, load_info);
// assert(res.error_code == Success);
// auto count = GetRowCount(segment);
// assert(count == N);
auto res = LoadFieldData(segment, load_info);
assert(res.error_code == Success);
auto count = GetRowCount(segment);
assert(count == N);
DeleteCollection(collection);
DeleteSegment(segment);
}
TEST(CApiTest, SealedSegment_search_float_Predicate_Range) {
constexpr auto DIM = 16;
constexpr auto K = 5;
std::string schema_string = generate_collection_shema("L2", "16", false);
auto collection = NewCollection(schema_string.c_str());
auto schema = ((segcore::Collection*)collection)->get_schema();
auto segment = NewSegment(collection, 0, Sealed);
auto N = 1000 * 1000;
auto dataset = DataGen(schema, N);
auto vec_col = dataset.get_col<float>(0);
auto counter_col = dataset.get_col<int64_t>(1);
auto query_ptr = vec_col.data() + 420000 * DIM;
const char* dsl_string = R"({
"bool": {
"must": [
{
"range": {
"counter": {
"GE": 420000,
"LT": 420010
}
}
},
{
"vector": {
"fakevec": {
"metric_type": "L2",
"params": {
"nprobe": 10
},
"query": "$0",
"topk": 5
}
}
}
]
}
})";
// create place_holder_group
int num_queries = 10;
auto raw_group = CreatePlaceholderGroupFromBlob(num_queries, DIM, query_ptr);
auto blob = raw_group.SerializeAsString();
// search on segment's small index
void* plan = nullptr;
auto status = CreatePlan(collection, dsl_string, &plan);
assert(status.error_code == Success);
void* placeholderGroup = nullptr;
status = ParsePlaceholderGroup(plan, blob.data(), blob.length(), &placeholderGroup);
assert(status.error_code == Success);
std::vector<CPlaceholderGroup> placeholderGroups;
placeholderGroups.push_back(placeholderGroup);
Timestamp time = 10000000;
// load index to segment
auto conf = milvus::knowhere::Config{{milvus::knowhere::meta::DIM, DIM},
{milvus::knowhere::meta::TOPK, K},
{milvus::knowhere::IndexParams::nlist, 100},
{milvus::knowhere::IndexParams::nprobe, 10},
{milvus::knowhere::IndexParams::m, 4},
{milvus::knowhere::IndexParams::nbits, 8},
{milvus::knowhere::Metric::TYPE, milvus::knowhere::Metric::L2},
{milvus::knowhere::meta::DEVICEID, 0}};
auto indexing = generate_index(vec_col.data(), conf, DIM, K, N, IndexEnum::INDEX_FAISS_IVFPQ);
// gen query dataset
auto query_dataset = milvus::knowhere::GenDataset(num_queries, DIM, query_ptr);
auto result_on_index = indexing->Query(query_dataset, conf, nullptr);
auto ids = result_on_index->Get<int64_t*>(milvus::knowhere::meta::IDS);
auto dis = result_on_index->Get<float*>(milvus::knowhere::meta::DISTANCE);
std::vector<int64_t> vec_ids(ids, ids + K * num_queries);
std::vector<float> vec_dis;
for (int j = 0; j < K * num_queries; ++j) {
vec_dis.push_back(dis[j] * -1);
}
auto binary_set = indexing->Serialize(conf);
void* c_load_index_info = nullptr;
status = NewLoadIndexInfo(&c_load_index_info);
assert(status.error_code == Success);
std::string index_type_key = "index_type";
std::string index_type_value = "IVF_PQ";
std::string index_mode_key = "index_mode";
std::string index_mode_value = "cpu";
std::string metric_type_key = "metric_type";
std::string metric_type_value = "L2";
AppendIndexParam(c_load_index_info, index_type_key.c_str(), index_type_value.c_str());
AppendIndexParam(c_load_index_info, index_mode_key.c_str(), index_mode_value.c_str());
AppendIndexParam(c_load_index_info, metric_type_key.c_str(), metric_type_value.c_str());
AppendFieldInfo(c_load_index_info, "fakevec", 100);
AppendIndex(c_load_index_info, (CBinarySet)&binary_set);
auto load_index_info = (LoadIndexInfo*)c_load_index_info;
auto query_dataset2 = milvus::knowhere::GenDataset(num_queries, DIM, query_ptr);
auto fuck2 = load_index_info->index;
auto result_on_index2 = fuck2->Query(query_dataset2, conf, nullptr);
auto ids2 = result_on_index2->Get<int64_t*>(milvus::knowhere::meta::IDS);
auto dis2 = result_on_index2->Get<float*>(milvus::knowhere::meta::DISTANCE);
int i = 1 + 1;
++i;
auto c_counter_field_data = CLoadFieldDataInfo{
101,
counter_col.data(),
N,
};
status = LoadFieldData(segment, c_counter_field_data);
assert(status.error_code == Success);
auto c_id_field_data = CLoadFieldDataInfo{
0,
counter_col.data(),
N,
};
status = LoadFieldData(segment, c_id_field_data);
assert(status.error_code == Success);
status = UpdateSealedSegmentIndex(segment, c_load_index_info);
assert(status.error_code == Success);
CQueryResult c_search_result_on_bigIndex;
auto res_after_load_index = Search(segment, plan, placeholderGroups.data(), &time, 1, &c_search_result_on_bigIndex);
assert(res_after_load_index.error_code == Success);
auto search_result_on_bigIndex = (*(QueryResult*)c_search_result_on_bigIndex);
for (int i = 0; i < num_queries; ++i) {
auto offset = i * K;
ASSERT_EQ(search_result_on_bigIndex.internal_seg_offsets_[offset], 420000 + i);
}
DeleteLoadIndexInfo(c_load_index_info);
DeletePlan(plan);
DeletePlaceholderGroup(placeholderGroup);
DeleteQueryResult(c_search_result_on_bigIndex);
DeleteCollection(collection);
DeleteSegment(segment);
}

View File

@ -31,7 +31,7 @@ TEST(Sealed, without_predicate) {
auto dim = 16;
auto topK = 5;
auto metric_type = MetricType::METRIC_L2;
schema->AddDebugField("fakevec", DataType::VECTOR_FLOAT, dim, metric_type);
auto fake_id = schema->AddDebugField("fakevec", DataType::VECTOR_FLOAT, dim, metric_type);
schema->AddDebugField("age", DataType::FLOAT);
std::string dsl = R"({
"bool": {
@ -106,7 +106,7 @@ TEST(Sealed, without_predicate) {
LoadIndexInfo load_info;
load_info.field_name = "fakevec";
load_info.field_id = 42;
load_info.field_id = fake_id.get();
load_info.index = indexing;
load_info.index_params["metric_type"] = "L2";
@ -128,7 +128,7 @@ TEST(Sealed, with_predicate) {
auto dim = 16;
auto topK = 5;
auto metric_type = MetricType::METRIC_L2;
schema->AddDebugField("fakevec", DataType::VECTOR_FLOAT, dim, metric_type);
auto fake_id = schema->AddDebugField("fakevec", DataType::VECTOR_FLOAT, dim, metric_type);
schema->AddDebugField("counter", DataType::INT64);
std::string dsl = R"({
"bool": {
@ -199,7 +199,7 @@ TEST(Sealed, with_predicate) {
LoadIndexInfo load_info;
load_info.field_name = "fakevec";
load_info.field_id = 42;
load_info.field_id = fake_id.get();
load_info.index = indexing;
load_info.index_params["metric_type"] = "L2";

View File

@ -51,6 +51,7 @@ func TestGrpcService(t *testing.T) {
assert.Nil(t, err)
core.ProxyTimeTickChan = make(chan typeutil.Timestamp, 8)
core.DataNodeSegmentFlushCompletedChan = make(chan typeutil.UniqueID, 8)
timeTickArray := make([]typeutil.Timestamp, 0, 16)
core.SendTimeTick = func(ts typeutil.Timestamp) error {
@ -199,6 +200,8 @@ func TestGrpcService(t *testing.T) {
})
t.Run("describe collection", func(t *testing.T) {
collMeta, err := core.MetaTable.GetCollectionByName("testColl")
assert.Nil(t, err)
req := &milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection,
@ -213,6 +216,7 @@ func TestGrpcService(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, rsp.Schema.Name, "testColl")
assert.Equal(t, rsp.CollectionID, collMeta.ID)
})
t.Run("show collection", func(t *testing.T) {
@ -275,6 +279,8 @@ func TestGrpcService(t *testing.T) {
})
t.Run("show partition", func(t *testing.T) {
coll, err := core.MetaTable.GetCollectionByName("testColl")
assert.Nil(t, err)
req := &milvuspb.ShowPartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowPartitions,
@ -284,6 +290,7 @@ func TestGrpcService(t *testing.T) {
},
DbName: "testDb",
CollectionName: "testColl",
CollectionID: coll.ID,
}
rsp, err := cli.ShowPartitions(req)
assert.Nil(t, err)
@ -312,7 +319,7 @@ func TestGrpcService(t *testing.T) {
req := &milvuspb.ShowSegmentRequest{
Base: &commonpb.MsgBase{
MsgType: 111, //TODO show segment request msg type
MsgType: commonpb.MsgType_kShowSegment,
MsgID: 111,
Timestamp: 111,
SourceID: 111,
@ -358,7 +365,7 @@ func TestGrpcService(t *testing.T) {
req := &milvuspb.DescribeSegmentRequest{
Base: &commonpb.MsgBase{
MsgType: 113, //TODO, describe segment request msg type
MsgType: commonpb.MsgType_kDescribeSegment,
MsgID: 113,
Timestamp: 113,
SourceID: 113,
@ -392,6 +399,47 @@ func TestGrpcService(t *testing.T) {
assert.Equal(t, rsp.IndexDescriptions[0].IndexName, cms.Params.DefaultIndexName)
})
t.Run("flush segment", func(t *testing.T) {
coll, err := core.MetaTable.GetCollectionByName("testColl")
assert.Nil(t, err)
partID := coll.PartitionIDs[1]
part, err := core.MetaTable.GetPartitionByID(partID)
assert.Nil(t, err)
assert.Equal(t, len(part.SegmentIDs), 1)
seg := &datapb.SegmentInfo{
SegmentID: 1001,
CollectionID: coll.ID,
PartitionID: part.PartitionID,
}
core.DataServiceSegmentChan <- seg
time.Sleep(time.Millisecond * 100)
part, err = core.MetaTable.GetPartitionByID(partID)
assert.Nil(t, err)
assert.Equal(t, len(part.SegmentIDs), 2)
core.DataNodeSegmentFlushCompletedChan <- 1001
time.Sleep(time.Millisecond * 100)
req := &milvuspb.DescribeIndexRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeIndex,
MsgID: 115,
Timestamp: 115,
SourceID: 115,
},
DbName: "",
CollectionName: "testColl",
FieldName: "vector",
IndexName: "",
}
rsp, err := cli.DescribeIndex(req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, len(rsp.IndexDescriptions), 2)
assert.Equal(t, rsp.IndexDescriptions[0].IndexName, cms.Params.DefaultIndexName)
assert.Equal(t, rsp.IndexDescriptions[1].IndexName, "index_100")
})
t.Run("drop partition", func(t *testing.T) {
req := &milvuspb.DropPartitionRequest{
Base: &commonpb.MsgBase{

View File

@ -4,6 +4,7 @@ import (
"context"
"log"
"math/rand"
"strconv"
"sync"
"sync/atomic"
"time"
@ -138,6 +139,9 @@ type Core struct {
//setMsgStreams segment channel, receive segment info from data service, if master create segment
DataServiceSegmentChan chan *datapb.SegmentInfo
//setMsgStreams ,if segment flush completed, data node would put segment id into msg stream
DataNodeSegmentFlushCompletedChan chan typeutil.UniqueID
//TODO,get binlog file path from data service,
GetBinlogFilePathsFromDataServiceReq func(segID typeutil.UniqueID, fieldID typeutil.UniqueID) ([]string, error)
@ -227,6 +231,9 @@ func (c *Core) checkInit() error {
if c.indexTaskQueue == nil {
return errors.Errorf("indexTaskQueue is nil")
}
if c.DataNodeSegmentFlushCompletedChan == nil {
return errors.Errorf("DataNodeSegmentFlushCompletedChan is nil")
}
log.Printf("master node id = %d\n", Params.NodeID)
return nil
}
@ -311,7 +318,7 @@ func (c *Core) startCreateIndexLoop() {
return
case t, ok := <-c.indexTaskQueue:
if !ok {
log.Printf("index task chan is close, exit loop")
log.Printf("index task chan has closed, exit loop")
return
}
if err := t.BuildIndex(); err != nil {
@ -321,6 +328,34 @@ func (c *Core) startCreateIndexLoop() {
}
}
func (c *Core) startSegmentFlushCompletedLoop() {
for {
select {
case <-c.ctx.Done():
log.Printf("close segment flush completed loop")
return
case seg, ok := <-c.DataNodeSegmentFlushCompletedChan:
if !ok {
log.Printf("data node segment flush completed chan has colsed, exit loop")
}
fields, err := c.MetaTable.GetSegmentVectorFields(seg)
if err != nil {
log.Printf("GetSegmentVectorFields, error = %s ", err.Error())
}
for _, f := range fields {
t := &CreateIndexTask{
core: c,
segmentID: seg,
indexName: "index_" + strconv.FormatInt(f.FieldID, 10),
fieldSchema: f,
indexParams: nil,
}
c.indexTaskQueue <- t
}
}
}
}
func (c *Core) setMsgStreams() error {
//proxy time tick stream,
proxyTimeTickStream := pulsarms.NewPulsarMsgStream(c.ctx, 1024)
@ -542,6 +577,7 @@ func (c *Core) Start() error {
go c.startTimeTickLoop()
go c.startDataServiceSegmentLoop()
go c.startCreateIndexLoop()
go c.startSegmentFlushCompletedLoop()
c.stateCode.Store(internalpb2.StateCode_HEALTHY)
})
return nil

View File

@ -182,6 +182,10 @@ func (mt *metaTable) AddCollection(coll *pb.CollectionInfo, part *pb.PartitionIn
if len(coll.PartitionIDs) != 0 {
return errors.Errorf("partitions should be empty when creating collection")
}
if _, ok := mt.collName2ID[coll.Schema.Name]; ok {
return errors.Errorf("collection %s exist", coll.Schema.Name)
}
coll.PartitionIDs = append(coll.PartitionIDs, part.PartitionID)
mt.collID2Meta[coll.ID] = *coll
mt.collName2ID[coll.Schema.Name] = coll.ID
@ -405,7 +409,7 @@ func (mt *metaTable) DeletePartition(collID typeutil.UniqueID, partitionName str
for _, segID := range partMeta.SegmentIDs {
segIndexMeta, ok := mt.segID2IndexMeta[segID]
if !ok {
log.Printf("segment id = %d not exist", segID)
log.Printf("segment id = %d has no index meta", segID)
continue
}
delete(mt.segID2IndexMeta, segID)
@ -630,6 +634,27 @@ func (mt *metaTable) GetNotIndexedSegments(collName string, fieldName string, in
return rstID, fieldSchema, nil
}
func (mt *metaTable) GetSegmentVectorFields(segID typeutil.UniqueID) ([]*schemapb.FieldSchema, error) {
mt.ddLock.RLock()
defer mt.ddLock.RUnlock()
collID, ok := mt.segID2CollID[segID]
if !ok {
return nil, errors.Errorf("segment id %d not belong to any collection", segID)
}
collMeta, ok := mt.collID2Meta[collID]
if !ok {
return nil, errors.Errorf("segment id %d not belong to any collection which has dropped", segID)
}
rst := make([]*schemapb.FieldSchema, 0, 2)
for _, f := range collMeta.Schema.Fields {
if f.DataType == schemapb.DataType_VECTOR_BINARY || f.DataType == schemapb.DataType_VECTOR_FLOAT {
field := proto.Clone(f)
rst = append(rst, field.(*schemapb.FieldSchema))
}
}
return rst, nil
}
func (mt *metaTable) GetIndexByName(collName string, fieldName string, indexName string) ([]pb.IndexInfo, error) {
mt.ddLock.RLock()
mt.ddLock.RUnlock()

View File

@ -212,6 +212,7 @@ func (t *DescribeCollectionReqTask) Execute() error {
return err
}
t.Rsp.Schema = proto.Clone(coll.Schema).(*schemapb.CollectionSchema)
t.Rsp.CollectionID = coll.ID
var newField []*schemapb.FieldSchema
for _, field := range t.Rsp.Schema.Fields {
if field.FieldID >= StartOfUserFieldID {
@ -368,10 +369,13 @@ func (t *ShowPartitionReqTask) Ts() (typeutil.Timestamp, error) {
}
func (t *ShowPartitionReqTask) Execute() error {
coll, err := t.core.MetaTable.GetCollectionByName(t.Req.CollectionName)
coll, err := t.core.MetaTable.GetCollectionByID(t.Req.CollectionID)
if err != nil {
return err
}
if coll.Schema.Name != t.Req.CollectionName {
return errors.Errorf("collection %s not exist", t.Req.CollectionName)
}
for _, partID := range coll.PartitionIDs {
partMeta, err := t.core.MetaTable.GetPartitionByID(partID)
if err != nil {
@ -477,6 +481,9 @@ func (t *CreateIndexReqTask) Execute() error {
if err != nil {
return err
}
if field.DataType != schemapb.DataType_VECTOR_FLOAT && field.DataType != schemapb.DataType_VECTOR_BINARY {
return errors.Errorf("field name = %s, data type = %s", t.Req.FieldName, schemapb.DataType_name[int32(field.DataType)])
}
for _, seg := range segIDs {
task := CreateIndexTask{
core: t.core,

View File

@ -46,6 +46,7 @@ message DescribeCollectionRequest {
message DescribeCollectionResponse {
common.Status status = 1;
schema.CollectionSchema schema = 2;
int64 collectionID = 3;
}
message LoadCollectionRequest {

View File

@ -380,6 +380,7 @@ func (m *DescribeCollectionRequest) GetCollectionName() string {
type DescribeCollectionResponse struct {
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
Schema *schemapb.CollectionSchema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`
CollectionID int64 `protobuf:"varint,3,opt,name=collectionID,proto3" json:"collectionID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -424,6 +425,13 @@ func (m *DescribeCollectionResponse) GetSchema() *schemapb.CollectionSchema {
return nil
}
func (m *DescribeCollectionResponse) GetCollectionID() int64 {
if m != nil {
return m.CollectionID
}
return 0
}
type LoadCollectionRequest struct {
Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"`
@ -2392,111 +2400,112 @@ func init() {
func init() { proto.RegisterFile("milvus.proto", fileDescriptor_02345ba45cc0e303) }
var fileDescriptor_02345ba45cc0e303 = []byte{
// 1661 bytes of a gzipped FileDescriptorProto
// 1665 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xdd, 0x6f, 0x1b, 0xc5,
0x16, 0xcf, 0xda, 0x8e, 0x93, 0x9c, 0xac, 0x1d, 0x67, 0xf2, 0xe5, 0xba, 0xed, 0x6d, 0x3a, 0xf7,
0xf6, 0x26, 0xfd, 0x4a, 0xae, 0xd2, 0xfb, 0xf9, 0x70, 0xa5, 0x36, 0x71, 0x9a, 0x5a, 0x6d, 0xd3,
0xdc, 0x75, 0x6e, 0x21, 0x54, 0x95, 0x59, 0x7b, 0x07, 0x7b, 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xef, 0xc3, 0xf0,
0xc8, 0xfa, 0xfa, 0x6b, 0xb7, 0xeb, 0x3a, 0x6b, 0xb4, 0xab, 0x8e, 0x8c, 0xd5, 0xe7, 0xba, 0x61,
0xe8, 0xcf, 0x19, 0xa9, 0x35, 0x56, 0xdd, 0x6d, 0x37, 0x35, 0x9d, 0x32, 0x5b, 0xaf, 0xb6, 0x19,
0xd1, 0x56, 0x75, 0x93, 0x11, 0xdb, 0x54, 0x8d, 0x55, 0x2e, 0xd8, 0xe3, 0x68, 0x55, 0xab, 0x69,
0xbe, 0xbe, 0xf5, 0x4b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x3e, 0x9a, 0x14, 0xa2, 0x21, 0x00,
0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

View File

@ -2,18 +2,23 @@ package querynode
import (
"context"
"encoding/binary"
"fmt"
"math"
"math/rand"
"path"
"strconv"
"testing"
"time"
"github.com/golang/protobuf/proto"
"github.com/stretchr/testify/assert"
"github.com/zilliztech/milvus-distributed/internal/indexnode"
minioKV "github.com/zilliztech/milvus-distributed/internal/kv/minio"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
"github.com/zilliztech/milvus-distributed/internal/storage"
)
@ -209,11 +214,11 @@ func generateIndex(segmentID UniqueID) ([]string, indexParam, error) {
return indexPaths, indexParams, nil
}
func TestSegmentManager_load_and_release(t *testing.T) {
func TestSegmentManager_load_release_and_search(t *testing.T) {
collectionID := UniqueID(0)
partitionID := UniqueID(1)
segmentID := UniqueID(2)
fieldIDs := []int64{101}
fieldIDs := []int64{0, 101}
node := newQueryNodeMock()
defer node.Stop()
@ -236,7 +241,7 @@ func TestSegmentManager_load_and_release(t *testing.T) {
assert.NoError(t, err)
fieldsMap := node.segManager.filterOutNeedlessFields(paths, srcFieldIDs, fieldIDs)
assert.Equal(t, len(fieldsMap), 1)
assert.Equal(t, len(fieldsMap), 2)
err = node.segManager.loadSegmentFieldsData(segmentID, fieldsMap)
assert.NoError(t, err)
@ -247,5 +252,50 @@ func TestSegmentManager_load_and_release(t *testing.T) {
err = node.segManager.loadIndex(segmentID, indexPaths, indexParams)
assert.NoError(t, err)
// do search
dslString := "{\"bool\": { \n\"vector\": {\n \"vec\": {\n \"metric_type\": \"L2\", \n \"params\": {\n \"nprobe\": 10 \n},\n \"query\": \"$0\",\"topk\": 10 \n } \n } \n } \n }"
const DIM = 16
var searchRawData []byte
var vec = [DIM]float32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
for _, ele := range vec {
buf := make([]byte, 4)
binary.LittleEndian.PutUint32(buf, math.Float32bits(ele))
searchRawData = append(searchRawData, buf...)
}
placeholderValue := milvuspb.PlaceholderValue{
Tag: "$0",
Type: milvuspb.PlaceholderType_VECTOR_FLOAT,
Values: [][]byte{searchRawData},
}
placeholderGroup := milvuspb.PlaceholderGroup{
Placeholders: []*milvuspb.PlaceholderValue{&placeholderValue},
}
placeHolderGroupBlob, err := proto.Marshal(&placeholderGroup)
assert.NoError(t, err)
searchTimestamp := Timestamp(1020)
collection, err := node.replica.getCollectionByID(collectionID)
assert.NoError(t, err)
plan, err := createPlan(*collection, dslString)
assert.NoError(t, err)
holder, err := parserPlaceholderGroup(plan, placeHolderGroupBlob)
assert.NoError(t, err)
placeholderGroups := make([]*PlaceholderGroup, 0)
placeholderGroups = append(placeholderGroups, holder)
// wait for segment building index
time.Sleep(3 * time.Second)
segment, err := node.replica.getSegmentByID(segmentID)
assert.NoError(t, err)
_, err = segment.segmentSearch(plan, placeholderGroups, []Timestamp{searchTimestamp})
assert.Nil(t, err)
plan.delete()
holder.delete()
<-ctx.Done()
}