Add proto for query service loading collection

Signed-off-by: xige-16 <xi.ge@zilliz.com>
pull/4973/head^2
xige-16 2021-01-18 19:32:08 +08:00 committed by yefu.chen
parent 3aca35b10c
commit d22c2cd203
98 changed files with 5805 additions and 8065 deletions

View File

@ -78,6 +78,36 @@ endif
verifiers: getdeps cppcheck fmt static-check ruleguard
master: build-cpp
@echo "Building each component's binary to './bin'"
@echo "Building master ..."
@mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="0" && GO111MODULE=on $(GO) build -o $(INSTALL_PATH)/master $(PWD)/cmd/master/main.go 1>/dev/null
# Builds various components locally.
proxynode: build-cpp
@echo "Building each component's binary to './bin'"
@echo "Building proxy ..."
@mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="0" && GO111MODULE=on $(GO) build -o $(INSTALL_PATH)/proxy $(PWD)/cmd/proxy/proxy.go 1>/dev/null
# Builds various components locally.
querynode: build-cpp
@echo "Building each component's binary to './bin'"
@echo "Building query node ..."
@mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="1" && GO111MODULE=on $(GO) build -o $(INSTALL_PATH)/querynode $(PWD)/cmd/querynode/query_node.go 1>/dev/null
# Builds various components locally.
writenode: build-cpp
@echo "Building each component's binary to './bin'"
@echo "Building write node ..."
@mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="1" && GO111MODULE=on $(GO) build -o $(INSTALL_PATH)/writenode $(PWD)/cmd/writenode/writenode.go 1>/dev/null
# Builds various components locally.
indexnode: build-cpp
@echo "Building each component's binary to './bin'"
@echo "Building indexbuilder ..."
@mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="1" && GO111MODULE=on $(GO) build -o $(INSTALL_PATH)/indexbuilder $(PWD)/cmd/indexbuilder/indexbuilder.go 1>/dev/null
# Builds various components locally.
build-go: build-cpp
@echo "Building each component's binary to './bin'"

6
go.mod
View File

@ -10,9 +10,6 @@ require (
github.com/aws/aws-sdk-go v1.30.8 // indirect
github.com/coreos/etcd v3.3.25+incompatible // indirect
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect
github.com/frankban/quicktest v1.10.2 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
@ -41,7 +38,6 @@ require (
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.6.1
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c
github.com/tikv/client-go v0.0.0-20200824032810-95774393107b
github.com/uber/jaeger-client-go v2.25.0+incompatible
github.com/uber/jaeger-lib v2.4.0+incompatible // indirect
github.com/urfave/cli v1.22.5 // indirect
@ -67,7 +63,7 @@ replace (
github.com/coreos/etcd => github.com/ozonru/etcd v3.3.20-grpc1.27-origmodule+incompatible
go.etcd.io/bbolt => go.etcd.io/bbolt v1.3.5
google.golang.org/api => google.golang.org/api v0.14.0
//google.golang.org/api => google.golang.org/api v0.14.0
//replace go.etcd.io/etcd => go.etcd.io/etcd v0.5.0-alpha.5.0.20200329194405-dd816f0735f8
google.golang.org/grpc => google.golang.org/grpc v1.26.0

5
go.sum
View File

@ -579,6 +579,11 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=

View File

@ -53,12 +53,14 @@ type tsoRequest struct {
type segRequest struct {
baseRequest
count uint32
colName string
partition string
segInfo map[UniqueID]uint32
channelID int32
timestamp Timestamp
count uint32
colName string
partitionName string
collID UniqueID
partitionID UniqueID
segInfo map[UniqueID]uint32
channelID int32
timestamp Timestamp
}
type syncRequest struct {
@ -119,7 +121,7 @@ type Allocator struct {
masterAddress string
masterConn *grpc.ClientConn
masterClient masterpb.MasterClient
masterClient masterpb.MasterServiceClient
countPerRPC uint32
toDoReqs []request
@ -160,7 +162,7 @@ func (ta *Allocator) connectMaster() error {
}
log.Printf("Connected to master, master_addr=%s", ta.masterAddress)
ta.masterConn = conn
ta.masterClient = masterpb.NewMasterClient(conn)
ta.masterClient = masterpb.NewMasterServiceClient(conn)
return nil
}

View File

@ -5,7 +5,8 @@ import (
"log"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/masterpb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
@ -46,10 +47,14 @@ func NewIDAllocator(ctx context.Context, masterAddr string) (*IDAllocator, error
func (ia *IDAllocator) syncID() bool {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
req := &internalpb.IDRequest{
PeerID: ia.PeerID,
Role: internalpb.PeerRole_Proxy,
Count: ia.countPerRPC,
req := &masterpb.IDRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kRequestID,
MsgID: 0,
Timestamp: 0,
SourceID: ia.PeerID,
},
Count: ia.countPerRPC,
}
resp, err := ia.masterClient.AllocID(ctx, req)

View File

@ -5,12 +5,13 @@ import (
"context"
"fmt"
"log"
"strconv"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
const (
@ -25,8 +26,10 @@ type segInfo struct {
}
type assignInfo struct {
collID UniqueID
partitionID UniqueID
collName string
partitionTag string
partitionName string
channelID int32
segID UniqueID
segInfos *list.List
@ -104,7 +107,7 @@ func (info *assignInfo) IsActive(now time.Time) bool {
type SegIDAssigner struct {
Allocator
assignInfos map[string]*list.List // collectionName -> *list.List
segReqs []*internalpb.SegIDRequest
segReqs []*datapb.SegIDRequest
getTickFunc func() Timestamp
PeerID UniqueID
}
@ -140,16 +143,6 @@ func (sa *SegIDAssigner) collectExpired() {
assign.RemoveExpired(ts)
if assign.Capacity(ts) == 0 {
info.Remove(e)
//if assign.IsActive(now) {
// sa.segReqs = append(sa.segReqs, &internalpb.SegIDRequest{
// ChannelID: assign.channelID,
// Count: 0, // intend to set zero
// CollName: assign.collName,
// PartitionTag: assign.partitionTag,
// })
//} else {
// info.Remove(e)
//}
}
}
}
@ -164,28 +157,31 @@ func (sa *SegIDAssigner) pickCanDoFunc() {
for _, req := range sa.toDoReqs {
segRequest := req.(*segRequest)
colName := segRequest.colName
partition := segRequest.partition
partitionName := segRequest.partitionName
channelID := segRequest.channelID
if _, ok := records[colName]; !ok {
records[colName] = make(map[string]map[int32]uint32)
}
if _, ok := records[colName][partition]; !ok {
records[colName][partition] = make(map[int32]uint32)
if _, ok := records[colName][partitionName]; !ok {
records[colName][partitionName] = make(map[int32]uint32)
}
if _, ok := records[colName][partition][channelID]; !ok {
records[colName][partition][channelID] = 0
if _, ok := records[colName][partitionName][channelID]; !ok {
records[colName][partitionName][channelID] = 0
}
records[colName][partition][channelID] += segRequest.count
assign := sa.getAssign(segRequest.colName, segRequest.partition, segRequest.channelID)
if assign == nil || assign.Capacity(segRequest.timestamp) < records[colName][partition][channelID] {
sa.segReqs = append(sa.segReqs, &internalpb.SegIDRequest{
ChannelID: segRequest.channelID,
Count: segRequest.count,
CollName: segRequest.colName,
PartitionTag: segRequest.partition,
records[colName][partitionName][channelID] += segRequest.count
assign := sa.getAssign(segRequest.colName, segRequest.partitionName, segRequest.channelID)
if assign == nil || assign.Capacity(segRequest.timestamp) < records[colName][partitionName][channelID] {
partitionID, _ := typeutil.Hash32String(segRequest.colName)
sa.segReqs = append(sa.segReqs, &datapb.SegIDRequest{
ChannelID: strconv.FormatUint(uint64(segRequest.channelID), 10),
Count: segRequest.count,
CollName: segRequest.colName,
PartitionName: segRequest.partitionName,
CollectionID: 0,
PartitionID: partitionID,
})
newTodoReqs = append(newTodoReqs, req)
} else {
@ -195,7 +191,7 @@ func (sa *SegIDAssigner) pickCanDoFunc() {
sa.toDoReqs = newTodoReqs
}
func (sa *SegIDAssigner) getAssign(colName, partition string, channelID int32) *assignInfo {
func (sa *SegIDAssigner) getAssign(colName, partitionName string, channelID int32) *assignInfo {
assignInfos, ok := sa.assignInfos[colName]
if !ok {
return nil
@ -203,7 +199,7 @@ func (sa *SegIDAssigner) getAssign(colName, partition string, channelID int32) *
for e := assignInfos.Front(); e != nil; e = e.Next() {
info := e.Value.(*assignInfo)
if info.partitionTag != partition || info.channelID != channelID {
if info.partitionName != partitionName || info.channelID != channelID {
continue
}
return info
@ -216,7 +212,7 @@ func (sa *SegIDAssigner) checkSyncFunc(timeout bool) bool {
return timeout || len(sa.segReqs) != 0
}
func (sa *SegIDAssigner) checkSegReqEqual(req1, req2 *internalpb.SegIDRequest) bool {
func (sa *SegIDAssigner) checkSegReqEqual(req1, req2 *datapb.SegIDRequest) bool {
if req1 == nil || req2 == nil {
return false
}
@ -224,7 +220,7 @@ func (sa *SegIDAssigner) checkSegReqEqual(req1, req2 *internalpb.SegIDRequest) b
if req1 == req2 {
return true
}
return req1.CollName == req2.CollName && req1.PartitionTag == req2.PartitionTag && req1.ChannelID == req2.ChannelID
return req1.CollName == req2.CollName && req1.PartitionName == req2.PartitionName && req1.ChannelID == req2.ChannelID
}
func (sa *SegIDAssigner) reduceSegReqs() {
@ -233,9 +229,9 @@ func (sa *SegIDAssigner) reduceSegReqs() {
return
}
var newSegReqs []*internalpb.SegIDRequest
var newSegReqs []*datapb.SegIDRequest
for _, req1 := range sa.segReqs {
var req2 *internalpb.SegIDRequest
var req2 *datapb.SegIDRequest
for _, req3 := range newSegReqs {
if sa.checkSegReqEqual(req1, req3) {
req2 = req3
@ -264,13 +260,13 @@ func (sa *SegIDAssigner) syncSegments() bool {
sa.reduceSegReqs()
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
req := &internalpb.AssignSegIDRequest{
PeerID: sa.PeerID,
Role: internalpb.PeerRole_Proxy,
PerChannelReq: sa.segReqs,
req := &datapb.AssignSegIDRequest{
NodeID: sa.PeerID,
PeerRole: "ProxyNode",
SegIDRequests: sa.segReqs,
}
sa.segReqs = []*internalpb.SegIDRequest{}
sa.segReqs = []*datapb.SegIDRequest{}
resp, err := sa.masterClient.AssignSegmentID(ctx, req)
if err != nil {
@ -280,12 +276,12 @@ func (sa *SegIDAssigner) syncSegments() bool {
now := time.Now()
success := false
for _, info := range resp.PerChannelAssignment {
for _, info := range resp.SegIDAssignments {
if info.Status.GetErrorCode() != commonpb.ErrorCode_SUCCESS {
log.Println("SyncSegment Error:", info.Status.Reason)
continue
}
assign := sa.getAssign(info.CollName, info.PartitionTag, info.ChannelID)
assign := sa.getAssign(info.CollName, info.PartitionName, info.ChannelID)
segInfo := &segInfo{
segID: info.SegID,
count: info.Count,
@ -300,10 +296,12 @@ func (sa *SegIDAssigner) syncSegments() bool {
segInfos.PushBack(segInfo)
assign = &assignInfo{
collName: info.CollName,
partitionTag: info.PartitionTag,
channelID: info.ChannelID,
segInfos: segInfos,
collID: info.CollectionID,
partitionID: info.PartitionID,
channelID: info.ChannelID,
segInfos: segInfos,
partitionName: info.PartitionName,
collName: info.CollName,
}
colInfos.PushBack(assign)
sa.assignInfos[info.CollName] = colInfos
@ -318,7 +316,7 @@ func (sa *SegIDAssigner) syncSegments() bool {
func (sa *SegIDAssigner) processFunc(req request) error {
segRequest := req.(*segRequest)
assign := sa.getAssign(segRequest.colName, segRequest.partition, segRequest.channelID)
assign := sa.getAssign(segRequest.colName, segRequest.partitionName, segRequest.channelID)
if assign == nil {
return errors.New("Failed to GetSegmentID")
}
@ -327,14 +325,14 @@ func (sa *SegIDAssigner) processFunc(req request) error {
return err
}
func (sa *SegIDAssigner) GetSegmentID(colName, partition string, channelID int32, count uint32, ts Timestamp) (map[UniqueID]uint32, error) {
func (sa *SegIDAssigner) GetSegmentID(colName, partitionName string, channelID int32, count uint32, ts Timestamp) (map[UniqueID]uint32, error) {
req := &segRequest{
baseRequest: baseRequest{done: make(chan error), valid: false},
colName: colName,
partition: partition,
channelID: channelID,
count: count,
timestamp: ts,
baseRequest: baseRequest{done: make(chan error), valid: false},
colName: colName,
partitionName: partitionName,
channelID: channelID,
count: count,
timestamp: ts,
}
sa.reqs <- req
req.Wait()

View File

@ -2,10 +2,12 @@ package allocator
import (
"context"
"log"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/masterpb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
@ -65,10 +67,14 @@ func (ta *TimestampAllocator) pickCanDoFunc() {
func (ta *TimestampAllocator) syncTs() bool {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
req := &internalpb.TsoRequest{
PeerID: ta.PeerID,
Role: internalpb.PeerRole_Proxy,
Count: ta.countPerRPC,
req := &masterpb.TsoRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kRequestTSO,
MsgID: 0,
Timestamp: 0,
SourceID: ta.PeerID,
},
Count: ta.countPerRPC,
}
resp, err := ta.masterClient.AllocTimestamp(ctx, req)

View File

@ -15,6 +15,7 @@
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MsgBase_common_2eproto;
namespace milvus {
namespace proto {
namespace common {
@ -42,6 +43,10 @@ class MsgBaseDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MsgBase> _instance;
} _MsgBase_default_instance_;
class MsgHeaderDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MsgHeader> _instance;
} _MsgHeader_default_instance_;
} // namespace common
} // namespace proto
} // namespace milvus
@ -115,6 +120,21 @@ static void InitDefaultsscc_info_MsgBase_common_2eproto() {
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MsgBase_common_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_MsgBase_common_2eproto}, {}};
static void InitDefaultsscc_info_MsgHeader_common_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::milvus::proto::common::_MsgHeader_default_instance_;
new (ptr) ::milvus::proto::common::MsgHeader();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::milvus::proto::common::MsgHeader::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_MsgHeader_common_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_MsgHeader_common_2eproto}, {
&scc_info_MsgBase_common_2eproto.base,}};
static void InitDefaultsscc_info_Status_common_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
@ -129,8 +149,8 @@ static void InitDefaultsscc_info_Status_common_2eproto() {
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Status_common_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Status_common_2eproto}, {}};
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_common_2eproto[6];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_common_2eproto[2];
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_common_2eproto[7];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_common_2eproto[3];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_common_2eproto = nullptr;
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_common_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
@ -175,6 +195,12 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_common_2eproto::offsets[] PROT
PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase, msgid_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase, timestamp_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase, sourceid_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgHeader, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgHeader, base_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::milvus::proto::common::Empty)},
@ -183,6 +209,7 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB
{ 19, -1, sizeof(::milvus::proto::common::Blob)},
{ 25, -1, sizeof(::milvus::proto::common::Address)},
{ 32, -1, sizeof(::milvus::proto::common::MsgBase)},
{ 41, -1, sizeof(::milvus::proto::common::MsgHeader)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
@ -192,6 +219,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] =
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::common::_Blob_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::common::_Address_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::common::_MsgBase_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::common::_MsgHeader_default_instance_),
};
const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
@ -203,53 +231,58 @@ const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(
"\022\n\n\002ip\030\001 \001(\t\022\014\n\004port\030\002 \001(\003\"m\n\007MsgBase\022.\n"
"\010msg_type\030\001 \001(\0162\034.milvus.proto.common.Ms"
"gType\022\r\n\005msgID\030\002 \001(\003\022\021\n\ttimestamp\030\003 \001(\004\022"
"\020\n\010sourceID\030\004 \001(\003*\270\004\n\tErrorCode\022\013\n\007SUCCE"
"SS\020\000\022\024\n\020UNEXPECTED_ERROR\020\001\022\022\n\016CONNECT_FA"
"ILED\020\002\022\025\n\021PERMISSION_DENIED\020\003\022\031\n\025COLLECT"
"ION_NOT_EXISTS\020\004\022\024\n\020ILLEGAL_ARGUMENT\020\005\022\025"
"\n\021ILLEGAL_DIMENSION\020\007\022\026\n\022ILLEGAL_INDEX_T"
"YPE\020\010\022\033\n\027ILLEGAL_COLLECTION_NAME\020\t\022\020\n\014IL"
"LEGAL_TOPK\020\n\022\025\n\021ILLEGAL_ROWRECORD\020\013\022\025\n\021I"
"LLEGAL_VECTOR_ID\020\014\022\031\n\025ILLEGAL_SEARCH_RES"
"ULT\020\r\022\022\n\016FILE_NOT_FOUND\020\016\022\017\n\013META_FAILED"
"\020\017\022\020\n\014CACHE_FAILED\020\020\022\030\n\024CANNOT_CREATE_FO"
"LDER\020\021\022\026\n\022CANNOT_CREATE_FILE\020\022\022\030\n\024CANNOT"
"_DELETE_FOLDER\020\023\022\026\n\022CANNOT_DELETE_FILE\020\024"
"\022\025\n\021BUILD_INDEX_ERROR\020\025\022\021\n\rILLEGAL_NLIST"
"\020\026\022\027\n\023ILLEGAL_METRIC_TYPE\020\027\022\021\n\rOUT_OF_ME"
"MORY\020\030\022\024\n\017DD_REQUEST_RACE\020\350\007*\315\003\n\007MsgType"
"\022\t\n\005kNone\020\000\022\025\n\021kCreateCollection\020d\022\023\n\017kD"
"ropCollection\020e\022\022\n\016kHasCollection\020f\022\027\n\023k"
"DescribeCollection\020g\022\024\n\020kShowCollections"
"\020h\022\022\n\016kGetSysConfigs\020i\022\025\n\020kCreatePartiti"
"on\020\310\001\022\023\n\016kDropPartition\020\311\001\022\022\n\rkHasPartit"
"ion\020\312\001\022\027\n\022kDescribePartition\020\313\001\022\024\n\017kShow"
"Partitions\020\314\001\022\021\n\014kCreateIndex\020\254\002\022\023\n\016kDes"
"cribeIndex\020\255\002\022\033\n\026kDescribeIndexProgress\020"
"\256\002\022\014\n\007kInsert\020\220\003\022\014\n\007kDelete\020\221\003\022\013\n\006kFlush"
"\020\222\003\022\014\n\007kSearch\020\364\003\022\022\n\rkSearchResult\020\365\003\022\016\n"
"\tkTimeTick\020\260\t\022\024\n\017kQueryNodeStats\020\261\t\022\017\n\nk"
"LoadIndex\020\262\tBBZ@github.com/zilliztech/mi"
"lvus-distributed/internal/proto/commonpb"
"b\006proto3"
"\020\n\010sourceID\030\004 \001(\003\"7\n\tMsgHeader\022*\n\004base\030\001"
" \001(\0132\034.milvus.proto.common.MsgBase*\270\004\n\tE"
"rrorCode\022\013\n\007SUCCESS\020\000\022\024\n\020UNEXPECTED_ERRO"
"R\020\001\022\022\n\016CONNECT_FAILED\020\002\022\025\n\021PERMISSION_DE"
"NIED\020\003\022\031\n\025COLLECTION_NOT_EXISTS\020\004\022\024\n\020ILL"
"EGAL_ARGUMENT\020\005\022\025\n\021ILLEGAL_DIMENSION\020\007\022\026"
"\n\022ILLEGAL_INDEX_TYPE\020\010\022\033\n\027ILLEGAL_COLLEC"
"TION_NAME\020\t\022\020\n\014ILLEGAL_TOPK\020\n\022\025\n\021ILLEGAL"
"_ROWRECORD\020\013\022\025\n\021ILLEGAL_VECTOR_ID\020\014\022\031\n\025I"
"LLEGAL_SEARCH_RESULT\020\r\022\022\n\016FILE_NOT_FOUND"
"\020\016\022\017\n\013META_FAILED\020\017\022\020\n\014CACHE_FAILED\020\020\022\030\n"
"\024CANNOT_CREATE_FOLDER\020\021\022\026\n\022CANNOT_CREATE"
"_FILE\020\022\022\030\n\024CANNOT_DELETE_FOLDER\020\023\022\026\n\022CAN"
"NOT_DELETE_FILE\020\024\022\025\n\021BUILD_INDEX_ERROR\020\025"
"\022\021\n\rILLEGAL_NLIST\020\026\022\027\n\023ILLEGAL_METRIC_TY"
"PE\020\027\022\021\n\rOUT_OF_MEMORY\020\030\022\024\n\017DD_REQUEST_RA"
"CE\020\350\007*N\n\nIndexState\022\010\n\004NONE\020\000\022\014\n\010UNISSUE"
"D\020\001\022\016\n\nINPROGRESS\020\002\022\014\n\010FINISHED\020\003\022\n\n\006FAI"
"LED\020\004*\360\003\n\007MsgType\022\t\n\005kNone\020\000\022\025\n\021kCreateC"
"ollection\020d\022\023\n\017kDropCollection\020e\022\022\n\016kHas"
"Collection\020f\022\027\n\023kDescribeCollection\020g\022\024\n"
"\020kShowCollections\020h\022\022\n\016kGetSysConfigs\020i\022"
"\025\n\020kCreatePartition\020\310\001\022\023\n\016kDropPartition"
"\020\311\001\022\022\n\rkHasPartition\020\312\001\022\027\n\022kDescribePart"
"ition\020\313\001\022\024\n\017kShowPartitions\020\314\001\022\021\n\014kCreat"
"eIndex\020\254\002\022\023\n\016kDescribeIndex\020\255\002\022\033\n\026kDescr"
"ibeIndexProgress\020\256\002\022\014\n\007kInsert\020\220\003\022\014\n\007kDe"
"lete\020\221\003\022\013\n\006kFlush\020\222\003\022\014\n\007kSearch\020\364\003\022\022\n\rkS"
"earchResult\020\365\003\022\016\n\tkTimeTick\020\260\t\022\024\n\017kQuery"
"NodeStats\020\261\t\022\017\n\nkLoadIndex\020\262\t\022\017\n\nkReques"
"tID\020\263\t\022\020\n\013kRequestTSO\020\264\tBBZ@github.com/z"
"illiztech/milvus-distributed/internal/pr"
"oto/commonpbb\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_common_2eproto_deps[1] = {
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_common_2eproto_sccs[6] = {
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_common_2eproto_sccs[7] = {
&scc_info_Address_common_2eproto.base,
&scc_info_Blob_common_2eproto.base,
&scc_info_Empty_common_2eproto.base,
&scc_info_KeyValuePair_common_2eproto.base,
&scc_info_MsgBase_common_2eproto.base,
&scc_info_MsgHeader_common_2eproto.base,
&scc_info_Status_common_2eproto.base,
};
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", 1448,
&descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_sccs, descriptor_table_common_2eproto_deps, 6, 0,
&descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 1620,
&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, 6, 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,
};
// Force running AddDescriptors() at dynamic initialization time.
@ -294,10 +327,27 @@ bool ErrorCode_IsValid(int value) {
}
}
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MsgType_descriptor() {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* IndexState_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_common_2eproto);
return file_level_enum_descriptors_common_2eproto[1];
}
bool IndexState_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
return true;
default:
return false;
}
}
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MsgType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_common_2eproto);
return file_level_enum_descriptors_common_2eproto[2];
}
bool MsgType_IsValid(int value) {
switch (value) {
case 0:
@ -323,6 +373,8 @@ bool MsgType_IsValid(int value) {
case 1200:
case 1201:
case 1202:
case 1203:
case 1204:
return true;
default:
return false;
@ -2128,6 +2180,272 @@ void MsgBase::InternalSwap(MsgBase* other) {
}
// ===================================================================
void MsgHeader::InitAsDefaultInstance() {
::milvus::proto::common::_MsgHeader_default_instance_._instance.get_mutable()->base_ = const_cast< ::milvus::proto::common::MsgBase*>(
::milvus::proto::common::MsgBase::internal_default_instance());
}
class MsgHeader::_Internal {
public:
static const ::milvus::proto::common::MsgBase& base(const MsgHeader* msg);
};
const ::milvus::proto::common::MsgBase&
MsgHeader::_Internal::base(const MsgHeader* msg) {
return *msg->base_;
}
MsgHeader::MsgHeader()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:milvus.proto.common.MsgHeader)
}
MsgHeader::MsgHeader(const MsgHeader& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_base()) {
base_ = new ::milvus::proto::common::MsgBase(*from.base_);
} else {
base_ = nullptr;
}
// @@protoc_insertion_point(copy_constructor:milvus.proto.common.MsgHeader)
}
void MsgHeader::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MsgHeader_common_2eproto.base);
base_ = nullptr;
}
MsgHeader::~MsgHeader() {
// @@protoc_insertion_point(destructor:milvus.proto.common.MsgHeader)
SharedDtor();
}
void MsgHeader::SharedDtor() {
if (this != internal_default_instance()) delete base_;
}
void MsgHeader::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const MsgHeader& MsgHeader::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MsgHeader_common_2eproto.base);
return *internal_default_instance();
}
void MsgHeader::Clear() {
// @@protoc_insertion_point(message_clear_start:milvus.proto.common.MsgHeader)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
if (GetArenaNoVirtual() == nullptr && base_ != nullptr) {
delete base_;
}
base_ = nullptr;
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* MsgHeader::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// .milvus.proto.common.MsgBase base = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ctx->ParseMessage(mutable_base(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool MsgHeader::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:milvus.proto.common.MsgHeader)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// .milvus.proto.common.MsgBase base = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_base()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:milvus.proto.common.MsgHeader)
return true;
failure:
// @@protoc_insertion_point(parse_failure:milvus.proto.common.MsgHeader)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void MsgHeader::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:milvus.proto.common.MsgHeader)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .milvus.proto.common.MsgBase base = 1;
if (this->has_base()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
1, _Internal::base(this), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:milvus.proto.common.MsgHeader)
}
::PROTOBUF_NAMESPACE_ID::uint8* MsgHeader::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:milvus.proto.common.MsgHeader)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .milvus.proto.common.MsgBase base = 1;
if (this->has_base()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
1, _Internal::base(this), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:milvus.proto.common.MsgHeader)
return target;
}
size_t MsgHeader::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:milvus.proto.common.MsgHeader)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// .milvus.proto.common.MsgBase base = 1;
if (this->has_base()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*base_);
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void MsgHeader::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.common.MsgHeader)
GOOGLE_DCHECK_NE(&from, this);
const MsgHeader* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<MsgHeader>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.common.MsgHeader)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.common.MsgHeader)
MergeFrom(*source);
}
}
void MsgHeader::MergeFrom(const MsgHeader& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.common.MsgHeader)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.has_base()) {
mutable_base()->::milvus::proto::common::MsgBase::MergeFrom(from.base());
}
}
void MsgHeader::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.common.MsgHeader)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void MsgHeader::CopyFrom(const MsgHeader& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.common.MsgHeader)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool MsgHeader::IsInitialized() const {
return true;
}
void MsgHeader::InternalSwap(MsgHeader* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(base_, other->base_);
}
::PROTOBUF_NAMESPACE_ID::Metadata MsgHeader::GetMetadata() const {
return GetMetadataStatic();
}
// @@protoc_insertion_point(namespace_scope)
} // namespace common
} // namespace proto
@ -2151,6 +2469,9 @@ template<> PROTOBUF_NOINLINE ::milvus::proto::common::Address* Arena::CreateMayb
template<> PROTOBUF_NOINLINE ::milvus::proto::common::MsgBase* Arena::CreateMaybeMessage< ::milvus::proto::common::MsgBase >(Arena* arena) {
return Arena::CreateInternal< ::milvus::proto::common::MsgBase >(arena);
}
template<> PROTOBUF_NOINLINE ::milvus::proto::common::MsgHeader* Arena::CreateMaybeMessage< ::milvus::proto::common::MsgHeader >(Arena* arena) {
return Arena::CreateInternal< ::milvus::proto::common::MsgHeader >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)

View File

@ -48,7 +48,7 @@ struct TableStruct_common_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[6]
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[7]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
@ -73,6 +73,9 @@ extern KeyValuePairDefaultTypeInternal _KeyValuePair_default_instance_;
class MsgBase;
class MsgBaseDefaultTypeInternal;
extern MsgBaseDefaultTypeInternal _MsgBase_default_instance_;
class MsgHeader;
class MsgHeaderDefaultTypeInternal;
extern MsgHeaderDefaultTypeInternal _MsgHeader_default_instance_;
class Status;
class StatusDefaultTypeInternal;
extern StatusDefaultTypeInternal _Status_default_instance_;
@ -85,6 +88,7 @@ template<> ::milvus::proto::common::Blob* Arena::CreateMaybeMessage<::milvus::pr
template<> ::milvus::proto::common::Empty* Arena::CreateMaybeMessage<::milvus::proto::common::Empty>(Arena*);
template<> ::milvus::proto::common::KeyValuePair* Arena::CreateMaybeMessage<::milvus::proto::common::KeyValuePair>(Arena*);
template<> ::milvus::proto::common::MsgBase* Arena::CreateMaybeMessage<::milvus::proto::common::MsgBase>(Arena*);
template<> ::milvus::proto::common::MsgHeader* Arena::CreateMaybeMessage<::milvus::proto::common::MsgHeader>(Arena*);
template<> ::milvus::proto::common::Status* Arena::CreateMaybeMessage<::milvus::proto::common::Status>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace milvus {
@ -139,6 +143,34 @@ inline bool ErrorCode_Parse(
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<ErrorCode>(
ErrorCode_descriptor(), name, value);
}
enum IndexState : int {
NONE = 0,
UNISSUED = 1,
INPROGRESS = 2,
FINISHED = 3,
FAILED = 4,
IndexState_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
IndexState_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
};
bool IndexState_IsValid(int value);
constexpr IndexState IndexState_MIN = NONE;
constexpr IndexState IndexState_MAX = FAILED;
constexpr int IndexState_ARRAYSIZE = IndexState_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* IndexState_descriptor();
template<typename T>
inline const std::string& IndexState_Name(T enum_t_value) {
static_assert(::std::is_same<T, IndexState>::value ||
::std::is_integral<T>::value,
"Incorrect type passed to function IndexState_Name.");
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
IndexState_descriptor(), enum_t_value);
}
inline bool IndexState_Parse(
const std::string& name, IndexState* value) {
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<IndexState>(
IndexState_descriptor(), name, value);
}
enum MsgType : int {
kNone = 0,
kCreateCollection = 100,
@ -163,12 +195,14 @@ enum MsgType : int {
kTimeTick = 1200,
kQueryNodeStats = 1201,
kLoadIndex = 1202,
kRequestID = 1203,
kRequestTSO = 1204,
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()
};
bool MsgType_IsValid(int value);
constexpr MsgType MsgType_MIN = kNone;
constexpr MsgType MsgType_MAX = kLoadIndex;
constexpr MsgType MsgType_MAX = kRequestTSO;
constexpr int MsgType_ARRAYSIZE = MsgType_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MsgType_descriptor();
@ -1034,6 +1068,140 @@ class MsgBase :
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_common_2eproto;
};
// -------------------------------------------------------------------
class MsgHeader :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.common.MsgHeader) */ {
public:
MsgHeader();
virtual ~MsgHeader();
MsgHeader(const MsgHeader& from);
MsgHeader(MsgHeader&& from) noexcept
: MsgHeader() {
*this = ::std::move(from);
}
inline MsgHeader& operator=(const MsgHeader& from) {
CopyFrom(from);
return *this;
}
inline MsgHeader& operator=(MsgHeader&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const MsgHeader& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const MsgHeader* internal_default_instance() {
return reinterpret_cast<const MsgHeader*>(
&_MsgHeader_default_instance_);
}
static constexpr int kIndexInFileMessages =
6;
friend void swap(MsgHeader& a, MsgHeader& b) {
a.Swap(&b);
}
inline void Swap(MsgHeader* other) {
if (other == this) return;
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline MsgHeader* New() const final {
return CreateMaybeMessage<MsgHeader>(nullptr);
}
MsgHeader* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<MsgHeader>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const MsgHeader& from);
void MergeFrom(const MsgHeader& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
#else
bool MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(MsgHeader* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "milvus.proto.common.MsgHeader";
}
private:
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
return nullptr;
}
inline void* MaybeArenaPtr() const {
return nullptr;
}
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_common_2eproto);
return ::descriptor_table_common_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kBaseFieldNumber = 1,
};
// .milvus.proto.common.MsgBase base = 1;
bool has_base() const;
void clear_base();
const ::milvus::proto::common::MsgBase& base() const;
::milvus::proto::common::MsgBase* release_base();
::milvus::proto::common::MsgBase* mutable_base();
void set_allocated_base(::milvus::proto::common::MsgBase* base);
// @@protoc_insertion_point(class_scope:milvus.proto.common.MsgHeader)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::milvus::proto::common::MsgBase* base_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_common_2eproto;
};
// ===================================================================
@ -1404,6 +1572,61 @@ inline void MsgBase::set_sourceid(::PROTOBUF_NAMESPACE_ID::int64 value) {
// @@protoc_insertion_point(field_set:milvus.proto.common.MsgBase.sourceID)
}
// -------------------------------------------------------------------
// MsgHeader
// .milvus.proto.common.MsgBase base = 1;
inline bool MsgHeader::has_base() const {
return this != internal_default_instance() && base_ != nullptr;
}
inline void MsgHeader::clear_base() {
if (GetArenaNoVirtual() == nullptr && base_ != nullptr) {
delete base_;
}
base_ = nullptr;
}
inline const ::milvus::proto::common::MsgBase& MsgHeader::base() const {
const ::milvus::proto::common::MsgBase* p = base_;
// @@protoc_insertion_point(field_get:milvus.proto.common.MsgHeader.base)
return p != nullptr ? *p : *reinterpret_cast<const ::milvus::proto::common::MsgBase*>(
&::milvus::proto::common::_MsgBase_default_instance_);
}
inline ::milvus::proto::common::MsgBase* MsgHeader::release_base() {
// @@protoc_insertion_point(field_release:milvus.proto.common.MsgHeader.base)
::milvus::proto::common::MsgBase* temp = base_;
base_ = nullptr;
return temp;
}
inline ::milvus::proto::common::MsgBase* MsgHeader::mutable_base() {
if (base_ == nullptr) {
auto* p = CreateMaybeMessage<::milvus::proto::common::MsgBase>(GetArenaNoVirtual());
base_ = p;
}
// @@protoc_insertion_point(field_mutable:milvus.proto.common.MsgHeader.base)
return base_;
}
inline void MsgHeader::set_allocated_base(::milvus::proto::common::MsgBase* base) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == nullptr) {
delete base_;
}
if (base) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
if (message_arena != submessage_arena) {
base = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, base, submessage_arena);
}
} else {
}
base_ = base;
// @@protoc_insertion_point(field_set_allocated:milvus.proto.common.MsgHeader.base)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
@ -1417,6 +1640,8 @@ inline void MsgBase::set_sourceid(::PROTOBUF_NAMESPACE_ID::int64 value) {
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
@ -1431,6 +1656,11 @@ template <>
inline const EnumDescriptor* GetEnumDescriptor< ::milvus::proto::common::ErrorCode>() {
return ::milvus::proto::common::ErrorCode_descriptor();
}
template <> struct is_proto_enum< ::milvus::proto::common::IndexState> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::milvus::proto::common::IndexState>() {
return ::milvus::proto::common::IndexState_descriptor();
}
template <> struct is_proto_enum< ::milvus::proto::common::MsgType> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::milvus::proto::common::MsgType>() {

View File

@ -201,7 +201,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_etcd_5fmeta_2eproto::offsets[]
PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, fieldid_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, indexid_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, index_params_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, status_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, state_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, index_file_paths_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
@ -223,37 +223,35 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] =
};
const char descriptor_table_protodef_etcd_5fmeta_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\017etcd_meta.proto\022\021milvus.proto.etcd\032\023in"
"dex_builder.proto\032\014common.proto\032\014schema."
"proto\"e\n\nTenantMeta\022\n\n\002ID\030\001 \001(\003\022\027\n\017num_q"
"uery_nodes\030\002 \001(\003\022\031\n\021insert_channelIDs\030\003 "
"\003(\t\022\027\n\017query_channelID\030\004 \001(\t\"a\n\tProxyMet"
"a\022\n\n\002ID\030\001 \001(\003\022-\n\007address\030\002 \001(\0132\034.milvus."
"proto.common.Address\022\031\n\021result_channelID"
"s\030\003 \003(\t\"\252\001\n\016CollectionMeta\022\n\n\002ID\030\001 \001(\003\0225"
"\n\006schema\030\002 \001(\0132%.milvus.proto.schema.Col"
"lectionSchema\022\023\n\013create_time\030\003 \001(\004\022\022\n\nse"
"gmentIDs\030\004 \003(\003\022\026\n\016partition_tags\030\005 \003(\t\022\024"
"\n\014partitionIDs\030\006 \003(\003\"9\n\020FieldBinlogFiles"
"\022\017\n\007fieldID\030\001 \001(\003\022\024\n\014binlog_files\030\002 \003(\t\""
"\204\002\n\013SegmentMeta\022\021\n\tsegmentID\030\001 \001(\003\022\024\n\014co"
"llectionID\030\002 \001(\003\022\025\n\rpartition_tag\030\003 \001(\t\022"
"\025\n\rchannel_start\030\004 \001(\005\022\023\n\013channel_end\030\005 "
"\001(\005\022\021\n\topen_time\030\006 \001(\004\022\022\n\nclose_time\030\007 \001"
"(\004\022\020\n\010num_rows\030\010 \001(\003\022\020\n\010mem_size\030\t \001(\003\022>"
"\n\021binlog_file_paths\030\n \003(\0132#.milvus.proto"
".etcd.FieldBinlogFiles\"\313\001\n\016FieldIndexMet"
"a\022\021\n\tsegmentID\030\001 \001(\003\022\017\n\007fieldID\030\002 \001(\003\022\017\n"
"\007indexID\030\003 \001(\003\0227\n\014index_params\030\004 \003(\0132!.m"
"ilvus.proto.common.KeyValuePair\0221\n\006statu"
"s\030\005 \001(\0162!.milvus.proto.service.IndexStat"
"us\022\030\n\020index_file_paths\030\006 \003(\tB@Z>github.c"
"om/zilliztech/milvus-distributed/interna"
"l/proto/etcdpbb\006proto3"
"\n\017etcd_meta.proto\022\021milvus.proto.etcd\032\014co"
"mmon.proto\032\014schema.proto\"e\n\nTenantMeta\022\n"
"\n\002ID\030\001 \001(\003\022\027\n\017num_query_nodes\030\002 \001(\003\022\031\n\021i"
"nsert_channelIDs\030\003 \003(\t\022\027\n\017query_channelI"
"D\030\004 \001(\t\"a\n\tProxyMeta\022\n\n\002ID\030\001 \001(\003\022-\n\007addr"
"ess\030\002 \001(\0132\034.milvus.proto.common.Address\022"
"\031\n\021result_channelIDs\030\003 \003(\t\"\252\001\n\016Collectio"
"nMeta\022\n\n\002ID\030\001 \001(\003\0225\n\006schema\030\002 \001(\0132%.milv"
"us.proto.schema.CollectionSchema\022\023\n\013crea"
"te_time\030\003 \001(\004\022\022\n\nsegmentIDs\030\004 \003(\003\022\026\n\016par"
"tition_tags\030\005 \003(\t\022\024\n\014partitionIDs\030\006 \003(\003\""
"9\n\020FieldBinlogFiles\022\017\n\007fieldID\030\001 \001(\003\022\024\n\014"
"binlog_files\030\002 \003(\t\"\204\002\n\013SegmentMeta\022\021\n\tse"
"gmentID\030\001 \001(\003\022\024\n\014collectionID\030\002 \001(\003\022\025\n\rp"
"artition_tag\030\003 \001(\t\022\025\n\rchannel_start\030\004 \001("
"\005\022\023\n\013channel_end\030\005 \001(\005\022\021\n\topen_time\030\006 \001("
"\004\022\022\n\nclose_time\030\007 \001(\004\022\020\n\010num_rows\030\010 \001(\003\022"
"\020\n\010mem_size\030\t \001(\003\022>\n\021binlog_file_paths\030\n"
" \003(\0132#.milvus.proto.etcd.FieldBinlogFile"
"s\"\310\001\n\016FieldIndexMeta\022\021\n\tsegmentID\030\001 \001(\003\022"
"\017\n\007fieldID\030\002 \001(\003\022\017\n\007indexID\030\003 \001(\003\0227\n\014ind"
"ex_params\030\004 \003(\0132!.milvus.proto.common.Ke"
"yValuePair\022.\n\005state\030\005 \001(\0162\037.milvus.proto"
".common.IndexState\022\030\n\020index_file_paths\030\006"
" \003(\tB@Z>github.com/zilliztech/milvus-dis"
"tributed/internal/proto/etcdpbb\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_etcd_5fmeta_2eproto_deps[3] = {
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_etcd_5fmeta_2eproto_deps[2] = {
&::descriptor_table_common_2eproto,
&::descriptor_table_index_5fbuilder_2eproto,
&::descriptor_table_schema_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_etcd_5fmeta_2eproto_sccs[6] = {
@ -267,8 +265,8 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_etc
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_etcd_5fmeta_2eproto_once;
static bool descriptor_table_etcd_5fmeta_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_etcd_5fmeta_2eproto = {
&descriptor_table_etcd_5fmeta_2eproto_initialized, descriptor_table_protodef_etcd_5fmeta_2eproto, "etcd_meta.proto", 1062,
&descriptor_table_etcd_5fmeta_2eproto_once, descriptor_table_etcd_5fmeta_2eproto_sccs, descriptor_table_etcd_5fmeta_2eproto_deps, 6, 3,
&descriptor_table_etcd_5fmeta_2eproto_initialized, descriptor_table_protodef_etcd_5fmeta_2eproto, "etcd_meta.proto", 1038,
&descriptor_table_etcd_5fmeta_2eproto_once, descriptor_table_etcd_5fmeta_2eproto_sccs, descriptor_table_etcd_5fmeta_2eproto_deps, 6, 2,
schemas, file_default_instances, TableStruct_etcd_5fmeta_2eproto::offsets,
file_level_metadata_etcd_5fmeta_2eproto, 6, file_level_enum_descriptors_etcd_5fmeta_2eproto, file_level_service_descriptors_etcd_5fmeta_2eproto,
};
@ -2630,16 +2628,16 @@ FieldIndexMeta::FieldIndexMeta(const FieldIndexMeta& from)
index_file_paths_(from.index_file_paths_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
::memcpy(&segmentid_, &from.segmentid_,
static_cast<size_t>(reinterpret_cast<char*>(&status_) -
reinterpret_cast<char*>(&segmentid_)) + sizeof(status_));
static_cast<size_t>(reinterpret_cast<char*>(&state_) -
reinterpret_cast<char*>(&segmentid_)) + sizeof(state_));
// @@protoc_insertion_point(copy_constructor:milvus.proto.etcd.FieldIndexMeta)
}
void FieldIndexMeta::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FieldIndexMeta_etcd_5fmeta_2eproto.base);
::memset(&segmentid_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&status_) -
reinterpret_cast<char*>(&segmentid_)) + sizeof(status_));
reinterpret_cast<char*>(&state_) -
reinterpret_cast<char*>(&segmentid_)) + sizeof(state_));
}
FieldIndexMeta::~FieldIndexMeta() {
@ -2668,8 +2666,8 @@ void FieldIndexMeta::Clear() {
index_params_.Clear();
index_file_paths_.Clear();
::memset(&segmentid_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&status_) -
reinterpret_cast<char*>(&segmentid_)) + sizeof(status_));
reinterpret_cast<char*>(&state_) -
reinterpret_cast<char*>(&segmentid_)) + sizeof(state_));
_internal_metadata_.Clear();
}
@ -2714,12 +2712,12 @@ const char* FieldIndexMeta::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34);
} else goto handle_unusual;
continue;
// .milvus.proto.service.IndexStatus status = 5;
// .milvus.proto.common.IndexState state = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
set_status(static_cast<::milvus::proto::service::IndexStatus>(val));
set_state(static_cast<::milvus::proto::common::IndexState>(val));
} else goto handle_unusual;
continue;
// repeated string index_file_paths = 6;
@ -2814,14 +2812,14 @@ bool FieldIndexMeta::MergePartialFromCodedStream(
break;
}
// .milvus.proto.service.IndexStatus status = 5;
// .milvus.proto.common.IndexState state = 5;
case 5: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) {
int value = 0;
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
set_status(static_cast< ::milvus::proto::service::IndexStatus >(value));
set_state(static_cast< ::milvus::proto::common::IndexState >(value));
} else {
goto handle_unusual;
}
@ -2895,10 +2893,10 @@ void FieldIndexMeta::SerializeWithCachedSizes(
output);
}
// .milvus.proto.service.IndexStatus status = 5;
if (this->status() != 0) {
// .milvus.proto.common.IndexState state = 5;
if (this->state() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
5, this->status(), output);
5, this->state(), output);
}
// repeated string index_file_paths = 6;
@ -2947,10 +2945,10 @@ void FieldIndexMeta::SerializeWithCachedSizes(
4, this->index_params(static_cast<int>(i)), target);
}
// .milvus.proto.service.IndexStatus status = 5;
if (this->status() != 0) {
// .milvus.proto.common.IndexState state = 5;
if (this->state() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
5, this->status(), target);
5, this->state(), target);
}
// repeated string index_file_paths = 6;
@ -3024,10 +3022,10 @@ size_t FieldIndexMeta::ByteSizeLong() const {
this->indexid());
}
// .milvus.proto.service.IndexStatus status = 5;
if (this->status() != 0) {
// .milvus.proto.common.IndexState state = 5;
if (this->state() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->status());
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->state());
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
@ -3068,8 +3066,8 @@ void FieldIndexMeta::MergeFrom(const FieldIndexMeta& from) {
if (from.indexid() != 0) {
set_indexid(from.indexid());
}
if (from.status() != 0) {
set_status(from.status());
if (from.state() != 0) {
set_state(from.state());
}
}
@ -3099,7 +3097,7 @@ void FieldIndexMeta::InternalSwap(FieldIndexMeta* other) {
swap(segmentid_, other->segmentid_);
swap(fieldid_, other->fieldid_);
swap(indexid_, other->indexid_);
swap(status_, other->status_);
swap(state_, other->state_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FieldIndexMeta::GetMetadata() const {

View File

@ -32,7 +32,6 @@
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
#include "index_builder.pb.h"
#include "common.pb.h"
#include "schema.pb.h"
// @@protoc_insertion_point(includes)
@ -1094,7 +1093,7 @@ class FieldIndexMeta :
kSegmentIDFieldNumber = 1,
kFieldIDFieldNumber = 2,
kIndexIDFieldNumber = 3,
kStatusFieldNumber = 5,
kStateFieldNumber = 5,
};
// repeated .milvus.proto.common.KeyValuePair index_params = 4;
int index_params_size() const;
@ -1139,10 +1138,10 @@ class FieldIndexMeta :
::PROTOBUF_NAMESPACE_ID::int64 indexid() const;
void set_indexid(::PROTOBUF_NAMESPACE_ID::int64 value);
// .milvus.proto.service.IndexStatus status = 5;
void clear_status();
::milvus::proto::service::IndexStatus status() const;
void set_status(::milvus::proto::service::IndexStatus value);
// .milvus.proto.common.IndexState state = 5;
void clear_state();
::milvus::proto::common::IndexState state() const;
void set_state(::milvus::proto::common::IndexState value);
// @@protoc_insertion_point(class_scope:milvus.proto.etcd.FieldIndexMeta)
private:
@ -1154,7 +1153,7 @@ class FieldIndexMeta :
::PROTOBUF_NAMESPACE_ID::int64 segmentid_;
::PROTOBUF_NAMESPACE_ID::int64 fieldid_;
::PROTOBUF_NAMESPACE_ID::int64 indexid_;
int status_;
int state_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_etcd_5fmeta_2eproto;
};
@ -1996,18 +1995,18 @@ FieldIndexMeta::index_params() const {
return index_params_;
}
// .milvus.proto.service.IndexStatus status = 5;
inline void FieldIndexMeta::clear_status() {
status_ = 0;
// .milvus.proto.common.IndexState state = 5;
inline void FieldIndexMeta::clear_state() {
state_ = 0;
}
inline ::milvus::proto::service::IndexStatus FieldIndexMeta::status() const {
// @@protoc_insertion_point(field_get:milvus.proto.etcd.FieldIndexMeta.status)
return static_cast< ::milvus::proto::service::IndexStatus >(status_);
inline ::milvus::proto::common::IndexState FieldIndexMeta::state() const {
// @@protoc_insertion_point(field_get:milvus.proto.etcd.FieldIndexMeta.state)
return static_cast< ::milvus::proto::common::IndexState >(state_);
}
inline void FieldIndexMeta::set_status(::milvus::proto::service::IndexStatus value) {
inline void FieldIndexMeta::set_state(::milvus::proto::common::IndexState value) {
status_ = value;
// @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.status)
state_ = value;
// @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.state)
}
// repeated string index_file_paths = 6;

View File

@ -51,7 +51,7 @@ func (watcher *proxyTimeTickWatcher) handleProxyTimeTickMsg() {
case <-watcher.ctx.Done():
return
case msg := <-watcher.msgQueue:
if err := watcher.allocator.ExpireAllocations(msg.Timestamp); err != nil {
if err := watcher.allocator.ExpireAllocations(msg.Base.Timestamp); err != nil {
log.Printf("expire allocations error : %s", err.Error())
}
}
@ -92,7 +92,7 @@ func (watcher *dataNodeTimeTickWatcher) handleDataNodeTimeTickMsg() {
continue
}
for _, id := range segments {
expired, err := watcher.allocator.IsAllocationsExpired(id, msg.Timestamp)
expired, err := watcher.allocator.IsAllocationsExpired(id, msg.Base.Timestamp)
if err != nil {
log.Printf("check allocations expired error %s", err.Error())
continue

View File

@ -8,30 +8,21 @@ import (
"time"
"github.com/zilliztech/milvus-distributed/internal/errors"
"google.golang.org/grpc"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexbuilderpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
type UniqueID = typeutil.UniqueID
type Client struct {
client indexbuilderpb.IndexBuildServiceClient
client indexpb.IndexServiceClient
address string
ctx context.Context
}
type IndexDescription struct {
ID UniqueID
Status indexbuilderpb.IndexStatus
EnqueueTime time.Time
ScheduleTime time.Time
BuildCompleteTime time.Time
}
func NewBuildIndexClient(ctx context.Context, address string) (*Client, error) {
return &Client{
address: address,
@ -51,11 +42,11 @@ func (c *Client) tryConnect() error {
if err != nil {
return err
}
c.client = indexbuilderpb.NewIndexBuildServiceClient(conn)
c.client = indexpb.NewIndexServiceClient(conn)
return nil
}
func (c *Client) BuildIndexWithoutID(columnDataPaths []string, typeParams map[string]string, indexParams map[string]string) (UniqueID, error) {
func (c *Client) BuildIndex(columnDataPaths []string, typeParams map[string]string, indexParams map[string]string) (UniqueID, error) {
if c.tryConnect() != nil {
panic("BuildIndexWithoutID: failed to connect index builder")
}
@ -115,7 +106,7 @@ func (c *Client) BuildIndexWithoutID(columnDataPaths []string, typeParams map[st
}
ctx := context.TODO()
requset := &indexbuilderpb.BuildIndexRequest{
requset := &indexpb.BuildIndexRequest{
DataPaths: columnDataPaths,
TypeParams: typeParamsKV,
IndexParams: indexParamsKV,
@ -129,25 +120,25 @@ func (c *Client) BuildIndexWithoutID(columnDataPaths []string, typeParams map[st
return indexID, err
}
func (c *Client) DescribeIndex(indexID UniqueID) (*IndexDescription, error) {
func (c *Client) GetIndexStates(indexID UniqueID) (*indexpb.IndexStatesResponse, error) {
if c.tryConnect() != nil {
panic("DescribeIndex: failed to connect index builder")
}
ctx := context.TODO()
request := &indexbuilderpb.DescribleIndexRequest{
request := &indexpb.IndexStatesRequest{
IndexID: indexID,
}
response, err := c.client.DescribeIndex(ctx, request)
response, err := c.client.GetIndexStates(ctx, request)
if err != nil {
return &IndexDescription{}, err
return &indexpb.IndexStatesResponse{}, err
}
indexDescription := IndexDescription{
ID: indexID,
Status: response.IndexStatus,
EnqueueTime: parseTS(response.EnqueTime),
ScheduleTime: parseTS(response.ScheduleTime),
BuildCompleteTime: parseTS(response.BuildCompleteTime),
indexDescription := indexpb.IndexStatesResponse{
Status: &commonpb.Status{
ErrorCode: 0,
},
IndexID: indexID,
State: response.State,
}
return &indexDescription, nil
}
@ -157,7 +148,7 @@ func (c *Client) GetIndexFilePaths(indexID UniqueID) ([]string, error) {
panic("GetIndexFilePaths: failed to connect index builder")
}
ctx := context.TODO()
request := &indexbuilderpb.GetIndexFilePathsRequest{
request := &indexpb.IndexFilePathRequest{
IndexID: indexID,
}

View File

@ -6,14 +6,14 @@ import (
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexbuilderpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
)
const (
reqTimeoutInterval = time.Second * 10
)
func (b *Builder) BuildIndex(ctx context.Context, request *indexbuilderpb.BuildIndexRequest) (*indexbuilderpb.BuildIndexResponse, error) {
func (b *Builder) BuildIndex(ctx context.Context, request *indexpb.BuildIndexRequest) (*indexpb.BuildIndexResponse, error) {
t := NewIndexAddTask()
t.req = request
t.idAllocator = b.idAllocator
@ -32,7 +32,7 @@ func (b *Builder) BuildIndex(ctx context.Context, request *indexbuilderpb.BuildI
return b.sched.IndexAddQueue.Enqueue(t)
}
}
ret := &indexbuilderpb.BuildIndexResponse{
ret := &indexpb.BuildIndexResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
},
@ -55,9 +55,9 @@ func (b *Builder) BuildIndex(ctx context.Context, request *indexbuilderpb.BuildI
return ret, nil
}
func (b *Builder) DescribeIndex(ctx context.Context, request *indexbuilderpb.DescribleIndexRequest) (*indexbuilderpb.DescribleIndexResponse, error) {
func (b *Builder) GetIndexStates(ctx context.Context, request *indexpb.IndexStatesRequest) (*indexpb.IndexStatesResponse, error) {
indexID := request.IndexID
ret, err := b.metaTable.GetIndexDescription(indexID)
ret, err := b.metaTable.GetIndexStates(indexID)
ret.Status = &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS}
ret.IndexID = indexID
if err != nil {
@ -67,8 +67,8 @@ func (b *Builder) DescribeIndex(ctx context.Context, request *indexbuilderpb.Des
return ret, nil
}
func (b *Builder) GetIndexFilePaths(ctx context.Context, request *indexbuilderpb.GetIndexFilePathsRequest) (*indexbuilderpb.GetIndexFilePathsResponse, error) {
ret := &indexbuilderpb.GetIndexFilePathsResponse{
func (b *Builder) GetIndexFilePaths(ctx context.Context, request *indexpb.IndexFilePathRequest) (*indexpb.IndexFilePathsResponse, error) {
ret := &indexpb.IndexFilePathsResponse{
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
IndexID: request.IndexID,
}

View File

@ -10,6 +10,7 @@ import (
"time"
"github.com/zilliztech/milvus-distributed/internal/indexservice"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
@ -21,7 +22,6 @@ import (
"github.com/zilliztech/milvus-distributed/internal/allocator"
"github.com/zilliztech/milvus-distributed/internal/kv"
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
"github.com/zilliztech/milvus-distributed/internal/proto/indexbuilderpb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
"google.golang.org/grpc"
)
@ -84,6 +84,14 @@ type Builder struct {
closeCallbacks []func()
}
func (b *Builder) RegisterNode(ctx context.Context, request *indexpb.RegisterNodeRequest) (*indexpb.RegisterNodeResponse, error) {
panic("implement me")
}
func (b *Builder) NotifyBuildIndex(ctx context.Context, notification *indexpb.BuildIndexNotification) (*commonpb.Status, error) {
panic("implement me")
}
func Init() {
rand.Seed(time.Now().UnixNano())
Params.Init()
@ -183,7 +191,7 @@ func (b *Builder) grpcLoop() {
}
b.grpcServer = grpc.NewServer()
indexbuilderpb.RegisterIndexBuildServiceServer(b.grpcServer, b)
indexpb.RegisterIndexServiceServer(b.grpcServer, b)
if err = b.grpcServer.Serve(lis); err != nil {
log.Fatalf("Builder grpc server fatal error=%v", err)
}

View File

@ -16,7 +16,7 @@ import (
"github.com/stretchr/testify/assert"
indexnodeclient "github.com/zilliztech/milvus-distributed/internal/indexnode/client"
"github.com/zilliztech/milvus-distributed/internal/master"
"github.com/zilliztech/milvus-distributed/internal/proto/indexbuilderpb"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
)
var ctx context.Context
@ -114,15 +114,15 @@ func TestBuilder_GRPC(t *testing.T) {
indexParams := make(map[string]string)
indexParams["b"] = "2"
columnDataPaths := []string{"dataA", "dataB"}
indexID, err := buildClient.BuildIndexWithoutID(columnDataPaths, typeParams, indexParams)
indexID, err := buildClient.BuildIndex(columnDataPaths, typeParams, indexParams)
assert.Nil(t, err)
time.Sleep(time.Second * 3)
description, err := buildClient.DescribeIndex(indexID)
description, err := buildClient.GetIndexStates(indexID)
assert.Nil(t, err)
assert.Equal(t, indexbuilderpb.IndexStatus_INPROGRESS, description.Status)
assert.Equal(t, indexID, description.ID)
assert.Equal(t, commonpb.IndexState_INPROGRESS, description.State)
assert.Equal(t, indexID, description.IndexID)
indexDataPaths, err := buildClient.GetIndexFilePaths(indexID)
assert.Nil(t, err)

View File

@ -6,10 +6,12 @@ import (
"sync"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/golang/protobuf/proto"
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/kv"
pb "github.com/zilliztech/milvus-distributed/internal/proto/indexbuilderpb"
pb "github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
)
type metaTable struct {
@ -67,7 +69,7 @@ func (mt *metaTable) AddIndex(indexID UniqueID, req *pb.BuildIndexRequest) error
return errors.Errorf("index already exists with ID = " + strconv.FormatInt(indexID, 10))
}
meta := &pb.IndexMeta{
Status: pb.IndexStatus_UNISSUED,
State: commonpb.IndexState_UNISSUED,
IndexID: indexID,
Req: req,
}
@ -75,14 +77,14 @@ func (mt *metaTable) AddIndex(indexID UniqueID, req *pb.BuildIndexRequest) error
return nil
}
func (mt *metaTable) UpdateIndexStatus(indexID UniqueID, status pb.IndexStatus) error {
func (mt *metaTable) UpdateIndexState(indexID UniqueID, state commonpb.IndexState) error {
mt.lock.Lock()
defer mt.lock.Unlock()
meta, ok := mt.indexID2Meta[indexID]
if !ok {
return errors.Errorf("index not exists with ID = " + strconv.FormatInt(indexID, 10))
}
meta.Status = status
meta.State = state
mt.saveIndexMeta(&meta)
return nil
}
@ -118,25 +120,22 @@ func (mt *metaTable) CompleteIndex(indexID UniqueID, dataPaths []string) error {
if !ok {
return errors.Errorf("index not exists with ID = " + strconv.FormatInt(indexID, 10))
}
meta.Status = pb.IndexStatus_FINISHED
meta.State = commonpb.IndexState_FINISHED
meta.IndexFilePaths = dataPaths
meta.BuildCompleteTime = time.Now().UnixNano()
mt.saveIndexMeta(&meta)
return nil
}
func (mt *metaTable) GetIndexDescription(indexID UniqueID) (*pb.DescribleIndexResponse, error) {
func (mt *metaTable) GetIndexStates(indexID UniqueID) (*pb.IndexStatesResponse, error) {
mt.lock.Lock()
defer mt.lock.Unlock()
ret := &pb.DescribleIndexResponse{}
ret := &pb.IndexStatesResponse{}
meta, ok := mt.indexID2Meta[indexID]
if !ok {
return ret, errors.Errorf("index not exists with ID = " + strconv.FormatInt(indexID, 10))
}
ret.IndexStatus = meta.Status
ret.EnqueTime = meta.EnqueTime
ret.BuildCompleteTime = meta.BuildCompleteTime
ret.ScheduleTime = meta.ScheduleTime
ret.State = meta.State
return ret, nil
}

View File

@ -10,7 +10,8 @@ import (
"github.com/zilliztech/milvus-distributed/internal/allocator"
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/kv"
"github.com/zilliztech/milvus-distributed/internal/proto/indexbuilderpb"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/storage"
)
@ -55,7 +56,7 @@ func (bt *BaseTask) Notify(err error) {
type IndexAddTask struct {
BaseTask
req *indexbuilderpb.BuildIndexRequest
req *indexpb.BuildIndexRequest
indexID UniqueID
idAllocator *allocator.IDAllocator
buildQueue TaskQueue
@ -123,7 +124,7 @@ type IndexBuildTask struct {
indexID UniqueID
kv kv.Base
savePaths []string
req *indexbuilderpb.BuildIndexRequest
req *indexpb.BuildIndexRequest
}
func newIndexBuildTask() *IndexBuildTask {
@ -147,7 +148,7 @@ func (it *IndexBuildTask) PreExecute() error {
}
func (it *IndexBuildTask) Execute() error {
err := it.table.UpdateIndexStatus(it.indexID, indexbuilderpb.IndexStatus_INPROGRESS)
err := it.table.UpdateIndexState(it.indexID, commonpb.IndexState_INPROGRESS)
if err != nil {
return err
}

View File

@ -4,8 +4,8 @@ import (
"sync"
"time"
buildindexclient "github.com/zilliztech/milvus-distributed/internal/indexnode/client"
"github.com/zilliztech/milvus-distributed/internal/proto/indexbuilderpb"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
writerclient "github.com/zilliztech/milvus-distributed/internal/writenode/client"
)
@ -63,8 +63,8 @@ func (m *MockWriteNodeClient) GetInsertBinlogPaths(segmentID UniqueID) (map[Uniq
}
type BuildIndexClient interface {
BuildIndexWithoutID(columnDataPaths []string, typeParams map[string]string, indexParams map[string]string) (UniqueID, error)
DescribeIndex(indexID UniqueID) (*buildindexclient.IndexDescription, error)
BuildIndex(columnDataPaths []string, typeParams map[string]string, indexParams map[string]string) (UniqueID, error)
GetIndexStates(indexID UniqueID) (*indexpb.IndexStatesResponse, error)
GetIndexFilePaths(indexID UniqueID) ([]string, error)
}
@ -72,28 +72,22 @@ type MockBuildIndexClient struct {
buildTime time.Time
}
func (m *MockBuildIndexClient) BuildIndexWithoutID(columnDataPaths []string, typeParams map[string]string, indexParams map[string]string) (UniqueID, error) {
func (m *MockBuildIndexClient) BuildIndex(columnDataPaths []string, typeParams map[string]string, indexParams map[string]string) (UniqueID, error) {
m.buildTime = time.Now()
return 1, nil
}
func (m *MockBuildIndexClient) DescribeIndex(indexID UniqueID) (*buildindexclient.IndexDescription, error) {
func (m *MockBuildIndexClient) GetIndexStates(indexID UniqueID) (*indexpb.IndexStatesResponse, error) {
now := time.Now()
if now.Sub(m.buildTime).Seconds() > 2 {
return &buildindexclient.IndexDescription{
ID: 1,
Status: indexbuilderpb.IndexStatus_FINISHED,
EnqueueTime: time.Now(),
ScheduleTime: time.Now(),
BuildCompleteTime: time.Now(),
return &indexpb.IndexStatesResponse{
IndexID: indexID,
State: commonpb.IndexState_FINISHED,
}, nil
}
return &buildindexclient.IndexDescription{
ID: 1,
Status: indexbuilderpb.IndexStatus_INPROGRESS,
EnqueueTime: time.Now(),
ScheduleTime: time.Now(),
BuildCompleteTime: time.Now(),
return &indexpb.IndexStatesResponse{
IndexID: 1,
State: commonpb.IndexState_INPROGRESS,
}, nil
}

View File

@ -4,43 +4,43 @@ import (
"errors"
"log"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/golang/protobuf/proto"
ms "github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/proto/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/proto/servicepb"
)
type createCollectionTask struct {
baseTask
req *internalpb.CreateCollectionRequest
req *milvuspb.CreateCollectionRequest
}
type dropCollectionTask struct {
baseTask
req *internalpb.DropCollectionRequest
req *milvuspb.DropCollectionRequest
segManager SegmentManager
}
type hasCollectionTask struct {
baseTask
hasCollection bool
req *internalpb.HasCollectionRequest
req *milvuspb.HasCollectionRequest
}
type describeCollectionTask struct {
baseTask
description *servicepb.CollectionDescription
req *internalpb.DescribeCollectionRequest
description *milvuspb.DescribeCollectionResponse
req *milvuspb.DescribeCollectionRequest
}
type showCollectionsTask struct {
baseTask
stringListResponse *servicepb.StringListResponse
req *internalpb.ShowCollectionRequest
stringListResponse *milvuspb.ShowCollectionResponse
req *milvuspb.ShowCollectionRequest
}
//////////////////////////////////////////////////////////////////////////
@ -49,14 +49,14 @@ func (t *createCollectionTask) Type() commonpb.MsgType {
log.Printf("null request")
return 0
}
return t.req.MsgType
return t.req.Base.MsgType
}
func (t *createCollectionTask) Ts() (Timestamp, error) {
if t.req == nil {
return 0, errors.New("null request")
}
return t.req.Timestamp, nil
return t.req.Base.Timestamp, nil
}
func (t *createCollectionTask) Execute() error {
@ -65,7 +65,7 @@ func (t *createCollectionTask) Execute() error {
}
var schema schemapb.CollectionSchema
err := proto.UnmarshalMerge(t.req.Schema.Value, &schema)
err := proto.UnmarshalMerge(t.req.Schema, &schema)
if err != nil {
return err
}
@ -114,19 +114,26 @@ func (t *createCollectionTask) Execute() error {
msgPack := ms.MsgPack{}
baseMsg := ms.BaseMsg{
BeginTimestamp: t.req.Timestamp,
EndTimestamp: t.req.Timestamp,
BeginTimestamp: t.req.Base.Timestamp,
EndTimestamp: t.req.Base.Timestamp,
HashValues: []uint32{0},
}
t.req.CollectionID = collectionID
t.req.Schema.Value, err = proto.Marshal(&schema)
createCollectionMsg := &internalpb2.CreateCollectionRequest{
Base: t.req.Base,
DbName: "",
CollectionName: t.req.CollectionName,
DbID: 0,
CollectionID: collectionID,
}
createCollectionMsg.Schema, err = proto.Marshal(&schema)
if err != nil {
return err
}
timeTickMsg := &ms.CreateCollectionMsg{
BaseMsg: baseMsg,
CreateCollectionRequest: *t.req,
CreateCollectionRequest: *createCollectionMsg,
}
msgPack.Msgs = append(msgPack.Msgs, timeTickMsg)
return t.sch.ddMsgStream.Broadcast(&msgPack)
@ -138,14 +145,14 @@ func (t *dropCollectionTask) Type() commonpb.MsgType {
log.Printf("null request")
return 0
}
return t.req.MsgType
return t.req.Base.MsgType
}
func (t *dropCollectionTask) Ts() (Timestamp, error) {
if t.req == nil {
return 0, errors.New("null request")
}
return t.req.Timestamp, nil
return t.req.Base.Timestamp, nil
}
func (t *dropCollectionTask) Execute() error {
@ -153,7 +160,7 @@ func (t *dropCollectionTask) Execute() error {
return errors.New("null request")
}
collectionName := t.req.CollectionName.CollectionName
collectionName := t.req.CollectionName
collectionMeta, err := t.mt.GetCollectionByName(collectionName)
if err != nil {
return err
@ -183,10 +190,16 @@ func (t *dropCollectionTask) Execute() error {
HashValues: []uint32{0},
}
t.req.CollectionID = collectionID
dropReq := internalpb2.DropCollectionRequest{
Base: t.req.Base,
DbName: "",
CollectionName: t.req.CollectionName,
DbID: 0,
CollectionID: collectionID,
}
timeTickMsg := &ms.DropCollectionMsg{
BaseMsg: baseMsg,
DropCollectionRequest: *t.req,
DropCollectionRequest: dropReq,
}
msgPack.Msgs = append(msgPack.Msgs, timeTickMsg)
return t.sch.ddMsgStream.Broadcast(&msgPack)
@ -199,14 +212,14 @@ func (t *hasCollectionTask) Type() commonpb.MsgType {
log.Printf("null request")
return 0
}
return t.req.MsgType
return t.req.Base.MsgType
}
func (t *hasCollectionTask) Ts() (Timestamp, error) {
if t.req == nil {
return 0, errors.New("null request")
}
return t.req.Timestamp, nil
return t.req.Base.Timestamp, nil
}
func (t *hasCollectionTask) Execute() error {
@ -214,7 +227,7 @@ func (t *hasCollectionTask) Execute() error {
return errors.New("null request")
}
collectionName := t.req.CollectionName.CollectionName
collectionName := t.req.CollectionName
_, err := t.mt.GetCollectionByName(collectionName)
if err == nil {
t.hasCollection = true
@ -229,14 +242,14 @@ func (t *describeCollectionTask) Type() commonpb.MsgType {
log.Printf("null request")
return 0
}
return t.req.MsgType
return t.req.Base.MsgType
}
func (t *describeCollectionTask) Ts() (Timestamp, error) {
if t.req == nil {
return 0, errors.New("null request")
}
return t.req.Timestamp, nil
return t.req.Base.Timestamp, nil
}
func (t *describeCollectionTask) filterSchema() error {
@ -260,7 +273,7 @@ func (t *describeCollectionTask) Execute() error {
}
collectionName := t.req.CollectionName
collection, err := t.mt.GetCollectionByName(collectionName.CollectionName)
collection, err := t.mt.GetCollectionByName(collectionName)
if err != nil {
return err
}
@ -276,14 +289,14 @@ func (t *showCollectionsTask) Type() commonpb.MsgType {
log.Printf("null request")
return 0
}
return t.req.MsgType
return t.req.Base.MsgType
}
func (t *showCollectionsTask) Ts() (Timestamp, error) {
if t.req == nil {
return 0, errors.New("null request")
}
return t.req.Timestamp, nil
return t.req.Base.Timestamp, nil
}
func (t *showCollectionsTask) Execute() error {
@ -296,7 +309,7 @@ func (t *showCollectionsTask) Execute() error {
return err
}
t.stringListResponse.Values = colls
t.stringListResponse.CollectionNames = colls
return nil
}

View File

@ -1,81 +0,0 @@
package master
import (
"log"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/errors"
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
type getSysConfigsTask struct {
baseTask
configkv *etcdkv.EtcdKV
req *internalpb.SysConfigRequest
keys []string
values []string
}
func (t *getSysConfigsTask) Type() commonpb.MsgType {
if t.req == nil {
log.Printf("null request")
return 0
}
return t.req.MsgType
}
func (t *getSysConfigsTask) Ts() (Timestamp, error) {
if t.req == nil {
return 0, errors.New("null request")
}
return t.req.Timestamp, nil
}
func (t *getSysConfigsTask) Execute() error {
if t.req == nil {
return errors.New("null request")
}
sc := &SysConfig{kv: t.configkv}
keyMap := make(map[string]bool)
// Load configs with prefix
for _, prefix := range t.req.KeyPrefixes {
prefixKeys, prefixVals, err := sc.GetByPrefix(prefix)
if err != nil {
return errors.Errorf("Load configs by prefix wrong: %s", err.Error())
}
t.keys = append(t.keys, prefixKeys...)
t.values = append(t.values, prefixVals...)
}
for _, key := range t.keys {
keyMap[key] = true
}
// Load specific configs
if len(t.req.Keys) > 0 {
// To clean up duplicated keys
cleanKeys := []string{}
for _, key := range t.req.Keys {
if v, ok := keyMap[key]; (!ok) || (ok && !v) {
cleanKeys = append(cleanKeys, key)
keyMap[key] = true
continue
}
log.Println("[GetSysConfigs] Warning: duplicate key:", key)
}
v, err := sc.Get(cleanKeys)
if err != nil {
return errors.Errorf("Load configs wrong: %s", err.Error())
}
t.keys = append(t.keys, cleanKeys...)
t.values = append(t.values, v...)
}
return nil
}

View File

@ -3,16 +3,18 @@ package master
import (
"context"
"fmt"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/servicepb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/masterpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
)
const slowThreshold = 5 * time.Millisecond
func (s *Master) CreateCollection(ctx context.Context, in *internalpb.CreateCollectionRequest) (*commonpb.Status, error) {
func (s *Master) CreateCollection(ctx context.Context, in *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) {
var t task = &createCollectionTask{
req: in,
baseTask: baseTask{
@ -42,7 +44,7 @@ func (s *Master) CreateCollection(ctx context.Context, in *internalpb.CreateColl
return response, nil
}
func (s *Master) DropCollection(ctx context.Context, in *internalpb.DropCollectionRequest) (*commonpb.Status, error) {
func (s *Master) DropCollection(ctx context.Context, in *milvuspb.DropCollectionRequest) (*commonpb.Status, error) {
var t task = &dropCollectionTask{
req: in,
baseTask: baseTask{
@ -73,7 +75,7 @@ func (s *Master) DropCollection(ctx context.Context, in *internalpb.DropCollecti
return response, nil
}
func (s *Master) HasCollection(ctx context.Context, in *internalpb.HasCollectionRequest) (*servicepb.BoolResponse, error) {
func (s *Master) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
var t task = &hasCollectionTask{
req: in,
baseTask: baseTask{
@ -88,7 +90,7 @@ func (s *Master) HasCollection(ctx context.Context, in *internalpb.HasCollection
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
}
response := &servicepb.BoolResponse{
response := &milvuspb.BoolResponse{
Status: st,
Value: false,
}
@ -110,7 +112,7 @@ func (s *Master) HasCollection(ctx context.Context, in *internalpb.HasCollection
return response, nil
}
func (s *Master) DescribeCollection(ctx context.Context, in *internalpb.DescribeCollectionRequest) (*servicepb.CollectionDescription, error) {
func (s *Master) DescribeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
var t task = &describeCollectionTask{
req: in,
baseTask: baseTask{
@ -121,7 +123,7 @@ func (s *Master) DescribeCollection(ctx context.Context, in *internalpb.Describe
description: nil,
}
response := &servicepb.CollectionDescription{
response := &milvuspb.DescribeCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
},
@ -146,7 +148,7 @@ func (s *Master) DescribeCollection(ctx context.Context, in *internalpb.Describe
return response, nil
}
func (s *Master) ShowCollections(ctx context.Context, in *internalpb.ShowCollectionRequest) (*servicepb.StringListResponse, error) {
func (s *Master) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error) {
var t task = &showCollectionsTask{
req: in,
baseTask: baseTask{
@ -157,12 +159,12 @@ func (s *Master) ShowCollections(ctx context.Context, in *internalpb.ShowCollect
stringListResponse: nil,
}
response := &servicepb.StringListResponse{
response := &milvuspb.ShowCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: "",
},
Values: nil,
CollectionNames: nil,
}
t.(*showCollectionsTask).stringListResponse = response
@ -184,7 +186,7 @@ func (s *Master) ShowCollections(ctx context.Context, in *internalpb.ShowCollect
}
//////////////////////////////////////////////////////////////////////////
func (s *Master) CreatePartition(ctx context.Context, in *internalpb.CreatePartitionRequest) (*commonpb.Status, error) {
func (s *Master) CreatePartition(ctx context.Context, in *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) {
var t task = &createPartitionTask{
req: in,
baseTask: baseTask{
@ -215,7 +217,7 @@ func (s *Master) CreatePartition(ctx context.Context, in *internalpb.CreateParti
}, nil
}
func (s *Master) DropPartition(ctx context.Context, in *internalpb.DropPartitionRequest) (*commonpb.Status, error) {
func (s *Master) DropPartition(ctx context.Context, in *milvuspb.DropPartitionRequest) (*commonpb.Status, error) {
var t task = &dropPartitionTask{
req: in,
baseTask: baseTask{
@ -246,7 +248,7 @@ func (s *Master) DropPartition(ctx context.Context, in *internalpb.DropPartition
}, nil
}
func (s *Master) HasPartition(ctx context.Context, in *internalpb.HasPartitionRequest) (*servicepb.BoolResponse, error) {
func (s *Master) HasPartition(ctx context.Context, in *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) {
var t task = &hasPartitionTask{
req: in,
baseTask: baseTask{
@ -259,7 +261,7 @@ func (s *Master) HasPartition(ctx context.Context, in *internalpb.HasPartitionRe
var err = s.scheduler.Enqueue(t)
if err != nil {
return &servicepb.BoolResponse{
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: "Enqueue failed",
@ -270,7 +272,7 @@ func (s *Master) HasPartition(ctx context.Context, in *internalpb.HasPartitionRe
err = t.WaitToFinish(ctx)
if err != nil {
return &servicepb.BoolResponse{
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: err.Error(),
@ -279,7 +281,7 @@ func (s *Master) HasPartition(ctx context.Context, in *internalpb.HasPartitionRe
}, nil
}
return &servicepb.BoolResponse{
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
},
@ -287,45 +289,7 @@ func (s *Master) HasPartition(ctx context.Context, in *internalpb.HasPartitionRe
}, nil
}
func (s *Master) DescribePartition(ctx context.Context, in *internalpb.DescribePartitionRequest) (*servicepb.PartitionDescription, error) {
var t task = &describePartitionTask{
req: in,
baseTask: baseTask{
sch: s.scheduler,
mt: s.metaTable,
cv: make(chan error),
},
description: nil,
}
var err = s.scheduler.Enqueue(t)
if err != nil {
return &servicepb.PartitionDescription{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: "Enqueue failed",
},
Name: in.PartitionName,
Statistics: nil,
}, nil
}
err = t.WaitToFinish(ctx)
if err != nil {
return &servicepb.PartitionDescription{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: "WaitToFinish failed",
},
Name: in.PartitionName,
Statistics: nil,
}, nil
}
return t.(*describePartitionTask).description, nil
}
func (s *Master) ShowPartitions(ctx context.Context, in *internalpb.ShowPartitionRequest) (*servicepb.StringListResponse, error) {
func (s *Master) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionRequest) (*milvuspb.ShowPartitionResponse, error) {
var t task = &showPartitionTask{
req: in,
baseTask: baseTask{
@ -333,84 +297,47 @@ func (s *Master) ShowPartitions(ctx context.Context, in *internalpb.ShowPartitio
mt: s.metaTable,
cv: make(chan error),
},
stringListResponse: nil,
resp: nil,
}
var err = s.scheduler.Enqueue(t)
if err != nil {
return &servicepb.StringListResponse{
return &milvuspb.ShowPartitionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: "Enqueue failed",
},
Values: nil,
PartitionNames: nil,
}, nil
}
err = t.WaitToFinish(ctx)
if err != nil {
return &servicepb.StringListResponse{
return &milvuspb.ShowPartitionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: "WaitToFinish failed",
},
Values: nil,
PartitionNames: nil,
}, nil
}
return t.(*showPartitionTask).stringListResponse, nil
}
func (s *Master) GetSysConfigs(ctx context.Context, in *internalpb.SysConfigRequest) (*servicepb.SysConfigResponse, error) {
var t task = &getSysConfigsTask{
req: in,
configkv: s.kvBase,
baseTask: baseTask{
sch: s.scheduler,
mt: s.metaTable,
cv: make(chan error),
},
keys: []string{},
values: []string{},
}
response := &servicepb.SysConfigResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
},
}
var err = s.scheduler.Enqueue(t)
if err != nil {
response.Status.Reason = "Enqueue failed: " + err.Error()
return response, nil
}
err = t.WaitToFinish(ctx)
if err != nil {
response.Status.Reason = "Get System Config failed: " + err.Error()
return response, nil
}
response.Keys = t.(*getSysConfigsTask).keys
response.Values = t.(*getSysConfigsTask).values
response.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
return response, nil
return t.(*showPartitionTask).resp, nil
}
//----------------------------------------Internal GRPC Service--------------------------------
func (s *Master) AllocTimestamp(ctx context.Context, request *internalpb.TsoRequest) (*internalpb.TsoResponse, error) {
func (s *Master) AllocTimestamp(ctx context.Context, request *masterpb.TsoRequest) (*masterpb.TsoResponse, error) {
count := request.GetCount()
ts, err := s.tsoAllocator.Alloc(count)
if err != nil {
return &internalpb.TsoResponse{
return &masterpb.TsoResponse{
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR},
}, nil
}
response := &internalpb.TsoResponse{
response := &masterpb.TsoResponse{
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
Timestamp: ts,
Count: count,
@ -419,17 +346,17 @@ func (s *Master) AllocTimestamp(ctx context.Context, request *internalpb.TsoRequ
return response, nil
}
func (s *Master) AllocID(ctx context.Context, request *internalpb.IDRequest) (*internalpb.IDResponse, error) {
func (s *Master) AllocID(ctx context.Context, request *masterpb.IDRequest) (*masterpb.IDResponse, error) {
count := request.GetCount()
ts, err := s.idAllocator.AllocOne()
if err != nil {
return &internalpb.IDResponse{
return &masterpb.IDResponse{
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR},
}, nil
}
response := &internalpb.IDResponse{
response := &masterpb.IDResponse{
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
ID: ts,
Count: count,
@ -438,14 +365,14 @@ func (s *Master) AllocID(ctx context.Context, request *internalpb.IDRequest) (*i
return response, nil
}
func (s *Master) AssignSegmentID(ctx context.Context, request *internalpb.AssignSegIDRequest) (*internalpb.AssignSegIDResponse, error) {
segInfos, _ := s.segmentManager.AssignSegment(request.GetPerChannelReq())
return &internalpb.AssignSegIDResponse{
PerChannelAssignment: segInfos,
func (s *Master) AssignSegmentID(ctx context.Context, request *datapb.AssignSegIDRequest) (*datapb.AssignSegIDResponse, error) {
segInfos, _ := s.segmentManager.AssignSegment(request.SegIDRequests)
return &datapb.AssignSegIDResponse{
SegIDAssignments: segInfos,
}, nil
}
func (s *Master) CreateIndex(ctx context.Context, req *internalpb.CreateIndexRequest) (*commonpb.Status, error) {
func (s *Master) CreateIndex(ctx context.Context, req *milvuspb.CreateIndexRequest) (*commonpb.Status, error) {
ret := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
}
@ -477,12 +404,13 @@ func (s *Master) CreateIndex(ctx context.Context, req *internalpb.CreateIndexReq
return ret, nil
}
func (s *Master) DescribeIndex(ctx context.Context, req *internalpb.DescribeIndexRequest) (*servicepb.DescribeIndexResponse, error) {
resp := &servicepb.DescribeIndexResponse{
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR},
CollectionName: req.CollectionName,
FieldName: req.FieldName,
func (s *Master) DescribeIndex(ctx context.Context, req *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) {
resp := &milvuspb.DescribeIndexResponse{
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR},
//CollectionName: req.CollectionName,
//FieldName: req.FieldName,
}
//resp.
task := &describeIndexTask{
baseTask: baseTask{
sch: s.scheduler,
@ -494,28 +422,28 @@ func (s *Master) DescribeIndex(ctx context.Context, req *internalpb.DescribeInde
}
if err := s.scheduler.Enqueue(task); err != nil {
resp.Status.Reason = fmt.Sprintf("Enqueue failed: %s", err.Error())
return resp, nil
task.resp.Status.Reason = fmt.Sprintf("Enqueue failed: %s", err.Error())
return task.resp, nil
}
if err := task.WaitToFinish(ctx); err != nil {
resp.Status.Reason = fmt.Sprintf("Describe Index failed: %s", err.Error())
return resp, nil
task.resp.Status.Reason = fmt.Sprintf("Describe Index failed: %s", err.Error())
return task.resp, nil
}
resp.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
return resp, nil
return task.resp, nil
}
func (s *Master) DescribeIndexProgress(ctx context.Context, req *internalpb.DescribeIndexProgressRequest) (*servicepb.BoolResponse, error) {
resp := &servicepb.BoolResponse{
func (s *Master) GetIndexState(ctx context.Context, req *milvuspb.IndexStateRequest) (*milvuspb.IndexStateResponse, error) {
resp := &milvuspb.IndexStateResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
},
Value: false,
State: commonpb.IndexState_NONE,
}
task := &describeIndexProgressTask{
task := &getIndexStateTask{
baseTask: baseTask{
sch: s.scheduler,
mt: s.metaTable,
@ -527,15 +455,23 @@ func (s *Master) DescribeIndexProgress(ctx context.Context, req *internalpb.Desc
}
if err := s.scheduler.Enqueue(task); err != nil {
resp.Status.Reason = "Enqueue failed :" + err.Error()
return resp, nil
task.resp.Status.Reason = "Enqueue failed :" + err.Error()
return task.resp, nil
}
if err := task.WaitToFinish(ctx); err != nil {
resp.Status.Reason = "Describe index progress failed:" + err.Error()
return resp, nil
return task.resp, nil
}
resp.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
return resp, nil
task.resp.Status.ErrorCode = commonpb.ErrorCode_SUCCESS
return task.resp, nil
}
func (s *Master) DescribeSegment(ctx context.Context, request *milvuspb.DescribeSegmentRequest) (*milvuspb.DescribeSegmentResponse, error) {
panic("implement me")
}
func (s *Master) ShowSegments(ctx context.Context, request *milvuspb.ShowSegmentRequest) (*milvuspb.ShowSegmentResponse, error) {
panic("implement me")
}

View File

@ -5,12 +5,9 @@ import (
"log"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/proto/indexbuilderpb"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
)
type IndexBuildInfo struct {
@ -75,7 +72,7 @@ func (scheduler *IndexBuildScheduler) schedule(info interface{}) error {
indexParamsMap[kv.Key] = kv.Value
}
indexID, err := scheduler.client.BuildIndexWithoutID(indexBuildInfo.binlogFilePath, typeParamsMap, indexParamsMap)
indexID, err := scheduler.client.BuildIndex(indexBuildInfo.binlogFilePath, typeParamsMap, indexParamsMap)
log.Printf("build index for segment %d field %d", indexBuildInfo.segmentID, indexBuildInfo.fieldID)
if err != nil {
return err
@ -86,7 +83,7 @@ func (scheduler *IndexBuildScheduler) schedule(info interface{}) error {
FieldID: indexBuildInfo.fieldID,
IndexID: indexID,
IndexParams: indexParams,
Status: indexbuilderpb.IndexStatus_NONE,
State: commonpb.IndexState_NONE,
})
if err != nil {
log.Printf("WARNING: " + err.Error())
@ -113,11 +110,11 @@ func (scheduler *IndexBuildScheduler) describe() error {
indexID := channelInfo.id
indexBuildInfo := channelInfo.info
for {
description, err := scheduler.client.DescribeIndex(channelInfo.id)
description, err := scheduler.client.GetIndexStates(channelInfo.id)
if err != nil {
return err
}
if description.Status == indexbuilderpb.IndexStatus_FINISHED {
if description.State == commonpb.IndexState_FINISHED {
log.Printf("build index for segment %d field %d is finished", indexBuildInfo.segmentID, indexBuildInfo.fieldID)
filePaths, err := scheduler.client.GetIndexFilePaths(indexID)
if err != nil {
@ -149,7 +146,7 @@ func (scheduler *IndexBuildScheduler) describe() error {
FieldID: indexBuildInfo.fieldID,
IndexID: indexID,
IndexParams: channelInfo.indexParams,
Status: indexbuilderpb.IndexStatus_FINISHED,
State: commonpb.IndexState_FINISHED,
IndexFilePaths: filePaths,
})
if err != nil {
@ -170,7 +167,7 @@ func (scheduler *IndexBuildScheduler) describe() error {
FieldID: indexBuildInfo.fieldID,
IndexID: indexID,
IndexParams: channelInfo.indexParams,
Status: description.Status,
State: description.State,
})
if err != nil {
return err

View File

@ -4,14 +4,12 @@ import (
"fmt"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/servicepb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
)
type createIndexTask struct {
baseTask
req *internalpb.CreateIndexRequest
req *milvuspb.CreateIndexRequest
indexBuildScheduler *IndexBuildScheduler
indexLoadScheduler *IndexLoadScheduler
segManager SegmentManager
@ -22,7 +20,7 @@ func (task *createIndexTask) Type() commonpb.MsgType {
}
func (task *createIndexTask) Ts() (Timestamp, error) {
return task.req.Timestamp, nil
return task.req.Base.Timestamp, nil
}
func (task *createIndexTask) Execute() error {
@ -109,8 +107,8 @@ func (task *createIndexTask) Execute() error {
type describeIndexTask struct {
baseTask
req *internalpb.DescribeIndexRequest
resp *servicepb.DescribeIndexResponse
req *milvuspb.DescribeIndexRequest
resp *milvuspb.DescribeIndexResponse
}
func (task *describeIndexTask) Type() commonpb.MsgType {
@ -118,7 +116,7 @@ func (task *describeIndexTask) Type() commonpb.MsgType {
}
func (task *describeIndexTask) Ts() (Timestamp, error) {
return task.req.Timestamp, nil
return task.req.Base.Timestamp, nil
}
func (task *describeIndexTask) Execute() error {
@ -141,26 +139,30 @@ func (task *describeIndexTask) Execute() error {
if err != nil {
return err
}
task.resp.ExtraParams = indexParams
description := &milvuspb.IndexDescription{
IndexName: "", // todo add IndexName to master meta_table
Params: indexParams,
}
task.resp.IndexDescriptions = []*milvuspb.IndexDescription{description}
return nil
}
type describeIndexProgressTask struct {
type getIndexStateTask struct {
baseTask
req *internalpb.DescribeIndexProgressRequest
req *milvuspb.IndexStateRequest
runtimeStats *RuntimeStats
resp *servicepb.BoolResponse
resp *milvuspb.IndexStateResponse
}
func (task *describeIndexProgressTask) Type() commonpb.MsgType {
func (task *getIndexStateTask) Type() commonpb.MsgType {
return commonpb.MsgType_kDescribeIndexProgress
}
func (task *describeIndexProgressTask) Ts() (Timestamp, error) {
return task.req.Timestamp, nil
func (task *getIndexStateTask) Ts() (Timestamp, error) {
return task.req.Base.Timestamp, nil
}
func (task *describeIndexProgressTask) Execute() error {
func (task *getIndexStateTask) Execute() error {
// get field id, collection id
collMeta, err := task.mt.GetCollectionByName(task.req.CollectionName)
if err != nil {
@ -188,7 +190,15 @@ func (task *describeIndexProgressTask) Execute() error {
// get completed segment nums from querynode's runtime stats
relatedSegments := task.runtimeStats.GetTotalNumOfRelatedSegments(collMeta.ID, fieldID, indexParams)
task.resp.Value = int64(totalSegmentNums) == relatedSegments
task.resp = &milvuspb.IndexStateResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
},
}
if int64(totalSegmentNums) == relatedSegments {
task.resp.State = commonpb.IndexState_FINISHED
} else {
task.resp.State = commonpb.IndexState_INPROGRESS
}
return nil
}

View File

@ -217,7 +217,7 @@ func CreateServer(ctx context.Context) (*Master, error) {
)
m.grpcServer = grpc.NewServer()
masterpb.RegisterMasterServer(m.grpcServer, m)
masterpb.RegisterMasterServiceServer(m.grpcServer, m)
return m, nil
}

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,6 @@ import (
"github.com/golang/protobuf/proto"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexbuilderpb"
"github.com/stretchr/testify/assert"
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
@ -433,7 +432,7 @@ func TestMetaTable_LoadIndexMetaFromKv(t *testing.T) {
FieldID: 100,
IndexID: 1000,
IndexParams: []*commonpb.KeyValuePair{{Key: "k1", Value: "v1"}},
Status: indexbuilderpb.IndexStatus_FINISHED,
State: commonpb.IndexState_FINISHED,
IndexFilePaths: []string{"path1"},
}
marshalRes := proto.MarshalTextString(&meta)
@ -466,7 +465,7 @@ func TestMetaTable_IndexMeta(t *testing.T) {
FieldID: 100,
IndexID: 1000,
IndexParams: []*commonpb.KeyValuePair{{Key: "k1", Value: "v1"}},
Status: indexbuilderpb.IndexStatus_INPROGRESS,
State: commonpb.IndexState_INPROGRESS,
IndexFilePaths: []string{},
})
assert.Nil(t, err)
@ -475,7 +474,7 @@ func TestMetaTable_IndexMeta(t *testing.T) {
FieldID: 100,
IndexID: 1000,
IndexParams: []*commonpb.KeyValuePair{{Key: "k1", Value: "v1"}},
Status: indexbuilderpb.IndexStatus_INPROGRESS,
State: commonpb.IndexState_INPROGRESS,
IndexFilePaths: []string{},
})
assert.NotNil(t, err)
@ -492,11 +491,11 @@ func TestMetaTable_IndexMeta(t *testing.T) {
FieldID: 100,
IndexID: 1000,
IndexParams: []*commonpb.KeyValuePair{{Key: "k1", Value: "v1"}},
Status: indexbuilderpb.IndexStatus_FINISHED,
State: commonpb.IndexState_FINISHED,
IndexFilePaths: []string{},
})
assert.Nil(t, err)
assert.EqualValues(t, indexbuilderpb.IndexStatus_FINISHED, meta.segID2IndexMetas[1][0].Status)
assert.EqualValues(t, commonpb.IndexState_FINISHED, meta.segID2IndexMetas[1][0].State)
err = meta.DeleteFieldIndexMeta(1, 100, []*commonpb.KeyValuePair{{Key: "k1", Value: "v1"}})
assert.Nil(t, err)
res, err = meta.HasFieldIndexMeta(1, 100, []*commonpb.KeyValuePair{{Key: "k1", Value: "v1"}})

View File

@ -2,42 +2,43 @@ package master
import (
"errors"
"log"
ms "github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/servicepb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
)
const partitionMetaPrefix = "partition/"
type createPartitionTask struct {
baseTask
req *internalpb.CreatePartitionRequest
req *milvuspb.CreatePartitionRequest
}
type dropPartitionTask struct {
baseTask
req *internalpb.DropPartitionRequest
req *milvuspb.DropPartitionRequest
}
type hasPartitionTask struct {
baseTask
hasPartition bool
req *internalpb.HasPartitionRequest
req *milvuspb.HasPartitionRequest
}
type describePartitionTask struct {
baseTask
description *servicepb.PartitionDescription
req *internalpb.DescribePartitionRequest
}
//type describePartitionTask struct {
// baseTask
// description *servicepb.PartitionDescription
// req *internalpb.DescribePartitionRequest
//}
type showPartitionTask struct {
baseTask
stringListResponse *servicepb.StringListResponse
req *internalpb.ShowPartitionRequest
resp *milvuspb.ShowPartitionResponse
req *milvuspb.ShowPartitionRequest
}
//////////////////////////////////////////////////////////////////////////
@ -46,14 +47,14 @@ func (t *createPartitionTask) Type() commonpb.MsgType {
log.Printf("null request")
return 0
}
return t.req.MsgType
return t.req.Base.MsgType
}
func (t *createPartitionTask) Ts() (Timestamp, error) {
if t.req == nil {
return 0, errors.New("null request")
}
return Timestamp(t.req.Timestamp), nil
return Timestamp(t.req.Base.Timestamp), nil
}
func (t *createPartitionTask) Execute() error {
@ -62,7 +63,7 @@ func (t *createPartitionTask) Execute() error {
}
partitionName := t.req.PartitionName
collectionName := partitionName.CollectionName
collectionName := t.req.CollectionName
collectionMeta, err := t.mt.GetCollectionByName(collectionName)
if err != nil {
return err
@ -73,7 +74,7 @@ func (t *createPartitionTask) Execute() error {
return err
}
err = t.mt.AddPartition(collectionMeta.ID, partitionName.Tag)
err = t.mt.AddPartition(collectionMeta.ID, partitionName)
if err != nil {
return err
}
@ -85,10 +86,18 @@ func (t *createPartitionTask) Execute() error {
HashValues: []uint32{0},
}
t.req.CollectionID = collectionMeta.ID
partitionMsg := internalpb2.CreatePartitionRequest{
Base: t.req.Base,
DbName: "",
CollectionName: t.req.CollectionName,
PartitionName: t.req.PartitionName,
DbID: 0, // todo add DbID
CollectionID: collectionMeta.ID,
PartitionID: 0, // todo add partitionID
}
timeTickMsg := &ms.CreatePartitionMsg{
BaseMsg: baseMsg,
CreatePartitionRequest: *t.req,
CreatePartitionRequest: partitionMsg,
}
msgPack.Msgs = append(msgPack.Msgs, timeTickMsg)
return t.sch.ddMsgStream.Broadcast(&msgPack)
@ -101,14 +110,14 @@ func (t *dropPartitionTask) Type() commonpb.MsgType {
log.Printf("null request")
return 0
}
return t.req.MsgType
return t.req.Base.MsgType
}
func (t *dropPartitionTask) Ts() (Timestamp, error) {
if t.req == nil {
return 0, errors.New("null request")
}
return t.req.Timestamp, nil
return t.req.Base.Timestamp, nil
}
func (t *dropPartitionTask) Execute() error {
@ -117,14 +126,14 @@ func (t *dropPartitionTask) Execute() error {
}
partitionName := t.req.PartitionName
collectionName := partitionName.CollectionName
collectionName := t.req.CollectionName
collectionMeta, err := t.mt.GetCollectionByName(collectionName)
if err != nil {
return err
}
err = t.mt.DeletePartition(collectionMeta.ID, partitionName.Tag)
err = t.mt.DeletePartition(collectionMeta.ID, partitionName)
if err != nil {
return err
}
@ -141,10 +150,18 @@ func (t *dropPartitionTask) Execute() error {
HashValues: []uint32{0},
}
t.req.CollectionID = collectionMeta.ID
dropMsg := internalpb2.DropPartitionRequest{
Base: t.req.Base,
DbName: "", // tod add DbName
CollectionName: t.req.CollectionName,
PartitionName: t.req.PartitionName,
DbID: 0, // todo add DbID
CollectionID: collectionMeta.ID,
PartitionID: 0, // todo addd PartitionID
}
timeTickMsg := &ms.DropPartitionMsg{
BaseMsg: baseMsg,
DropPartitionRequest: *t.req,
DropPartitionRequest: dropMsg,
}
msgPack.Msgs = append(msgPack.Msgs, timeTickMsg)
return t.sch.ddMsgStream.Broadcast(&msgPack)
@ -157,14 +174,14 @@ func (t *hasPartitionTask) Type() commonpb.MsgType {
log.Printf("null request")
return 0
}
return t.req.MsgType
return t.req.Base.MsgType
}
func (t *hasPartitionTask) Ts() (Timestamp, error) {
if t.req == nil {
return 0, errors.New("null request")
}
return t.req.Timestamp, nil
return t.req.Base.Timestamp, nil
}
func (t *hasPartitionTask) Execute() error {
@ -173,54 +190,54 @@ func (t *hasPartitionTask) Execute() error {
}
partitionName := t.req.PartitionName
collectionName := partitionName.CollectionName
collectionName := t.req.CollectionName
collectionMeta, err := t.mt.GetCollectionByName(collectionName)
if err != nil {
return err
}
t.hasPartition = t.mt.HasPartition(collectionMeta.ID, partitionName.Tag)
t.hasPartition = t.mt.HasPartition(collectionMeta.ID, partitionName)
return nil
}
//////////////////////////////////////////////////////////////////////////
func (t *describePartitionTask) Type() commonpb.MsgType {
if t.req == nil {
log.Printf("null request")
return 0
}
return t.req.MsgType
}
func (t *describePartitionTask) Ts() (Timestamp, error) {
if t.req == nil {
return 0, errors.New("null request")
}
return t.req.Timestamp, nil
}
func (t *describePartitionTask) Execute() error {
if t.req == nil {
return errors.New("null request")
}
partitionName := t.req.PartitionName
description := servicepb.PartitionDescription{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
},
Name: partitionName,
Statistics: nil,
}
t.description = &description
return nil
}
//func (t *describePartitionTask) Type() commonpb.MsgType {
// if t.req == nil {
// log.Printf("null request")
// return 0
// }
// return t.req.MsgType
//}
//
//func (t *describePartitionTask) Ts() (Timestamp, error) {
// if t.req == nil {
// return 0, errors.New("null request")
// }
// return t.req.Timestamp, nil
//}
//
//func (t *describePartitionTask) Execute() error {
// if t.req == nil {
// return errors.New("null request")
// }
//
// partitionName := t.req.PartitionName
//
// description := servicepb.PartitionDescription{
// Status: &commonpb.Status{
// ErrorCode: commonpb.ErrorCode_SUCCESS,
// },
// Name: partitionName,
// Statistics: nil,
// }
//
// t.description = &description
//
// return nil
//
//}
//////////////////////////////////////////////////////////////////////////
func (t *showPartitionTask) Type() commonpb.MsgType {
@ -228,14 +245,14 @@ func (t *showPartitionTask) Type() commonpb.MsgType {
log.Printf("null request")
return 0
}
return t.req.MsgType
return t.req.Base.MsgType
}
func (t *showPartitionTask) Ts() (Timestamp, error) {
if t.req == nil {
return 0, errors.New("null request")
}
return t.req.Timestamp, nil
return t.req.Base.Timestamp, nil
}
func (t *showPartitionTask) Execute() error {
@ -243,21 +260,21 @@ func (t *showPartitionTask) Execute() error {
return errors.New("null request")
}
collMeta, err := t.mt.GetCollectionByName(t.req.CollectionName.CollectionName)
collMeta, err := t.mt.GetCollectionByName(t.req.CollectionName)
if err != nil {
return err
}
partitions := make([]string, 0)
partitions = append(partitions, collMeta.PartitionTags...)
stringListResponse := servicepb.StringListResponse{
stringListResponse := milvuspb.ShowPartitionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
},
Values: partitions,
PartitionNames: partitions,
}
t.stringListResponse = &stringListResponse
t.resp = &stringListResponse
return nil

View File

@ -12,7 +12,6 @@ import (
"github.com/stretchr/testify/assert"
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
"github.com/zilliztech/milvus-distributed/internal/proto/indexbuilderpb"
"go.etcd.io/etcd/clientv3"
)
@ -97,15 +96,15 @@ func TestPersistenceScheduler(t *testing.T) {
//wait flush segment request sent to build index node
time.Sleep(100 * time.Microsecond)
idxDes, err := buildIndexClient.DescribeIndex(UniqueID(1))
idxDes, err := buildIndexClient.GetIndexStates(UniqueID(1))
assert.Nil(t, err)
assert.Equal(t, indexbuilderpb.IndexStatus_INPROGRESS, idxDes.Status)
assert.Equal(t, commonpb.IndexState_INPROGRESS, idxDes.State)
//wait build index to finish
time.Sleep(3 * time.Second)
idxDes, err = buildIndexClient.DescribeIndex(UniqueID(1))
idxDes, err = buildIndexClient.GetIndexStates(UniqueID(1))
assert.Nil(t, err)
assert.Equal(t, indexbuilderpb.IndexStatus_FINISHED, idxDes.Status)
assert.Equal(t, commonpb.IndexState_FINISHED, idxDes.State)
}

View File

@ -2,23 +2,40 @@ package master
import (
"context"
"fmt"
"math/rand"
"strconv"
"testing"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/golang/protobuf/proto"
"github.com/stretchr/testify/assert"
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
ms "github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
"github.com/zilliztech/milvus-distributed/internal/proto/servicepb"
"github.com/zilliztech/milvus-distributed/internal/util/tsoutil"
"go.etcd.io/etcd/clientv3"
)
func filterSchema(schema *schemapb.CollectionSchema) *schemapb.CollectionSchema {
cloneSchema := proto.Clone(schema).(*schemapb.CollectionSchema)
// remove system field
var newFields []*schemapb.FieldSchema
for _, fieldMeta := range cloneSchema.Fields {
fieldID := fieldMeta.FieldID
// todo not hardcode
if fieldID < 100 {
continue
}
newFields = append(newFields, fieldMeta)
}
cloneSchema.Fields = newFields
return cloneSchema
}
func TestMaster_Scheduler_Collection(t *testing.T) {
Init()
etcdAddress := Params.EtcdAddress
@ -74,12 +91,14 @@ func TestMaster_Scheduler_Collection(t *testing.T) {
assert.Nil(t, err)
////////////////////////////CreateCollection////////////////////////
createCollectionReq := internalpb.CreateCollectionRequest{
MsgType: commonpb.MsgType_kCreateCollection,
ReqID: 1,
Timestamp: 11,
ProxyID: 1,
Schema: &commonpb.Blob{Value: schemaBytes},
createCollectionReq := milvuspb.CreateCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreateCollection,
MsgID: 1,
Timestamp: 11,
SourceID: 1,
},
Schema: schemaBytes,
}
var createCollectionTask task = &createCollectionTask{
@ -111,19 +130,33 @@ func TestMaster_Scheduler_Collection(t *testing.T) {
break
}
}
assert.Equal(t, createCollectionReq.MsgType, createCollectionMsg.CreateCollectionRequest.MsgType)
assert.Equal(t, createCollectionReq.ReqID, createCollectionMsg.CreateCollectionRequest.ReqID)
assert.Equal(t, createCollectionReq.Timestamp, createCollectionMsg.CreateCollectionRequest.Timestamp)
assert.Equal(t, createCollectionReq.ProxyID, createCollectionMsg.CreateCollectionRequest.ProxyID)
assert.Equal(t, createCollectionReq.Schema.Value, createCollectionMsg.CreateCollectionRequest.Schema.Value)
assert.Equal(t, createCollectionReq.Base.MsgType, createCollectionMsg.CreateCollectionRequest.Base.MsgType)
assert.Equal(t, createCollectionReq.Base.MsgID, createCollectionMsg.CreateCollectionRequest.Base.MsgID)
assert.Equal(t, createCollectionReq.Base.Timestamp, createCollectionMsg.CreateCollectionRequest.Base.Timestamp)
assert.Equal(t, createCollectionReq.Base.SourceID, createCollectionMsg.CreateCollectionRequest.Base.SourceID)
var schema1 schemapb.CollectionSchema
proto.UnmarshalMerge(createCollectionReq.Schema, &schema1)
var schema2 schemapb.CollectionSchema
proto.UnmarshalMerge(createCollectionMsg.CreateCollectionRequest.Schema, &schema2)
filterSchema2 := filterSchema(&schema2)
filterSchema2Value, _ := proto.Marshal(filterSchema2)
fmt.Println("aaaa")
fmt.Println(schema1.String())
fmt.Println("bbbb")
fmt.Println(schema2.String())
assert.Equal(t, createCollectionReq.Schema, filterSchema2Value)
////////////////////////////DropCollection////////////////////////
dropCollectionReq := internalpb.DropCollectionRequest{
MsgType: commonpb.MsgType_kDropCollection,
ReqID: 1,
Timestamp: 13,
ProxyID: 1,
CollectionName: &servicepb.CollectionName{CollectionName: sch.Name},
dropCollectionReq := milvuspb.DropCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropCollection,
MsgID: 1,
Timestamp: 13,
SourceID: 1,
},
CollectionName: sch.Name,
}
var dropCollectionTask task = &dropCollectionTask{
@ -155,11 +188,11 @@ func TestMaster_Scheduler_Collection(t *testing.T) {
break
}
}
assert.Equal(t, dropCollectionReq.MsgType, dropCollectionMsg.DropCollectionRequest.MsgType)
assert.Equal(t, dropCollectionReq.ReqID, dropCollectionMsg.DropCollectionRequest.ReqID)
assert.Equal(t, dropCollectionReq.Timestamp, dropCollectionMsg.DropCollectionRequest.Timestamp)
assert.Equal(t, dropCollectionReq.ProxyID, dropCollectionMsg.DropCollectionRequest.ProxyID)
assert.Equal(t, dropCollectionReq.CollectionName.CollectionName, dropCollectionMsg.DropCollectionRequest.CollectionName.CollectionName)
assert.Equal(t, dropCollectionReq.Base.MsgType, dropCollectionMsg.DropCollectionRequest.Base.MsgType)
assert.Equal(t, dropCollectionReq.Base.MsgID, dropCollectionMsg.DropCollectionRequest.Base.MsgID)
assert.Equal(t, dropCollectionReq.Base.Timestamp, dropCollectionMsg.DropCollectionRequest.Base.Timestamp)
assert.Equal(t, dropCollectionReq.Base.SourceID, dropCollectionMsg.DropCollectionRequest.Base.MsgID)
assert.Equal(t, dropCollectionReq.CollectionName, dropCollectionMsg.DropCollectionRequest.CollectionName)
}
@ -218,12 +251,14 @@ func TestMaster_Scheduler_Partition(t *testing.T) {
assert.Nil(t, err)
////////////////////////////CreateCollection////////////////////////
createCollectionReq := internalpb.CreateCollectionRequest{
MsgType: commonpb.MsgType_kCreateCollection,
ReqID: 1,
Timestamp: 11,
ProxyID: 1,
Schema: &commonpb.Blob{Value: schemaBytes},
createCollectionReq := milvuspb.CreateCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreateCollection,
MsgID: 1,
Timestamp: 11,
SourceID: 1,
},
Schema: schemaBytes,
}
var createCollectionTask task = &createCollectionTask{
@ -255,23 +290,36 @@ func TestMaster_Scheduler_Partition(t *testing.T) {
break
}
}
assert.Equal(t, createCollectionReq.MsgType, createCollectionMsg.CreateCollectionRequest.MsgType)
assert.Equal(t, createCollectionReq.ReqID, createCollectionMsg.CreateCollectionRequest.ReqID)
assert.Equal(t, createCollectionReq.Timestamp, createCollectionMsg.CreateCollectionRequest.Timestamp)
assert.Equal(t, createCollectionReq.ProxyID, createCollectionMsg.CreateCollectionRequest.ProxyID)
assert.Equal(t, createCollectionReq.Schema.Value, createCollectionMsg.CreateCollectionRequest.Schema.Value)
assert.Equal(t, createCollectionReq.Base.MsgType, createCollectionMsg.CreateCollectionRequest.Base.MsgType)
assert.Equal(t, createCollectionReq.Base.MsgID, createCollectionMsg.CreateCollectionRequest.Base.MsgID)
assert.Equal(t, createCollectionReq.Base.Timestamp, createCollectionMsg.CreateCollectionRequest.Base.Timestamp)
assert.Equal(t, createCollectionReq.Base.SourceID, createCollectionMsg.CreateCollectionRequest.Base.SourceID)
//assert.Equal(t, createCollectionReq.Schema, createCollectionMsg.CreateCollectionRequest.Schema)
var schema1 schemapb.CollectionSchema
proto.UnmarshalMerge(createCollectionReq.Schema, &schema1)
var schema2 schemapb.CollectionSchema
proto.UnmarshalMerge(createCollectionMsg.CreateCollectionRequest.Schema, &schema2)
filterSchema2 := filterSchema(&schema2)
filterSchema2Value, _ := proto.Marshal(filterSchema2)
fmt.Println("aaaa")
fmt.Println(schema1.String())
fmt.Println("bbbb")
fmt.Println(schema2.String())
assert.Equal(t, createCollectionReq.Schema, filterSchema2Value)
////////////////////////////CreatePartition////////////////////////
partitionName := "partitionName" + strconv.FormatUint(rand.Uint64(), 10)
createPartitionReq := internalpb.CreatePartitionRequest{
MsgType: commonpb.MsgType_kCreatePartition,
ReqID: 1,
Timestamp: 13,
ProxyID: 1,
PartitionName: &servicepb.PartitionName{
CollectionName: sch.Name,
Tag: partitionName,
createPartitionReq := milvuspb.CreatePartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreatePartition,
MsgID: 1,
Timestamp: 13,
SourceID: 1,
},
CollectionName: sch.Name,
PartitionName: partitionName,
}
var createPartitionTask task = &createPartitionTask{
@ -302,23 +350,23 @@ func TestMaster_Scheduler_Partition(t *testing.T) {
break
}
}
assert.Equal(t, createPartitionReq.MsgType, createPartitionMsg.CreatePartitionRequest.MsgType)
assert.Equal(t, createPartitionReq.ReqID, createPartitionMsg.CreatePartitionRequest.ReqID)
assert.Equal(t, createPartitionReq.Timestamp, createPartitionMsg.CreatePartitionRequest.Timestamp)
assert.Equal(t, createPartitionReq.ProxyID, createPartitionMsg.CreatePartitionRequest.ProxyID)
assert.Equal(t, createPartitionReq.PartitionName.CollectionName, createPartitionMsg.CreatePartitionRequest.PartitionName.CollectionName)
assert.Equal(t, createPartitionReq.PartitionName.Tag, createPartitionMsg.CreatePartitionRequest.PartitionName.Tag)
assert.Equal(t, createPartitionReq.Base.MsgType, createPartitionMsg.CreatePartitionRequest.Base.MsgType)
assert.Equal(t, createPartitionReq.Base.MsgID, createPartitionMsg.CreatePartitionRequest.Base.MsgID)
assert.Equal(t, createPartitionReq.Base.Timestamp, createPartitionMsg.CreatePartitionRequest.Base.Timestamp)
assert.Equal(t, createPartitionReq.Base.SourceID, createPartitionMsg.CreatePartitionRequest.Base.MsgID)
assert.Equal(t, createPartitionReq.CollectionName, createPartitionMsg.CreatePartitionRequest.CollectionName)
assert.Equal(t, createPartitionReq.PartitionName, createPartitionMsg.CreatePartitionRequest.PartitionName)
////////////////////////////DropPartition////////////////////////
dropPartitionReq := internalpb.DropPartitionRequest{
MsgType: commonpb.MsgType_kDropPartition,
ReqID: 1,
Timestamp: 15,
ProxyID: 1,
PartitionName: &servicepb.PartitionName{
CollectionName: sch.Name,
Tag: partitionName,
dropPartitionReq := milvuspb.DropPartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropPartition,
MsgID: 1,
Timestamp: 15,
SourceID: 1,
},
CollectionName: sch.Name,
PartitionName: partitionName,
}
var dropPartitionTask task = &dropPartitionTask{
@ -349,10 +397,10 @@ func TestMaster_Scheduler_Partition(t *testing.T) {
break
}
}
assert.Equal(t, dropPartitionReq.MsgType, dropPartitionMsg.DropPartitionRequest.MsgType)
assert.Equal(t, dropPartitionReq.ReqID, dropPartitionMsg.DropPartitionRequest.ReqID)
assert.Equal(t, dropPartitionReq.Timestamp, dropPartitionMsg.DropPartitionRequest.Timestamp)
assert.Equal(t, dropPartitionReq.ProxyID, dropPartitionMsg.DropPartitionRequest.ProxyID)
assert.Equal(t, dropPartitionReq.PartitionName.CollectionName, dropPartitionMsg.DropPartitionRequest.PartitionName.CollectionName)
assert.Equal(t, dropPartitionReq.Base.MsgType, dropPartitionMsg.DropPartitionRequest.Base.MsgType)
assert.Equal(t, dropPartitionReq.Base.MsgID, dropPartitionMsg.DropPartitionRequest.Base.MsgID)
assert.Equal(t, dropPartitionReq.Base.Timestamp, dropPartitionMsg.DropPartitionRequest.Base.Timestamp)
assert.Equal(t, dropPartitionReq.Base.SourceID, dropPartitionMsg.DropPartitionRequest.Base.SourceID)
assert.Equal(t, dropPartitionReq.CollectionName, dropPartitionMsg.DropPartitionRequest.CollectionName)
}

View File

@ -144,7 +144,7 @@ func (assigner *SegmentAssigner) startProxyTimeSync() {
log.Println("proxy time sync stopped")
return
case msg := <-assigner.proxyTimeSyncChan:
if err := assigner.syncProxyTimeStamp(msg.TimeTickMsg.Timestamp); err != nil {
if err := assigner.syncProxyTimeStamp(msg.TimeTickMsg.Base.Timestamp); err != nil {
log.Println("proxy time sync error: " + err.Error())
}
}

View File

@ -6,12 +6,13 @@ import (
"testing"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
"go.etcd.io/etcd/clientv3"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
@ -102,8 +103,13 @@ func TestSegmentManager_AssignSegmentID(t *testing.T) {
BaseMsg: msgstream.BaseMsg{
BeginTimestamp: timestamp, EndTimestamp: timestamp, HashValues: []uint32{},
},
TimeTickMsg: internalpb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick, PeerID: 1, Timestamp: timestamp,
TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: timestamp,
SourceID: 1,
},
},
}

View File

@ -2,19 +2,18 @@ package master
import (
"context"
"log"
"strconv"
"sync"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
ms "github.com/zilliztech/milvus-distributed/internal/msgstream"
)
@ -35,7 +34,7 @@ type channelRange struct {
type SegmentManager interface {
Start()
Close()
AssignSegment(segIDReq []*internalpb.SegIDRequest) ([]*internalpb.SegIDAssignment, error)
AssignSegment(segIDReq []*datapb.SegIDRequest) ([]*datapb.SegIDAssignment, error)
ForceClose(collID UniqueID) error
DropCollection(collID UniqueID) error
}
@ -63,20 +62,20 @@ type SegmentManagerImpl struct {
waitGroup sync.WaitGroup
}
func (manager *SegmentManagerImpl) AssignSegment(segIDReq []*internalpb.SegIDRequest) ([]*internalpb.SegIDAssignment, error) {
func (manager *SegmentManagerImpl) AssignSegment(segIDReq []*datapb.SegIDRequest) ([]*datapb.SegIDAssignment, error) {
manager.mu.Lock()
defer manager.mu.Unlock()
res := make([]*internalpb.SegIDAssignment, 0)
res := make([]*datapb.SegIDAssignment, 0)
for _, req := range segIDReq {
result := &internalpb.SegIDAssignment{
result := &datapb.SegIDAssignment{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
},
}
collName := req.CollName
partitionTag := req.PartitionTag
paritionName := req.PartitionName
count := req.Count
channelID := req.ChannelID
@ -88,13 +87,13 @@ func (manager *SegmentManagerImpl) AssignSegment(segIDReq []*internalpb.SegIDReq
}
collID := collMeta.GetID()
if !manager.metaTable.HasPartition(collID, partitionTag) {
result.Status.Reason = "partition tag " + partitionTag + " can not find in coll " + strconv.FormatInt(collID, 10)
if !manager.metaTable.HasPartition(collID, paritionName) {
result.Status.Reason = "partition tag " + paritionName + " can not find in coll " + strconv.FormatInt(collID, 10)
res = append(res, result)
continue
}
assignInfo, err := manager.assignSegment(collName, collID, partitionTag, count, channelID)
channelIDInt, _ := strconv.ParseInt(channelID, 10, 64)
assignInfo, err := manager.assignSegment(collName, collID, paritionName, count, int32(channelIDInt))
if err != nil {
result.Status.Reason = err.Error()
res = append(res, result)
@ -109,9 +108,9 @@ func (manager *SegmentManagerImpl) AssignSegment(segIDReq []*internalpb.SegIDReq
func (manager *SegmentManagerImpl) assignSegment(
collName string,
collID UniqueID,
partitionTag string,
paritionName string,
count uint32,
channelID int32) (*internalpb.SegIDAssignment, error) {
channelID int32) (*datapb.SegIDAssignment, error) {
collStatus, ok := manager.collStatus[collID]
if !ok {
@ -124,7 +123,7 @@ func (manager *SegmentManagerImpl) assignSegment(
if segStatus.closable {
continue
}
match, err := manager.isMatch(segStatus.segmentID, partitionTag, channelID)
match, err := manager.isMatch(segStatus.segmentID, paritionName, channelID)
if err != nil {
return nil, err
}
@ -140,13 +139,13 @@ func (manager *SegmentManagerImpl) assignSegment(
continue
}
return &internalpb.SegIDAssignment{
SegID: segStatus.segmentID,
ChannelID: channelID,
Count: count,
CollName: collName,
PartitionTag: partitionTag,
ExpireTime: result.expireTime,
return &datapb.SegIDAssignment{
SegID: segStatus.segmentID,
ChannelID: channelID,
Count: count,
CollName: collName,
PartitionName: paritionName,
ExpireTime: result.expireTime,
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
Reason: "",
@ -163,7 +162,7 @@ func (manager *SegmentManagerImpl) assignSegment(
return nil, errors.Errorf("request count %d is larger than total rows %d", count, total)
}
id, err := manager.openNewSegment(channelID, collID, partitionTag, total)
id, err := manager.openNewSegment(channelID, collID, paritionName, total)
if err != nil {
return nil, err
}
@ -175,13 +174,13 @@ func (manager *SegmentManagerImpl) assignSegment(
if !result.isSuccess {
return nil, errors.Errorf("assign failed for segment %d", id)
}
return &internalpb.SegIDAssignment{
SegID: id,
ChannelID: channelID,
Count: count,
CollName: collName,
PartitionTag: partitionTag,
ExpireTime: result.expireTime,
return &datapb.SegIDAssignment{
SegID: id,
ChannelID: channelID,
Count: count,
CollName: collName,
PartitionName: paritionName,
ExpireTime: result.expireTime,
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
Reason: "",
@ -189,14 +188,14 @@ func (manager *SegmentManagerImpl) assignSegment(
}, nil
}
func (manager *SegmentManagerImpl) isMatch(segmentID UniqueID, partitionTag string, channelID int32) (bool, error) {
func (manager *SegmentManagerImpl) isMatch(segmentID UniqueID, paritionName string, channelID int32) (bool, error) {
segMeta, err := manager.metaTable.GetSegmentByID(segmentID)
if err != nil {
return false, err
}
if channelID < segMeta.GetChannelStart() ||
channelID > segMeta.GetChannelEnd() || segMeta.PartitionTag != partitionTag {
channelID > segMeta.GetChannelEnd() || segMeta.PartitionTag != paritionName {
return false, nil
}
return true, nil
@ -214,7 +213,7 @@ func (manager *SegmentManagerImpl) estimateTotalRows(collName string) (int, erro
return int(manager.segmentThreshold / float64(sizePerRecord)), nil
}
func (manager *SegmentManagerImpl) openNewSegment(channelID int32, collID UniqueID, partitionTag string, numRows int) (UniqueID, error) {
func (manager *SegmentManagerImpl) openNewSegment(channelID int32, collID UniqueID, paritionName string, numRows int) (UniqueID, error) {
// find the channel range
channelStart, channelEnd := int32(-1), int32(-1)
for _, r := range manager.channelRanges {
@ -240,7 +239,7 @@ func (manager *SegmentManagerImpl) openNewSegment(channelID int32, collID Unique
err = manager.metaTable.AddSegment(&etcdpb.SegmentMeta{
SegmentID: newID,
CollectionID: collID,
PartitionTag: partitionTag,
PartitionTag: paritionName,
ChannelStart: channelStart,
ChannelEnd: channelEnd,
OpenTime: openTime,
@ -286,7 +285,7 @@ func (manager *SegmentManagerImpl) startWriteNodeTimeSync() {
log.Println("write node time sync stopped")
return
case msg := <-manager.writeNodeTimeSyncChan:
if err := manager.syncWriteNodeTimestamp(msg.TimeTickMsg.Timestamp); err != nil {
if err := manager.syncWriteNodeTimestamp(msg.TimeTickMsg.Base.Timestamp); err != nil {
log.Println("write node time sync error: " + err.Error())
}
}
@ -454,7 +453,7 @@ func (manager *mockSegmentManager) Start() {
func (manager *mockSegmentManager) Close() {
}
func (manager *mockSegmentManager) AssignSegment(segIDReq []*internalpb.SegIDRequest) ([]*internalpb.SegIDAssignment, error) {
func (manager *mockSegmentManager) AssignSegment(segIDReq []*datapb.SegIDRequest) ([]*datapb.SegIDAssignment, error) {
return nil, nil
}

View File

@ -2,6 +2,7 @@ package master
import (
"context"
"strconv"
"sync/atomic"
"testing"
"time"
@ -10,8 +11,9 @@ import (
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
pb "github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
"github.com/zilliztech/milvus-distributed/internal/util/tsoutil"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
@ -44,7 +46,7 @@ func TestSegmentManager_AssignSegment(t *testing.T) {
collName := "segmgr_test_coll"
var collID int64 = 1001
partitionTag := "test_part"
partitionName := "test_part"
schema := &schemapb.CollectionSchema{
Name: collName,
Fields: []*schemapb.FieldSchema{
@ -62,7 +64,7 @@ func TestSegmentManager_AssignSegment(t *testing.T) {
PartitionTags: []string{},
})
assert.Nil(t, err)
err = mt.AddPartition(collID, partitionTag)
err = mt.AddPartition(collID, partitionName)
assert.Nil(t, err)
var cnt int64
@ -106,9 +108,13 @@ func TestSegmentManager_AssignSegment(t *testing.T) {
{maxCount, 2, false, -1, -1, int32(maxCount)},
}
var results = make([]*internalpb.SegIDAssignment, 0)
var results = make([]*datapb.SegIDAssignment, 0)
for _, c := range cases {
result, _ := segManager.AssignSegment([]*internalpb.SegIDRequest{{Count: c.Count, ChannelID: c.ChannelID, CollName: collName, PartitionTag: partitionTag}})
result, _ := segManager.AssignSegment([]*datapb.SegIDRequest{
{Count: c.Count,
ChannelID: strconv.FormatInt(int64(c.ChannelID), 10),
CollName: collName, PartitionName: partitionName},
})
results = append(results, result...)
if c.Err {
assert.EqualValues(t, commonpb.ErrorCode_UNEXPECTED_ERROR, result[0].Status.ErrorCode)
@ -132,7 +138,7 @@ func TestSegmentManager_AssignSegment(t *testing.T) {
err = mt.UpdateSegment(&pb.SegmentMeta{
SegmentID: results[0].SegID,
CollectionID: collID,
PartitionTag: partitionTag,
PartitionTag: partitionName,
ChannelStart: 0,
ChannelEnd: 1,
CloseTime: timestamp,
@ -144,10 +150,13 @@ func TestSegmentManager_AssignSegment(t *testing.T) {
BaseMsg: msgstream.BaseMsg{
BeginTimestamp: timestamp, EndTimestamp: timestamp, HashValues: []uint32{},
},
TimeTickMsg: internalpb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: 1,
Timestamp: timestamp,
TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: timestamp,
SourceID: 1,
},
},
}
syncWriteChan <- tsMsg
@ -183,7 +192,7 @@ func TestSegmentManager_SycnWritenode(t *testing.T) {
collName := "segmgr_test_coll"
var collID int64 = 1001
partitionTag := "test_part"
partitionName := "test_part"
schema := &schemapb.CollectionSchema{
Name: collName,
Fields: []*schemapb.FieldSchema{
@ -201,7 +210,7 @@ func TestSegmentManager_SycnWritenode(t *testing.T) {
PartitionTags: []string{},
})
assert.Nil(t, err)
err = mt.AddPartition(collID, partitionTag)
err = mt.AddPartition(collID, partitionName)
assert.Nil(t, err)
var cnt int64
@ -229,10 +238,10 @@ func TestSegmentManager_SycnWritenode(t *testing.T) {
assert.Nil(t, err)
maxCount := uint32(Params.SegmentSize * 1024 * 1024 / float64(sizePerRecord))
req := []*internalpb.SegIDRequest{
{Count: maxCount, ChannelID: 1, CollName: collName, PartitionTag: partitionTag},
{Count: maxCount, ChannelID: 2, CollName: collName, PartitionTag: partitionTag},
{Count: maxCount, ChannelID: 3, CollName: collName, PartitionTag: partitionTag},
req := []*datapb.SegIDRequest{
{Count: maxCount, ChannelID: "1", CollName: collName, PartitionName: partitionName},
{Count: maxCount, ChannelID: "2", CollName: collName, PartitionName: partitionName},
{Count: maxCount, ChannelID: "3", CollName: collName, PartitionName: partitionName},
}
assignSegment, err := segManager.AssignSegment(req)
assert.Nil(t, err)
@ -245,7 +254,7 @@ func TestSegmentManager_SycnWritenode(t *testing.T) {
err = mt.UpdateSegment(&pb.SegmentMeta{
SegmentID: assignSegment[i].SegID,
CollectionID: collID,
PartitionTag: partitionTag,
PartitionTag: partitionName,
ChannelStart: 0,
ChannelEnd: 1,
CloseTime: timestamp,
@ -263,10 +272,13 @@ func TestSegmentManager_SycnWritenode(t *testing.T) {
BaseMsg: msgstream.BaseMsg{
BeginTimestamp: timestamp, EndTimestamp: timestamp, HashValues: []uint32{},
},
TimeTickMsg: internalpb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: 1,
Timestamp: timestamp,
TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: timestamp,
SourceID: 1,
},
},
}
syncWriteChan <- tsMsg

View File

@ -3,7 +3,7 @@ package master
import (
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
)
type StatsProcessor struct {
@ -29,7 +29,7 @@ func (processor *StatsProcessor) ProcessQueryNodeStats(msgPack *msgstream.MsgPac
}
for _, fieldStat := range statsMsg.GetFieldStats() {
if err := processor.processFieldStat(statsMsg.PeerID, fieldStat); err != nil {
if err := processor.processFieldStat(statsMsg.Base.SourceID, fieldStat); err != nil {
return err
}
}
@ -39,7 +39,7 @@ func (processor *StatsProcessor) ProcessQueryNodeStats(msgPack *msgstream.MsgPac
return nil
}
func (processor *StatsProcessor) processSegmentStat(segStats *internalpb.SegmentStats) error {
func (processor *StatsProcessor) processSegmentStat(segStats *internalpb2.SegmentStats) error {
if !segStats.GetRecentlyModified() {
return nil
}
@ -56,7 +56,7 @@ func (processor *StatsProcessor) processSegmentStat(segStats *internalpb.Segment
return processor.metaTable.UpdateSegment(segMeta)
}
func (processor *StatsProcessor) processFieldStat(peerID int64, fieldStats *internalpb.FieldStats) error {
func (processor *StatsProcessor) processFieldStat(peerID int64, fieldStats *internalpb2.FieldStats) error {
collID := fieldStats.CollectionID
fieldID := fieldStats.FieldID

View File

@ -17,7 +17,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
pb "github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
)
func TestStatsProcess(t *testing.T) {
@ -72,17 +72,19 @@ func TestStatsProcess(t *testing.T) {
OpenTime: ts,
})
assert.Nil(t, err)
stats := internalpb.QueryNodeStats{
MsgType: commonpb.MsgType_kQueryNodeStats,
PeerID: 1,
SegStats: []*internalpb.SegmentStats{
stats := internalpb2.QueryNodeStats{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kQueryNodeStats,
SourceID: 1,
},
SegStats: []*internalpb2.SegmentStats{
{SegmentID: 100, MemorySize: 2500000, NumRows: 25000, RecentlyModified: true},
},
FieldStats: []*internalpb.FieldStats{
{CollectionID: 1, FieldID: 100, IndexStats: []*internalpb.IndexStats{
FieldStats: []*internalpb2.FieldStats{
{CollectionID: 1, FieldID: 100, IndexStats: []*internalpb2.IndexStats{
{IndexParams: []*commonpb.KeyValuePair{}, NumRelatedSegments: 100},
}},
{CollectionID: 2, FieldID: 100, IndexStats: []*internalpb.IndexStats{
{CollectionID: 2, FieldID: 100, IndexStats: []*internalpb2.IndexStats{
{IndexParams: []*commonpb.KeyValuePair{}, NumRelatedSegments: 200},
}},
},

View File

@ -1,117 +0,0 @@
package master
import (
"fmt"
"log"
"os"
"path"
"path/filepath"
"strings"
"github.com/spf13/viper"
"github.com/zilliztech/milvus-distributed/internal/errors"
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
)
type SysConfig struct {
kv *etcdkv.EtcdKV
}
// Initialize Configs from config files, and store them in Etcd.
func (conf *SysConfig) InitFromFile(filePath string) error {
memConfigs, err := conf.getConfigFiles(filePath)
if err != nil {
return errors.Errorf("[Init SysConfig] %s\n", err.Error())
}
for _, memConfig := range memConfigs {
if err := conf.saveToEtcd(memConfig, "config"); err != nil {
return errors.Errorf("[Init SysConfig] %s\n", err.Error())
}
}
return nil
}
func (conf *SysConfig) GetByPrefix(keyPrefix string) (keys []string, values []string, err error) {
realPrefix := path.Join("config", strings.ToLower(keyPrefix))
keys, values, err = conf.kv.LoadWithPrefix(realPrefix)
for index := range keys {
keys[index] = strings.Replace(keys[index], conf.kv.GetPath("config"), "", 1)
}
if err != nil {
return nil, nil, err
}
log.Println("Loaded", len(keys), "pairs of configs with prefix", keyPrefix)
return keys, values, err
}
// Get specific configs for keys.
func (conf *SysConfig) Get(keys []string) ([]string, error) {
var keysToLoad []string
for i := range keys {
keysToLoad = append(keysToLoad, path.Join("config", strings.ToLower(keys[i])))
}
values, err := conf.kv.MultiLoad(keysToLoad)
if err != nil {
return nil, err
}
return values, nil
}
func (conf *SysConfig) getConfigFiles(filePath string) ([]*viper.Viper, error) {
var vipers []*viper.Viper
err := filepath.Walk(filePath,
func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
// all names
if !info.IsDir() && filepath.Ext(path) == ".yaml" {
log.Println("Config files ", info.Name())
currentConf := viper.New()
currentConf.SetConfigFile(path)
if err := currentConf.ReadInConfig(); err != nil {
log.Panic("Config file error: ", err)
}
vipers = append(vipers, currentConf)
}
return nil
})
if err != nil {
return nil, err
}
if len(vipers) == 0 {
return nil, errors.Errorf("There are no config files in the path `%s`.\n", filePath)
}
return vipers, nil
}
func (conf *SysConfig) saveToEtcd(memConfig *viper.Viper, secondRootPath string) error {
configMaps := map[string]string{}
allKeys := memConfig.AllKeys()
for _, key := range allKeys {
etcdKey := strings.ReplaceAll(key, ".", "/")
etcdKey = path.Join(secondRootPath, etcdKey)
val := memConfig.Get(key)
if val == nil {
configMaps[etcdKey] = ""
continue
}
configMaps[etcdKey] = fmt.Sprintf("%v", val)
}
if err := conf.kv.MultiSave(configMaps); err != nil {
return err
}
return nil
}

View File

@ -1,209 +0,0 @@
package master
import (
"context"
"fmt"
"log"
"path"
"strings"
"testing"
"time"
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.etcd.io/etcd/clientv3"
)
func Test_SysConfig(t *testing.T) {
Init()
ctx, cancel := context.WithCancel(context.TODO())
defer cancel()
cli, err := clientv3.New(clientv3.Config{
Endpoints: []string{Params.EtcdAddress},
DialTimeout: 5 * time.Second,
})
require.Nil(t, err)
_, err = cli.Delete(ctx, "/test/root", clientv3.WithPrefix())
require.Nil(t, err)
rootPath := "/test/root"
configKV := etcdkv.NewEtcdKV(cli, rootPath)
defer configKV.Close()
sc := SysConfig{kv: configKV}
require.Equal(t, rootPath, sc.kv.GetPath("."))
t.Run("tests on contig_test.yaml", func(t *testing.T) {
err = sc.InitFromFile(".")
require.Nil(t, err)
testKeys := []string{
"/etcd/address",
"/master/port",
"/master/proxyidlist",
"/master/segmentthresholdfactor",
"/pulsar/token",
"/reader/stopflag",
"/proxy/timezone",
"/proxy/network/address",
"/proxy/storage/path",
"/storage/accesskey",
}
testVals := []string{
"localhost",
"53100",
"[1 2]",
"0.75",
"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKb2UifQ.ipevRNuRP6HflG8cFKnmUPtypruRC4fb1DWtoLL62SY",
"-1",
"UTC+8",
"0.0.0.0",
"/var/lib/milvus",
"",
}
vals, err := sc.Get(testKeys)
assert.Nil(t, err)
for i := range testVals {
assert.Equal(t, testVals[i], vals[i])
}
keys, vals, err := sc.GetByPrefix("/master")
assert.Nil(t, err)
for i := range keys {
assert.True(t, strings.HasPrefix(keys[i], "/master/"))
}
assert.Equal(t, len(keys), len(vals))
assert.Equal(t, 21, len(keys))
// Test get all configs
keys, vals, err = sc.GetByPrefix("/")
assert.Nil(t, err)
assert.Equal(t, len(keys), len(vals))
assert.Equal(t, 73, len(vals))
// Test get configs with prefix not exist
keys, vals, err = sc.GetByPrefix("/config")
assert.Nil(t, err)
assert.Equal(t, len(keys), len(vals))
assert.Equal(t, 0, len(keys))
assert.Equal(t, 0, len(vals))
_, _, err = sc.GetByPrefix("//././../../../../../..//../")
assert.Nil(t, err)
_, _, err = sc.GetByPrefix("/master/./address")
assert.Nil(t, err)
_, _, err = sc.GetByPrefix(".")
assert.Nil(t, err)
_, _, err = sc.GetByPrefix("\\")
assert.Nil(t, err)
})
t.Run("getConfigFiles", func(t *testing.T) {
filePath := "../../configs"
vipers, err := sc.getConfigFiles(filePath)
assert.Nil(t, err)
assert.NotNil(t, vipers[0])
filePath = "/path/not/exists"
_, err = sc.getConfigFiles(filePath)
assert.NotNil(t, err)
log.Println(err)
})
t.Run("Test saveToEtcd Normal", func(t *testing.T) {
_, err = cli.Delete(ctx, "/test/root/config", clientv3.WithPrefix())
require.Nil(t, err)
v := viper.New()
v.Set("a.suba1", "v1")
v.Set("a.suba2", "v2")
v.Set("a.suba3.subsuba1", "v3")
v.Set("a.suba3.subsuba2", "v4")
secondRootPath := "config"
err := sc.saveToEtcd(v, secondRootPath)
assert.Nil(t, err)
value, err := sc.kv.Load(path.Join(secondRootPath, "a/suba1"))
assert.Nil(t, err)
assert.Equal(t, "v1", value)
value, err = sc.kv.Load(path.Join(secondRootPath, "a/suba2"))
assert.Nil(t, err)
assert.Equal(t, "v2", value)
value, err = sc.kv.Load(path.Join(secondRootPath, "a/suba3/subsuba1"))
assert.Nil(t, err)
assert.Equal(t, "v3", value)
value, err = sc.kv.Load(path.Join(secondRootPath, "a/suba3/subsuba2"))
assert.Nil(t, err)
assert.Equal(t, "v4", value)
keys, values, err := sc.kv.LoadWithPrefix(path.Join(secondRootPath, "a"))
assert.Nil(t, err)
assert.Equal(t, 4, len(keys))
assert.Equal(t, 4, len(values))
assert.ElementsMatch(t, []string{
path.Join(sc.kv.GetPath(secondRootPath), "/a/suba1"),
path.Join(sc.kv.GetPath(secondRootPath), "/a/suba2"),
path.Join(sc.kv.GetPath(secondRootPath), "/a/suba3/subsuba1"),
path.Join(sc.kv.GetPath(secondRootPath), "/a/suba3/subsuba2"),
}, keys)
assert.ElementsMatch(t, []string{"v1", "v2", "v3", "v4"}, values)
keys = []string{
"/a/suba1",
"/a/suba2",
"/a/suba3/subsuba1",
"/a/suba3/subsuba2",
}
values, err = sc.Get(keys)
assert.Nil(t, err)
assert.ElementsMatch(t, []string{"v1", "v2", "v3", "v4"}, values)
keysAfter, values, err := sc.GetByPrefix("/a")
fmt.Println(keysAfter)
assert.Nil(t, err)
assert.ElementsMatch(t, []string{"v1", "v2", "v3", "v4"}, values)
assert.ElementsMatch(t, keys, keysAfter)
})
t.Run("Test saveToEtcd Different value types", func(t *testing.T) {
v := viper.New()
v.Set("string", "string")
v.Set("number", 1)
v.Set("nil", nil)
v.Set("float", 1.2)
v.Set("intslice", []int{100, 200})
v.Set("stringslice", []string{"a", "b"})
v.Set("stringmapstring", map[string]string{"k1": "1", "k2": "2"})
secondRootPath := "test_save_to_etcd_different_value_types"
err := sc.saveToEtcd(v, secondRootPath)
require.Nil(t, err)
keys, values, err := sc.kv.LoadWithPrefix(path.Join("/", secondRootPath))
assert.Nil(t, err)
assert.Equal(t, 7, len(keys))
assert.Equal(t, 7, len(values))
assert.ElementsMatch(t, []string{
path.Join(sc.kv.GetPath(secondRootPath), "nil"),
path.Join(sc.kv.GetPath(secondRootPath), "string"),
path.Join(sc.kv.GetPath(secondRootPath), "number"),
path.Join(sc.kv.GetPath(secondRootPath), "float"),
path.Join(sc.kv.GetPath(secondRootPath), "intslice"),
path.Join(sc.kv.GetPath(secondRootPath), "stringslice"),
path.Join(sc.kv.GetPath(secondRootPath), "stringmapstring"),
}, keys)
assert.ElementsMatch(t, []string{"", "string", "1", "1.2", "[100 200]", "[a b]", "map[k1:1 k2:2]"}, values)
})
}

View File

@ -6,16 +6,18 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/stretchr/testify/assert"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
)
func TestMaster_CreateCollectionTask(t *testing.T) {
req := internalpb.CreateCollectionRequest{
MsgType: commonpb.MsgType_kCreateCollection,
ReqID: 1,
Timestamp: 11,
ProxyID: 1,
Schema: nil,
req := milvuspb.CreateCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreateCollection,
MsgID: 1,
Timestamp: 11,
SourceID: 1,
},
Schema: nil,
}
var collectionTask task = &createCollectionTask{
req: &req,
@ -40,12 +42,13 @@ func TestMaster_CreateCollectionTask(t *testing.T) {
}
func TestMaster_DropCollectionTask(t *testing.T) {
req := internalpb.DropCollectionRequest{
MsgType: commonpb.MsgType_kDropPartition,
ReqID: 1,
Timestamp: 11,
ProxyID: 1,
CollectionName: nil,
req := milvuspb.DropCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropPartition,
MsgID: 1,
Timestamp: 11,
SourceID: 1,
},
}
var collectionTask task = &dropCollectionTask{
req: &req,
@ -72,12 +75,13 @@ func TestMaster_DropCollectionTask(t *testing.T) {
}
func TestMaster_HasCollectionTask(t *testing.T) {
req := internalpb.HasCollectionRequest{
MsgType: commonpb.MsgType_kHasCollection,
ReqID: 1,
Timestamp: 11,
ProxyID: 1,
CollectionName: nil,
req := milvuspb.HasCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kHasCollection,
MsgID: 1,
Timestamp: 11,
SourceID: 1,
},
}
var collectionTask task = &hasCollectionTask{
req: &req,
@ -102,11 +106,13 @@ func TestMaster_HasCollectionTask(t *testing.T) {
}
func TestMaster_ShowCollectionTask(t *testing.T) {
req := internalpb.ShowCollectionRequest{
MsgType: commonpb.MsgType_kShowCollections,
ReqID: 1,
Timestamp: 11,
ProxyID: 1,
req := milvuspb.ShowCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowCollections,
MsgID: 1,
Timestamp: 11,
SourceID: 1,
},
}
var collectionTask task = &showCollectionsTask{
req: &req,
@ -131,12 +137,13 @@ func TestMaster_ShowCollectionTask(t *testing.T) {
}
func TestMaster_DescribeCollectionTask(t *testing.T) {
req := internalpb.DescribeCollectionRequest{
MsgType: commonpb.MsgType_kDescribeCollection,
ReqID: 1,
Timestamp: 11,
ProxyID: 1,
CollectionName: nil,
req := milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection,
MsgID: 1,
Timestamp: 11,
SourceID: 1,
},
}
var collectionTask task = &describeCollectionTask{
req: &req,
@ -161,12 +168,13 @@ func TestMaster_DescribeCollectionTask(t *testing.T) {
}
func TestMaster_CreatePartitionTask(t *testing.T) {
req := internalpb.CreatePartitionRequest{
MsgType: commonpb.MsgType_kCreatePartition,
ReqID: 1,
Timestamp: 11,
ProxyID: 1,
PartitionName: nil,
req := milvuspb.CreatePartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreatePartition,
MsgID: 1,
Timestamp: 11,
SourceID: 1,
},
}
var partitionTask task = &createPartitionTask{
req: &req,
@ -190,12 +198,13 @@ func TestMaster_CreatePartitionTask(t *testing.T) {
assert.NotNil(t, err)
}
func TestMaster_DropPartitionTask(t *testing.T) {
req := internalpb.DropPartitionRequest{
MsgType: commonpb.MsgType_kDropPartition,
ReqID: 1,
Timestamp: 11,
ProxyID: 1,
PartitionName: nil,
req := milvuspb.DropPartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropPartition,
MsgID: 1,
Timestamp: 11,
SourceID: 1,
},
}
var partitionTask task = &dropPartitionTask{
req: &req,
@ -219,12 +228,13 @@ func TestMaster_DropPartitionTask(t *testing.T) {
assert.NotNil(t, err)
}
func TestMaster_HasPartitionTask(t *testing.T) {
req := internalpb.HasPartitionRequest{
MsgType: commonpb.MsgType_kHasPartition,
ReqID: 1,
Timestamp: 11,
ProxyID: 1,
PartitionName: nil,
req := milvuspb.HasPartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kHasPartition,
MsgID: 1,
Timestamp: 11,
SourceID: 1,
},
}
var partitionTask task = &hasPartitionTask{
req: &req,
@ -247,41 +257,45 @@ func TestMaster_HasPartitionTask(t *testing.T) {
err = partitionTask.Execute()
assert.NotNil(t, err)
}
func TestMaster_DescribePartitionTask(t *testing.T) {
req := internalpb.DescribePartitionRequest{
MsgType: commonpb.MsgType_kDescribePartition,
ReqID: 1,
Timestamp: 11,
ProxyID: 1,
PartitionName: nil,
}
var partitionTask task = &describePartitionTask{
req: &req,
baseTask: baseTask{},
}
assert.Equal(t, commonpb.MsgType_kDescribePartition, partitionTask.Type())
ts, err := partitionTask.Ts()
assert.Equal(t, uint64(11), ts)
assert.Nil(t, err)
partitionTask = &describePartitionTask{
req: nil,
baseTask: baseTask{},
}
//func TestMaster_DescribePartitionTask(t *testing.T) {
// req := milvuspb.DescribePartitionRequest{
// MsgType: commonpb.MsgType_kDescribePartition,
// ReqID: 1,
// Timestamp: 11,
// ProxyID: 1,
// PartitionName: nil,
// }
// var partitionTask task = &describePartitionTask{
// req: &req,
// baseTask: baseTask{},
// }
// assert.Equal(t, commonpb.MsgType_kDescribePartition, partitionTask.Type())
// ts, err := partitionTask.Ts()
// assert.Equal(t, uint64(11), ts)
// assert.Nil(t, err)
//
// partitionTask = &describePartitionTask{
// req: nil,
// baseTask: baseTask{},
// }
//
// assert.Equal(t, commonpb.MsgType_kNone, partitionTask.Type())
// ts, err = partitionTask.Ts()
// assert.Equal(t, uint64(0), ts)
// assert.NotNil(t, err)
// err = partitionTask.Execute()
// assert.NotNil(t, err)
//}
assert.Equal(t, commonpb.MsgType_kNone, partitionTask.Type())
ts, err = partitionTask.Ts()
assert.Equal(t, uint64(0), ts)
assert.NotNil(t, err)
err = partitionTask.Execute()
assert.NotNil(t, err)
}
func TestMaster_ShowPartitionTask(t *testing.T) {
req := internalpb.ShowPartitionRequest{
MsgType: commonpb.MsgType_kShowPartitions,
ReqID: 1,
Timestamp: 11,
ProxyID: 1,
req := milvuspb.ShowPartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowPartitions,
MsgID: 1,
Timestamp: 11,
SourceID: 1,
},
}
var partitionTask task = &showPartitionTask{
req: &req,

View File

@ -68,7 +68,7 @@ func receiveMsg(stream *ms.MsgStream) []uint64 {
msgs := result.Msgs
for _, v := range msgs {
timetickmsg := v.(*ms.TimeTickMsg)
results = append(results, timetickmsg.TimeTickMsg.Timestamp)
results = append(results, timetickmsg.TimeTickMsg.Base.Timestamp)
receiveCount++
if receiveCount == 10 {
return results

View File

@ -7,7 +7,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/errors"
ms "github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
)
type timeSyncMsgProducer struct {
@ -78,10 +78,13 @@ func (syncMsgProducer *timeSyncMsgProducer) broadcastMsg(barrier TimeTickBarrier
EndTimestamp: timetick,
HashValues: []uint32{0},
}
timeTickResult := internalPb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: 0,
Timestamp: timetick,
timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: timetick,
SourceID: 0,
},
}
timeTickMsg := &ms.TimeTickMsg{
BaseMsg: baseMsg,

View File

@ -68,15 +68,15 @@ func (ttBarrier *softTimeTickBarrier) Start() error {
if len(ttmsgs.Msgs) > 0 {
for _, timetickmsg := range ttmsgs.Msgs {
ttmsg := timetickmsg.(*ms.TimeTickMsg)
oldT, ok := ttBarrier.peer2LastTt[ttmsg.PeerID]
oldT, ok := ttBarrier.peer2LastTt[ttmsg.Base.SourceID]
// log.Printf("[softTimeTickBarrier] peer(%d)=%d\n", ttmsg.PeerID, ttmsg.Timestamp)
if !ok {
log.Printf("[softTimeTickBarrier] Warning: peerID %d not exist\n", ttmsg.PeerID)
log.Printf("[softTimeTickBarrier] Warning: peerID %d not exist\n", ttmsg.Base.SourceID)
continue
}
if ttmsg.Timestamp > oldT {
ttBarrier.peer2LastTt[ttmsg.PeerID] = ttmsg.Timestamp
if ttmsg.Base.Timestamp > oldT {
ttBarrier.peer2LastTt[ttmsg.Base.SourceID] = ttmsg.Base.Timestamp
// get a legal Timestamp
ts := ttBarrier.minTimestamp()
@ -164,18 +164,18 @@ func (ttBarrier *hardTimeTickBarrier) Start() error {
// that `ttmsg.Timestamp > oldT`
ttmsg := timetickmsg.(*ms.TimeTickMsg)
oldT, ok := ttBarrier.peer2Tt[ttmsg.PeerID]
oldT, ok := ttBarrier.peer2Tt[ttmsg.Base.SourceID]
if !ok {
log.Printf("[hardTimeTickBarrier] Warning: peerID %d not exist\n", ttmsg.PeerID)
log.Printf("[hardTimeTickBarrier] Warning: peerID %d not exist\n", ttmsg.Base.SourceID)
continue
}
if oldT > state {
log.Printf("[hardTimeTickBarrier] Warning: peer(%d) timestamp(%d) ahead\n",
ttmsg.PeerID, ttmsg.Timestamp)
ttmsg.Base.SourceID, ttmsg.Base.Timestamp)
}
ttBarrier.peer2Tt[ttmsg.PeerID] = ttmsg.Timestamp
ttBarrier.peer2Tt[ttmsg.Base.SourceID] = ttmsg.Base.Timestamp
newState := ttBarrier.minTimestamp()
if newState > state {

View File

@ -12,18 +12,20 @@ import (
ms "github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
)
func getTtMsg(msgType commonpb.MsgType, peerID UniqueID, timeStamp uint64) ms.TsMsg {
baseMsg := ms.BaseMsg{
HashValues: []uint32{uint32(peerID)},
}
timeTickResult := internalPb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: peerID,
Timestamp: timeStamp,
timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: timeStamp,
SourceID: peerID,
},
}
timeTickMsg := &ms.TimeTickMsg{
BaseMsg: baseMsg,

View File

@ -2,11 +2,11 @@ package msgstream
import (
"context"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"fmt"
"github.com/golang/protobuf/proto"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
)
type MsgType = commonpb.MsgType
@ -44,11 +44,11 @@ func (bm *BaseMsg) HashKeys() []uint32 {
/////////////////////////////////////////Insert//////////////////////////////////////////
type InsertMsg struct {
BaseMsg
internalPb.InsertRequest
internalpb2.InsertRequest
}
func (it *InsertMsg) Type() MsgType {
return it.MsgType
return it.Base.MsgType
}
func (it *InsertMsg) GetMsgContext() context.Context {
@ -66,11 +66,16 @@ func (it *InsertMsg) Marshal(input TsMsg) ([]byte, error) {
if err != nil {
return nil, err
}
headerMsg := commonpb.MsgHeader{}
err2 := proto.Unmarshal(mb, &headerMsg)
if err2 != nil {
fmt.Println(err2.Error())
}
return mb, nil
}
func (it *InsertMsg) Unmarshal(input []byte) (TsMsg, error) {
insertRequest := internalPb.InsertRequest{}
insertRequest := internalpb2.InsertRequest{}
err := proto.Unmarshal(input, &insertRequest)
if err != nil {
return nil, err
@ -96,11 +101,11 @@ func (it *InsertMsg) Unmarshal(input []byte) (TsMsg, error) {
/////////////////////////////////////////Flush//////////////////////////////////////////
type FlushMsg struct {
BaseMsg
internalPb.FlushMsg
internalpb2.FlushMsg
}
func (fl *FlushMsg) Type() MsgType {
return fl.GetMsgType()
return fl.Base.MsgType
}
func (fl *FlushMsg) GetMsgContext() context.Context {
@ -121,14 +126,14 @@ func (fl *FlushMsg) Marshal(input TsMsg) ([]byte, error) {
}
func (fl *FlushMsg) Unmarshal(input []byte) (TsMsg, error) {
flushMsg := internalPb.FlushMsg{}
flushMsg := internalpb2.FlushMsg{}
err := proto.Unmarshal(input, &flushMsg)
if err != nil {
return nil, err
}
flushMsgTask := &FlushMsg{FlushMsg: flushMsg}
flushMsgTask.BeginTimestamp = flushMsgTask.Timestamp
flushMsgTask.EndTimestamp = flushMsgTask.Timestamp
flushMsgTask.BeginTimestamp = flushMsgTask.Base.Timestamp
flushMsgTask.EndTimestamp = flushMsgTask.Base.Timestamp
return flushMsgTask, nil
}
@ -136,11 +141,11 @@ func (fl *FlushMsg) Unmarshal(input []byte) (TsMsg, error) {
/////////////////////////////////////////Delete//////////////////////////////////////////
type DeleteMsg struct {
BaseMsg
internalPb.DeleteRequest
internalpb2.DeleteRequest
}
func (dt *DeleteMsg) Type() MsgType {
return dt.MsgType
return dt.Base.MsgType
}
func (dt *DeleteMsg) GetMsgContext() context.Context {
@ -152,17 +157,18 @@ func (dt *DeleteMsg) SetMsgContext(ctx context.Context) {
}
func (dt *DeleteMsg) Marshal(input TsMsg) ([]byte, error) {
deleteTask := input.(*DeleteMsg)
deleteRequest := &deleteTask.DeleteRequest
deleteMsg := input.(*DeleteMsg)
deleteRequest := &deleteMsg.DeleteRequest
mb, err := proto.Marshal(deleteRequest)
if err != nil {
return nil, err
}
return mb, nil
}
func (dt *DeleteMsg) Unmarshal(input []byte) (TsMsg, error) {
deleteRequest := internalPb.DeleteRequest{}
deleteRequest := internalpb2.DeleteRequest{}
err := proto.Unmarshal(input, &deleteRequest)
if err != nil {
return nil, err
@ -188,11 +194,11 @@ func (dt *DeleteMsg) Unmarshal(input []byte) (TsMsg, error) {
/////////////////////////////////////////Search//////////////////////////////////////////
type SearchMsg struct {
BaseMsg
internalPb.SearchRequest
internalpb2.SearchRequest
}
func (st *SearchMsg) Type() MsgType {
return st.MsgType
return st.Base.MsgType
}
func (st *SearchMsg) GetMsgContext() context.Context {
@ -214,14 +220,14 @@ func (st *SearchMsg) Marshal(input TsMsg) ([]byte, error) {
}
func (st *SearchMsg) Unmarshal(input []byte) (TsMsg, error) {
searchRequest := internalPb.SearchRequest{}
searchRequest := internalpb2.SearchRequest{}
err := proto.Unmarshal(input, &searchRequest)
if err != nil {
return nil, err
}
searchMsg := &SearchMsg{SearchRequest: searchRequest}
searchMsg.BeginTimestamp = searchMsg.Timestamp
searchMsg.EndTimestamp = searchMsg.Timestamp
searchMsg.BeginTimestamp = searchMsg.Base.Timestamp
searchMsg.EndTimestamp = searchMsg.Base.Timestamp
return searchMsg, nil
}
@ -229,11 +235,11 @@ func (st *SearchMsg) Unmarshal(input []byte) (TsMsg, error) {
/////////////////////////////////////////SearchResult//////////////////////////////////////////
type SearchResultMsg struct {
BaseMsg
internalPb.SearchResult
internalpb2.SearchResults
}
func (srt *SearchResultMsg) Type() MsgType {
return srt.MsgType
return srt.Base.MsgType
}
func (srt *SearchResultMsg) GetMsgContext() context.Context {
@ -246,7 +252,7 @@ func (srt *SearchResultMsg) SetMsgContext(ctx context.Context) {
func (srt *SearchResultMsg) Marshal(input TsMsg) ([]byte, error) {
searchResultTask := input.(*SearchResultMsg)
searchResultRequest := &searchResultTask.SearchResult
searchResultRequest := &searchResultTask.SearchResults
mb, err := proto.Marshal(searchResultRequest)
if err != nil {
return nil, err
@ -255,14 +261,14 @@ func (srt *SearchResultMsg) Marshal(input TsMsg) ([]byte, error) {
}
func (srt *SearchResultMsg) Unmarshal(input []byte) (TsMsg, error) {
searchResultRequest := internalPb.SearchResult{}
searchResultRequest := internalpb2.SearchResults{}
err := proto.Unmarshal(input, &searchResultRequest)
if err != nil {
return nil, err
}
searchResultMsg := &SearchResultMsg{SearchResult: searchResultRequest}
searchResultMsg.BeginTimestamp = searchResultMsg.Timestamp
searchResultMsg.EndTimestamp = searchResultMsg.Timestamp
searchResultMsg := &SearchResultMsg{SearchResults: searchResultRequest}
searchResultMsg.BeginTimestamp = searchResultMsg.Base.Timestamp
searchResultMsg.EndTimestamp = searchResultMsg.Base.Timestamp
return searchResultMsg, nil
}
@ -270,11 +276,11 @@ func (srt *SearchResultMsg) Unmarshal(input []byte) (TsMsg, error) {
/////////////////////////////////////////TimeTick//////////////////////////////////////////
type TimeTickMsg struct {
BaseMsg
internalPb.TimeTickMsg
internalpb2.TimeTickMsg
}
func (tst *TimeTickMsg) Type() MsgType {
return tst.MsgType
return tst.Base.MsgType
}
func (tst *TimeTickMsg) GetMsgContext() context.Context {
@ -296,14 +302,14 @@ func (tst *TimeTickMsg) Marshal(input TsMsg) ([]byte, error) {
}
func (tst *TimeTickMsg) Unmarshal(input []byte) (TsMsg, error) {
timeTickMsg := internalPb.TimeTickMsg{}
timeTickMsg := internalpb2.TimeTickMsg{}
err := proto.Unmarshal(input, &timeTickMsg)
if err != nil {
return nil, err
}
timeTick := &TimeTickMsg{TimeTickMsg: timeTickMsg}
timeTick.BeginTimestamp = timeTick.Timestamp
timeTick.EndTimestamp = timeTick.Timestamp
timeTick.BeginTimestamp = timeTick.Base.Timestamp
timeTick.EndTimestamp = timeTick.Base.Timestamp
return timeTick, nil
}
@ -311,11 +317,11 @@ func (tst *TimeTickMsg) Unmarshal(input []byte) (TsMsg, error) {
/////////////////////////////////////////QueryNodeStats//////////////////////////////////////////
type QueryNodeStatsMsg struct {
BaseMsg
internalPb.QueryNodeStats
internalpb2.QueryNodeStats
}
func (qs *QueryNodeStatsMsg) Type() MsgType {
return qs.MsgType
return qs.Base.MsgType
}
func (qs *QueryNodeStatsMsg) GetMsgContext() context.Context {
@ -337,7 +343,7 @@ func (qs *QueryNodeStatsMsg) Marshal(input TsMsg) ([]byte, error) {
}
func (qs *QueryNodeStatsMsg) Unmarshal(input []byte) (TsMsg, error) {
queryNodeSegStats := internalPb.QueryNodeStats{}
queryNodeSegStats := internalpb2.QueryNodeStats{}
err := proto.Unmarshal(input, &queryNodeSegStats)
if err != nil {
return nil, err
@ -350,7 +356,7 @@ func (qs *QueryNodeStatsMsg) Unmarshal(input []byte) (TsMsg, error) {
///////////////////////////////////////////Key2Seg//////////////////////////////////////////
//type Key2SegMsg struct {
// BaseMsg
// internalPb.Key2SegMsg
// internalpb2.Key2SegMsg
//}
//
//func (k2st *Key2SegMsg) Type() MsgType {
@ -360,11 +366,11 @@ func (qs *QueryNodeStatsMsg) Unmarshal(input []byte) (TsMsg, error) {
/////////////////////////////////////////CreateCollection//////////////////////////////////////////
type CreateCollectionMsg struct {
BaseMsg
internalPb.CreateCollectionRequest
internalpb2.CreateCollectionRequest
}
func (cc *CreateCollectionMsg) Type() MsgType {
return cc.MsgType
return cc.Base.MsgType
}
func (cc *CreateCollectionMsg) GetMsgContext() context.Context {
@ -382,18 +388,25 @@ func (cc *CreateCollectionMsg) Marshal(input TsMsg) ([]byte, error) {
if err != nil {
return nil, err
}
headerMsg := commonpb.MsgHeader{}
err2 := proto.Unmarshal(mb, &headerMsg)
if err2 != nil {
fmt.Println(err2.Error())
}
return mb, nil
}
func (cc *CreateCollectionMsg) Unmarshal(input []byte) (TsMsg, error) {
createCollectionRequest := internalPb.CreateCollectionRequest{}
createCollectionRequest := internalpb2.CreateCollectionRequest{}
err := proto.Unmarshal(input, &createCollectionRequest)
if err != nil {
return nil, err
}
createCollectionMsg := &CreateCollectionMsg{CreateCollectionRequest: createCollectionRequest}
createCollectionMsg.BeginTimestamp = createCollectionMsg.Timestamp
createCollectionMsg.EndTimestamp = createCollectionMsg.Timestamp
createCollectionMsg.BeginTimestamp = createCollectionMsg.Base.Timestamp
createCollectionMsg.EndTimestamp = createCollectionMsg.Base.Timestamp
return createCollectionMsg, nil
}
@ -401,11 +414,11 @@ func (cc *CreateCollectionMsg) Unmarshal(input []byte) (TsMsg, error) {
/////////////////////////////////////////DropCollection//////////////////////////////////////////
type DropCollectionMsg struct {
BaseMsg
internalPb.DropCollectionRequest
internalpb2.DropCollectionRequest
}
func (dc *DropCollectionMsg) Type() MsgType {
return dc.MsgType
return dc.Base.MsgType
}
func (dc *DropCollectionMsg) GetMsgContext() context.Context {
return dc.MsgCtx
@ -426,14 +439,14 @@ func (dc *DropCollectionMsg) Marshal(input TsMsg) ([]byte, error) {
}
func (dc *DropCollectionMsg) Unmarshal(input []byte) (TsMsg, error) {
dropCollectionRequest := internalPb.DropCollectionRequest{}
dropCollectionRequest := internalpb2.DropCollectionRequest{}
err := proto.Unmarshal(input, &dropCollectionRequest)
if err != nil {
return nil, err
}
dropCollectionMsg := &DropCollectionMsg{DropCollectionRequest: dropCollectionRequest}
dropCollectionMsg.BeginTimestamp = dropCollectionMsg.Timestamp
dropCollectionMsg.EndTimestamp = dropCollectionMsg.Timestamp
dropCollectionMsg.BeginTimestamp = dropCollectionMsg.Base.Timestamp
dropCollectionMsg.EndTimestamp = dropCollectionMsg.Base.Timestamp
return dropCollectionMsg, nil
}
@ -441,7 +454,7 @@ func (dc *DropCollectionMsg) Unmarshal(input []byte) (TsMsg, error) {
/////////////////////////////////////////CreatePartition//////////////////////////////////////////
type CreatePartitionMsg struct {
BaseMsg
internalPb.CreatePartitionRequest
internalpb2.CreatePartitionRequest
}
func (cc *CreatePartitionMsg) GetMsgContext() context.Context {
@ -453,7 +466,7 @@ func (cc *CreatePartitionMsg) SetMsgContext(ctx context.Context) {
}
func (cc *CreatePartitionMsg) Type() MsgType {
return cc.MsgType
return cc.Base.MsgType
}
func (cc *CreatePartitionMsg) Marshal(input TsMsg) ([]byte, error) {
@ -467,14 +480,14 @@ func (cc *CreatePartitionMsg) Marshal(input TsMsg) ([]byte, error) {
}
func (cc *CreatePartitionMsg) Unmarshal(input []byte) (TsMsg, error) {
createPartitionRequest := internalPb.CreatePartitionRequest{}
createPartitionRequest := internalpb2.CreatePartitionRequest{}
err := proto.Unmarshal(input, &createPartitionRequest)
if err != nil {
return nil, err
}
createPartitionMsg := &CreatePartitionMsg{CreatePartitionRequest: createPartitionRequest}
createPartitionMsg.BeginTimestamp = createPartitionMsg.Timestamp
createPartitionMsg.EndTimestamp = createPartitionMsg.Timestamp
createPartitionMsg.BeginTimestamp = createPartitionMsg.Base.Timestamp
createPartitionMsg.EndTimestamp = createPartitionMsg.Base.Timestamp
return createPartitionMsg, nil
}
@ -482,7 +495,7 @@ func (cc *CreatePartitionMsg) Unmarshal(input []byte) (TsMsg, error) {
/////////////////////////////////////////DropPartition//////////////////////////////////////////
type DropPartitionMsg struct {
BaseMsg
internalPb.DropPartitionRequest
internalpb2.DropPartitionRequest
}
func (dc *DropPartitionMsg) GetMsgContext() context.Context {
@ -494,7 +507,7 @@ func (dc *DropPartitionMsg) SetMsgContext(ctx context.Context) {
}
func (dc *DropPartitionMsg) Type() MsgType {
return dc.MsgType
return dc.Base.MsgType
}
func (dc *DropPartitionMsg) Marshal(input TsMsg) ([]byte, error) {
@ -508,14 +521,14 @@ func (dc *DropPartitionMsg) Marshal(input TsMsg) ([]byte, error) {
}
func (dc *DropPartitionMsg) Unmarshal(input []byte) (TsMsg, error) {
dropPartitionRequest := internalPb.DropPartitionRequest{}
dropPartitionRequest := internalpb2.DropPartitionRequest{}
err := proto.Unmarshal(input, &dropPartitionRequest)
if err != nil {
return nil, err
}
dropPartitionMsg := &DropPartitionMsg{DropPartitionRequest: dropPartitionRequest}
dropPartitionMsg.BeginTimestamp = dropPartitionMsg.Timestamp
dropPartitionMsg.EndTimestamp = dropPartitionMsg.Timestamp
dropPartitionMsg.BeginTimestamp = dropPartitionMsg.Base.Timestamp
dropPartitionMsg.EndTimestamp = dropPartitionMsg.Base.Timestamp
return dropPartitionMsg, nil
}
@ -523,11 +536,11 @@ func (dc *DropPartitionMsg) Unmarshal(input []byte) (TsMsg, error) {
/////////////////////////////////////////LoadIndex//////////////////////////////////////////
type LoadIndexMsg struct {
BaseMsg
internalPb.LoadIndex
internalpb2.LoadIndex
}
func (lim *LoadIndexMsg) Type() MsgType {
return lim.MsgType
return lim.Base.MsgType
}
func (lim *LoadIndexMsg) GetMsgContext() context.Context {
@ -549,7 +562,7 @@ func (lim *LoadIndexMsg) Marshal(input TsMsg) ([]byte, error) {
}
func (lim *LoadIndexMsg) Unmarshal(input []byte) (TsMsg, error) {
loadIndexRequest := internalPb.LoadIndex{}
loadIndexRequest := internalpb2.LoadIndex{}
err := proto.Unmarshal(input, &loadIndexRequest)
if err != nil {
return nil, err

View File

@ -10,7 +10,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
)
type InsertTask struct {
@ -29,10 +29,10 @@ func (tt *InsertTask) Marshal(input TsMsg) ([]byte, error) {
}
func (tt *InsertTask) Unmarshal(input []byte) (TsMsg, error) {
insertRequest := internalPb.InsertRequest{}
insertRequest := internalpb2.InsertRequest{}
err := proto.Unmarshal(input, &insertRequest)
testMsg := &InsertTask{InsertMsg: InsertMsg{InsertRequest: insertRequest}}
testMsg.Tag = testMsg.PartitionTag
testMsg.Tag = testMsg.InsertRequest.PartitionName
if err != nil {
return nil, err
}
@ -64,15 +64,18 @@ func newRepackFunc(tsMsgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, erro
result[key] = &msgPack
}
sliceRequest := internalPb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: insertRequest.ReqID,
sliceRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: insertRequest.Base.MsgID,
Timestamp: insertRequest.Timestamps[index],
SourceID: insertRequest.Base.SourceID,
},
CollectionName: insertRequest.CollectionName,
PartitionTag: insertRequest.PartitionTag,
PartitionName: insertRequest.PartitionName,
SegmentID: insertRequest.SegmentID,
ChannelID: insertRequest.ChannelID,
ProxyID: insertRequest.ProxyID,
Timestamps: []uint64{insertRequest.Timestamps[index]},
Timestamps: []Timestamp{insertRequest.Timestamps[index]},
RowIDs: []int64{insertRequest.RowIDs[index]},
RowData: []*commonpb.Blob{insertRequest.RowData[index]},
}
@ -93,14 +96,17 @@ func getInsertTask(reqID UniqueID, hashValue uint32) TsMsg {
EndTimestamp: 0,
HashValues: []uint32{hashValue},
}
insertRequest := internalPb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: reqID,
insertRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: reqID,
Timestamp: 1,
SourceID: 1,
},
CollectionName: "Collection",
PartitionTag: "Partition",
PartitionName: "Partition",
SegmentID: 1,
ChannelID: 1,
ProxyID: 1,
ChannelID: "1",
Timestamps: []Timestamp{1},
RowIDs: []int64{1},
RowData: []*commonpb.Blob{{}},

View File

@ -2,8 +2,10 @@ package msgstream
import (
"context"
"fmt"
"log"
"reflect"
"strconv"
"strings"
"sync"
"time"
@ -15,7 +17,7 @@ import (
oplog "github.com/opentracing/opentracing-go/log"
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
@ -193,11 +195,12 @@ func (ms *PulsarMsgStream) Produce(msgPack *MsgPack) error {
for index, hashValue := range hashValues {
if tsMsg.Type() == commonpb.MsgType_kSearchResult {
searchResult := tsMsg.(*SearchResultMsg)
channelID := int32(searchResult.ResultChannelID)
if channelID >= int32(len(ms.producers)) {
channelID := searchResult.ResultChannelID
channelIDInt, _ := strconv.ParseInt(channelID, 10, 64)
if channelIDInt >= int64(len(ms.producers)) {
return errors.New("Failed to produce pulsar msg to unKnow channel")
}
bucketValues[index] = channelID
bucketValues[index] = int32(channelIDInt)
continue
}
bucketValues[index] = int32(hashValue % uint32(len(ms.producers)))
@ -231,6 +234,15 @@ func (ms *PulsarMsgStream) Produce(msgPack *MsgPack) error {
}
msg := &pulsar.ProducerMessage{Payload: mb}
if v.Msgs[i].Type() == commonpb.MsgType_kDelete {
headerMsg := commonpb.MsgHeader{}
err := proto.Unmarshal(mb, &headerMsg)
if err != nil {
fmt.Println(err.Error())
}
}
var child opentracing.Span
if v.Msgs[i].Type() == commonpb.MsgType_kInsert ||
v.Msgs[i].Type() == commonpb.MsgType_kSearch ||
@ -382,13 +394,16 @@ func (ms *PulsarMsgStream) bufMsgPackToChannel() {
}
(*ms.consumers[chosen]).AckID(pulsarMsg.ID())
headerMsg := internalPb.MsgHeader{}
err := proto.Unmarshal(pulsarMsg.Payload(), &headerMsg)
headerMsg := commonpb.MsgHeader{}
payload := pulsarMsg.Payload()
err := proto.Unmarshal(payload, &headerMsg)
//delete2, _ := ms.unmarshal.Unmarshal(payload, commonpb.MsgType_kDelete)
//fmt.Println(delete2)
if err != nil {
log.Printf("Failed to unmarshal message header, error = %v", err)
continue
}
tsMsg, err := ms.unmarshal.Unmarshal(pulsarMsg.Payload(), headerMsg.MsgType)
tsMsg, err := ms.unmarshal.Unmarshal(pulsarMsg.Payload(), headerMsg.Base.MsgType)
if tsMsg.Type() == commonpb.MsgType_kSearch ||
tsMsg.Type() == commonpb.MsgType_kSearchResult {
tracer := opentracing.GlobalTracer()
@ -548,14 +563,14 @@ func (ms *PulsarTtMsgStream) findTimeTick(channelIndex int,
}
(*ms.consumers[channelIndex]).Ack(pulsarMsg)
headerMsg := internalPb.MsgHeader{}
headerMsg := commonpb.MsgHeader{}
err := proto.Unmarshal(pulsarMsg.Payload(), &headerMsg)
if err != nil {
log.Printf("Failed to unmarshal, error = %v", err)
}
unMarshalFunc := (*ms.unmarshal).tempMap[headerMsg.MsgType]
unMarshalFunc := (*ms.unmarshal).tempMap[headerMsg.Base.MsgType]
if unMarshalFunc == nil {
panic("null unMarshalFunc for " + headerMsg.MsgType.String() + " msg type")
panic("null unMarshalFunc for " + headerMsg.Base.MsgType.String() + " msg type")
}
tsMsg, err := unMarshalFunc(pulsarMsg.Payload())
if err != nil {
@ -579,9 +594,9 @@ func (ms *PulsarTtMsgStream) findTimeTick(channelIndex int,
span.Finish()
}
if headerMsg.MsgType == commonpb.MsgType_kTimeTick {
if headerMsg.Base.MsgType == commonpb.MsgType_kTimeTick {
findMapMutex.Lock()
eofMsgMap[channelIndex] = tsMsg.(*TimeTickMsg).Timestamp
eofMsgMap[channelIndex] = tsMsg.(*TimeTickMsg).Base.Timestamp
findMapMutex.Unlock()
return
}
@ -684,14 +699,17 @@ func insertRepackFunc(tsMsgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, e
result[key] = &msgPack
}
sliceRequest := internalPb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: insertRequest.ReqID,
sliceRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: insertRequest.Base.MsgID,
Timestamp: insertRequest.Timestamps[index],
SourceID: insertRequest.Base.SourceID,
},
CollectionName: insertRequest.CollectionName,
PartitionTag: insertRequest.PartitionTag,
PartitionName: insertRequest.PartitionName,
SegmentID: insertRequest.SegmentID,
ChannelID: insertRequest.ChannelID,
ProxyID: insertRequest.ProxyID,
Timestamps: []uint64{insertRequest.Timestamps[index]},
RowIDs: []int64{insertRequest.RowIDs[index]},
RowData: []*commonpb.Blob{insertRequest.RowData[index]},
@ -733,17 +751,23 @@ func deleteRepackFunc(tsMsgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, e
result[key] = &msgPack
}
sliceRequest := internalPb.DeleteRequest{
MsgType: commonpb.MsgType_kDelete,
ReqID: deleteRequest.ReqID,
sliceRequest := internalpb2.DeleteRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDelete,
MsgID: deleteRequest.Base.MsgID,
Timestamp: deleteRequest.Timestamps[index],
SourceID: deleteRequest.Base.SourceID,
},
CollectionName: deleteRequest.CollectionName,
ChannelID: deleteRequest.ChannelID,
ProxyID: deleteRequest.ProxyID,
Timestamps: []uint64{deleteRequest.Timestamps[index]},
PrimaryKeys: []int64{deleteRequest.PrimaryKeys[index]},
}
deleteMsg := &DeleteMsg{
BaseMsg: BaseMsg{
MsgCtx: request.GetMsgContext(),
},
DeleteRequest: sliceRequest,
}
result[key].Msgs = append(result[key].Msgs, deleteMsg)

View File

@ -8,7 +8,7 @@ import (
"testing"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/util/paramtable"
)
@ -44,14 +44,17 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
switch msgType {
case commonpb.MsgType_kInsert:
insertRequest := internalPb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: reqID,
insertRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: reqID,
Timestamp: 11,
SourceID: reqID,
},
CollectionName: "Collection",
PartitionTag: "Partition",
PartitionName: "Partition",
SegmentID: 1,
ChannelID: 0,
ProxyID: 1,
ChannelID: "0",
Timestamps: []Timestamp{1},
RowIDs: []int64{1},
RowData: []*commonpb.Blob{{}},
@ -62,12 +65,15 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return insertMsg
case commonpb.MsgType_kDelete:
deleteRequest := internalPb.DeleteRequest{
MsgType: commonpb.MsgType_kDelete,
ReqID: reqID,
deleteRequest := internalpb2.DeleteRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDelete,
MsgID: reqID,
Timestamp: 11,
SourceID: reqID,
},
CollectionName: "Collection",
ChannelID: 1,
ProxyID: 1,
ChannelID: "1",
Timestamps: []Timestamp{1},
PrimaryKeys: []IntPrimaryKey{1},
}
@ -77,12 +83,15 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return deleteMsg
case commonpb.MsgType_kSearch:
searchRequest := internalPb.SearchRequest{
MsgType: commonpb.MsgType_kSearch,
ReqID: reqID,
ProxyID: 1,
Timestamp: 1,
ResultChannelID: 0,
searchRequest := internalpb2.SearchRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearch,
MsgID: reqID,
Timestamp: 11,
SourceID: reqID,
},
Query: nil,
ResultChannelID: "0",
}
searchMsg := &SearchMsg{
BaseMsg: baseMsg,
@ -90,25 +99,29 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return searchMsg
case commonpb.MsgType_kSearchResult:
searchResult := internalPb.SearchResult{
MsgType: commonpb.MsgType_kSearchResult,
searchResult := internalpb2.SearchResults{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearchResult,
MsgID: reqID,
Timestamp: 1,
SourceID: reqID,
},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
ReqID: reqID,
ProxyID: 1,
QueryNodeID: 1,
Timestamp: 1,
ResultChannelID: 0,
ResultChannelID: "0",
}
searchResultMsg := &SearchResultMsg{
BaseMsg: baseMsg,
SearchResult: searchResult,
BaseMsg: baseMsg,
SearchResults: searchResult,
}
return searchResultMsg
case commonpb.MsgType_kTimeTick:
timeTickResult := internalPb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: reqID,
Timestamp: 1,
timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: reqID,
Timestamp: 1,
SourceID: reqID,
},
}
timeTickMsg := &TimeTickMsg{
BaseMsg: baseMsg,
@ -116,9 +129,11 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return timeTickMsg
case commonpb.MsgType_kQueryNodeStats:
queryNodeSegStats := internalPb.QueryNodeStats{
MsgType: commonpb.MsgType_kQueryNodeStats,
PeerID: reqID,
queryNodeSegStats := internalpb2.QueryNodeStats{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kQueryNodeStats,
SourceID: reqID,
},
}
queryNodeSegStatsMsg := &QueryNodeStatsMsg{
BaseMsg: baseMsg,
@ -135,10 +150,13 @@ func getTimeTickMsg(reqID UniqueID, hashValue uint32, time uint64) TsMsg {
EndTimestamp: 0,
HashValues: []uint32{hashValue},
}
timeTickResult := internalPb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: reqID,
Timestamp: time,
timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: reqID,
Timestamp: time,
SourceID: reqID,
},
}
timeTickMsg := &TimeTickMsg{
BaseMsg: baseMsg,
@ -248,7 +266,7 @@ func TestStream_PulsarMsgStream_Delete(t *testing.T) {
msgPack := MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kDelete, 1, 1))
msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kDelete, 3, 3))
//msgPack.Msgs = append(msgPack.Msgs, getTsMsg(commonpb.MsgType_kDelete, 3, 3))
inputStream, outputStream := initPulsarStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName)
err := (*inputStream).Produce(&msgPack)
@ -372,14 +390,17 @@ func TestStream_PulsarMsgStream_InsertRepackFunc(t *testing.T) {
HashValues: []uint32{1, 3},
}
insertRequest := internalPb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: 1,
insertRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: 1,
Timestamp: 1,
SourceID: 1,
},
CollectionName: "Collection",
PartitionTag: "Partition",
PartitionName: "Partition",
SegmentID: 1,
ChannelID: 1,
ProxyID: 1,
ChannelID: "1",
Timestamps: []Timestamp{1, 1},
RowIDs: []int64{1, 3},
RowData: []*commonpb.Blob{{}, {}},
@ -425,12 +446,15 @@ func TestStream_PulsarMsgStream_DeleteRepackFunc(t *testing.T) {
HashValues: []uint32{1, 3},
}
deleteRequest := internalPb.DeleteRequest{
MsgType: commonpb.MsgType_kDelete,
ReqID: 1,
deleteRequest := internalpb2.DeleteRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDelete,
MsgID: 1,
Timestamp: 1,
SourceID: 1,
},
CollectionName: "Collection",
ChannelID: 1,
ProxyID: 1,
ChannelID: "1",
Timestamps: []Timestamp{1, 1},
PrimaryKeys: []int64{1, 3},
}
@ -529,3 +553,37 @@ func TestStream_PulsarTtMsgStream_Insert(t *testing.T) {
(*inputStream).Close()
(*outputStream).Close()
}
func TestStream_PulsarTtMsgStream_UnMarshalHeader(t *testing.T) {
pulsarAddress, _ := Params.Load("_PulsarAddress")
producerChannels := []string{"insert1", "insert2"}
consumerChannels := []string{"insert1", "insert2"}
consumerSubName := "subInsert"
msgPack0 := MsgPack{}
msgPack0.Msgs = append(msgPack0.Msgs, getTimeTickMsg(0, 0, 0))
msgPack1 := MsgPack{}
msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_kInsert, 1, 1))
msgPack1.Msgs = append(msgPack1.Msgs, getTsMsg(commonpb.MsgType_kInsert, 3, 3))
msgPack2 := MsgPack{}
msgPack2.Msgs = append(msgPack2.Msgs, getTimeTickMsg(5, 5, 5))
inputStream, outputStream := initPulsarTtStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName)
err := (*inputStream).Broadcast(&msgPack0)
if err != nil {
log.Fatalf("broadcast error = %v", err)
}
err = (*inputStream).Produce(&msgPack1)
if err != nil {
log.Fatalf("produce error = %v", err)
}
err = (*inputStream).Broadcast(&msgPack2)
if err != nil {
log.Fatalf("broadcast error = %v", err)
}
receiveMsg(outputStream, len(msgPack1.Msgs))
(*inputStream).Close()
(*outputStream).Close()
}

View File

@ -9,11 +9,11 @@ import (
"github.com/golang/protobuf/proto"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
)
func newInsertMsgUnmarshal(input []byte) (TsMsg, error) {
insertRequest := internalPb.InsertRequest{}
insertRequest := internalpb2.InsertRequest{}
err := proto.Unmarshal(input, &insertRequest)
insertMsg := &InsertMsg{InsertRequest: insertRequest}
fmt.Println("use func newInsertMsgUnmarshal unmarshal")

View File

@ -33,6 +33,13 @@ enum ErrorCode {
DD_REQUEST_RACE = 1000;
}
enum IndexState {
NONE = 0;
UNISSUED = 1;
INPROGRESS = 2;
FINISHED = 3;
FAILED = 4;
}
message Empty{}
@ -94,6 +101,8 @@ enum MsgType {
kTimeTick = 1200;
kQueryNodeStats = 1201;
kLoadIndex = 1202;
kRequestID = 1203;
kRequestTSO = 1204;
}
@ -104,3 +113,8 @@ message MsgBase {
int64 sourceID = 4;
}
// Don't Modify This. @czs
message MsgHeader {
common.MsgBase base = 1;
}

View File

@ -115,6 +115,40 @@ func (ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{0}
}
type IndexState int32
const (
IndexState_NONE IndexState = 0
IndexState_UNISSUED IndexState = 1
IndexState_INPROGRESS IndexState = 2
IndexState_FINISHED IndexState = 3
IndexState_FAILED IndexState = 4
)
var IndexState_name = map[int32]string{
0: "NONE",
1: "UNISSUED",
2: "INPROGRESS",
3: "FINISHED",
4: "FAILED",
}
var IndexState_value = map[string]int32{
"NONE": 0,
"UNISSUED": 1,
"INPROGRESS": 2,
"FINISHED": 3,
"FAILED": 4,
}
func (x IndexState) String() string {
return proto.EnumName(IndexState_name, int32(x))
}
func (IndexState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{1}
}
type MsgType int32
const (
@ -147,6 +181,8 @@ const (
MsgType_kTimeTick MsgType = 1200
MsgType_kQueryNodeStats MsgType = 1201
MsgType_kLoadIndex MsgType = 1202
MsgType_kRequestID MsgType = 1203
MsgType_kRequestTSO MsgType = 1204
)
var MsgType_name = map[int32]string{
@ -173,6 +209,8 @@ var MsgType_name = map[int32]string{
1200: "kTimeTick",
1201: "kQueryNodeStats",
1202: "kLoadIndex",
1203: "kRequestID",
1204: "kRequestTSO",
}
var MsgType_value = map[string]int32{
@ -199,6 +237,8 @@ var MsgType_value = map[string]int32{
"kTimeTick": 1200,
"kQueryNodeStats": 1201,
"kLoadIndex": 1202,
"kRequestID": 1203,
"kRequestTSO": 1204,
}
func (x MsgType) String() string {
@ -206,7 +246,7 @@ func (x MsgType) String() string {
}
func (MsgType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{1}
return fileDescriptor_555bd8c177793206, []int{2}
}
type Empty struct {
@ -483,8 +523,49 @@ func (m *MsgBase) GetSourceID() int64 {
return 0
}
// Don't Modify This. @czs
type MsgHeader struct {
Base *MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MsgHeader) Reset() { *m = MsgHeader{} }
func (m *MsgHeader) String() string { return proto.CompactTextString(m) }
func (*MsgHeader) ProtoMessage() {}
func (*MsgHeader) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{6}
}
func (m *MsgHeader) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgHeader.Unmarshal(m, b)
}
func (m *MsgHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MsgHeader.Marshal(b, m, deterministic)
}
func (m *MsgHeader) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgHeader.Merge(m, src)
}
func (m *MsgHeader) XXX_Size() int {
return xxx_messageInfo_MsgHeader.Size(m)
}
func (m *MsgHeader) XXX_DiscardUnknown() {
xxx_messageInfo_MsgHeader.DiscardUnknown(m)
}
var xxx_messageInfo_MsgHeader proto.InternalMessageInfo
func (m *MsgHeader) GetBase() *MsgBase {
if m != nil {
return m.Base
}
return nil
}
func init() {
proto.RegisterEnum("milvus.proto.common.ErrorCode", ErrorCode_name, ErrorCode_value)
proto.RegisterEnum("milvus.proto.common.IndexState", IndexState_name, IndexState_value)
proto.RegisterEnum("milvus.proto.common.MsgType", MsgType_name, MsgType_value)
proto.RegisterType((*Empty)(nil), "milvus.proto.common.Empty")
proto.RegisterType((*Status)(nil), "milvus.proto.common.Status")
@ -492,69 +573,76 @@ func init() {
proto.RegisterType((*Blob)(nil), "milvus.proto.common.Blob")
proto.RegisterType((*Address)(nil), "milvus.proto.common.Address")
proto.RegisterType((*MsgBase)(nil), "milvus.proto.common.MsgBase")
proto.RegisterType((*MsgHeader)(nil), "milvus.proto.common.MsgHeader")
}
func init() { proto.RegisterFile("common.proto", fileDescriptor_555bd8c177793206) }
var fileDescriptor_555bd8c177793206 = []byte{
// 941 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0xdd, 0x6e, 0xe3, 0x44,
0x14, 0xde, 0xfc, 0xb4, 0xa9, 0x4f, 0xd3, 0x74, 0x3a, 0xfd, 0x0b, 0x6c, 0x85, 0xaa, 0x5e, 0x55,
0x2b, 0x6d, 0x2b, 0x81, 0x04, 0x57, 0x48, 0xb8, 0xe3, 0x49, 0x6b, 0xad, 0x63, 0x67, 0xc7, 0xce,
0xd2, 0xe5, 0xc6, 0x72, 0x92, 0xd9, 0xc4, 0xb2, 0x93, 0x89, 0x3c, 0x93, 0x85, 0xec, 0x53, 0xc0,
0x3e, 0x07, 0x20, 0xe0, 0x8a, 0x47, 0xe0, 0xf7, 0x3d, 0x78, 0x00, 0xb8, 0x47, 0x63, 0xc7, 0x4d,
0x40, 0x7b, 0x37, 0xe7, 0xfb, 0xfc, 0x7d, 0xf3, 0x9d, 0xe3, 0xd1, 0x81, 0xe6, 0x50, 0x4c, 0xa7,
0x62, 0x76, 0x35, 0xcf, 0x84, 0x12, 0xf8, 0x70, 0x1a, 0xa7, 0xaf, 0x17, 0xb2, 0xa8, 0xae, 0x0a,
0xea, 0xa2, 0x01, 0x5b, 0x74, 0x3a, 0x57, 0xcb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, 0xae, 0x17, 0xad, 0x44, 0x3f, 0x1a, 0x78,
0x1f, 0x20, 0x71, 0x44, 0x34, 0x2a, 0xe2, 0xfd, 0x64, 0xdc, 0xdc, 0x7c, 0xf1, 0xd9, 0x38, 0x56,
0x93, 0xc5, 0x40, 0x2f, 0x9f, 0xeb, 0x37, 0x71, 0x9a, 0xc6, 0x6f, 0x14, 0x1f, 0x4e, 0xae, 0x8b,
0xc5, 0xf4, 0x74, 0x14, 0x4b, 0x95, 0xc5, 0x83, 0x85, 0xe2, 0xa3, 0xeb, 0x78, 0xa6, 0x78, 0x36,
0x8b, 0xd2, 0xeb, 0x7c, 0x5b, 0x5d, 0x17, 0xdb, 0x6a, 0x3e, 0x18, 0x6c, 0xe7, 0xf5, 0x47, 0xff,
0x06, 0x00, 0x00, 0xff, 0xff, 0x73, 0xec, 0xf0, 0xa7, 0xfe, 0x05, 0x00, 0x00,
// 1038 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x5b, 0x6f, 0xe3, 0x44,
0x14, 0xde, 0x5c, 0xda, 0xd4, 0x27, 0x69, 0x3a, 0x9d, 0xde, 0x02, 0x5b, 0xa1, 0x2a, 0x4f, 0x55,
0xa5, 0x6d, 0x11, 0x48, 0xf0, 0xb4, 0x12, 0xae, 0x3d, 0x69, 0x47, 0xeb, 0x4b, 0x76, 0xec, 0x2c,
0x5d, 0x5e, 0x2c, 0x27, 0x9e, 0x4d, 0x2c, 0x3b, 0x71, 0xf0, 0x38, 0x0b, 0xd9, 0x5f, 0x01, 0xfb,
0x3b, 0x00, 0x71, 0x7b, 0xe0, 0x27, 0x70, 0xfb, 0x21, 0x3c, 0xf2, 0x00, 0xef, 0x68, 0xec, 0xb8,
0x09, 0x68, 0x79, 0x9b, 0xf3, 0x9d, 0xf9, 0xbe, 0xf9, 0xce, 0x99, 0x99, 0x03, 0xad, 0x51, 0x32,
0x9d, 0x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a6, 0xd9, 0x7c, 0x38, 0xdc, 0xce, 0xe3, 0xf7,
0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x87, 0x1d, 0x81, 0xb0, 0x06, 0x00, 0x00,
}

View File

@ -19,10 +19,12 @@ message RegisterNodeResponse {
message SegIDRequest {
int32 count = 1;
uint32 count = 1;
string channelID = 2;
int64 collectionID = 3;
int64 partitionID = 4;
string coll_name = 5;// todo remove
string partition_name = 6; // todo remove
}
message AssignSegIDRequest {
@ -40,6 +42,8 @@ message SegIDAssignment {
int64 partitionID = 5;
uint64 expire_time = 6;
common.Status status = 7;
string coll_name = 8;// todo remove
string partition_name = 9;// todo remove
}
message AssignSegIDResponse {
@ -79,9 +83,10 @@ message SegmentStatesResponse {
SegmentState state = 1;
uint64 create_time = 2;
uint64 sealed_time = 3;
repeated internal.MsgPosition start_positions = 4;
repeated internal.MsgPosition end_positions = 5;
}
message InsertBinlogPathRequest {
common.MsgBase base = 1;
int64 segmentID = 2;

View File

@ -144,10 +144,12 @@ func (m *RegisterNodeResponse) GetInitParams() *internalpb2.InitParams {
}
type SegIDRequest struct {
Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
ChannelID string `protobuf:"bytes,2,opt,name=channelID,proto3" json:"channelID,omitempty"`
CollectionID int64 `protobuf:"varint,3,opt,name=collectionID,proto3" json:"collectionID,omitempty"`
PartitionID int64 `protobuf:"varint,4,opt,name=partitionID,proto3" json:"partitionID,omitempty"`
CollName string `protobuf:"bytes,5,opt,name=coll_name,json=collName,proto3" json:"coll_name,omitempty"`
PartitionName string `protobuf:"bytes,6,opt,name=partition_name,json=partitionName,proto3" json:"partition_name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -178,7 +180,7 @@ func (m *SegIDRequest) XXX_DiscardUnknown() {
var xxx_messageInfo_SegIDRequest proto.InternalMessageInfo
func (m *SegIDRequest) GetCount() int32 {
func (m *SegIDRequest) GetCount() uint32 {
if m != nil {
return m.Count
}
@ -206,6 +208,20 @@ func (m *SegIDRequest) GetPartitionID() int64 {
return 0
}
func (m *SegIDRequest) GetCollName() string {
if m != nil {
return m.CollName
}
return ""
}
func (m *SegIDRequest) GetPartitionName() string {
if m != nil {
return m.PartitionName
}
return ""
}
type AssignSegIDRequest struct {
NodeID int64 `protobuf:"varint,1,opt,name=nodeID,proto3" json:"nodeID,omitempty"`
PeerRole string `protobuf:"bytes,2,opt,name=peer_role,json=peerRole,proto3" json:"peer_role,omitempty"`
@ -269,6 +285,8 @@ type SegIDAssignment struct {
PartitionID int64 `protobuf:"varint,5,opt,name=partitionID,proto3" json:"partitionID,omitempty"`
ExpireTime uint64 `protobuf:"varint,6,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"`
Status *commonpb.Status `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
CollName string `protobuf:"bytes,8,opt,name=coll_name,json=collName,proto3" json:"coll_name,omitempty"`
PartitionName string `protobuf:"bytes,9,opt,name=partition_name,json=partitionName,proto3" json:"partition_name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -348,6 +366,20 @@ func (m *SegIDAssignment) GetStatus() *commonpb.Status {
return nil
}
func (m *SegIDAssignment) GetCollName() string {
if m != nil {
return m.CollName
}
return ""
}
func (m *SegIDAssignment) GetPartitionName() string {
if m != nil {
return m.PartitionName
}
return ""
}
type AssignSegIDResponse struct {
SegIDAssignments []*SegIDAssignment `protobuf:"bytes,1,rep,name=segIDAssignments,proto3" json:"segIDAssignments,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
@ -584,12 +616,14 @@ func (m *SegmentStatesRequest) GetSegmentID() int64 {
}
type SegmentStatesResponse struct {
State SegmentState `protobuf:"varint,1,opt,name=state,proto3,enum=milvus.proto.data.SegmentState" json:"state,omitempty"`
CreateTime uint64 `protobuf:"varint,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
SealedTime uint64 `protobuf:"varint,3,opt,name=sealed_time,json=sealedTime,proto3" json:"sealed_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
State SegmentState `protobuf:"varint,1,opt,name=state,proto3,enum=milvus.proto.data.SegmentState" json:"state,omitempty"`
CreateTime uint64 `protobuf:"varint,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
SealedTime uint64 `protobuf:"varint,3,opt,name=sealed_time,json=sealedTime,proto3" json:"sealed_time,omitempty"`
StartPositions []*internalpb2.MsgPosition `protobuf:"bytes,4,rep,name=start_positions,json=startPositions,proto3" json:"start_positions,omitempty"`
EndPositions []*internalpb2.MsgPosition `protobuf:"bytes,5,rep,name=end_positions,json=endPositions,proto3" json:"end_positions,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SegmentStatesResponse) Reset() { *m = SegmentStatesResponse{} }
@ -638,6 +672,20 @@ func (m *SegmentStatesResponse) GetSealedTime() uint64 {
return 0
}
func (m *SegmentStatesResponse) GetStartPositions() []*internalpb2.MsgPosition {
if m != nil {
return m.StartPositions
}
return nil
}
func (m *SegmentStatesResponse) GetEndPositions() []*internalpb2.MsgPosition {
if m != nil {
return m.EndPositions
}
return nil
}
type InsertBinlogPathRequest struct {
Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
SegmentID int64 `protobuf:"varint,2,opt,name=segmentID,proto3" json:"segmentID,omitempty"`
@ -1016,73 +1064,78 @@ func init() {
func init() { proto.RegisterFile("data_service.proto", fileDescriptor_3385cd32ad6cfe64) }
var fileDescriptor_3385cd32ad6cfe64 = []byte{
// 1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, 0xaa, 0x55, 0x06, 0xa8, 0x18, 0x37, 0xce,
0x0a, 0x09, 0xa0, 0x73, 0x8e, 0xaa, 0xd4, 0xea, 0xc9, 0xe1, 0x92, 0x9e, 0x3e, 0x9b, 0x3a, 0xbd,
0xa3, 0xe5, 0xc0, 0x3c, 0x50, 0x02, 0xbb, 0xe7, 0xa8, 0x16, 0xda, 0x2a, 0x79, 0x5a, 0xe1, 0xe3,
0x8e, 0x3e, 0xdf, 0xfb, 0xf4, 0x3d, 0xb0, 0xc5, 0x98, 0x2e, 0x6c, 0xe7, 0x31, 0xf3, 0x0a, 0x3a,
0xbc, 0xd3, 0x49, 0xb9, 0xef, 0xf5, 0x96, 0x77, 0x6f, 0x67, 0xe5, 0xec, 0xeb, 0xd7, 0x5f, 0x05,
0x4c, 0x4d, 0xa6, 0xe3, 0x54, 0x1e, 0x27, 0x37, 0x2c, 0x0c, 0xd9, 0x8d, 0x42, 0x6f, 0x72, 0x62,
0xf6, 0x7e, 0xe6, 0x33, 0xa9, 0x12, 0x36, 0x9e, 0x2a, 0xf4, 0x4f, 0x66, 0x1e, 0x4e, 0xb4, 0xc3,
0x93, 0x34, 0x72, 0x3c, 0x1e, 0xaf, 0xea, 0xd5, 0xb3, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe2,
0x16, 0xff, 0x66, 0xbc, 0x0c, 0x00, 0x00,
// 1127 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6e, 0xdb, 0x46,
0x13, 0xb7, 0x44, 0xc9, 0x96, 0x46, 0xb2, 0xa4, 0xac, 0x9d, 0xef, 0x53, 0x94, 0x34, 0x76, 0x09,
0x24, 0x36, 0x82, 0xd6, 0x2e, 0x1c, 0xa4, 0xbd, 0x15, 0x8d, 0xab, 0xd4, 0x10, 0xda, 0x18, 0xc6,
0xaa, 0x40, 0x81, 0xf4, 0x20, 0x50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7,
0x8b, 0x3c, 0x21, 0xc3, 0x93, 0x02, 0x95, 0xcb, 0x8f, 0xb7, 0xde, 0xd3, 0x55, 0xb0, 0xd4, 0xd9,
0x11, 0x34, 0x33, 0xcb, 0x4b, 0x16, 0x1a, 0x58, 0xde, 0xb5, 0x85, 0x06, 0x0a, 0x96, 0xa0, 0xbd,
0x46, 0x3c, 0xe8, 0x9c, 0xa0, 0xca, 0x2d, 0x20, 0xb2, 0xb7, 0x62, 0xd3, 0xcc, 0x77, 0x61, 0x6f,
0x7f, 0x35, 0x30, 0x35, 0x14, 0xc1, 0xf6, 0x09, 0xaa, 0xa5, 0xb1, 0x4a, 0x9e, 0x15, 0xe8, 0xb8,
0x61, 0xce, 0xf7, 0x3e, 0xb9, 0x05, 0x36, 0x6b, 0xd3, 0x81, 0x7b, 0xa9, 0xcd, 0xb4, 0x83, 0xf6,
0x6e, 0x54, 0x92, 0x9f, 0x7b, 0xbd, 0xd5, 0xd3, 0xdb, 0x5e, 0x3b, 0xfe, 0xea, 0xcd, 0x97, 0x1e,
0x53, 0xd3, 0xd9, 0x38, 0xa6, 0xc7, 0xe1, 0x15, 0xf3, 0x7d, 0x76, 0xa5, 0x70, 0x32, 0x3d, 0x34,
0x77, 0x3f, 0x75, 0x99, 0x54, 0x11, 0x1b, 0xcf, 0x14, 0xba, 0x87, 0x73, 0x0d, 0x87, 0x5a, 0xe1,
0x61, 0x6c, 0x39, 0x1c, 0x8f, 0xd7, 0xf5, 0xe9, 0xf9, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0e,
0x0b, 0x09, 0xf1, 0xda, 0x0d, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

View File

@ -2,7 +2,6 @@ syntax = "proto3";
package milvus.proto.etcd;
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/etcdpb";
import "index_builder.proto";
import "common.proto";
import "schema.proto";
@ -13,14 +12,12 @@ message TenantMeta {
string query_channelID = 4;
}
message ProxyMeta {
int64 ID = 1;
common.Address address = 2;
repeated string result_channelIDs = 3;
}
message CollectionMeta {
int64 ID=1;
schema.CollectionSchema schema=2;
@ -53,6 +50,6 @@ message FieldIndexMeta {
int64 fieldID = 2;
int64 indexID = 3;
repeated common.KeyValuePair index_params = 4;
service.IndexStatus status = 5;
common.IndexState state = 5;
repeated string index_file_paths = 6;
}
}

View File

@ -7,7 +7,6 @@ import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
commonpb "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
indexbuilderpb "github.com/zilliztech/milvus-distributed/internal/proto/indexbuilderpb"
schemapb "github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
math "math"
)
@ -379,15 +378,15 @@ func (m *SegmentMeta) GetBinlogFilePaths() []*FieldBinlogFiles {
}
type FieldIndexMeta struct {
SegmentID int64 `protobuf:"varint,1,opt,name=segmentID,proto3" json:"segmentID,omitempty"`
FieldID int64 `protobuf:"varint,2,opt,name=fieldID,proto3" json:"fieldID,omitempty"`
IndexID int64 `protobuf:"varint,3,opt,name=indexID,proto3" json:"indexID,omitempty"`
IndexParams []*commonpb.KeyValuePair `protobuf:"bytes,4,rep,name=index_params,json=indexParams,proto3" json:"index_params,omitempty"`
Status indexbuilderpb.IndexStatus `protobuf:"varint,5,opt,name=status,proto3,enum=milvus.proto.service.IndexStatus" json:"status,omitempty"`
IndexFilePaths []string `protobuf:"bytes,6,rep,name=index_file_paths,json=indexFilePaths,proto3" json:"index_file_paths,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
SegmentID int64 `protobuf:"varint,1,opt,name=segmentID,proto3" json:"segmentID,omitempty"`
FieldID int64 `protobuf:"varint,2,opt,name=fieldID,proto3" json:"fieldID,omitempty"`
IndexID int64 `protobuf:"varint,3,opt,name=indexID,proto3" json:"indexID,omitempty"`
IndexParams []*commonpb.KeyValuePair `protobuf:"bytes,4,rep,name=index_params,json=indexParams,proto3" json:"index_params,omitempty"`
State commonpb.IndexState `protobuf:"varint,5,opt,name=state,proto3,enum=milvus.proto.common.IndexState" json:"state,omitempty"`
IndexFilePaths []string `protobuf:"bytes,6,rep,name=index_file_paths,json=indexFilePaths,proto3" json:"index_file_paths,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *FieldIndexMeta) Reset() { *m = FieldIndexMeta{} }
@ -443,11 +442,11 @@ func (m *FieldIndexMeta) GetIndexParams() []*commonpb.KeyValuePair {
return nil
}
func (m *FieldIndexMeta) GetStatus() indexbuilderpb.IndexStatus {
func (m *FieldIndexMeta) GetState() commonpb.IndexState {
if m != nil {
return m.Status
return m.State
}
return indexbuilderpb.IndexStatus_NONE
return commonpb.IndexState_NONE
}
func (m *FieldIndexMeta) GetIndexFilePaths() []string {
@ -469,51 +468,50 @@ func init() {
func init() { proto.RegisterFile("etcd_meta.proto", fileDescriptor_975d306d62b73e88) }
var fileDescriptor_975d306d62b73e88 = []byte{
// 726 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x4d, 0x6f, 0xea, 0x46,
0x14, 0x15, 0x38, 0x81, 0xf8, 0x42, 0x20, 0x99, 0x6e, 0xdc, 0x34, 0x6d, 0x09, 0x51, 0x5a, 0xa4,
0xaa, 0x20, 0xa5, 0x52, 0xa5, 0x2e, 0x5a, 0xb5, 0x09, 0x8d, 0x84, 0xaa, 0x36, 0xd4, 0xa0, 0x2e,
0xba, 0xb1, 0x06, 0xfb, 0x06, 0x46, 0xf2, 0x8c, 0xe9, 0xcc, 0x38, 0x1f, 0xac, 0xfa, 0x07, 0xde,
0x1f, 0x78, 0x7f, 0xf1, 0xfd, 0x86, 0x27, 0x3d, 0xcd, 0x8c, 0x31, 0x90, 0xc7, 0xe2, 0x2d, 0xe7,
0xdc, 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af, 0xfb, 0x15, 0xca, 0x47,
0x16, 0x63, 0xdf, 0x2e, 0x32, 0xb1, 0xc4, 0xb0, 0x68, 0x20, 0x3d, 0x38, 0x71, 0x02, 0xb6, 0x5c,
0xab, 0xd9, 0xcb, 0xd8, 0xb2, 0x78, 0xe9, 0xc7, 0xcd, 0xaf, 0xff, 0xfe, 0x32, 0x67, 0x7a, 0x91,
0xcf, 0x8c, 0x9e, 0xc1, 0x8a, 0xa5, 0x29, 0x5b, 0x69, 0x8c, 0x17, 0x03, 0xf7, 0xad, 0xef, 0x13,
0xa6, 0xb4, 0x64, 0xb3, 0x5c, 0x63, 0x32, 0x60, 0x42, 0xa3, 0x14, 0x34, 0x1d, 0x58, 0x01, 0x03,
0xe3, 0xf8, 0x72, 0x36, 0xab, 0xd9, 0xd3, 0x0f, 0x1f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x12, 0x8d,
0xcf, 0x40, 0x8e, 0x05, 0x00, 0x00,
// 707 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x41, 0x6f, 0xda, 0x48,
0x14, 0x16, 0x38, 0x40, 0xfc, 0x20, 0x90, 0xcc, 0xc9, 0x9b, 0xcd, 0x6e, 0x08, 0x51, 0x76, 0x91,
0x56, 0x0b, 0x12, 0xab, 0xed, 0xad, 0x55, 0x9b, 0xd0, 0x48, 0xa8, 0x6a, 0x43, 0x0d, 0xea, 0xa1,
0x17, 0x6b, 0xb0, 0x5f, 0x60, 0x24, 0xcf, 0x98, 0x7a, 0xc6, 0x4d, 0xc2, 0xa9, 0xd7, 0xfe, 0x85,
0xfe, 0xc5, 0xfe, 0x86, 0x4a, 0xd5, 0xcc, 0x38, 0x06, 0x5a, 0x0e, 0xbd, 0x79, 0xbe, 0xf7, 0xbd,
0x37, 0xdf, 0xfb, 0xbe, 0x31, 0xb4, 0x50, 0x85, 0x51, 0xc0, 0x51, 0xd1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8, 0x7c, 0xfe, 0xfe, 0xd9, 0x9c, 0xa9, 0x45, 0x36, 0xd3, 0xc3,
0xfa, 0x2b, 0x16, 0xc7, 0x6c, 0xa5, 0x30, 0x5c, 0xf4, 0xed, 0x45, 0xff, 0x46, 0x4c, 0xaa, 0x94,
0xcd, 0x32, 0x85, 0x51, 0x9f, 0x09, 0x85, 0xa9, 0xa0, 0x71, 0xdf, 0xdc, 0xde, 0xd7, 0x6e, 0x2f,
0x67, 0xb3, 0xaa, 0x39, 0xfd, 0xf7, 0x3d, 0x00, 0x00, 0xff, 0xff, 0x57, 0x2c, 0x97, 0xd1, 0x75,
0x05, 0x00, 0x00,
}

View File

@ -1,73 +0,0 @@
syntax = "proto3";
package milvus.proto.service;
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/indexbuilderpb";
import "common.proto";
enum IndexStatus {
NONE = 0;
UNISSUED = 1;
INPROGRESS = 2;
FINISHED = 3;
}
message BuildIndexRequest {
repeated string data_paths=2;
repeated common.KeyValuePair type_params = 3;
repeated common.KeyValuePair index_params = 4;
}
message BuildIndexResponse {
common.Status status = 1;
int64 indexID = 2;
}
message GetIndexFilePathsRequest {
int64 indexID = 1;
}
message GetIndexFilePathsResponse {
common.Status status = 1;
int64 indexID = 2;
repeated string index_file_paths=3;
}
message DescribleIndexRequest {
int64 indexID = 1;
}
message DescribleIndexResponse {
common.Status status = 1;
IndexStatus index_status =2;
int64 indexID = 3;
int64 enque_time = 4;
int64 schedule_time = 5;
int64 build_complete_time = 6;
}
message IndexMeta {
IndexStatus status =1;
int64 indexID = 2;
int64 enque_time = 3;
int64 schedule_time = 4;
int64 build_complete_time = 5;
BuildIndexRequest req = 6;
repeated string index_file_paths=7;
}
service IndexBuildService {
/**
* @brief This method is used to create collection
*
* @param CollectionSchema, use to provide collection information to be created.
*
* @return Status
*/
rpc BuildIndex(BuildIndexRequest) returns (BuildIndexResponse){}
rpc DescribeIndex(DescribleIndexRequest) returns (DescribleIndexResponse){}
rpc GetIndexFilePaths(GetIndexFilePathsRequest) returns (GetIndexFilePathsResponse){}
}

View File

@ -17,22 +17,13 @@ message RegisterNodeResponse {
internal.InitParams init_params = 1;
}
enum IndexState {
NONE = 0;
UNISSUED = 1;
INPROGRESS = 2;
FINISHED = 3;
FAILED = 4;
}
message IndexStatesRequest {
int64 indexID = 1;
}
message IndexStatesResponse {
common.Status status = 1;
IndexState state = 2;
common.IndexState state = 2;
int64 indexID = 3;
}
@ -70,7 +61,7 @@ message IndexFilePathsResponse {
}
message IndexMeta {
IndexState state = 1;
common.IndexState state = 1;
int64 indexID = 2;
int64 enque_time = 3;
int64 schedule_time = 4;

View File

@ -1,679 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: index_builder.proto
package indexbuilderpb
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
commonpb "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type IndexStatus int32
const (
IndexStatus_NONE IndexStatus = 0
IndexStatus_UNISSUED IndexStatus = 1
IndexStatus_INPROGRESS IndexStatus = 2
IndexStatus_FINISHED IndexStatus = 3
)
var IndexStatus_name = map[int32]string{
0: "NONE",
1: "UNISSUED",
2: "INPROGRESS",
3: "FINISHED",
}
var IndexStatus_value = map[string]int32{
"NONE": 0,
"UNISSUED": 1,
"INPROGRESS": 2,
"FINISHED": 3,
}
func (x IndexStatus) String() string {
return proto.EnumName(IndexStatus_name, int32(x))
}
func (IndexStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_c1d6a79d693ba681, []int{0}
}
type BuildIndexRequest struct {
DataPaths []string `protobuf:"bytes,2,rep,name=data_paths,json=dataPaths,proto3" json:"data_paths,omitempty"`
TypeParams []*commonpb.KeyValuePair `protobuf:"bytes,3,rep,name=type_params,json=typeParams,proto3" json:"type_params,omitempty"`
IndexParams []*commonpb.KeyValuePair `protobuf:"bytes,4,rep,name=index_params,json=indexParams,proto3" json:"index_params,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BuildIndexRequest) Reset() { *m = BuildIndexRequest{} }
func (m *BuildIndexRequest) String() string { return proto.CompactTextString(m) }
func (*BuildIndexRequest) ProtoMessage() {}
func (*BuildIndexRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c1d6a79d693ba681, []int{0}
}
func (m *BuildIndexRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BuildIndexRequest.Unmarshal(m, b)
}
func (m *BuildIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BuildIndexRequest.Marshal(b, m, deterministic)
}
func (m *BuildIndexRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_BuildIndexRequest.Merge(m, src)
}
func (m *BuildIndexRequest) XXX_Size() int {
return xxx_messageInfo_BuildIndexRequest.Size(m)
}
func (m *BuildIndexRequest) XXX_DiscardUnknown() {
xxx_messageInfo_BuildIndexRequest.DiscardUnknown(m)
}
var xxx_messageInfo_BuildIndexRequest proto.InternalMessageInfo
func (m *BuildIndexRequest) GetDataPaths() []string {
if m != nil {
return m.DataPaths
}
return nil
}
func (m *BuildIndexRequest) GetTypeParams() []*commonpb.KeyValuePair {
if m != nil {
return m.TypeParams
}
return nil
}
func (m *BuildIndexRequest) GetIndexParams() []*commonpb.KeyValuePair {
if m != nil {
return m.IndexParams
}
return nil
}
type BuildIndexResponse struct {
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
IndexID int64 `protobuf:"varint,2,opt,name=indexID,proto3" json:"indexID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BuildIndexResponse) Reset() { *m = BuildIndexResponse{} }
func (m *BuildIndexResponse) String() string { return proto.CompactTextString(m) }
func (*BuildIndexResponse) ProtoMessage() {}
func (*BuildIndexResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c1d6a79d693ba681, []int{1}
}
func (m *BuildIndexResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BuildIndexResponse.Unmarshal(m, b)
}
func (m *BuildIndexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BuildIndexResponse.Marshal(b, m, deterministic)
}
func (m *BuildIndexResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_BuildIndexResponse.Merge(m, src)
}
func (m *BuildIndexResponse) XXX_Size() int {
return xxx_messageInfo_BuildIndexResponse.Size(m)
}
func (m *BuildIndexResponse) XXX_DiscardUnknown() {
xxx_messageInfo_BuildIndexResponse.DiscardUnknown(m)
}
var xxx_messageInfo_BuildIndexResponse proto.InternalMessageInfo
func (m *BuildIndexResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *BuildIndexResponse) GetIndexID() int64 {
if m != nil {
return m.IndexID
}
return 0
}
type GetIndexFilePathsRequest struct {
IndexID int64 `protobuf:"varint,1,opt,name=indexID,proto3" json:"indexID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetIndexFilePathsRequest) Reset() { *m = GetIndexFilePathsRequest{} }
func (m *GetIndexFilePathsRequest) String() string { return proto.CompactTextString(m) }
func (*GetIndexFilePathsRequest) ProtoMessage() {}
func (*GetIndexFilePathsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c1d6a79d693ba681, []int{2}
}
func (m *GetIndexFilePathsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetIndexFilePathsRequest.Unmarshal(m, b)
}
func (m *GetIndexFilePathsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetIndexFilePathsRequest.Marshal(b, m, deterministic)
}
func (m *GetIndexFilePathsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetIndexFilePathsRequest.Merge(m, src)
}
func (m *GetIndexFilePathsRequest) XXX_Size() int {
return xxx_messageInfo_GetIndexFilePathsRequest.Size(m)
}
func (m *GetIndexFilePathsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetIndexFilePathsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetIndexFilePathsRequest proto.InternalMessageInfo
func (m *GetIndexFilePathsRequest) GetIndexID() int64 {
if m != nil {
return m.IndexID
}
return 0
}
type GetIndexFilePathsResponse struct {
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
IndexID int64 `protobuf:"varint,2,opt,name=indexID,proto3" json:"indexID,omitempty"`
IndexFilePaths []string `protobuf:"bytes,3,rep,name=index_file_paths,json=indexFilePaths,proto3" json:"index_file_paths,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetIndexFilePathsResponse) Reset() { *m = GetIndexFilePathsResponse{} }
func (m *GetIndexFilePathsResponse) String() string { return proto.CompactTextString(m) }
func (*GetIndexFilePathsResponse) ProtoMessage() {}
func (*GetIndexFilePathsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c1d6a79d693ba681, []int{3}
}
func (m *GetIndexFilePathsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetIndexFilePathsResponse.Unmarshal(m, b)
}
func (m *GetIndexFilePathsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetIndexFilePathsResponse.Marshal(b, m, deterministic)
}
func (m *GetIndexFilePathsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetIndexFilePathsResponse.Merge(m, src)
}
func (m *GetIndexFilePathsResponse) XXX_Size() int {
return xxx_messageInfo_GetIndexFilePathsResponse.Size(m)
}
func (m *GetIndexFilePathsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetIndexFilePathsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetIndexFilePathsResponse proto.InternalMessageInfo
func (m *GetIndexFilePathsResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *GetIndexFilePathsResponse) GetIndexID() int64 {
if m != nil {
return m.IndexID
}
return 0
}
func (m *GetIndexFilePathsResponse) GetIndexFilePaths() []string {
if m != nil {
return m.IndexFilePaths
}
return nil
}
type DescribleIndexRequest struct {
IndexID int64 `protobuf:"varint,1,opt,name=indexID,proto3" json:"indexID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DescribleIndexRequest) Reset() { *m = DescribleIndexRequest{} }
func (m *DescribleIndexRequest) String() string { return proto.CompactTextString(m) }
func (*DescribleIndexRequest) ProtoMessage() {}
func (*DescribleIndexRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c1d6a79d693ba681, []int{4}
}
func (m *DescribleIndexRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DescribleIndexRequest.Unmarshal(m, b)
}
func (m *DescribleIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DescribleIndexRequest.Marshal(b, m, deterministic)
}
func (m *DescribleIndexRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DescribleIndexRequest.Merge(m, src)
}
func (m *DescribleIndexRequest) XXX_Size() int {
return xxx_messageInfo_DescribleIndexRequest.Size(m)
}
func (m *DescribleIndexRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DescribleIndexRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DescribleIndexRequest proto.InternalMessageInfo
func (m *DescribleIndexRequest) GetIndexID() int64 {
if m != nil {
return m.IndexID
}
return 0
}
type DescribleIndexResponse struct {
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
IndexStatus IndexStatus `protobuf:"varint,2,opt,name=index_status,json=indexStatus,proto3,enum=milvus.proto.service.IndexStatus" json:"index_status,omitempty"`
IndexID int64 `protobuf:"varint,3,opt,name=indexID,proto3" json:"indexID,omitempty"`
EnqueTime int64 `protobuf:"varint,4,opt,name=enque_time,json=enqueTime,proto3" json:"enque_time,omitempty"`
ScheduleTime int64 `protobuf:"varint,5,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
BuildCompleteTime int64 `protobuf:"varint,6,opt,name=build_complete_time,json=buildCompleteTime,proto3" json:"build_complete_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DescribleIndexResponse) Reset() { *m = DescribleIndexResponse{} }
func (m *DescribleIndexResponse) String() string { return proto.CompactTextString(m) }
func (*DescribleIndexResponse) ProtoMessage() {}
func (*DescribleIndexResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c1d6a79d693ba681, []int{5}
}
func (m *DescribleIndexResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DescribleIndexResponse.Unmarshal(m, b)
}
func (m *DescribleIndexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DescribleIndexResponse.Marshal(b, m, deterministic)
}
func (m *DescribleIndexResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DescribleIndexResponse.Merge(m, src)
}
func (m *DescribleIndexResponse) XXX_Size() int {
return xxx_messageInfo_DescribleIndexResponse.Size(m)
}
func (m *DescribleIndexResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DescribleIndexResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DescribleIndexResponse proto.InternalMessageInfo
func (m *DescribleIndexResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *DescribleIndexResponse) GetIndexStatus() IndexStatus {
if m != nil {
return m.IndexStatus
}
return IndexStatus_NONE
}
func (m *DescribleIndexResponse) GetIndexID() int64 {
if m != nil {
return m.IndexID
}
return 0
}
func (m *DescribleIndexResponse) GetEnqueTime() int64 {
if m != nil {
return m.EnqueTime
}
return 0
}
func (m *DescribleIndexResponse) GetScheduleTime() int64 {
if m != nil {
return m.ScheduleTime
}
return 0
}
func (m *DescribleIndexResponse) GetBuildCompleteTime() int64 {
if m != nil {
return m.BuildCompleteTime
}
return 0
}
type IndexMeta struct {
Status IndexStatus `protobuf:"varint,1,opt,name=status,proto3,enum=milvus.proto.service.IndexStatus" json:"status,omitempty"`
IndexID int64 `protobuf:"varint,2,opt,name=indexID,proto3" json:"indexID,omitempty"`
EnqueTime int64 `protobuf:"varint,3,opt,name=enque_time,json=enqueTime,proto3" json:"enque_time,omitempty"`
ScheduleTime int64 `protobuf:"varint,4,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
BuildCompleteTime int64 `protobuf:"varint,5,opt,name=build_complete_time,json=buildCompleteTime,proto3" json:"build_complete_time,omitempty"`
Req *BuildIndexRequest `protobuf:"bytes,6,opt,name=req,proto3" json:"req,omitempty"`
IndexFilePaths []string `protobuf:"bytes,7,rep,name=index_file_paths,json=indexFilePaths,proto3" json:"index_file_paths,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *IndexMeta) Reset() { *m = IndexMeta{} }
func (m *IndexMeta) String() string { return proto.CompactTextString(m) }
func (*IndexMeta) ProtoMessage() {}
func (*IndexMeta) Descriptor() ([]byte, []int) {
return fileDescriptor_c1d6a79d693ba681, []int{6}
}
func (m *IndexMeta) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IndexMeta.Unmarshal(m, b)
}
func (m *IndexMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IndexMeta.Marshal(b, m, deterministic)
}
func (m *IndexMeta) XXX_Merge(src proto.Message) {
xxx_messageInfo_IndexMeta.Merge(m, src)
}
func (m *IndexMeta) XXX_Size() int {
return xxx_messageInfo_IndexMeta.Size(m)
}
func (m *IndexMeta) XXX_DiscardUnknown() {
xxx_messageInfo_IndexMeta.DiscardUnknown(m)
}
var xxx_messageInfo_IndexMeta proto.InternalMessageInfo
func (m *IndexMeta) GetStatus() IndexStatus {
if m != nil {
return m.Status
}
return IndexStatus_NONE
}
func (m *IndexMeta) GetIndexID() int64 {
if m != nil {
return m.IndexID
}
return 0
}
func (m *IndexMeta) GetEnqueTime() int64 {
if m != nil {
return m.EnqueTime
}
return 0
}
func (m *IndexMeta) GetScheduleTime() int64 {
if m != nil {
return m.ScheduleTime
}
return 0
}
func (m *IndexMeta) GetBuildCompleteTime() int64 {
if m != nil {
return m.BuildCompleteTime
}
return 0
}
func (m *IndexMeta) GetReq() *BuildIndexRequest {
if m != nil {
return m.Req
}
return nil
}
func (m *IndexMeta) GetIndexFilePaths() []string {
if m != nil {
return m.IndexFilePaths
}
return nil
}
func init() {
proto.RegisterEnum("milvus.proto.service.IndexStatus", IndexStatus_name, IndexStatus_value)
proto.RegisterType((*BuildIndexRequest)(nil), "milvus.proto.service.BuildIndexRequest")
proto.RegisterType((*BuildIndexResponse)(nil), "milvus.proto.service.BuildIndexResponse")
proto.RegisterType((*GetIndexFilePathsRequest)(nil), "milvus.proto.service.GetIndexFilePathsRequest")
proto.RegisterType((*GetIndexFilePathsResponse)(nil), "milvus.proto.service.GetIndexFilePathsResponse")
proto.RegisterType((*DescribleIndexRequest)(nil), "milvus.proto.service.DescribleIndexRequest")
proto.RegisterType((*DescribleIndexResponse)(nil), "milvus.proto.service.DescribleIndexResponse")
proto.RegisterType((*IndexMeta)(nil), "milvus.proto.service.IndexMeta")
}
func init() { proto.RegisterFile("index_builder.proto", fileDescriptor_c1d6a79d693ba681) }
var fileDescriptor_c1d6a79d693ba681 = []byte{
// 626 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xdb, 0x6e, 0xd3, 0x4c,
0x10, 0xae, 0xe3, 0xf4, 0x90, 0x49, 0x5a, 0x25, 0xdb, 0xff, 0x47, 0x26, 0xa8, 0x52, 0x08, 0x17,
0x44, 0x1c, 0x12, 0x91, 0x72, 0xd3, 0xdb, 0x36, 0x69, 0x1b, 0x21, 0xd2, 0xc8, 0xa6, 0x5c, 0x70,
0x13, 0xf9, 0x30, 0x90, 0x95, 0xd6, 0x87, 0x7a, 0xd7, 0x15, 0xed, 0x73, 0xf0, 0x02, 0x3c, 0x06,
0x12, 0x8f, 0xc2, 0xc3, 0x20, 0xaf, 0x37, 0xa5, 0x6e, 0x5d, 0xc5, 0x12, 0xe2, 0xd2, 0xb3, 0xdf,
0xf7, 0xcd, 0x7c, 0x33, 0x3b, 0x6b, 0xd8, 0xa5, 0x81, 0x87, 0x5f, 0xe7, 0x4e, 0x42, 0x99, 0x87,
0x71, 0x3f, 0x8a, 0x43, 0x11, 0x92, 0xff, 0x7c, 0xca, 0x2e, 0x13, 0x9e, 0x7d, 0xf5, 0x39, 0xc6,
0x97, 0xd4, 0xc5, 0x76, 0xc3, 0x0d, 0x7d, 0x3f, 0x0c, 0xb2, 0x68, 0xf7, 0xa7, 0x06, 0xad, 0xc3,
0x94, 0x35, 0x49, 0x05, 0x4c, 0xbc, 0x48, 0x90, 0x0b, 0xb2, 0x07, 0xe0, 0xd9, 0xc2, 0x9e, 0x47,
0xb6, 0x58, 0x70, 0xa3, 0xd2, 0xd1, 0x7b, 0x35, 0xb3, 0x96, 0x46, 0x66, 0x69, 0x80, 0x1c, 0x42,
0x5d, 0x5c, 0x45, 0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06, 0x79, 0x59, 0x4c, 0x2e, 0xdc, 0xba, 0xf6, 0xab, 0x72, 0xe0, 0x9b, 0x6c,
0x97, 0xd0, 0xba, 0xf7, 0xa8, 0x90, 0x7e, 0xb1, 0xc8, 0x43, 0x8f, 0x56, 0x7b, 0x50, 0x1a, 0xbf,
0xcc, 0x7b, 0x78, 0xfa, 0xe9, 0xf8, 0x0b, 0x15, 0x8b, 0xc4, 0x49, 0x77, 0x7a, 0x70, 0x4d, 0x19,
0xa3, 0xd7, 0x02, 0xdd, 0xc5, 0x20, 0x53, 0x7a, 0xed, 0x51, 0x2e, 0x62, 0xea, 0x24, 0x02, 0xbd,
0x01, 0x0d, 0x04, 0xc6, 0x81, 0xcd, 0x06, 0x52, 0x7e, 0x20, 0xa7, 0xad, 0xfe, 0x4c, 0x91, 0xe3,
0x6c, 0xc8, 0xe8, 0xfe, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x05, 0xa2, 0xa4, 0x63, 0xb3, 0x06,
0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// IndexBuildServiceClient is the client API for IndexBuildService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type IndexBuildServiceClient interface {
//*
// @brief This method is used to create collection
//
// @param CollectionSchema, use to provide collection information to be created.
//
// @return Status
BuildIndex(ctx context.Context, in *BuildIndexRequest, opts ...grpc.CallOption) (*BuildIndexResponse, error)
DescribeIndex(ctx context.Context, in *DescribleIndexRequest, opts ...grpc.CallOption) (*DescribleIndexResponse, error)
GetIndexFilePaths(ctx context.Context, in *GetIndexFilePathsRequest, opts ...grpc.CallOption) (*GetIndexFilePathsResponse, error)
}
type indexBuildServiceClient struct {
cc *grpc.ClientConn
}
func NewIndexBuildServiceClient(cc *grpc.ClientConn) IndexBuildServiceClient {
return &indexBuildServiceClient{cc}
}
func (c *indexBuildServiceClient) BuildIndex(ctx context.Context, in *BuildIndexRequest, opts ...grpc.CallOption) (*BuildIndexResponse, error) {
out := new(BuildIndexResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.service.IndexBuildService/BuildIndex", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *indexBuildServiceClient) DescribeIndex(ctx context.Context, in *DescribleIndexRequest, opts ...grpc.CallOption) (*DescribleIndexResponse, error) {
out := new(DescribleIndexResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.service.IndexBuildService/DescribeIndex", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *indexBuildServiceClient) GetIndexFilePaths(ctx context.Context, in *GetIndexFilePathsRequest, opts ...grpc.CallOption) (*GetIndexFilePathsResponse, error) {
out := new(GetIndexFilePathsResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.service.IndexBuildService/GetIndexFilePaths", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// IndexBuildServiceServer is the server API for IndexBuildService service.
type IndexBuildServiceServer interface {
//*
// @brief This method is used to create collection
//
// @param CollectionSchema, use to provide collection information to be created.
//
// @return Status
BuildIndex(context.Context, *BuildIndexRequest) (*BuildIndexResponse, error)
DescribeIndex(context.Context, *DescribleIndexRequest) (*DescribleIndexResponse, error)
GetIndexFilePaths(context.Context, *GetIndexFilePathsRequest) (*GetIndexFilePathsResponse, error)
}
// UnimplementedIndexBuildServiceServer can be embedded to have forward compatible implementations.
type UnimplementedIndexBuildServiceServer struct {
}
func (*UnimplementedIndexBuildServiceServer) BuildIndex(ctx context.Context, req *BuildIndexRequest) (*BuildIndexResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BuildIndex not implemented")
}
func (*UnimplementedIndexBuildServiceServer) DescribeIndex(ctx context.Context, req *DescribleIndexRequest) (*DescribleIndexResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DescribeIndex not implemented")
}
func (*UnimplementedIndexBuildServiceServer) GetIndexFilePaths(ctx context.Context, req *GetIndexFilePathsRequest) (*GetIndexFilePathsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetIndexFilePaths not implemented")
}
func RegisterIndexBuildServiceServer(s *grpc.Server, srv IndexBuildServiceServer) {
s.RegisterService(&_IndexBuildService_serviceDesc, srv)
}
func _IndexBuildService_BuildIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BuildIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IndexBuildServiceServer).BuildIndex(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.service.IndexBuildService/BuildIndex",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IndexBuildServiceServer).BuildIndex(ctx, req.(*BuildIndexRequest))
}
return interceptor(ctx, in, info, handler)
}
func _IndexBuildService_DescribeIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DescribleIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IndexBuildServiceServer).DescribeIndex(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.service.IndexBuildService/DescribeIndex",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IndexBuildServiceServer).DescribeIndex(ctx, req.(*DescribleIndexRequest))
}
return interceptor(ctx, in, info, handler)
}
func _IndexBuildService_GetIndexFilePaths_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetIndexFilePathsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IndexBuildServiceServer).GetIndexFilePaths(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.service.IndexBuildService/GetIndexFilePaths",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IndexBuildServiceServer).GetIndexFilePaths(ctx, req.(*GetIndexFilePathsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _IndexBuildService_serviceDesc = grpc.ServiceDesc{
ServiceName: "milvus.proto.service.IndexBuildService",
HandlerType: (*IndexBuildServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "BuildIndex",
Handler: _IndexBuildService_BuildIndex_Handler,
},
{
MethodName: "DescribeIndex",
Handler: _IndexBuildService_DescribeIndex_Handler,
},
{
MethodName: "GetIndexFilePaths",
Handler: _IndexBuildService_GetIndexFilePaths_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "index_builder.proto",
}

View File

@ -26,40 +26,6 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type IndexState int32
const (
IndexState_NONE IndexState = 0
IndexState_UNISSUED IndexState = 1
IndexState_INPROGRESS IndexState = 2
IndexState_FINISHED IndexState = 3
IndexState_FAILED IndexState = 4
)
var IndexState_name = map[int32]string{
0: "NONE",
1: "UNISSUED",
2: "INPROGRESS",
3: "FINISHED",
4: "FAILED",
}
var IndexState_value = map[string]int32{
"NONE": 0,
"UNISSUED": 1,
"INPROGRESS": 2,
"FINISHED": 3,
"FAILED": 4,
}
func (x IndexState) String() string {
return proto.EnumName(IndexState_name, int32(x))
}
func (IndexState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_a5d2036b4df73e0a, []int{0}
}
type RegisterNodeRequest struct {
Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
Address *commonpb.Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
@ -186,12 +152,12 @@ func (m *IndexStatesRequest) GetIndexID() int64 {
}
type IndexStatesResponse struct {
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
State IndexState `protobuf:"varint,2,opt,name=state,proto3,enum=milvus.proto.index.IndexState" json:"state,omitempty"`
IndexID int64 `protobuf:"varint,3,opt,name=indexID,proto3" json:"indexID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
State commonpb.IndexState `protobuf:"varint,2,opt,name=state,proto3,enum=milvus.proto.common.IndexState" json:"state,omitempty"`
IndexID int64 `protobuf:"varint,3,opt,name=indexID,proto3" json:"indexID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *IndexStatesResponse) Reset() { *m = IndexStatesResponse{} }
@ -226,11 +192,11 @@ func (m *IndexStatesResponse) GetStatus() *commonpb.Status {
return nil
}
func (m *IndexStatesResponse) GetState() IndexState {
func (m *IndexStatesResponse) GetState() commonpb.IndexState {
if m != nil {
return m.State
}
return IndexState_NONE
return commonpb.IndexState_NONE
}
func (m *IndexStatesResponse) GetIndexID() int64 {
@ -539,16 +505,16 @@ func (m *IndexFilePathsResponse) GetIndexFilePaths() []string {
}
type IndexMeta struct {
State IndexState `protobuf:"varint,1,opt,name=state,proto3,enum=milvus.proto.index.IndexState" json:"state,omitempty"`
IndexID int64 `protobuf:"varint,2,opt,name=indexID,proto3" json:"indexID,omitempty"`
EnqueTime int64 `protobuf:"varint,3,opt,name=enque_time,json=enqueTime,proto3" json:"enque_time,omitempty"`
ScheduleTime int64 `protobuf:"varint,4,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
BuildCompleteTime int64 `protobuf:"varint,5,opt,name=build_complete_time,json=buildCompleteTime,proto3" json:"build_complete_time,omitempty"`
Req *BuildIndexRequest `protobuf:"bytes,6,opt,name=req,proto3" json:"req,omitempty"`
IndexFilePaths []string `protobuf:"bytes,7,rep,name=index_file_paths,json=indexFilePaths,proto3" json:"index_file_paths,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
State commonpb.IndexState `protobuf:"varint,1,opt,name=state,proto3,enum=milvus.proto.common.IndexState" json:"state,omitempty"`
IndexID int64 `protobuf:"varint,2,opt,name=indexID,proto3" json:"indexID,omitempty"`
EnqueTime int64 `protobuf:"varint,3,opt,name=enque_time,json=enqueTime,proto3" json:"enque_time,omitempty"`
ScheduleTime int64 `protobuf:"varint,4,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
BuildCompleteTime int64 `protobuf:"varint,5,opt,name=build_complete_time,json=buildCompleteTime,proto3" json:"build_complete_time,omitempty"`
Req *BuildIndexRequest `protobuf:"bytes,6,opt,name=req,proto3" json:"req,omitempty"`
IndexFilePaths []string `protobuf:"bytes,7,rep,name=index_file_paths,json=indexFilePaths,proto3" json:"index_file_paths,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *IndexMeta) Reset() { *m = IndexMeta{} }
@ -576,11 +542,11 @@ func (m *IndexMeta) XXX_DiscardUnknown() {
var xxx_messageInfo_IndexMeta proto.InternalMessageInfo
func (m *IndexMeta) GetState() IndexState {
func (m *IndexMeta) GetState() commonpb.IndexState {
if m != nil {
return m.State
}
return IndexState_NONE
return commonpb.IndexState_NONE
}
func (m *IndexMeta) GetIndexID() int64 {
@ -626,7 +592,6 @@ func (m *IndexMeta) GetIndexFilePaths() []string {
}
func init() {
proto.RegisterEnum("milvus.proto.index.IndexState", IndexState_name, IndexState_value)
proto.RegisterType((*RegisterNodeRequest)(nil), "milvus.proto.index.RegisterNodeRequest")
proto.RegisterType((*RegisterNodeResponse)(nil), "milvus.proto.index.RegisterNodeResponse")
proto.RegisterType((*IndexStatesRequest)(nil), "milvus.proto.index.IndexStatesRequest")
@ -643,56 +608,52 @@ func init() {
func init() { proto.RegisterFile("index_service.proto", fileDescriptor_a5d2036b4df73e0a) }
var fileDescriptor_a5d2036b4df73e0a = []byte{
// 780 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x4e, 0xdb, 0x4a,
0x14, 0x26, 0x71, 0x08, 0xe4, 0x10, 0xa2, 0x30, 0x41, 0x57, 0x28, 0xf7, 0x72, 0x05, 0xbe, 0xba,
0x10, 0x21, 0xd5, 0x41, 0xa1, 0x6a, 0x97, 0x15, 0x21, 0x81, 0x5a, 0x2d, 0x26, 0x72, 0x4a, 0x17,
0x54, 0x55, 0xe4, 0xd8, 0x03, 0x19, 0xd5, 0x3f, 0xc1, 0x33, 0x46, 0x85, 0x4d, 0x17, 0x7d, 0x82,
0x6e, 0xfb, 0x18, 0x5d, 0xf7, 0xe1, 0x2a, 0x8f, 0xc7, 0x89, 0x0d, 0x21, 0x81, 0xfe, 0xec, 0xec,
0x33, 0xdf, 0xf9, 0xfb, 0xbe, 0x73, 0x66, 0xa0, 0x42, 0x5c, 0x0b, 0x7f, 0xec, 0x51, 0xec, 0x5f,
0x11, 0x13, 0x2b, 0x43, 0xdf, 0x63, 0x1e, 0x42, 0x0e, 0xb1, 0xaf, 0x02, 0x1a, 0xfd, 0x29, 0x1c,
0x51, 0x2d, 0x9a, 0x9e, 0xe3, 0x78, 0x6e, 0x64, 0xab, 0x96, 0x88, 0xcb, 0xb0, 0xef, 0x1a, 0x76,
0xf4, 0x2f, 0x7f, 0x82, 0x8a, 0x8e, 0x2f, 0x08, 0x65, 0xd8, 0xd7, 0x3c, 0x0b, 0xeb, 0xf8, 0x32,
0xc0, 0x94, 0xa1, 0x5d, 0xc8, 0xf5, 0x0d, 0x8a, 0xd7, 0x32, 0x1b, 0x99, 0xda, 0x52, 0xe3, 0x1f,
0x25, 0x15, 0x57, 0x04, 0x3c, 0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e0, 0xcd, 0xfd, 0xb3, 0x17, 0x17, 0x84, 0x0d, 0x82, 0x7e, 0x78, 0x52, 0xbf, 0x21, 0xb6, 0x4d,
0x6e, 0x18, 0x36, 0x07, 0xf5, 0xc8, 0xeb, 0x89, 0x45, 0x28, 0xf3, 0x49, 0x3f, 0x60, 0xd8, 0xaa,
0xc7, 0x4f, 0x7c, 0x9d, 0x87, 0xaa, 0xf3, 0x6c, 0xc3, 0x7e, 0x3f, 0xcf, 0x7f, 0xf7, 0x7e, 0x04,
0x00, 0x00, 0xff, 0xff, 0x43, 0x20, 0x69, 0x04, 0x06, 0x09, 0x00, 0x00,
// 714 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x4e, 0xdb, 0x40,
0x10, 0x26, 0x24, 0x80, 0x32, 0x84, 0x08, 0x36, 0xa8, 0x42, 0x69, 0x51, 0xc1, 0x55, 0x4b, 0x84,
0x54, 0x07, 0x05, 0xb5, 0x3d, 0x56, 0x04, 0xd4, 0x2a, 0xaa, 0x40, 0xc8, 0x54, 0x3d, 0x50, 0x55,
0xd1, 0xda, 0x1e, 0xc8, 0xaa, 0xfe, 0xc3, 0xbb, 0x46, 0x85, 0x4b, 0x0f, 0x7d, 0x82, 0x9e, 0xfb,
0x18, 0xbd, 0xf6, 0xe1, 0x2a, 0xaf, 0xd7, 0x89, 0x4d, 0x4c, 0x02, 0xfd, 0xb9, 0x79, 0x67, 0xbf,
0x99, 0xf9, 0xe6, 0x9b, 0x9d, 0x31, 0x34, 0x98, 0x67, 0xe3, 0x97, 0x3e, 0xc7, 0xf0, 0x92, 0x59,
0xa8, 0x07, 0xa1, 0x2f, 0x7c, 0x42, 0x5c, 0xe6, 0x5c, 0x46, 0x3c, 0x39, 0xe9, 0x12, 0xd1, 0xac,
0x59, 0xbe, 0xeb, 0xfa, 0x5e, 0x62, 0x6b, 0xd6, 0x99, 0x27,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6d, 0xc6, 0x45, 0xc8, 0xcc, 0x48, 0xa0, 0xdd, 0x4e, 0x7f,
0xca, 0x6d, 0x19, 0xaa, 0x2d, 0xb3, 0x05, 0xa6, 0x39, 0x2f, 0x8f, 0xbb, 0xbf, 0x03, 0x00, 0x00,
0xff, 0xff, 0x89, 0xd5, 0x9c, 0x9e, 0xb8, 0x08, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

View File

@ -4,7 +4,6 @@ option go_package = "github.com/zilliztech/milvus-distributed/internal/proto/int
import "common.proto";
enum StateCode {
INITIALIZING = 0;
HEALTHY = 1;
@ -43,3 +42,154 @@ message TimeTickMsg {
common.MsgBase base = 1;
}
message CreateCollectionRequest {
common.MsgBase base = 1;
string db_name = 2;
string collectionName = 3;
// `schema` is the serialized `schema.CollectionSchema`
int64 dbID = 4;
int64 collectionID = 5;
bytes schema = 6;
}
message DropCollectionRequest {
common.MsgBase base = 1;
string db_name = 2;
string collectionName = 3;
int64 dbID = 4;
int64 collectionID = 5;
}
message CreatePartitionRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
string partition_name = 4;
int64 dbID = 5;
int64 collectionID = 6;
int64 partitionID = 7;
}
message DropPartitionRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
string partition_name = 4;
int64 dbID = 5;
int64 collectionID = 6;
int64 partitionID = 7;
}
message CreateIndexRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
string field_name = 4;
int64 dbID = 5;
int64 collectionID = 6;
int64 fieldID = 7;
repeated common.KeyValuePair extra_params = 8;
}
message InsertRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
string partition_name = 4;
int64 segmentID = 5;
string channelID = 6;
repeated uint64 timestamps = 7;
repeated int64 rowIDs = 8;
repeated common.Blob row_data = 9;
}
message SearchRequest {
common.MsgBase base = 1;
string result_channelID = 2;
common.Blob query = 3;
}
message SearchResults {
common.MsgBase base = 1;
common.Status status = 2;
string result_channelID = 3;
string metric_type = 4;
repeated bytes hits = 5;
}
message DeleteRequest {
common.MsgBase base = 1;
string collection_name = 2;
string channelID = 3;
repeated uint64 timestamps = 4;
repeated int64 primary_keys = 5;
}
message FlushMsg {
common.MsgBase base = 1;
int64 segmentID = 2;
int64 collectionID = 3;
string partitionTag = 4;
}
//message Key2Seg {
// int64 rowID = 1;
// int64 primary_key = 2;
// uint64 timestamp = 3;
// bool is_valid = 4;
// repeated int64 segmentIDs = 5;
//}
//
//
//message Key2SegMsg {
// int64 reqID = 1;
// repeated Key2Seg key2seg = 2;
//}
message LoadIndex {
common.MsgBase base = 1;
int64 segmentID = 2;
string fieldName = 3;
int64 fieldID = 4;
repeated string index_paths = 5;
repeated common.KeyValuePair index_params = 6;
}
message IndexStats {
repeated common.KeyValuePair index_params = 1;
int64 num_related_segments = 2;
}
message FieldStats {
int64 collectionID = 1;
int64 fieldID = 2;
repeated IndexStats index_stats = 3;
}
message SegmentStats {
int64 segmentID = 1;
int64 memory_size = 2;
int64 num_rows = 3;
bool recently_modified = 4;
}
message QueryNodeStats {
common.MsgBase base = 1;
repeated SegmentStats seg_stats = 2;
repeated FieldStats field_stats = 3;
}
message MsgPosition {
string channel_name = 1;
string msgID = 2;
uint64 timestamp = 3;
}

View File

@ -1,316 +0,0 @@
syntax = "proto3";
package milvus.proto.internal;
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/internalpb";
import "common.proto";
import "service_msg.proto";
enum PeerRole {
Master = 0;
Reader = 1;
Writer = 2;
Proxy = 3;
}
message IDRequest {
int64 peerID = 1;
PeerRole role = 2;
uint32 count = 3;
}
message IDResponse {
common.Status status = 1;
int64 ID = 2;
uint32 count = 3;
}
message TsoRequest {
int64 peerID = 1;
PeerRole role = 2;
uint32 count = 3;
}
message TsoResponse {
common.Status status = 1;
uint64 timestamp = 2;
uint32 count = 3;
}
message SegIDRequest {
uint32 count = 1;
int32 channelID = 2;
string coll_name = 3;
string partition_tag = 4;
}
message AssignSegIDRequest {
int64 peerID = 1;
PeerRole role = 2;
repeated SegIDRequest per_channel_req = 3;
}
message SegIDAssignment {
int64 segID = 1;
int32 channelID = 2;
uint32 count = 3;
string coll_name = 4;
string partition_tag = 5;
uint64 expire_time = 6;
common.Status status = 7;
}
message AssignSegIDResponse {
repeated SegIDAssignment per_channel_assignment = 1;
}
message CreateCollectionRequest {
common.MsgType msg_type = 1;
int64 collectionID = 2;
int64 reqID = 3;
uint64 timestamp = 4;
int64 proxyID = 5;
common.Blob schema = 6;
}
message DropCollectionRequest {
common.MsgType msg_type = 1;
int64 collectionID = 2;
int64 reqID = 3;
uint64 timestamp = 4;
int64 proxyID = 5;
service.CollectionName collection_name = 6;
}
message HasCollectionRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
uint64 timestamp = 3;
int64 proxyID = 4;
service.CollectionName collection_name = 5;
}
message DescribeCollectionRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
uint64 timestamp = 3;
int64 proxyID = 4;
service.CollectionName collection_name = 5;
}
message ShowCollectionRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
uint64 timestamp = 3;
int64 proxyID = 4;
}
message CreatePartitionRequest {
common.MsgType msg_type = 1;
int64 collectionID = 2;
int64 partitionID = 3;
int64 reqID = 4;
uint64 timestamp = 5;
int64 proxyID = 6;
service.PartitionName partition_name = 7;
}
message DropPartitionRequest {
common.MsgType msg_type = 1;
int64 collectionID = 2;
int64 partitionID = 3;
int64 reqID = 4;
uint64 timestamp = 5;
int64 proxyID = 6;
service.PartitionName partition_name = 7;
}
message HasPartitionRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
uint64 timestamp = 3;
int64 proxyID = 4;
service.PartitionName partition_name = 5;
}
message DescribePartitionRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
uint64 timestamp = 3;
int64 proxyID = 4;
service.PartitionName partition_name = 5;
}
message ShowPartitionRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
uint64 timestamp = 3;
int64 proxyID = 4;
service.CollectionName collection_name = 5;
}
message InsertRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
string collection_name = 3;
string partition_tag = 4;
int64 segmentID = 5;
int64 channelID = 6;
int64 proxyID = 7;
repeated uint64 timestamps = 8;
repeated int64 rowIDs = 9;
repeated common.Blob row_data = 10;
}
message DeleteRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
string collection_name = 3;
int64 channelID = 4;
int64 proxyID = 5;
repeated uint64 timestamps = 6;
repeated int64 primary_keys = 7;
}
message SearchRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
int64 proxyID = 3;
uint64 timestamp = 4;
int64 result_channelID = 5;
common.Blob query = 6;
}
/**
* @brief Request of DescribePartition
*/
message SysConfigRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
int64 proxyID = 3;
uint64 timestamp = 4;
repeated string keys = 5;
repeated string key_prefixes = 6;
}
message SearchResult {
common.MsgType msg_type = 1;
common.Status status = 2;
int64 reqID = 3;
int64 proxyID = 4;
int64 query_nodeID = 5;
uint64 timestamp = 6;
int64 result_channelID = 7;
repeated bytes hits = 8;
string metric_type = 9;
}
message TimeTickMsg {
common.MsgType msg_type = 1;
int64 peerID = 2;
uint64 timestamp = 3;
}
message FlushMsg {
common.MsgType msg_type = 1;
int64 segmentID = 2;
uint64 timestamp = 3;
int64 collectionID = 4;
string partitionTag = 5;
}
message Key2Seg {
int64 rowID = 1;
int64 primary_key = 2;
uint64 timestamp = 3;
bool is_valid = 4;
repeated int64 segmentIDs = 5;
}
message Key2SegMsg {
int64 reqID = 1;
repeated Key2Seg key2seg = 2;
}
message LoadIndex {
common.MsgType msg_type = 1;
int64 segmentID = 2;
string fieldName = 3;
int64 fieldID = 4;
repeated string index_paths = 5;
repeated common.KeyValuePair index_params = 6;
}
message IndexStats {
repeated common.KeyValuePair index_params = 1;
int64 num_related_segments = 2;
}
message FieldStats {
int64 collectionID = 1;
int64 fieldID = 2;
repeated IndexStats index_stats = 3;
}
message SegmentStats {
int64 segmentID = 1;
int64 memory_size = 2;
int64 num_rows = 3;
bool recently_modified = 4;
}
message QueryNodeStats {
common.MsgType msg_type = 1;
int64 peerID = 2;
repeated SegmentStats seg_stats = 3;
repeated FieldStats field_stats = 4;
}
message CreateIndexRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
uint64 timestamp = 3;
int64 proxyID = 4;
string collection_name = 5;
string field_name = 6;
repeated common.KeyValuePair extra_params = 7;
}
message DescribeIndexRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
uint64 timestamp = 3;
int64 proxyID = 4;
string collection_name = 5;
string field_name = 6;
}
message DescribeIndexProgressRequest {
common.MsgType msg_type = 1;
int64 reqID = 2;
uint64 timestamp = 3;
int64 proxyID = 4;
string collection_name = 5;
string field_name = 6;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,94 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: msg_header.proto
package internalpb
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
commonpb "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type MsgHeader struct {
MsgType commonpb.MsgType `protobuf:"varint,1,opt,name=msg_type,json=msgType,proto3,enum=milvus.proto.common.MsgType" json:"msg_type,omitempty"`
Message *any.Any `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MsgHeader) Reset() { *m = MsgHeader{} }
func (m *MsgHeader) String() string { return proto.CompactTextString(m) }
func (*MsgHeader) ProtoMessage() {}
func (*MsgHeader) Descriptor() ([]byte, []int) {
return fileDescriptor_4712536c36da8833, []int{0}
}
func (m *MsgHeader) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgHeader.Unmarshal(m, b)
}
func (m *MsgHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MsgHeader.Marshal(b, m, deterministic)
}
func (m *MsgHeader) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgHeader.Merge(m, src)
}
func (m *MsgHeader) XXX_Size() int {
return xxx_messageInfo_MsgHeader.Size(m)
}
func (m *MsgHeader) XXX_DiscardUnknown() {
xxx_messageInfo_MsgHeader.DiscardUnknown(m)
}
var xxx_messageInfo_MsgHeader proto.InternalMessageInfo
func (m *MsgHeader) GetMsgType() commonpb.MsgType {
if m != nil {
return m.MsgType
}
return commonpb.MsgType_kNone
}
func (m *MsgHeader) GetMessage() *any.Any {
if m != nil {
return m.Message
}
return nil
}
func init() {
proto.RegisterType((*MsgHeader)(nil), "milvus.proto.internal.MsgHeader")
}
func init() { proto.RegisterFile("msg_header.proto", fileDescriptor_4712536c36da8833) }
var fileDescriptor_4712536c36da8833 = []byte{
// 221 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8f, 0xbd, 0x4b, 0xc4, 0x30,
0x18, 0xc6, 0xc9, 0x0d, 0x9e, 0x46, 0x11, 0x29, 0x0a, 0xe7, 0xe1, 0x70, 0x38, 0x75, 0x31, 0x81,
0x3a, 0x38, 0x5b, 0x1c, 0x5c, 0x6e, 0x29, 0x4e, 0x2e, 0x92, 0xb4, 0xaf, 0x69, 0x20, 0x5f, 0xe4,
0x43, 0x4c, 0xff, 0x7a, 0x69, 0x63, 0x05, 0xb7, 0x3c, 0x4f, 0x5e, 0x7e, 0x3f, 0x1e, 0x7c, 0xa5,
0x83, 0xf8, 0x18, 0x81, 0x0d, 0xe0, 0x89, 0xf3, 0x36, 0xda, 0xea, 0x46, 0x4b, 0xf5, 0x95, 0x42,
0x49, 0x44, 0x9a, 0x08, 0xde, 0x30, 0xb5, 0xbf, 0xe8, 0xad, 0xd6, 0xd6, 0x94, 0x7a, 0x7f, 0x2b,
0xac, 0x15, 0x0a, 0xe8, 0x92, 0x78, 0xfa, 0xa4, 0xcc, 0xe4, 0xf2, 0x75, 0xff, 0x8d, 0xcf, 0x8e,
0x41, 0xbc, 0x2e, 0xc8, 0xea, 0x09, 0x9f, 0xce, 0x82, 0x98, 0x1d, 0xec, 0xd0, 0x01, 0xd5, 0x97,
0xcd, 0x1d, 0xf9, 0xc7, 0xff, 0xa5, 0x1e, 0x83, 0x78, 0xcb, 0x0e, 0xba, 0xad, 0x2e, 0x8f, 0xaa,
0xc1, 0x5b, 0x0d, 0x21, 0x30, 0x01, 0xbb, 0xcd, 0x01, 0xd5, 0xe7, 0xcd, 0x35, 0x29, 0x4a, 0xb2,
0x2a, 0xc9, 0xb3, 0xc9, 0xed, 0xa6, 0x46, 0xdd, 0x7a, 0xd8, 0xbe, 0xbc, 0xb7, 0x42, 0xc6, 0x31,
0xf1, 0x99, 0x4a, 0x27, 0xa9, 0x94, 0x9c, 0x22, 0xf4, 0x23, 0x2d, 0xc6, 0x87, 0x41, 0x86, 0xe8,
0x25, 0x4f, 0x11, 0x06, 0xba, 0xee, 0x2a, 0x0b, 0xfe, 0xa2, 0xe3, 0xfc, 0x64, 0x69, 0x1e, 0x7f,
0x02, 0x00, 0x00, 0xff, 0xff, 0x39, 0x42, 0x97, 0x88, 0x1a, 0x01, 0x00, 0x00,
}

File diff suppressed because it is too large Load Diff

View File

@ -4,10 +4,32 @@ package milvus.proto.master;
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/masterpb";
import "common.proto";
import "internal_msg.proto";
import "service_msg.proto";
import "milvus.proto";
import "data_service.proto";
service Master {
message IDRequest {
common.MsgBase base = 1;
uint32 count = 2;
}
message IDResponse {
common.Status status = 1;
int64 ID = 2;
uint32 count = 3;
}
message TsoRequest {
common.MsgBase base = 1;
uint32 count = 3;
}
message TsoResponse {
common.Status status = 1;
uint64 timestamp = 2;
uint32 count = 3;
}
service MasterService {
/**
* @brief This method is used to create collection
*
@ -15,7 +37,7 @@ service Master {
*
* @return Status
*/
rpc CreateCollection(internal.CreateCollectionRequest) returns (common.Status){}
rpc CreateCollection(milvus.CreateCollectionRequest) returns (common.Status){}
/**
* @brief This method is used to delete collection.
@ -24,7 +46,7 @@ service Master {
*
* @return Status
*/
rpc DropCollection(internal.DropCollectionRequest) returns (common.Status) {}
rpc DropCollection(milvus.DropCollectionRequest) returns (common.Status) {}
/**
* @brief This method is used to test collection existence.
@ -33,7 +55,7 @@ service Master {
*
* @return BoolResponse
*/
rpc HasCollection(internal.HasCollectionRequest) returns (service.BoolResponse) {}
rpc HasCollection(milvus.HasCollectionRequest) returns (milvus.BoolResponse) {}
/**
* @brief This method is used to get collection schema.
@ -42,42 +64,40 @@ service Master {
*
* @return CollectionSchema
*/
rpc DescribeCollection(internal.DescribeCollectionRequest) returns (service.CollectionDescription) {}
rpc DescribeCollection(milvus.DescribeCollectionRequest) returns (milvus.DescribeCollectionResponse) {}
// rpc GetCollectionStatistics(milvus.CollectionStatsRequest) returns (milvus.CollectionStatsResponse) {}
/**
* @brief This method is used to list all collections.
*
* @return StringListResponse, collection name list
*/
rpc ShowCollections(internal.ShowCollectionRequest) returns (service.StringListResponse) {}
rpc ShowCollections(milvus.ShowCollectionRequest) returns (milvus.ShowCollectionResponse) {}
/**
* @brief This method is used to create partition
*
* @return Status
*/
rpc CreatePartition(internal.CreatePartitionRequest) returns (common.Status) {}
rpc CreatePartition(milvus.CreatePartitionRequest) returns (common.Status) {}
/**
* @brief This method is used to drop partition
*
* @return Status
*/
rpc DropPartition(internal.DropPartitionRequest) returns (common.Status) {}
rpc DropPartition(milvus.DropPartitionRequest) returns (common.Status) {}
/**
* @brief This method is used to test partition existence.
*
* @return BoolResponse
*/
rpc HasPartition(internal.HasPartitionRequest) returns (service.BoolResponse) {}
rpc HasPartition(milvus.HasPartitionRequest) returns (milvus.BoolResponse) {}
/**
* @brief This method is used to get basic partition infomation.
*
* @return PartitionDescription
*/
rpc DescribePartition(internal.DescribePartitionRequest) returns (service.PartitionDescription) {}
// rpc GetPartitionStatistics(milvus.PartitionStatsRequest) returns (milvus.PartitionStatsResponse) {}
/**
* @brief This method is used to show partition information
@ -86,24 +106,19 @@ service Master {
*
* @return StringListResponse
*/
rpc ShowPartitions(internal.ShowPartitionRequest) returns (service.StringListResponse) {}
rpc ShowPartitions(milvus.ShowPartitionRequest) returns (milvus.ShowPartitionResponse) {}
rpc DescribeSegment(milvus.DescribeSegmentRequest) returns (milvus.DescribeSegmentResponse) {}
rpc ShowSegments(milvus.ShowSegmentRequest) returns (milvus.ShowSegmentResponse) {}
/**
* @brief This method is used to get system configs
*
* @param SysConfigRequest, keys or key_prefixes of the configs.
*
* @return SysConfigResponse
*/
rpc GetSysConfigs(internal.SysConfigRequest) returns (service.SysConfigResponse) {}
rpc CreateIndex(milvus.CreateIndexRequest) returns (common.Status) {}
rpc DescribeIndex(milvus.DescribeIndexRequest) returns (milvus.DescribeIndexResponse) {}
rpc GetIndexState(milvus.IndexStateRequest) returns (milvus.IndexStateResponse) {}
rpc AllocTimestamp(internal.TsoRequest) returns (internal.TsoResponse) {}
rpc AllocID(internal.IDRequest) returns (internal.IDResponse) {}
rpc AllocTimestamp(TsoRequest) returns (TsoResponse) {}
rpc AllocID(IDRequest) returns (IDResponse) {}
rpc AssignSegmentID(internal.AssignSegIDRequest) returns (internal.AssignSegIDResponse) {}
// todo move to data service
rpc AssignSegmentID(data.AssignSegIDRequest) returns (data.AssignSegIDResponse) {}
rpc CreateIndex(internal.CreateIndexRequest) returns (common.Status) {}
rpc DescribeIndex(internal.DescribeIndexRequest) returns (service.DescribeIndexResponse) {}
rpc DescribeIndexProgress(internal.DescribeIndexProgressRequest) returns (service.BoolResponse) {}
}
}

View File

@ -1,119 +0,0 @@
syntax = "proto3";
package milvus.proto.master;
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/masterpb2";
import "common.proto";
import "milvus.proto";
import "service_msg.proto";
message IDRequest {
common.MsgBase base = 1;
uint32 count = 2;
}
message IDResponse {
common.Status status = 1;
int64 ID = 2;
uint32 count = 3;
}
message TsoRequest {
common.MsgBase base = 1;
uint32 count = 3;
}
message TsoResponse {
common.Status status = 1;
uint64 timestamp = 2;
uint32 count = 3;
}
service MasterService {
/**
* @brief This method is used to create collection
*
* @param CreateCollectionRequest, use to provide collection information to be created.
*
* @return Status
*/
rpc CreateCollection(milvus.CreateCollectionRequest) returns (common.Status){}
/**
* @brief This method is used to delete collection.
*
* @param DropCollectionRequest, collection name is going to be deleted.
*
* @return Status
*/
rpc DropCollection(milvus.DropCollectionRequest) returns (common.Status) {}
/**
* @brief This method is used to test collection existence.
*
* @param HasCollectionRequest, collection name is going to be tested.
*
* @return BoolResponse
*/
rpc HasCollection(milvus.HasCollectionRequest) returns (service.BoolResponse) {}
/**
* @brief This method is used to get collection schema.
*
* @param DescribeCollectionRequest, target collection name.
*
* @return CollectionSchema
*/
rpc DescribeCollection(milvus.DescribeCollectionRequest) returns (milvus.DescribeCollectionResponse) {}
rpc GetCollectionStatistics(milvus.CollectionStatsRequest) returns (milvus.CollectionStatsResponse) {}
/**
* @brief This method is used to list all collections.
*
* @return StringListResponse, collection name list
*/
rpc ShowCollections(milvus.ShowCollectionRequest) returns (milvus.ShowCollectionResponse) {}
/**
* @brief This method is used to create partition
*
* @return Status
*/
rpc CreatePartition(milvus.CreatePartitionRequest) returns (common.Status) {}
/**
* @brief This method is used to drop partition
*
* @return Status
*/
rpc DropPartition(milvus.DropPartitionRequest) returns (common.Status) {}
/**
* @brief This method is used to test partition existence.
*
* @return BoolResponse
*/
rpc HasPartition(milvus.HasPartitionRequest) returns (service.BoolResponse) {}
rpc GetPartitionStatistics(milvus.PartitionStatsRequest) returns (milvus.PartitionStatsResponse) {}
/**
* @brief This method is used to show partition information
*
* @param ShowPartitionRequest, target collection name.
*
* @return StringListResponse
*/
rpc ShowPartitions(milvus.ShowPartitionRequest) returns (milvus.ShowPartitionResponse) {}
rpc CreateIndex(milvus.CreateIndexRequest) returns (common.Status) {}
rpc DescribeIndex(milvus.DescribeIndexRequest) returns (milvus.DescribeIndexResponse) {}
rpc AllocTimestamp(TsoRequest) returns (TsoResponse) {}
rpc AllocID(IDRequest) returns (IDResponse) {}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,959 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: master_service.proto
package masterpb2
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
commonpb "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
milvuspb "github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
servicepb "github.com/zilliztech/milvus-distributed/internal/proto/servicepb"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type IDRequest struct {
Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *IDRequest) Reset() { *m = IDRequest{} }
func (m *IDRequest) String() string { return proto.CompactTextString(m) }
func (*IDRequest) ProtoMessage() {}
func (*IDRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9a501bcba839fe29, []int{0}
}
func (m *IDRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IDRequest.Unmarshal(m, b)
}
func (m *IDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IDRequest.Marshal(b, m, deterministic)
}
func (m *IDRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_IDRequest.Merge(m, src)
}
func (m *IDRequest) XXX_Size() int {
return xxx_messageInfo_IDRequest.Size(m)
}
func (m *IDRequest) XXX_DiscardUnknown() {
xxx_messageInfo_IDRequest.DiscardUnknown(m)
}
var xxx_messageInfo_IDRequest proto.InternalMessageInfo
func (m *IDRequest) GetBase() *commonpb.MsgBase {
if m != nil {
return m.Base
}
return nil
}
func (m *IDRequest) GetCount() uint32 {
if m != nil {
return m.Count
}
return 0
}
type IDResponse struct {
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"`
Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *IDResponse) Reset() { *m = IDResponse{} }
func (m *IDResponse) String() string { return proto.CompactTextString(m) }
func (*IDResponse) ProtoMessage() {}
func (*IDResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9a501bcba839fe29, []int{1}
}
func (m *IDResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IDResponse.Unmarshal(m, b)
}
func (m *IDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IDResponse.Marshal(b, m, deterministic)
}
func (m *IDResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_IDResponse.Merge(m, src)
}
func (m *IDResponse) XXX_Size() int {
return xxx_messageInfo_IDResponse.Size(m)
}
func (m *IDResponse) XXX_DiscardUnknown() {
xxx_messageInfo_IDResponse.DiscardUnknown(m)
}
var xxx_messageInfo_IDResponse proto.InternalMessageInfo
func (m *IDResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *IDResponse) GetID() int64 {
if m != nil {
return m.ID
}
return 0
}
func (m *IDResponse) GetCount() uint32 {
if m != nil {
return m.Count
}
return 0
}
type TsoRequest struct {
Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TsoRequest) Reset() { *m = TsoRequest{} }
func (m *TsoRequest) String() string { return proto.CompactTextString(m) }
func (*TsoRequest) ProtoMessage() {}
func (*TsoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9a501bcba839fe29, []int{2}
}
func (m *TsoRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TsoRequest.Unmarshal(m, b)
}
func (m *TsoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TsoRequest.Marshal(b, m, deterministic)
}
func (m *TsoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_TsoRequest.Merge(m, src)
}
func (m *TsoRequest) XXX_Size() int {
return xxx_messageInfo_TsoRequest.Size(m)
}
func (m *TsoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_TsoRequest.DiscardUnknown(m)
}
var xxx_messageInfo_TsoRequest proto.InternalMessageInfo
func (m *TsoRequest) GetBase() *commonpb.MsgBase {
if m != nil {
return m.Base
}
return nil
}
func (m *TsoRequest) GetCount() uint32 {
if m != nil {
return m.Count
}
return 0
}
type TsoResponse struct {
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TsoResponse) Reset() { *m = TsoResponse{} }
func (m *TsoResponse) String() string { return proto.CompactTextString(m) }
func (*TsoResponse) ProtoMessage() {}
func (*TsoResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9a501bcba839fe29, []int{3}
}
func (m *TsoResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TsoResponse.Unmarshal(m, b)
}
func (m *TsoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TsoResponse.Marshal(b, m, deterministic)
}
func (m *TsoResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_TsoResponse.Merge(m, src)
}
func (m *TsoResponse) XXX_Size() int {
return xxx_messageInfo_TsoResponse.Size(m)
}
func (m *TsoResponse) XXX_DiscardUnknown() {
xxx_messageInfo_TsoResponse.DiscardUnknown(m)
}
var xxx_messageInfo_TsoResponse proto.InternalMessageInfo
func (m *TsoResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *TsoResponse) GetTimestamp() uint64 {
if m != nil {
return m.Timestamp
}
return 0
}
func (m *TsoResponse) GetCount() uint32 {
if m != nil {
return m.Count
}
return 0
}
func init() {
proto.RegisterType((*IDRequest)(nil), "milvus.proto.master.IDRequest")
proto.RegisterType((*IDResponse)(nil), "milvus.proto.master.IDResponse")
proto.RegisterType((*TsoRequest)(nil), "milvus.proto.master.TsoRequest")
proto.RegisterType((*TsoResponse)(nil), "milvus.proto.master.TsoResponse")
}
func init() { proto.RegisterFile("master_service.proto", fileDescriptor_9a501bcba839fe29) }
var fileDescriptor_9a501bcba839fe29 = []byte{
// 598 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0xd9, 0x6e, 0xd3, 0x40,
0x14, 0x86, 0xbb, 0x51, 0xd4, 0x93, 0xa5, 0x30, 0x54, 0x50, 0x99, 0x8a, 0x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, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x7b,
0x9a, 0xb9, 0x24, 0x08, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// MasterServiceClient is the client API for MasterService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type MasterServiceClient interface {
//*
// @brief This method is used to create collection
//
// @param CreateCollectionRequest, use to provide collection information to be created.
//
// @return Status
CreateCollection(ctx context.Context, in *milvuspb.CreateCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
//*
// @brief This method is used to delete collection.
//
// @param DropCollectionRequest, collection name is going to be deleted.
//
// @return Status
DropCollection(ctx context.Context, in *milvuspb.DropCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
//*
// @brief This method is used to test collection existence.
//
// @param HasCollectionRequest, collection name is going to be tested.
//
// @return BoolResponse
HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequest, opts ...grpc.CallOption) (*servicepb.BoolResponse, error)
//*
// @brief This method is used to get collection schema.
//
// @param DescribeCollectionRequest, target collection name.
//
// @return CollectionSchema
DescribeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest, opts ...grpc.CallOption) (*milvuspb.DescribeCollectionResponse, error)
GetCollectionStatistics(ctx context.Context, in *milvuspb.CollectionStatsRequest, opts ...grpc.CallOption) (*milvuspb.CollectionStatsResponse, error)
//*
// @brief This method is used to list all collections.
//
// @return StringListResponse, collection name list
ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionRequest, opts ...grpc.CallOption) (*milvuspb.ShowCollectionResponse, error)
//*
// @brief This method is used to create partition
//
// @return Status
CreatePartition(ctx context.Context, in *milvuspb.CreatePartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
//*
// @brief This method is used to drop partition
//
// @return Status
DropPartition(ctx context.Context, in *milvuspb.DropPartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
//*
// @brief This method is used to test partition existence.
//
// @return BoolResponse
HasPartition(ctx context.Context, in *milvuspb.HasPartitionRequest, opts ...grpc.CallOption) (*servicepb.BoolResponse, error)
GetPartitionStatistics(ctx context.Context, in *milvuspb.PartitionStatsRequest, opts ...grpc.CallOption) (*milvuspb.PartitionStatsResponse, error)
//*
// @brief This method is used to show partition information
//
// @param ShowPartitionRequest, target collection name.
//
// @return StringListResponse
ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionResponse, error)
CreateIndex(ctx context.Context, in *milvuspb.CreateIndexRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRequest, opts ...grpc.CallOption) (*milvuspb.DescribeIndexResponse, error)
AllocTimestamp(ctx context.Context, in *TsoRequest, opts ...grpc.CallOption) (*TsoResponse, error)
AllocID(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*IDResponse, error)
}
type masterServiceClient struct {
cc *grpc.ClientConn
}
func NewMasterServiceClient(cc *grpc.ClientConn) MasterServiceClient {
return &masterServiceClient{cc}
}
func (c *masterServiceClient) CreateCollection(ctx context.Context, in *milvuspb.CreateCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
out := new(commonpb.Status)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/CreateCollection", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) DropCollection(ctx context.Context, in *milvuspb.DropCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
out := new(commonpb.Status)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/DropCollection", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequest, opts ...grpc.CallOption) (*servicepb.BoolResponse, error) {
out := new(servicepb.BoolResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/HasCollection", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) DescribeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest, opts ...grpc.CallOption) (*milvuspb.DescribeCollectionResponse, error) {
out := new(milvuspb.DescribeCollectionResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/DescribeCollection", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) GetCollectionStatistics(ctx context.Context, in *milvuspb.CollectionStatsRequest, opts ...grpc.CallOption) (*milvuspb.CollectionStatsResponse, error) {
out := new(milvuspb.CollectionStatsResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/GetCollectionStatistics", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionRequest, opts ...grpc.CallOption) (*milvuspb.ShowCollectionResponse, error) {
out := new(milvuspb.ShowCollectionResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/ShowCollections", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) CreatePartition(ctx context.Context, in *milvuspb.CreatePartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
out := new(commonpb.Status)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/CreatePartition", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) DropPartition(ctx context.Context, in *milvuspb.DropPartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
out := new(commonpb.Status)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/DropPartition", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) HasPartition(ctx context.Context, in *milvuspb.HasPartitionRequest, opts ...grpc.CallOption) (*servicepb.BoolResponse, error) {
out := new(servicepb.BoolResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/HasPartition", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) GetPartitionStatistics(ctx context.Context, in *milvuspb.PartitionStatsRequest, opts ...grpc.CallOption) (*milvuspb.PartitionStatsResponse, error) {
out := new(milvuspb.PartitionStatsResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/GetPartitionStatistics", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionResponse, error) {
out := new(milvuspb.ShowPartitionResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/ShowPartitions", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) CreateIndex(ctx context.Context, in *milvuspb.CreateIndexRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
out := new(commonpb.Status)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/CreateIndex", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRequest, opts ...grpc.CallOption) (*milvuspb.DescribeIndexResponse, error) {
out := new(milvuspb.DescribeIndexResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/DescribeIndex", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) AllocTimestamp(ctx context.Context, in *TsoRequest, opts ...grpc.CallOption) (*TsoResponse, error) {
out := new(TsoResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/AllocTimestamp", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) AllocID(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*IDResponse, error) {
out := new(IDResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/AllocID", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MasterServiceServer is the server API for MasterService service.
type MasterServiceServer interface {
//*
// @brief This method is used to create collection
//
// @param CreateCollectionRequest, use to provide collection information to be created.
//
// @return Status
CreateCollection(context.Context, *milvuspb.CreateCollectionRequest) (*commonpb.Status, error)
//*
// @brief This method is used to delete collection.
//
// @param DropCollectionRequest, collection name is going to be deleted.
//
// @return Status
DropCollection(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error)
//*
// @brief This method is used to test collection existence.
//
// @param HasCollectionRequest, collection name is going to be tested.
//
// @return BoolResponse
HasCollection(context.Context, *milvuspb.HasCollectionRequest) (*servicepb.BoolResponse, error)
//*
// @brief This method is used to get collection schema.
//
// @param DescribeCollectionRequest, target collection name.
//
// @return CollectionSchema
DescribeCollection(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)
GetCollectionStatistics(context.Context, *milvuspb.CollectionStatsRequest) (*milvuspb.CollectionStatsResponse, error)
//*
// @brief This method is used to list all collections.
//
// @return StringListResponse, collection name list
ShowCollections(context.Context, *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error)
//*
// @brief This method is used to create partition
//
// @return Status
CreatePartition(context.Context, *milvuspb.CreatePartitionRequest) (*commonpb.Status, error)
//*
// @brief This method is used to drop partition
//
// @return Status
DropPartition(context.Context, *milvuspb.DropPartitionRequest) (*commonpb.Status, error)
//*
// @brief This method is used to test partition existence.
//
// @return BoolResponse
HasPartition(context.Context, *milvuspb.HasPartitionRequest) (*servicepb.BoolResponse, error)
GetPartitionStatistics(context.Context, *milvuspb.PartitionStatsRequest) (*milvuspb.PartitionStatsResponse, error)
//*
// @brief This method is used to show partition information
//
// @param ShowPartitionRequest, target collection name.
//
// @return StringListResponse
ShowPartitions(context.Context, *milvuspb.ShowPartitionRequest) (*milvuspb.ShowPartitionResponse, error)
CreateIndex(context.Context, *milvuspb.CreateIndexRequest) (*commonpb.Status, error)
DescribeIndex(context.Context, *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error)
AllocTimestamp(context.Context, *TsoRequest) (*TsoResponse, error)
AllocID(context.Context, *IDRequest) (*IDResponse, error)
}
// UnimplementedMasterServiceServer can be embedded to have forward compatible implementations.
type UnimplementedMasterServiceServer struct {
}
func (*UnimplementedMasterServiceServer) CreateCollection(ctx context.Context, req *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateCollection not implemented")
}
func (*UnimplementedMasterServiceServer) DropCollection(ctx context.Context, req *milvuspb.DropCollectionRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method DropCollection not implemented")
}
func (*UnimplementedMasterServiceServer) HasCollection(ctx context.Context, req *milvuspb.HasCollectionRequest) (*servicepb.BoolResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HasCollection not implemented")
}
func (*UnimplementedMasterServiceServer) DescribeCollection(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DescribeCollection not implemented")
}
func (*UnimplementedMasterServiceServer) GetCollectionStatistics(ctx context.Context, req *milvuspb.CollectionStatsRequest) (*milvuspb.CollectionStatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCollectionStatistics not implemented")
}
func (*UnimplementedMasterServiceServer) ShowCollections(ctx context.Context, req *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ShowCollections not implemented")
}
func (*UnimplementedMasterServiceServer) CreatePartition(ctx context.Context, req *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreatePartition not implemented")
}
func (*UnimplementedMasterServiceServer) DropPartition(ctx context.Context, req *milvuspb.DropPartitionRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method DropPartition not implemented")
}
func (*UnimplementedMasterServiceServer) HasPartition(ctx context.Context, req *milvuspb.HasPartitionRequest) (*servicepb.BoolResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HasPartition not implemented")
}
func (*UnimplementedMasterServiceServer) GetPartitionStatistics(ctx context.Context, req *milvuspb.PartitionStatsRequest) (*milvuspb.PartitionStatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPartitionStatistics not implemented")
}
func (*UnimplementedMasterServiceServer) ShowPartitions(ctx context.Context, req *milvuspb.ShowPartitionRequest) (*milvuspb.ShowPartitionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ShowPartitions not implemented")
}
func (*UnimplementedMasterServiceServer) CreateIndex(ctx context.Context, req *milvuspb.CreateIndexRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateIndex not implemented")
}
func (*UnimplementedMasterServiceServer) DescribeIndex(ctx context.Context, req *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DescribeIndex not implemented")
}
func (*UnimplementedMasterServiceServer) AllocTimestamp(ctx context.Context, req *TsoRequest) (*TsoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AllocTimestamp not implemented")
}
func (*UnimplementedMasterServiceServer) AllocID(ctx context.Context, req *IDRequest) (*IDResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AllocID not implemented")
}
func RegisterMasterServiceServer(s *grpc.Server, srv MasterServiceServer) {
s.RegisterService(&_MasterService_serviceDesc, srv)
}
func _MasterService_CreateCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.CreateCollectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).CreateCollection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/CreateCollection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).CreateCollection(ctx, req.(*milvuspb.CreateCollectionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_DropCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.DropCollectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).DropCollection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/DropCollection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).DropCollection(ctx, req.(*milvuspb.DropCollectionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_HasCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.HasCollectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).HasCollection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/HasCollection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).HasCollection(ctx, req.(*milvuspb.HasCollectionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_DescribeCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.DescribeCollectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).DescribeCollection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/DescribeCollection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).DescribeCollection(ctx, req.(*milvuspb.DescribeCollectionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_GetCollectionStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.CollectionStatsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).GetCollectionStatistics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/GetCollectionStatistics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).GetCollectionStatistics(ctx, req.(*milvuspb.CollectionStatsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_ShowCollections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.ShowCollectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).ShowCollections(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/ShowCollections",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).ShowCollections(ctx, req.(*milvuspb.ShowCollectionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_CreatePartition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.CreatePartitionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).CreatePartition(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/CreatePartition",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).CreatePartition(ctx, req.(*milvuspb.CreatePartitionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_DropPartition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.DropPartitionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).DropPartition(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/DropPartition",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).DropPartition(ctx, req.(*milvuspb.DropPartitionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_HasPartition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.HasPartitionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).HasPartition(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/HasPartition",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).HasPartition(ctx, req.(*milvuspb.HasPartitionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_GetPartitionStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.PartitionStatsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).GetPartitionStatistics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/GetPartitionStatistics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).GetPartitionStatistics(ctx, req.(*milvuspb.PartitionStatsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_ShowPartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.ShowPartitionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).ShowPartitions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/ShowPartitions",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).ShowPartitions(ctx, req.(*milvuspb.ShowPartitionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_CreateIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.CreateIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).CreateIndex(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/CreateIndex",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).CreateIndex(ctx, req.(*milvuspb.CreateIndexRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_DescribeIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.DescribeIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).DescribeIndex(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/DescribeIndex",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).DescribeIndex(ctx, req.(*milvuspb.DescribeIndexRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_AllocTimestamp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TsoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).AllocTimestamp(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/AllocTimestamp",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).AllocTimestamp(ctx, req.(*TsoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_AllocID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).AllocID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/AllocID",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).AllocID(ctx, req.(*IDRequest))
}
return interceptor(ctx, in, info, handler)
}
var _MasterService_serviceDesc = grpc.ServiceDesc{
ServiceName: "milvus.proto.master.MasterService",
HandlerType: (*MasterServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateCollection",
Handler: _MasterService_CreateCollection_Handler,
},
{
MethodName: "DropCollection",
Handler: _MasterService_DropCollection_Handler,
},
{
MethodName: "HasCollection",
Handler: _MasterService_HasCollection_Handler,
},
{
MethodName: "DescribeCollection",
Handler: _MasterService_DescribeCollection_Handler,
},
{
MethodName: "GetCollectionStatistics",
Handler: _MasterService_GetCollectionStatistics_Handler,
},
{
MethodName: "ShowCollections",
Handler: _MasterService_ShowCollections_Handler,
},
{
MethodName: "CreatePartition",
Handler: _MasterService_CreatePartition_Handler,
},
{
MethodName: "DropPartition",
Handler: _MasterService_DropPartition_Handler,
},
{
MethodName: "HasPartition",
Handler: _MasterService_HasPartition_Handler,
},
{
MethodName: "GetPartitionStatistics",
Handler: _MasterService_GetPartitionStatistics_Handler,
},
{
MethodName: "ShowPartitions",
Handler: _MasterService_ShowPartitions_Handler,
},
{
MethodName: "CreateIndex",
Handler: _MasterService_CreateIndex_Handler,
},
{
MethodName: "DescribeIndex",
Handler: _MasterService_DescribeIndex_Handler,
},
{
MethodName: "AllocTimestamp",
Handler: _MasterService_AllocTimestamp_Handler,
},
{
MethodName: "AllocID",
Handler: _MasterService_AllocID_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "master_service.proto",
}

View File

@ -130,13 +130,36 @@ message ShowPartitionRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
int64 collectionID = 4;
}
message ShowPartitionResponse {
repeated string partition_names = 1;
common.Status status = 2;
repeated string partition_names = 1;
repeated int64 partitionIDs = 2;
common.Status status = 3;
}
message DescribeSegmentRequest {
common.MsgBase base = 1;
int64 collectionID = 2;
int64 segmentID = 3;
}
message DescribeSegmentResponse {
common.Status status = 1;
int64 indexID = 2;
}
message ShowSegmentRequest {
common.MsgBase base = 1;
int64 collectionID = 2;
int64 partitionID = 3;
}
message ShowSegmentResponse {
common.Status status = 1;
repeated int64 segmentIDs = 2;
}
message CreateIndexRequest {
common.MsgBase base = 1;
@ -151,6 +174,7 @@ message DescribeIndexRequest {
string db_name = 2;
string collection_name = 3;
string field_name = 4;
string index_name = 5;
}
message IndexDescription {
@ -159,8 +183,21 @@ message IndexDescription {
}
message DescribeIndexResponse {
repeated IndexDescription index_descriptions = 1;
common.Status status = 2;
common.Status status = 1;
repeated IndexDescription index_descriptions = 2;
}
message IndexStateRequest {
common.MsgBase base = 1;
string db_name = 2 ;
string collection_name = 3;
string field_name = 4;
string index_name = 5;
}
message IndexStateResponse {
common.Status status = 1;
common.IndexState state = 2;
}
message InsertRequest {
@ -211,7 +248,7 @@ message Hits {
repeated float scores = 3;
}
message QueryResult {
message SearchResults {
common.Status status = 1;
repeated bytes hits = 2;
}
@ -242,8 +279,9 @@ service MilvusService {
rpc CreateIndex(CreateIndexRequest) returns (common.Status) {}
rpc DescribeIndex(DescribeIndexRequest) returns (DescribeIndexResponse) {}
rpc GetIndexState(IndexStateRequest) returns (IndexStateResponse) {}
rpc Insert(InsertRequest) returns (InsertResponse) {}
rpc Search(SearchRequest) returns (QueryResult) {}
rpc Search(SearchRequest) returns (SearchResults) {}
rpc Flush(FlushRequest) returns (common.Status) {}
}

View File

@ -1112,6 +1112,7 @@ type ShowPartitionRequest 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"`
CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"`
CollectionID int64 `protobuf:"varint,4,opt,name=collectionID,proto3" json:"collectionID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1163,9 +1164,17 @@ func (m *ShowPartitionRequest) GetCollectionName() string {
return ""
}
func (m *ShowPartitionRequest) GetCollectionID() int64 {
if m != nil {
return m.CollectionID
}
return 0
}
type ShowPartitionResponse struct {
PartitionNames []string `protobuf:"bytes,1,rep,name=partition_names,json=partitionNames,proto3" json:"partition_names,omitempty"`
Status *commonpb.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
PartitionIDs []int64 `protobuf:"varint,2,rep,packed,name=partitionIDs,proto3" json:"partitionIDs,omitempty"`
Status *commonpb.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1203,6 +1212,13 @@ func (m *ShowPartitionResponse) GetPartitionNames() []string {
return nil
}
func (m *ShowPartitionResponse) GetPartitionIDs() []int64 {
if m != nil {
return m.PartitionIDs
}
return nil
}
func (m *ShowPartitionResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
@ -1210,6 +1226,210 @@ func (m *ShowPartitionResponse) GetStatus() *commonpb.Status {
return nil
}
type DescribeSegmentRequest struct {
Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
CollectionID int64 `protobuf:"varint,2,opt,name=collectionID,proto3" json:"collectionID,omitempty"`
SegmentID int64 `protobuf:"varint,3,opt,name=segmentID,proto3" json:"segmentID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DescribeSegmentRequest) Reset() { *m = DescribeSegmentRequest{} }
func (m *DescribeSegmentRequest) String() string { return proto.CompactTextString(m) }
func (*DescribeSegmentRequest) ProtoMessage() {}
func (*DescribeSegmentRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{21}
}
func (m *DescribeSegmentRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DescribeSegmentRequest.Unmarshal(m, b)
}
func (m *DescribeSegmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DescribeSegmentRequest.Marshal(b, m, deterministic)
}
func (m *DescribeSegmentRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DescribeSegmentRequest.Merge(m, src)
}
func (m *DescribeSegmentRequest) XXX_Size() int {
return xxx_messageInfo_DescribeSegmentRequest.Size(m)
}
func (m *DescribeSegmentRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DescribeSegmentRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DescribeSegmentRequest proto.InternalMessageInfo
func (m *DescribeSegmentRequest) GetBase() *commonpb.MsgBase {
if m != nil {
return m.Base
}
return nil
}
func (m *DescribeSegmentRequest) GetCollectionID() int64 {
if m != nil {
return m.CollectionID
}
return 0
}
func (m *DescribeSegmentRequest) GetSegmentID() int64 {
if m != nil {
return m.SegmentID
}
return 0
}
type DescribeSegmentResponse struct {
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
IndexID int64 `protobuf:"varint,2,opt,name=indexID,proto3" json:"indexID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DescribeSegmentResponse) Reset() { *m = DescribeSegmentResponse{} }
func (m *DescribeSegmentResponse) String() string { return proto.CompactTextString(m) }
func (*DescribeSegmentResponse) ProtoMessage() {}
func (*DescribeSegmentResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{22}
}
func (m *DescribeSegmentResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DescribeSegmentResponse.Unmarshal(m, b)
}
func (m *DescribeSegmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DescribeSegmentResponse.Marshal(b, m, deterministic)
}
func (m *DescribeSegmentResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DescribeSegmentResponse.Merge(m, src)
}
func (m *DescribeSegmentResponse) XXX_Size() int {
return xxx_messageInfo_DescribeSegmentResponse.Size(m)
}
func (m *DescribeSegmentResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DescribeSegmentResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DescribeSegmentResponse proto.InternalMessageInfo
func (m *DescribeSegmentResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *DescribeSegmentResponse) GetIndexID() int64 {
if m != nil {
return m.IndexID
}
return 0
}
type ShowSegmentRequest struct {
Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
CollectionID int64 `protobuf:"varint,2,opt,name=collectionID,proto3" json:"collectionID,omitempty"`
PartitionID int64 `protobuf:"varint,3,opt,name=partitionID,proto3" json:"partitionID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ShowSegmentRequest) Reset() { *m = ShowSegmentRequest{} }
func (m *ShowSegmentRequest) String() string { return proto.CompactTextString(m) }
func (*ShowSegmentRequest) ProtoMessage() {}
func (*ShowSegmentRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{23}
}
func (m *ShowSegmentRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ShowSegmentRequest.Unmarshal(m, b)
}
func (m *ShowSegmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ShowSegmentRequest.Marshal(b, m, deterministic)
}
func (m *ShowSegmentRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ShowSegmentRequest.Merge(m, src)
}
func (m *ShowSegmentRequest) XXX_Size() int {
return xxx_messageInfo_ShowSegmentRequest.Size(m)
}
func (m *ShowSegmentRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ShowSegmentRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ShowSegmentRequest proto.InternalMessageInfo
func (m *ShowSegmentRequest) GetBase() *commonpb.MsgBase {
if m != nil {
return m.Base
}
return nil
}
func (m *ShowSegmentRequest) GetCollectionID() int64 {
if m != nil {
return m.CollectionID
}
return 0
}
func (m *ShowSegmentRequest) GetPartitionID() int64 {
if m != nil {
return m.PartitionID
}
return 0
}
type ShowSegmentResponse struct {
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
SegmentIDs []int64 `protobuf:"varint,2,rep,packed,name=segmentIDs,proto3" json:"segmentIDs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ShowSegmentResponse) Reset() { *m = ShowSegmentResponse{} }
func (m *ShowSegmentResponse) String() string { return proto.CompactTextString(m) }
func (*ShowSegmentResponse) ProtoMessage() {}
func (*ShowSegmentResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{24}
}
func (m *ShowSegmentResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ShowSegmentResponse.Unmarshal(m, b)
}
func (m *ShowSegmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ShowSegmentResponse.Marshal(b, m, deterministic)
}
func (m *ShowSegmentResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ShowSegmentResponse.Merge(m, src)
}
func (m *ShowSegmentResponse) XXX_Size() int {
return xxx_messageInfo_ShowSegmentResponse.Size(m)
}
func (m *ShowSegmentResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ShowSegmentResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ShowSegmentResponse proto.InternalMessageInfo
func (m *ShowSegmentResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *ShowSegmentResponse) GetSegmentIDs() []int64 {
if m != nil {
return m.SegmentIDs
}
return nil
}
type CreateIndexRequest 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"`
@ -1225,7 +1445,7 @@ func (m *CreateIndexRequest) Reset() { *m = CreateIndexRequest{} }
func (m *CreateIndexRequest) String() string { return proto.CompactTextString(m) }
func (*CreateIndexRequest) ProtoMessage() {}
func (*CreateIndexRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{21}
return fileDescriptor_02345ba45cc0e303, []int{25}
}
func (m *CreateIndexRequest) XXX_Unmarshal(b []byte) error {
@ -1286,6 +1506,7 @@ type DescribeIndexRequest struct {
DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"`
CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"`
FieldName string `protobuf:"bytes,4,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"`
IndexName string `protobuf:"bytes,5,opt,name=index_name,json=indexName,proto3" json:"index_name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1295,7 +1516,7 @@ func (m *DescribeIndexRequest) Reset() { *m = DescribeIndexRequest{} }
func (m *DescribeIndexRequest) String() string { return proto.CompactTextString(m) }
func (*DescribeIndexRequest) ProtoMessage() {}
func (*DescribeIndexRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{22}
return fileDescriptor_02345ba45cc0e303, []int{26}
}
func (m *DescribeIndexRequest) XXX_Unmarshal(b []byte) error {
@ -1344,6 +1565,13 @@ func (m *DescribeIndexRequest) GetFieldName() string {
return ""
}
func (m *DescribeIndexRequest) GetIndexName() string {
if m != nil {
return m.IndexName
}
return ""
}
type IndexDescription struct {
IndexName string `protobuf:"bytes,1,opt,name=index_name,json=indexName,proto3" json:"index_name,omitempty"`
Params []*commonpb.KeyValuePair `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"`
@ -1356,7 +1584,7 @@ func (m *IndexDescription) Reset() { *m = IndexDescription{} }
func (m *IndexDescription) String() string { return proto.CompactTextString(m) }
func (*IndexDescription) ProtoMessage() {}
func (*IndexDescription) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{23}
return fileDescriptor_02345ba45cc0e303, []int{27}
}
func (m *IndexDescription) XXX_Unmarshal(b []byte) error {
@ -1392,8 +1620,8 @@ func (m *IndexDescription) GetParams() []*commonpb.KeyValuePair {
}
type DescribeIndexResponse struct {
IndexDescriptions []*IndexDescription `protobuf:"bytes,1,rep,name=index_descriptions,json=indexDescriptions,proto3" json:"index_descriptions,omitempty"`
Status *commonpb.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
IndexDescriptions []*IndexDescription `protobuf:"bytes,2,rep,name=index_descriptions,json=indexDescriptions,proto3" json:"index_descriptions,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1403,7 +1631,7 @@ func (m *DescribeIndexResponse) Reset() { *m = DescribeIndexResponse{} }
func (m *DescribeIndexResponse) String() string { return proto.CompactTextString(m) }
func (*DescribeIndexResponse) ProtoMessage() {}
func (*DescribeIndexResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{24}
return fileDescriptor_02345ba45cc0e303, []int{28}
}
func (m *DescribeIndexResponse) XXX_Unmarshal(b []byte) error {
@ -1424,6 +1652,13 @@ func (m *DescribeIndexResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_DescribeIndexResponse proto.InternalMessageInfo
func (m *DescribeIndexResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *DescribeIndexResponse) GetIndexDescriptions() []*IndexDescription {
if m != nil {
return m.IndexDescriptions
@ -1431,13 +1666,124 @@ func (m *DescribeIndexResponse) GetIndexDescriptions() []*IndexDescription {
return nil
}
func (m *DescribeIndexResponse) GetStatus() *commonpb.Status {
type IndexStateRequest 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"`
CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"`
FieldName string `protobuf:"bytes,4,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"`
IndexName string `protobuf:"bytes,5,opt,name=index_name,json=indexName,proto3" json:"index_name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *IndexStateRequest) Reset() { *m = IndexStateRequest{} }
func (m *IndexStateRequest) String() string { return proto.CompactTextString(m) }
func (*IndexStateRequest) ProtoMessage() {}
func (*IndexStateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{29}
}
func (m *IndexStateRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IndexStateRequest.Unmarshal(m, b)
}
func (m *IndexStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IndexStateRequest.Marshal(b, m, deterministic)
}
func (m *IndexStateRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_IndexStateRequest.Merge(m, src)
}
func (m *IndexStateRequest) XXX_Size() int {
return xxx_messageInfo_IndexStateRequest.Size(m)
}
func (m *IndexStateRequest) XXX_DiscardUnknown() {
xxx_messageInfo_IndexStateRequest.DiscardUnknown(m)
}
var xxx_messageInfo_IndexStateRequest proto.InternalMessageInfo
func (m *IndexStateRequest) GetBase() *commonpb.MsgBase {
if m != nil {
return m.Base
}
return nil
}
func (m *IndexStateRequest) GetDbName() string {
if m != nil {
return m.DbName
}
return ""
}
func (m *IndexStateRequest) GetCollectionName() string {
if m != nil {
return m.CollectionName
}
return ""
}
func (m *IndexStateRequest) GetFieldName() string {
if m != nil {
return m.FieldName
}
return ""
}
func (m *IndexStateRequest) GetIndexName() string {
if m != nil {
return m.IndexName
}
return ""
}
type IndexStateResponse struct {
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
State commonpb.IndexState `protobuf:"varint,2,opt,name=state,proto3,enum=milvus.proto.common.IndexState" json:"state,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *IndexStateResponse) Reset() { *m = IndexStateResponse{} }
func (m *IndexStateResponse) String() string { return proto.CompactTextString(m) }
func (*IndexStateResponse) ProtoMessage() {}
func (*IndexStateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{30}
}
func (m *IndexStateResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IndexStateResponse.Unmarshal(m, b)
}
func (m *IndexStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IndexStateResponse.Marshal(b, m, deterministic)
}
func (m *IndexStateResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_IndexStateResponse.Merge(m, src)
}
func (m *IndexStateResponse) XXX_Size() int {
return xxx_messageInfo_IndexStateResponse.Size(m)
}
func (m *IndexStateResponse) XXX_DiscardUnknown() {
xxx_messageInfo_IndexStateResponse.DiscardUnknown(m)
}
var xxx_messageInfo_IndexStateResponse proto.InternalMessageInfo
func (m *IndexStateResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *IndexStateResponse) GetState() commonpb.IndexState {
if m != nil {
return m.State
}
return commonpb.IndexState_NONE
}
type InsertRequest 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"`
@ -1454,7 +1800,7 @@ func (m *InsertRequest) Reset() { *m = InsertRequest{} }
func (m *InsertRequest) String() string { return proto.CompactTextString(m) }
func (*InsertRequest) ProtoMessage() {}
func (*InsertRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{25}
return fileDescriptor_02345ba45cc0e303, []int{31}
}
func (m *InsertRequest) XXX_Unmarshal(b []byte) error {
@ -1530,7 +1876,7 @@ func (m *InsertResponse) Reset() { *m = InsertResponse{} }
func (m *InsertResponse) String() string { return proto.CompactTextString(m) }
func (*InsertResponse) ProtoMessage() {}
func (*InsertResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{26}
return fileDescriptor_02345ba45cc0e303, []int{32}
}
func (m *InsertResponse) XXX_Unmarshal(b []byte) error {
@ -1586,7 +1932,7 @@ func (m *PlaceholderValue) Reset() { *m = PlaceholderValue{} }
func (m *PlaceholderValue) String() string { return proto.CompactTextString(m) }
func (*PlaceholderValue) ProtoMessage() {}
func (*PlaceholderValue) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{27}
return fileDescriptor_02345ba45cc0e303, []int{33}
}
func (m *PlaceholderValue) XXX_Unmarshal(b []byte) error {
@ -1639,7 +1985,7 @@ func (m *PlaceholderGroup) Reset() { *m = PlaceholderGroup{} }
func (m *PlaceholderGroup) String() string { return proto.CompactTextString(m) }
func (*PlaceholderGroup) ProtoMessage() {}
func (*PlaceholderGroup) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{28}
return fileDescriptor_02345ba45cc0e303, []int{34}
}
func (m *PlaceholderGroup) XXX_Unmarshal(b []byte) error {
@ -1684,7 +2030,7 @@ func (m *SearchRequest) Reset() { *m = SearchRequest{} }
func (m *SearchRequest) String() string { return proto.CompactTextString(m) }
func (*SearchRequest) ProtoMessage() {}
func (*SearchRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{29}
return fileDescriptor_02345ba45cc0e303, []int{35}
}
func (m *SearchRequest) XXX_Unmarshal(b []byte) error {
@ -1760,7 +2106,7 @@ func (m *Hits) Reset() { *m = Hits{} }
func (m *Hits) String() string { return proto.CompactTextString(m) }
func (*Hits) ProtoMessage() {}
func (*Hits) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{30}
return fileDescriptor_02345ba45cc0e303, []int{36}
}
func (m *Hits) XXX_Unmarshal(b []byte) error {
@ -1802,7 +2148,7 @@ func (m *Hits) GetScores() []float32 {
return nil
}
type QueryResult struct {
type SearchResults struct {
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
Hits [][]byte `protobuf:"bytes,2,rep,name=hits,proto3" json:"hits,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
@ -1810,39 +2156,39 @@ type QueryResult struct {
XXX_sizecache int32 `json:"-"`
}
func (m *QueryResult) Reset() { *m = QueryResult{} }
func (m *QueryResult) String() string { return proto.CompactTextString(m) }
func (*QueryResult) ProtoMessage() {}
func (*QueryResult) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{31}
func (m *SearchResults) Reset() { *m = SearchResults{} }
func (m *SearchResults) String() string { return proto.CompactTextString(m) }
func (*SearchResults) ProtoMessage() {}
func (*SearchResults) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{37}
}
func (m *QueryResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryResult.Unmarshal(m, b)
func (m *SearchResults) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SearchResults.Unmarshal(m, b)
}
func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic)
func (m *SearchResults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SearchResults.Marshal(b, m, deterministic)
}
func (m *QueryResult) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryResult.Merge(m, src)
func (m *SearchResults) XXX_Merge(src proto.Message) {
xxx_messageInfo_SearchResults.Merge(m, src)
}
func (m *QueryResult) XXX_Size() int {
return xxx_messageInfo_QueryResult.Size(m)
func (m *SearchResults) XXX_Size() int {
return xxx_messageInfo_SearchResults.Size(m)
}
func (m *QueryResult) XXX_DiscardUnknown() {
xxx_messageInfo_QueryResult.DiscardUnknown(m)
func (m *SearchResults) XXX_DiscardUnknown() {
xxx_messageInfo_SearchResults.DiscardUnknown(m)
}
var xxx_messageInfo_QueryResult proto.InternalMessageInfo
var xxx_messageInfo_SearchResults proto.InternalMessageInfo
func (m *QueryResult) GetStatus() *commonpb.Status {
func (m *SearchResults) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *QueryResult) GetHits() [][]byte {
func (m *SearchResults) GetHits() [][]byte {
if m != nil {
return m.Hits
}
@ -1862,7 +2208,7 @@ func (m *FlushRequest) Reset() { *m = FlushRequest{} }
func (m *FlushRequest) String() string { return proto.CompactTextString(m) }
func (*FlushRequest) ProtoMessage() {}
func (*FlushRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{32}
return fileDescriptor_02345ba45cc0e303, []int{38}
}
func (m *FlushRequest) XXX_Unmarshal(b []byte) error {
@ -1927,112 +2273,129 @@ func init() {
proto.RegisterType((*PartitionStatsResponse)(nil), "milvus.proto.milvus.PartitionStatsResponse")
proto.RegisterType((*ShowPartitionRequest)(nil), "milvus.proto.milvus.ShowPartitionRequest")
proto.RegisterType((*ShowPartitionResponse)(nil), "milvus.proto.milvus.ShowPartitionResponse")
proto.RegisterType((*DescribeSegmentRequest)(nil), "milvus.proto.milvus.DescribeSegmentRequest")
proto.RegisterType((*DescribeSegmentResponse)(nil), "milvus.proto.milvus.DescribeSegmentResponse")
proto.RegisterType((*ShowSegmentRequest)(nil), "milvus.proto.milvus.ShowSegmentRequest")
proto.RegisterType((*ShowSegmentResponse)(nil), "milvus.proto.milvus.ShowSegmentResponse")
proto.RegisterType((*CreateIndexRequest)(nil), "milvus.proto.milvus.CreateIndexRequest")
proto.RegisterType((*DescribeIndexRequest)(nil), "milvus.proto.milvus.DescribeIndexRequest")
proto.RegisterType((*IndexDescription)(nil), "milvus.proto.milvus.IndexDescription")
proto.RegisterType((*DescribeIndexResponse)(nil), "milvus.proto.milvus.DescribeIndexResponse")
proto.RegisterType((*IndexStateRequest)(nil), "milvus.proto.milvus.IndexStateRequest")
proto.RegisterType((*IndexStateResponse)(nil), "milvus.proto.milvus.IndexStateResponse")
proto.RegisterType((*InsertRequest)(nil), "milvus.proto.milvus.InsertRequest")
proto.RegisterType((*InsertResponse)(nil), "milvus.proto.milvus.InsertResponse")
proto.RegisterType((*PlaceholderValue)(nil), "milvus.proto.milvus.PlaceholderValue")
proto.RegisterType((*PlaceholderGroup)(nil), "milvus.proto.milvus.PlaceholderGroup")
proto.RegisterType((*SearchRequest)(nil), "milvus.proto.milvus.SearchRequest")
proto.RegisterType((*Hits)(nil), "milvus.proto.milvus.Hits")
proto.RegisterType((*QueryResult)(nil), "milvus.proto.milvus.QueryResult")
proto.RegisterType((*SearchResults)(nil), "milvus.proto.milvus.SearchResults")
proto.RegisterType((*FlushRequest)(nil), "milvus.proto.milvus.FlushRequest")
}
func init() { proto.RegisterFile("milvus.proto", fileDescriptor_02345ba45cc0e303) }
var fileDescriptor_02345ba45cc0e303 = []byte{
// 1405 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xdd, 0x6f, 0x1b, 0x45,
0x10, 0xcf, 0xc5, 0x8e, 0x9b, 0x4c, 0xfc, 0x95, 0x6d, 0x93, 0xb8, 0x2e, 0x88, 0xf4, 0xa0, 0xd4,
0xfd, 0x4a, 0x50, 0x8a, 0x04, 0x3c, 0x20, 0xb5, 0x6e, 0xfa, 0x61, 0xb5, 0x4d, 0xc3, 0x25, 0x54,
0x0a, 0xa8, 0x32, 0x6b, 0xdf, 0x12, 0x9f, 0x38, 0xfb, 0x8e, 0xdb, 0x75, 0x52, 0xf7, 0x11, 0x24,
0x90, 0x00, 0x01, 0x7f, 0x03, 0xe2, 0x85, 0x37, 0x28, 0x52, 0xff, 0x29, 0xc4, 0x9f, 0x80, 0x84,
0xf6, 0xa3, 0x97, 0xbb, 0xeb, 0x5e, 0x6c, 0x82, 0x2a, 0xbb, 0x6f, 0xde, 0xf1, 0xcc, 0xec, 0x6f,
0x67, 0x7e, 0xbb, 0x37, 0x33, 0x90, 0xef, 0x3a, 0xee, 0x7e, 0x9f, 0xae, 0xfa, 0x81, 0xc7, 0x3c,
0x74, 0x32, 0xba, 0x5a, 0x95, 0x8b, 0x6a, 0xbe, 0xed, 0x75, 0xbb, 0x5e, 0x4f, 0x0a, 0xab, 0x79,
0xda, 0xee, 0x90, 0x2e, 0x96, 0x2b, 0xf3, 0x57, 0x03, 0x96, 0x6f, 0x04, 0x04, 0x33, 0x72, 0xc3,
0x73, 0x5d, 0xd2, 0x66, 0x8e, 0xd7, 0xb3, 0xc8, 0x97, 0x7d, 0x42, 0x19, 0x7a, 0x07, 0xb2, 0x2d,
0x4c, 0x49, 0xc5, 0x58, 0x31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c3, 0xc2, 0xd6, 0x81, 0x42, 0xac, 0x6e,
0x4f, 0x63, 0xab, 0xa6, 0xeb, 0x49, 0x39, 0x80, 0xb6, 0x0d, 0x30, 0xa7, 0xd0, 0x36, 0xe4, 0x64,
0xf1, 0x89, 0xcc, 0x94, 0xb2, 0x3f, 0x52, 0x99, 0x57, 0xdf, 0x3c, 0x52, 0x27, 0x74, 0xba, 0x05,
0x39, 0x59, 0x74, 0xa5, 0x38, 0x8d, 0x55, 0x64, 0xd5, 0x15, 0xad, 0x4e, 0xa4, 0xf6, 0x30, 0xa7,
0x50, 0x03, 0x66, 0x44, 0xcd, 0x80, 0xf4, 0x57, 0x26, 0x5a, 0x4f, 0x0c, 0x89, 0x6d, 0xbd, 0xfe,
0xc9, 0xb5, 0x3d, 0x87, 0x75, 0xfa, 0x2d, 0xfe, 0xcf, 0xda, 0x13, 0xc7, 0x75, 0x9d, 0x27, 0x8c,
0xb4, 0x3b, 0x6b, 0xd2, 0xea, 0x8a, 0xed, 0x50, 0x16, 0x38, 0xad, 0x3e, 0x23, 0xf6, 0x9a, 0xd3,
0x63, 0x24, 0xe8, 0x61, 0x77, 0x4d, 0xb8, 0x52, 0x1a, 0x7e, 0xab, 0x95, 0x13, 0xeb, 0xab, 0xff,
0x06, 0x00, 0x00, 0xff, 0xff, 0xae, 0xb8, 0xc8, 0x82, 0xce, 0x1b, 0x00, 0x00,
// 1575 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xdd, 0x6e, 0x1b, 0x45,
0x14, 0xce, 0xd8, 0x8e, 0x9b, 0x9c, 0xd8, 0x8e, 0x33, 0xf9, 0x73, 0xdd, 0x96, 0xa6, 0x0b, 0x6d,
0xdc, 0xbf, 0x04, 0xa5, 0x20, 0xe0, 0x02, 0xa9, 0x75, 0xdd, 0xa6, 0x56, 0xdb, 0x34, 0x5a, 0x87,
0x8a, 0x80, 0x2a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c, 0xfd, 0x89, 0x4d, 0xeb, 0x8d, 0x55, 0x67, 0xd7, 0x55, 0x4d,
0x67, 0xb6, 0xa5, 0xd7, 0x3a, 0x36, 0xd5, 0x56, 0xf5, 0x96, 0x4d, 0xad, 0x16, 0x31, 0x56, 0x85,
0x29, 0x57, 0xa3, 0x5d, 0xab, 0x25, 0xc5, 0xfa, 0xda, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa4,
0x89, 0x87, 0x99, 0xdd, 0x1f, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -2064,8 +2427,9 @@ type MilvusServiceClient interface {
ShowPartitions(ctx context.Context, in *ShowPartitionRequest, opts ...grpc.CallOption) (*ShowPartitionResponse, error)
CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
DescribeIndex(ctx context.Context, in *DescribeIndexRequest, opts ...grpc.CallOption) (*DescribeIndexResponse, error)
GetIndexState(ctx context.Context, in *IndexStateRequest, opts ...grpc.CallOption) (*IndexStateResponse, error)
Insert(ctx context.Context, in *InsertRequest, opts ...grpc.CallOption) (*InsertResponse, error)
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*QueryResult, error)
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResults, error)
Flush(ctx context.Context, in *FlushRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
}
@ -2230,6 +2594,15 @@ func (c *milvusServiceClient) DescribeIndex(ctx context.Context, in *DescribeInd
return out, nil
}
func (c *milvusServiceClient) GetIndexState(ctx context.Context, in *IndexStateRequest, opts ...grpc.CallOption) (*IndexStateResponse, error) {
out := new(IndexStateResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/GetIndexState", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *milvusServiceClient) Insert(ctx context.Context, in *InsertRequest, opts ...grpc.CallOption) (*InsertResponse, error) {
out := new(InsertResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/Insert", in, out, opts...)
@ -2239,8 +2612,8 @@ func (c *milvusServiceClient) Insert(ctx context.Context, in *InsertRequest, opt
return out, nil
}
func (c *milvusServiceClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*QueryResult, error) {
out := new(QueryResult)
func (c *milvusServiceClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResults, error) {
out := new(SearchResults)
err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/Search", in, out, opts...)
if err != nil {
return nil, err
@ -2276,8 +2649,9 @@ type MilvusServiceServer interface {
ShowPartitions(context.Context, *ShowPartitionRequest) (*ShowPartitionResponse, error)
CreateIndex(context.Context, *CreateIndexRequest) (*commonpb.Status, error)
DescribeIndex(context.Context, *DescribeIndexRequest) (*DescribeIndexResponse, error)
GetIndexState(context.Context, *IndexStateRequest) (*IndexStateResponse, error)
Insert(context.Context, *InsertRequest) (*InsertResponse, error)
Search(context.Context, *SearchRequest) (*QueryResult, error)
Search(context.Context, *SearchRequest) (*SearchResults, error)
Flush(context.Context, *FlushRequest) (*commonpb.Status, error)
}
@ -2336,10 +2710,13 @@ func (*UnimplementedMilvusServiceServer) CreateIndex(ctx context.Context, req *C
func (*UnimplementedMilvusServiceServer) DescribeIndex(ctx context.Context, req *DescribeIndexRequest) (*DescribeIndexResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DescribeIndex not implemented")
}
func (*UnimplementedMilvusServiceServer) GetIndexState(ctx context.Context, req *IndexStateRequest) (*IndexStateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetIndexState not implemented")
}
func (*UnimplementedMilvusServiceServer) Insert(ctx context.Context, req *InsertRequest) (*InsertResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Insert not implemented")
}
func (*UnimplementedMilvusServiceServer) Search(ctx context.Context, req *SearchRequest) (*QueryResult, error) {
func (*UnimplementedMilvusServiceServer) Search(ctx context.Context, req *SearchRequest) (*SearchResults, error) {
return nil, status.Errorf(codes.Unimplemented, "method Search not implemented")
}
func (*UnimplementedMilvusServiceServer) Flush(ctx context.Context, req *FlushRequest) (*commonpb.Status, error) {
@ -2656,6 +3033,24 @@ func _MilvusService_DescribeIndex_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
func _MilvusService_GetIndexState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IndexStateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MilvusServiceServer).GetIndexState(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.milvus.MilvusService/GetIndexState",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MilvusServiceServer).GetIndexState(ctx, req.(*IndexStateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MilvusService_Insert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InsertRequest)
if err := dec(in); err != nil {
@ -2782,6 +3177,10 @@ var _MilvusService_serviceDesc = grpc.ServiceDesc{
MethodName: "DescribeIndex",
Handler: _MilvusService_DescribeIndex_Handler,
},
{
MethodName: "GetIndexState",
Handler: _MilvusService_GetIndexState_Handler,
},
{
MethodName: "Insert",
Handler: _MilvusService_Insert_Handler,

View File

@ -1,13 +0,0 @@
syntax = "proto3";
package milvus.proto.internal;
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/internalpb";
import "common.proto";
import "google/protobuf/any.proto";
message MsgHeader {
common.MsgType msg_type = 1;
google.protobuf.Any message = 2[lazy=true];
}

View File

@ -3,13 +3,16 @@ package proxynode
import (
"context"
"errors"
"strconv"
"log"
"time"
"github.com/opentracing/opentracing-go"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/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/proto/servicepb"
)
@ -31,18 +34,21 @@ func (p *Proxy) Insert(ctx context.Context, in *servicepb.RowBatch) (*servicepb.
BaseMsg: msgstream.BaseMsg{
HashValues: in.HashKeys,
},
InsertRequest: internalpb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: 0,
},
CollectionName: in.CollectionName,
PartitionTag: in.PartitionTag,
PartitionName: in.PartitionTag,
RowData: in.RowData,
},
},
manipulationMsgStream: p.manipulationMsgStream,
rowIDAllocator: p.idAllocator,
}
if len(it.PartitionTag) <= 0 {
it.PartitionTag = Params.defaultPartitionTag()
if len(it.PartitionName) <= 0 {
it.PartitionName = Params.defaultPartitionTag()
}
var cancel func()
@ -86,9 +92,10 @@ func (p *Proxy) CreateCollection(ctx context.Context, req *schemapb.CollectionSc
log.Println("create collection: ", req)
cct := &CreateCollectionTask{
Condition: NewTaskCondition(ctx),
CreateCollectionRequest: internalpb.CreateCollectionRequest{
MsgType: commonpb.MsgType_kCreateCollection,
Schema: &commonpb.Blob{},
CreateCollectionRequest: milvuspb.CreateCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreateCollection,
},
},
masterClient: p.masterClient,
schema: req,
@ -131,15 +138,18 @@ func (p *Proxy) Search(ctx context.Context, req *servicepb.Query) (*servicepb.Qu
span.SetTag("partition tag", req.PartitionTags)
span.SetTag("dsl", req.Dsl)
log.Println("search: ", req.CollectionName, req.Dsl)
qt := &QueryTask{
qt := &SearchTask{
ctx: ctx,
Condition: NewTaskCondition(ctx),
SearchRequest: internalpb.SearchRequest{
ProxyID: Params.ProxyID(),
ResultChannelID: Params.ProxyID(),
SearchRequest: internalpb2.SearchRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearch,
SourceID: Params.ProxyID(),
},
ResultChannelID: strconv.FormatInt(Params.ProxyID(), 10),
},
queryMsgStream: p.queryMsgStream,
resultBuf: make(chan []*internalpb.SearchResult),
resultBuf: make(chan []*internalpb2.SearchResults),
query: req,
}
var cancel func()
@ -182,9 +192,12 @@ func (p *Proxy) DropCollection(ctx context.Context, req *servicepb.CollectionNam
log.Println("drop collection: ", req)
dct := &DropCollectionTask{
Condition: NewTaskCondition(ctx),
DropCollectionRequest: internalpb.DropCollectionRequest{
MsgType: commonpb.MsgType_kDropCollection,
CollectionName: req,
DropCollectionRequest: milvuspb.DropCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropCollection,
SourceID: Params.ProxyID(),
},
CollectionName: req.CollectionName,
},
masterClient: p.masterClient,
}
@ -223,9 +236,12 @@ func (p *Proxy) HasCollection(ctx context.Context, req *servicepb.CollectionName
log.Println("has collection: ", req)
hct := &HasCollectionTask{
Condition: NewTaskCondition(ctx),
HasCollectionRequest: internalpb.HasCollectionRequest{
MsgType: commonpb.MsgType_kHasCollection,
CollectionName: req,
HasCollectionRequest: milvuspb.HasCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kHasCollection,
SourceID: Params.ProxyID(),
},
CollectionName: req.CollectionName,
},
masterClient: p.masterClient,
}
@ -268,9 +284,11 @@ func (p *Proxy) DescribeCollection(ctx context.Context, req *servicepb.Collectio
log.Println("describe collection: ", req)
dct := &DescribeCollectionTask{
Condition: NewTaskCondition(ctx),
DescribeCollectionRequest: internalpb.DescribeCollectionRequest{
MsgType: commonpb.MsgType_kDescribeCollection,
CollectionName: req,
DescribeCollectionRequest: milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection,
},
CollectionName: req.CollectionName,
},
masterClient: p.masterClient,
}
@ -313,8 +331,11 @@ func (p *Proxy) ShowCollections(ctx context.Context, req *commonpb.Empty) (*serv
log.Println("show collections")
sct := &ShowCollectionsTask{
Condition: NewTaskCondition(ctx),
ShowCollectionRequest: internalpb.ShowCollectionRequest{
MsgType: commonpb.MsgType_kDescribeCollection,
ShowCollectionRequest: milvuspb.ShowCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowCollections,
SourceID: Params.ProxyID(),
},
},
masterClient: p.masterClient,
}
@ -357,12 +378,13 @@ func (p *Proxy) CreatePartition(ctx context.Context, in *servicepb.PartitionName
log.Println("create partition", in)
cpt := &CreatePartitionTask{
Condition: NewTaskCondition(ctx),
CreatePartitionRequest: internalpb.CreatePartitionRequest{
MsgType: commonpb.MsgType_kCreatePartition,
ReqID: 0,
Timestamp: 0,
ProxyID: 0,
PartitionName: in,
CreatePartitionRequest: milvuspb.CreatePartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreatePartition,
SourceID: Params.ProxyID(),
},
CollectionName: in.CollectionName,
PartitionName: in.Tag,
//TODO, ReqID,Timestamp,ProxyID
},
masterClient: p.masterClient,
@ -403,12 +425,13 @@ func (p *Proxy) DropPartition(ctx context.Context, in *servicepb.PartitionName)
log.Println("drop partition: ", in)
dpt := &DropPartitionTask{
Condition: NewTaskCondition(ctx),
DropPartitionRequest: internalpb.DropPartitionRequest{
MsgType: commonpb.MsgType_kDropPartition,
ReqID: 0,
Timestamp: 0,
ProxyID: 0,
PartitionName: in,
DropPartitionRequest: milvuspb.DropPartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropPartition,
SourceID: Params.ProxyID(),
},
CollectionName: in.CollectionName,
PartitionName: in.Tag,
//TODO, ReqID,Timestamp,ProxyID
},
masterClient: p.masterClient,
@ -450,12 +473,13 @@ func (p *Proxy) HasPartition(ctx context.Context, in *servicepb.PartitionName) (
log.Println("has partition: ", in)
hpt := &HasPartitionTask{
Condition: NewTaskCondition(ctx),
HasPartitionRequest: internalpb.HasPartitionRequest{
MsgType: commonpb.MsgType_kHasPartition,
ReqID: 0,
Timestamp: 0,
ProxyID: 0,
PartitionName: in,
HasPartitionRequest: milvuspb.HasPartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kHasPartition,
SourceID: Params.ProxyID(),
},
CollectionName: in.CollectionName,
PartitionName: in.Tag,
//TODO, ReqID,Timestamp,ProxyID
},
masterClient: p.masterClient,
@ -501,69 +525,83 @@ func (p *Proxy) HasPartition(ctx context.Context, in *servicepb.PartitionName) (
func (p *Proxy) DescribePartition(ctx context.Context, in *servicepb.PartitionName) (*servicepb.PartitionDescription, error) {
log.Println("describe partition: ", in)
dpt := &DescribePartitionTask{
Condition: NewTaskCondition(ctx),
DescribePartitionRequest: internalpb.DescribePartitionRequest{
MsgType: commonpb.MsgType_kDescribePartition,
ReqID: 0,
Timestamp: 0,
ProxyID: 0,
PartitionName: in,
//TODO, ReqID,Timestamp,ProxyID
return &servicepb.PartitionDescription{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: "Deprecated!",
},
masterClient: p.masterClient,
result: nil,
ctx: nil,
}
Name: in,
Statistics: nil,
}, nil
var cancel func()
dpt.ctx, cancel = context.WithTimeout(ctx, reqTimeoutInterval)
defer cancel()
err := func() error {
select {
case <-ctx.Done():
return errors.New("describe partion timeout")
default:
return p.sched.DdQueue.Enqueue(dpt)
}
}()
if err != nil {
return &servicepb.PartitionDescription{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: err.Error(),
},
Name: in,
Statistics: nil,
}, nil
}
err = dpt.WaitToFinish()
if err != nil {
return &servicepb.PartitionDescription{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: err.Error(),
},
Name: in,
Statistics: nil,
}, nil
}
return dpt.result, nil
}
//func (p *Proxy) DescribePartition2(ctx context.Context, in *servicepb.PartitionName) (*servicepb.PartitionDescription, error) {
// log.Println("describe partition: ", in)
// dpt := &DescribePartitionTask{
// Condition: NewTaskCondition(ctx),
// DescribePartitionRequest: internalpb.DescribePartitionRequest{
// MsgType: commonpb.MsgType_kDescribePartition,
// ReqID: 0,
// Timestamp: 0,
// ProxyID: 0,
// PartitionName: in,
// //TODO, ReqID,Timestamp,ProxyID
// },
// masterClient: p.masterClient,
// result: nil,
// ctx: nil,
// }
//
// var cancel func()
// dpt.ctx, cancel = context.WithTimeout(ctx, reqTimeoutInterval)
// defer cancel()
//
// err := func() error {
// select {
// case <-ctx.Done():
// return errors.New("describe partion timeout")
// default:
// return p.sched.DdQueue.Enqueue(dpt)
// }
// }()
//
// if err != nil {
// return &servicepb.PartitionDescription{
// Status: &commonpb.Status{
// ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
// Reason: err.Error(),
// },
// Name: in,
// Statistics: nil,
// }, nil
// }
//
// err = dpt.WaitToFinish()
// if err != nil {
// return &servicepb.PartitionDescription{
// Status: &commonpb.Status{
// ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
// Reason: err.Error(),
// },
// Name: in,
// Statistics: nil,
// }, nil
// }
// return dpt.result, nil
//}
func (p *Proxy) ShowPartitions(ctx context.Context, req *servicepb.CollectionName) (*servicepb.StringListResponse, error) {
log.Println("show partitions: ", req)
spt := &ShowPartitionsTask{
Condition: NewTaskCondition(ctx),
ShowPartitionRequest: internalpb.ShowPartitionRequest{
MsgType: commonpb.MsgType_kShowPartitions,
ReqID: 0,
Timestamp: 0,
ProxyID: 0,
CollectionName: req,
ShowPartitionRequest: milvuspb.ShowPartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kShowPartitions,
SourceID: Params.ProxyID(),
},
CollectionName: req.CollectionName,
},
masterClient: p.masterClient,
result: nil,
@ -610,8 +648,11 @@ func (p *Proxy) CreateIndex(ctx context.Context, indexParam *servicepb.IndexPara
log.Println("create index for: ", indexParam.FieldName)
cit := &CreateIndexTask{
Condition: NewTaskCondition(ctx),
CreateIndexRequest: internalpb.CreateIndexRequest{
MsgType: commonpb.MsgType_kCreateIndex,
CreateIndexRequest: milvuspb.CreateIndexRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreateIndex,
SourceID: Params.ProxyID(),
},
CollectionName: indexParam.CollectionName,
FieldName: indexParam.FieldName,
ExtraParams: indexParam.ExtraParams,
@ -654,8 +695,11 @@ func (p *Proxy) DescribeIndex(ctx context.Context, req *servicepb.DescribeIndexR
log.Println("Describe index for: ", req.FieldName)
dit := &DescribeIndexTask{
Condition: NewTaskCondition(ctx),
DescribeIndexRequest: internalpb.DescribeIndexRequest{
MsgType: commonpb.MsgType_kDescribeIndex,
DescribeIndexRequest: milvuspb.DescribeIndexRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeIndex,
SourceID: Params.ProxyID(),
},
CollectionName: req.CollectionName,
FieldName: req.FieldName,
},
@ -707,8 +751,11 @@ func (p *Proxy) DescribeIndexProgress(ctx context.Context, req *servicepb.Descri
log.Println("Describe index progress for: ", req.FieldName)
dipt := &DescribeIndexProgressTask{
Condition: NewTaskCondition(ctx),
DescribeIndexProgressRequest: internalpb.DescribeIndexProgressRequest{
MsgType: commonpb.MsgType_kDescribeIndexProgress,
IndexStateRequest: milvuspb.IndexStateRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeIndexProgress,
SourceID: Params.ProxyID(),
},
CollectionName: req.CollectionName,
FieldName: req.FieldName,
},

View File

@ -4,10 +4,9 @@ import (
"context"
"sync"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/servicepb"
)
@ -48,11 +47,11 @@ func (metaCache *SimpleMetaCache) Get(collectionName string) (*servicepb.Collect
func (metaCache *SimpleMetaCache) Sync(collectionName string) error {
dct := &DescribeCollectionTask{
Condition: NewTaskCondition(metaCache.ctx),
DescribeCollectionRequest: internalpb.DescribeCollectionRequest{
MsgType: commonpb.MsgType_kDescribeCollection,
CollectionName: &servicepb.CollectionName{
CollectionName: collectionName,
DescribeCollectionRequest: milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeCollection,
},
CollectionName: collectionName,
},
masterClient: metaCache.proxyInstance.masterClient,
}

View File

@ -33,7 +33,7 @@ type Proxy struct {
grpcServer *grpc.Server
masterConn *grpc.ClientConn
masterClient masterpb.MasterClient
masterClient masterpb.MasterServiceClient
sched *TaskScheduler
tick *timeTick
@ -191,7 +191,7 @@ func (p *Proxy) connectMaster() error {
}
log.Printf("Proxy connected to master, master_addr=%s", masterAddr)
p.masterConn = conn
p.masterClient = masterpb.NewMasterClient(conn)
p.masterClient = masterpb.NewMasterServiceClient(conn)
return nil
}

View File

@ -21,7 +21,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/master"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
"github.com/zilliztech/milvus-distributed/internal/proto/servicepb"
"go.etcd.io/etcd/clientv3"
@ -351,9 +351,11 @@ func TestProxy_Search(t *testing.T) {
BaseMsg: msgstream.BaseMsg{
HashValues: []uint32{1},
},
SearchResult: internalpb.SearchResult{
MsgType: commonpb.MsgType_kSearchResult,
ReqID: int64(i % testNum),
SearchResults: internalpb2.SearchResults{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearchResult,
MsgID: int64(i % testNum),
},
},
}
msgPack := &msgstream.MsgPack{
@ -456,9 +458,9 @@ func TestProxy_PartitionGRPC(t *testing.T) {
assert.Equal(t, stb.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
assert.Equal(t, stb.Value, true)
std, err := proxyClient.DescribePartition(ctx, preq)
assert.Nil(t, err)
assert.Equal(t, std.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
//std, err := proxyClient.DescribePartition(ctx, preq)
//assert.Nil(t, err)
//assert.Equal(t, std.Status.ErrorCode, commonpb.ErrorCode_SUCCESS)
sts, err := proxyClient.ShowPartitions(ctx, &servicepb.CollectionName{CollectionName: collName})
assert.Nil(t, err)

View File

@ -3,6 +3,9 @@ package proxynode
import (
"log"
"sort"
"strconv"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
@ -10,7 +13,6 @@ import (
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
func insertRepackFunc(tsMsgs []msgstream.TsMsg,
@ -43,7 +45,7 @@ func insertRepackFunc(tsMsgs []msgstream.TsMsg,
return nil, errors.New(string("the length of hashValue, timestamps, rowIDs, RowData are not equal"))
}
reqID := insertRequest.ReqID
reqID := insertRequest.Base.MsgID
if _, ok := channelCountMap[reqID]; !ok {
channelCountMap[reqID] = make(map[int32]uint32)
}
@ -53,7 +55,7 @@ func insertRepackFunc(tsMsgs []msgstream.TsMsg,
}
if _, ok := reqSchemaMap[reqID]; !ok {
reqSchemaMap[reqID] = []string{insertRequest.CollectionName, insertRequest.PartitionTag}
reqSchemaMap[reqID] = []string{insertRequest.CollectionName, insertRequest.PartitionName}
}
for idx, channelID := range keys {
@ -153,10 +155,10 @@ func insertRepackFunc(tsMsgs []msgstream.TsMsg,
for i, request := range tsMsgs {
insertRequest := request.(*msgstream.InsertMsg)
keys := hashKeys[i]
reqID := insertRequest.ReqID
reqID := insertRequest.Base.MsgID
collectionName := insertRequest.CollectionName
partitionTag := insertRequest.PartitionTag
proxyID := insertRequest.ProxyID
partitionTag := insertRequest.PartitionName
proxyID := insertRequest.Base.SourceID
for index, key := range keys {
ts := insertRequest.Timestamps[index]
rowID := insertRequest.RowIDs[index]
@ -167,14 +169,17 @@ func insertRepackFunc(tsMsgs []msgstream.TsMsg,
result[key] = &msgPack
}
segmentID := getSegmentID(reqID, key)
sliceRequest := internalpb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: reqID,
sliceRequest := internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: reqID,
Timestamp: ts,
SourceID: proxyID,
},
CollectionName: collectionName,
PartitionTag: partitionTag,
PartitionName: partitionTag,
SegmentID: segmentID,
ChannelID: int64(key),
ProxyID: proxyID,
ChannelID: strconv.FormatInt(int64(key), 10),
Timestamps: []uint64{ts},
RowIDs: []int64{rowID},
RowData: []*commonpb.Blob{row},

File diff suppressed because it is too large Load Diff

View File

@ -7,9 +7,10 @@ import (
"log"
"sync"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/allocator"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
type TaskQueue interface {
@ -375,7 +376,7 @@ func (sched *TaskScheduler) queryResultLoop() {
queryResultMsgStream.Start()
defer queryResultMsgStream.Close()
queryResultBuf := make(map[UniqueID][]*internalpb.SearchResult)
queryResultBuf := make(map[UniqueID][]*internalpb2.SearchResults)
for {
select {
@ -389,16 +390,16 @@ func (sched *TaskScheduler) queryResultLoop() {
}
for _, tsMsg := range msgPack.Msgs {
searchResultMsg, _ := tsMsg.(*msgstream.SearchResultMsg)
reqID := searchResultMsg.GetReqID()
reqID := searchResultMsg.Base.MsgID
_, ok = queryResultBuf[reqID]
if !ok {
queryResultBuf[reqID] = make([]*internalpb.SearchResult, 0)
queryResultBuf[reqID] = make([]*internalpb2.SearchResults, 0)
}
queryResultBuf[reqID] = append(queryResultBuf[reqID], &searchResultMsg.SearchResult)
queryResultBuf[reqID] = append(queryResultBuf[reqID], &searchResultMsg.SearchResults)
if len(queryResultBuf[reqID]) == queryNodeNum {
t := sched.getTaskByReqID(reqID)
if t != nil {
qt, ok := t.(*QueryTask)
qt, ok := t.(*SearchTask)
if ok {
log.Printf("address of query task: %p", qt)
qt.resultBuf <- queryResultBuf[reqID]

View File

@ -6,12 +6,13 @@ import (
"sync"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/apache/pulsar-client-go/pulsar"
"github.com/zilliztech/milvus-distributed/internal/allocator"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
type tickCheckFunc = func(Timestamp) bool
@ -74,10 +75,13 @@ func (tt *timeTick) tick() error {
BaseMsg: msgstream.BaseMsg{
HashValues: []uint32{uint32(Params.ProxyID())},
},
TimeTickMsg: internalpb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: tt.peerID,
Timestamp: tt.currentTick,
TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: tt.currentTick,
SourceID: tt.peerID,
},
},
}
msgPack.Msgs = append(msgPack.Msgs, timeTickMsg)

View File

@ -5,7 +5,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
)
type Client struct {
@ -45,8 +45,10 @@ func (c *Client) LoadIndex(indexPaths []string,
})
}
loadIndexRequest := internalPb.LoadIndex{
MsgType: commonpb.MsgType_kLoadIndex,
loadIndexRequest := internalpb2.LoadIndex{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kLoadIndex,
},
SegmentID: segmentID,
FieldName: fieldName,
FieldID: fieldID,

View File

@ -19,7 +19,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
)
@ -55,7 +55,7 @@ type collectionReplica interface {
// segment
getSegmentNum() int
getSegmentStatistics() []*internalpb.SegmentStats
getSegmentStatistics() []*internalpb2.SegmentStats
addSegment(segmentID UniqueID, partitionTag string, collectionID UniqueID) error
removeSegment(segmentID UniqueID) error
getSegmentByID(segmentID UniqueID) (*Segment, error)
@ -330,18 +330,18 @@ func (colReplica *collectionReplicaImpl) getSegmentNum() int {
return len(colReplica.segments)
}
func (colReplica *collectionReplicaImpl) getSegmentStatistics() []*internalpb.SegmentStats {
func (colReplica *collectionReplicaImpl) getSegmentStatistics() []*internalpb2.SegmentStats {
colReplica.mu.RLock()
defer colReplica.mu.RUnlock()
var statisticData = make([]*internalpb.SegmentStats, 0)
var statisticData = make([]*internalpb2.SegmentStats, 0)
for segmentID, segment := range colReplica.segments {
currentMemSize := segment.getMemSize()
segment.lastMemSize = currentMemSize
segmentNumOfRows := segment.getRowCount()
stat := internalpb.SegmentStats{
stat := internalpb2.SegmentStats{
SegmentID: segmentID,
MemorySize: currentMemSize,
NumRows: segmentNumOfRows,
@ -438,9 +438,9 @@ func (colReplica *collectionReplicaImpl) getVecFieldIDsBySegmentID(segmentID Uni
if err != nil {
return nil, err
}
col, err := colReplica.getCollectionByIDPrivate(seg.collectionID)
if err != nil {
return nil, err
col, err2 := colReplica.getCollectionByIDPrivate(seg.collectionID)
if err2 != nil {
return nil, err2
}
vecFields := make([]int64, 0)

View File

@ -9,7 +9,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
)
// NOTE: start pulsar before test
@ -53,14 +53,17 @@ func TestDataSyncService_Start(t *testing.T) {
uint32(i), uint32(i),
},
},
InsertRequest: internalPb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: int64(0),
InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: 0,
Timestamp: uint64(i + 1000),
SourceID: 0,
},
CollectionName: "collection0",
PartitionTag: "default",
PartitionName: "default",
SegmentID: int64(0),
ChannelID: int64(0),
ProxyID: int64(0),
ChannelID: "0",
Timestamps: []uint64{uint64(i + 1000), uint64(i + 1000)},
RowIDs: []int64{int64(i), int64(i)},
RowData: []*commonpb.Blob{
@ -85,10 +88,13 @@ func TestDataSyncService_Start(t *testing.T) {
EndTimestamp: 0,
HashValues: []uint32{0},
}
timeTickResult := internalPb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: UniqueID(0),
Timestamp: math.MaxUint64,
timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: math.MaxUint64,
SourceID: 0,
},
}
timeTickMsg := &msgstream.TimeTickMsg{
BaseMsg: baseMsg,

View File

@ -88,7 +88,7 @@ func (ddNode *ddNode) createCollection(msg *msgstream.CreateCollectionMsg) {
}
var schema schemapb.CollectionSchema
err := proto.Unmarshal((*msg.Schema).Value, &schema)
err := proto.Unmarshal(msg.Schema, &schema)
if err != nil {
log.Println(err)
return
@ -112,7 +112,7 @@ func (ddNode *ddNode) createCollection(msg *msgstream.CreateCollectionMsg) {
ddNode.ddMsg.collectionRecords[collectionName] = append(ddNode.ddMsg.collectionRecords[collectionName],
metaOperateRecord{
createOrDrop: true,
timestamp: msg.Timestamp,
timestamp: msg.Base.Timestamp,
})
}
@ -125,11 +125,11 @@ func (ddNode *ddNode) dropCollection(msg *msgstream.DropCollectionMsg) {
// return
//}
collectionName := msg.CollectionName.CollectionName
collectionName := msg.CollectionName
ddNode.ddMsg.collectionRecords[collectionName] = append(ddNode.ddMsg.collectionRecords[collectionName],
metaOperateRecord{
createOrDrop: false,
timestamp: msg.Timestamp,
timestamp: msg.Base.Timestamp,
})
ddNode.ddMsg.gcRecord.collections = append(ddNode.ddMsg.gcRecord.collections, collectionID)
@ -137,24 +137,24 @@ func (ddNode *ddNode) dropCollection(msg *msgstream.DropCollectionMsg) {
func (ddNode *ddNode) createPartition(msg *msgstream.CreatePartitionMsg) {
collectionID := msg.CollectionID
partitionTag := msg.PartitionName.Tag
partitionName := msg.PartitionName
err := ddNode.replica.addPartition(collectionID, partitionTag)
err := ddNode.replica.addPartition(collectionID, partitionName)
if err != nil {
log.Println(err)
return
}
ddNode.ddMsg.partitionRecords[partitionTag] = append(ddNode.ddMsg.partitionRecords[partitionTag],
ddNode.ddMsg.partitionRecords[partitionName] = append(ddNode.ddMsg.partitionRecords[partitionName],
metaOperateRecord{
createOrDrop: true,
timestamp: msg.Timestamp,
timestamp: msg.Base.Timestamp,
})
}
func (ddNode *ddNode) dropPartition(msg *msgstream.DropPartitionMsg) {
collectionID := msg.CollectionID
partitionTag := msg.PartitionName.Tag
partitionName := msg.PartitionName
//err := ddNode.replica.removePartition(collectionID, partitionTag)
//if err != nil {
@ -162,14 +162,14 @@ func (ddNode *ddNode) dropPartition(msg *msgstream.DropPartitionMsg) {
// return
//}
ddNode.ddMsg.partitionRecords[partitionTag] = append(ddNode.ddMsg.partitionRecords[partitionTag],
ddNode.ddMsg.partitionRecords[partitionName] = append(ddNode.ddMsg.partitionRecords[partitionName],
metaOperateRecord{
createOrDrop: false,
timestamp: msg.Timestamp,
timestamp: msg.Base.Timestamp,
})
ddNode.ddMsg.gcRecord.partitions = append(ddNode.ddMsg.gcRecord.partitions, partitionWithID{
partitionTag: partitionTag,
partitionTag: partitionName,
collectionID: collectionID,
})
}

View File

@ -86,7 +86,7 @@ func (iNode *insertNode) Operate(in []*Msg) []*Msg {
log.Println(err)
continue
}
err = iNode.replica.addSegment(task.SegmentID, task.PartitionTag, collection.ID())
err = iNode.replica.addSegment(task.SegmentID, task.PartitionName, collection.ID())
if err != nil {
log.Println(err)
continue

View File

@ -13,7 +13,7 @@ import (
minioKV "github.com/zilliztech/milvus-distributed/internal/kv/minio"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
)
type loadIndexService struct {
@ -23,8 +23,8 @@ type loadIndexService struct {
replica collectionReplica
fieldIndexes map[string][]*internalPb.IndexStats
fieldStatsChan chan []*internalPb.FieldStats
fieldIndexes map[string][]*internalpb2.IndexStats
fieldStatsChan chan []*internalpb2.FieldStats
loadIndexMsgStream msgstream.MsgStream
@ -71,8 +71,8 @@ func newLoadIndexService(ctx context.Context, replica collectionReplica) *loadIn
client: MinioKV,
replica: replica,
fieldIndexes: make(map[string][]*internalPb.IndexStats),
fieldStatsChan: make(chan []*internalPb.FieldStats, 1),
fieldIndexes: make(map[string][]*internalpb2.IndexStats),
fieldStatsChan: make(chan []*internalpb2.FieldStats, 1),
loadIndexMsgStream: stream,
@ -216,9 +216,9 @@ func (lis *loadIndexService) updateSegmentIndexStats(indexMsg *msgstream.LoadInd
// sort index params by key
sort.Slice(newIndexParams, func(i, j int) bool { return newIndexParams[i].Key < newIndexParams[j].Key })
if !ok {
lis.fieldIndexes[fieldStatsKey] = make([]*internalPb.IndexStats, 0)
lis.fieldIndexes[fieldStatsKey] = make([]*internalpb2.IndexStats, 0)
lis.fieldIndexes[fieldStatsKey] = append(lis.fieldIndexes[fieldStatsKey],
&internalPb.IndexStats{
&internalpb2.IndexStats{
IndexParams: newIndexParams,
NumRelatedSegments: 1,
})
@ -232,7 +232,7 @@ func (lis *loadIndexService) updateSegmentIndexStats(indexMsg *msgstream.LoadInd
}
if isNewIndex {
lis.fieldIndexes[fieldStatsKey] = append(lis.fieldIndexes[fieldStatsKey],
&internalPb.IndexStats{
&internalpb2.IndexStats{
IndexParams: newIndexParams,
NumRelatedSegments: 1,
})
@ -292,13 +292,13 @@ func (lis *loadIndexService) updateSegmentIndex(bytesIndex [][]byte, loadIndexMs
}
func (lis *loadIndexService) sendQueryNodeStats() error {
resultFieldsStats := make([]*internalPb.FieldStats, 0)
resultFieldsStats := make([]*internalpb2.FieldStats, 0)
for fieldStatsKey, indexStats := range lis.fieldIndexes {
colID, fieldID, err := lis.fieldsStatsKey2IDs(fieldStatsKey)
if err != nil {
return err
}
fieldStats := internalPb.FieldStats{
fieldStats := internalpb2.FieldStats{
CollectionID: colID,
FieldID: fieldID,
IndexStats: indexStats,

View File

@ -17,7 +17,7 @@ import (
minioKV "github.com/zilliztech/milvus-distributed/internal/kv/minio"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/servicepb"
"github.com/zilliztech/milvus-distributed/internal/querynode/client"
)
@ -78,14 +78,17 @@ func TestLoadIndexService_FloatVector(t *testing.T) {
BaseMsg: msgstream.BaseMsg{
HashValues: hashValues,
},
InsertRequest: internalpb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: 0,
InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: 0,
Timestamp: timestamps[0],
SourceID: 0,
},
CollectionName: "collection0",
PartitionTag: "default",
PartitionName: "default",
SegmentID: segmentID,
ChannelID: int64(0),
ProxyID: int64(0),
ChannelID: "0",
Timestamps: timestamps,
RowIDs: rowIDs,
RowData: insertRowBlob,
@ -104,10 +107,13 @@ func TestLoadIndexService_FloatVector(t *testing.T) {
EndTimestamp: 0,
HashValues: []uint32{0},
},
TimeTickMsg: internalpb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: UniqueID(0),
Timestamp: math.MaxUint64,
TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: math.MaxUint64,
SourceID: 0,
},
},
}
timeTickMsgPack := &msgstream.MsgPack{
@ -181,12 +187,14 @@ func TestLoadIndexService_FloatVector(t *testing.T) {
BaseMsg: msgstream.BaseMsg{
HashValues: []uint32{0},
},
SearchRequest: internalpb.SearchRequest{
MsgType: commonpb.MsgType_kSearch,
ReqID: n,
ProxyID: int64(1),
Timestamp: uint64(msgLength),
ResultChannelID: int64(0),
SearchRequest: internalpb2.SearchRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearch,
MsgID: n,
Timestamp: uint64(msgLength),
SourceID: 1,
},
ResultChannelID: "0",
Query: &blob,
},
}
@ -403,14 +411,17 @@ func TestLoadIndexService_BinaryVector(t *testing.T) {
BaseMsg: msgstream.BaseMsg{
HashValues: hashValues,
},
InsertRequest: internalpb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: 0,
InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: 0,
Timestamp: timestamps[0],
SourceID: 0,
},
CollectionName: "collection0",
PartitionTag: "default",
PartitionName: "default",
SegmentID: segmentID,
ChannelID: int64(0),
ProxyID: int64(0),
ChannelID: "0",
Timestamps: timestamps,
RowIDs: rowIDs,
RowData: insertRowBlob,
@ -429,10 +440,13 @@ func TestLoadIndexService_BinaryVector(t *testing.T) {
EndTimestamp: 0,
HashValues: []uint32{0},
},
TimeTickMsg: internalpb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: UniqueID(0),
Timestamp: math.MaxUint64,
TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: math.MaxUint64,
SourceID: 0,
},
},
}
timeTickMsgPack := &msgstream.MsgPack{
@ -495,12 +509,14 @@ func TestLoadIndexService_BinaryVector(t *testing.T) {
BaseMsg: msgstream.BaseMsg{
HashValues: []uint32{0},
},
SearchRequest: internalpb.SearchRequest{
MsgType: commonpb.MsgType_kSearch,
ReqID: n,
ProxyID: int64(1),
Timestamp: uint64(msgLength),
ResultChannelID: int64(0),
SearchRequest: internalpb2.SearchRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearch,
MsgID: n,
Timestamp: uint64(msgLength),
SourceID: 1,
},
ResultChannelID: "0",
Query: &blob,
},
}

View File

@ -7,6 +7,7 @@ import (
"fmt"
"log"
"regexp"
"strconv"
"sync"
"github.com/opentracing/opentracing-go"
@ -16,7 +17,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/servicepb"
)
@ -228,7 +229,7 @@ func (ss *searchService) search(msg msgstream.TsMsg) error {
return errors.New("invalid request type = " + string(msg.Type()))
}
searchTimestamp := searchMsg.Timestamp
searchTimestamp := searchMsg.Base.Timestamp
var queryBlob = searchMsg.Query.Value
query := servicepb.Query{}
err := proto.Unmarshal(queryBlob, &query)
@ -312,19 +313,21 @@ func (ss *searchService) search(msg msgstream.TsMsg) error {
}
nilHits[i] = bs
}
var results = internalpb.SearchResult{
MsgType: commonpb.MsgType_kSearchResult,
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
ReqID: searchMsg.ReqID,
ProxyID: searchMsg.ProxyID,
QueryNodeID: ss.queryNodeID,
Timestamp: searchTimestamp,
ResultChannelID: searchMsg.ResultChannelID,
Hits: nilHits,
}
resultChannelInt, _ := strconv.ParseInt(searchMsg.ResultChannelID, 10, 64)
searchResultMsg := &msgstream.SearchResultMsg{
BaseMsg: msgstream.BaseMsg{HashValues: []uint32{uint32(searchMsg.ResultChannelID)}},
SearchResult: results,
BaseMsg: msgstream.BaseMsg{HashValues: []uint32{uint32(resultChannelInt)}},
SearchResults: internalpb2.SearchResults{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearchResult,
MsgID: searchMsg.Base.MsgID,
Timestamp: searchTimestamp,
SourceID: searchMsg.Base.SourceID,
},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
ResultChannelID: searchMsg.ResultChannelID,
Hits: nilHits,
MetricType: plan.getMetricType(),
},
}
err = ss.publishSearchResult(searchResultMsg)
if err != nil {
@ -377,23 +380,34 @@ func (ss *searchService) search(msg msgstream.TsMsg) error {
//fmt.Println("hits msg = ", unMarshaledHit)
offset += len
}
var results = internalpb.SearchResult{
MsgType: commonpb.MsgType_kSearchResult,
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
ReqID: searchMsg.ReqID,
ProxyID: searchMsg.ProxyID,
QueryNodeID: searchMsg.ProxyID,
Timestamp: searchTimestamp,
ResultChannelID: searchMsg.ResultChannelID,
Hits: hits,
MetricType: plan.getMetricType(),
}
resultChannelInt, _ := strconv.ParseInt(searchMsg.ResultChannelID, 10, 64)
searchResultMsg := &msgstream.SearchResultMsg{
BaseMsg: msgstream.BaseMsg{
MsgCtx: searchMsg.MsgCtx,
HashValues: []uint32{uint32(searchMsg.ResultChannelID)}},
SearchResult: results,
BaseMsg: msgstream.BaseMsg{HashValues: []uint32{uint32(resultChannelInt)}},
SearchResults: internalpb2.SearchResults{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearchResult,
MsgID: searchMsg.Base.MsgID,
Timestamp: searchTimestamp,
SourceID: searchMsg.Base.SourceID,
},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS},
ResultChannelID: searchMsg.ResultChannelID,
Hits: hits,
MetricType: plan.getMetricType(),
},
}
// For debugging, please don't delete.
//for i := 0; i < len(hits); i++ {
// testHits := milvuspb.Hits{}
// err := proto.Unmarshal(hits[i], &testHits)
// if err != nil {
// panic(err)
// }
// fmt.Println(testHits.IDs)
// fmt.Println(testHits.Scores)
//}
err = ss.publishSearchResult(searchResultMsg)
if err != nil {
span.LogFields(oplog.Error(err))
@ -423,28 +437,30 @@ func (ss *searchService) publishFailedSearchResult(msg msgstream.TsMsg, errMsg s
// span, ctx := opentracing.StartSpanFromContext(msg.GetMsgContext(), "receive search msg")
// defer span.Finish()
// msg.SetMsgContext(ctx)
fmt.Println("Public fail SearchResult!")
//fmt.Println("Public fail SearchResult!")
msgPack := msgstream.MsgPack{}
searchMsg, ok := msg.(*msgstream.SearchMsg)
if !ok {
return errors.New("invalid request type = " + string(msg.Type()))
}
var results = internalpb.SearchResult{
MsgType: commonpb.MsgType_kSearchResult,
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR, Reason: errMsg},
ReqID: searchMsg.ReqID,
ProxyID: searchMsg.ProxyID,
QueryNodeID: searchMsg.ProxyID,
Timestamp: searchMsg.Timestamp,
ResultChannelID: searchMsg.ResultChannelID,
Hits: [][]byte{},
resultChannelInt, _ := strconv.ParseInt(searchMsg.ResultChannelID, 10, 64)
searchResultMsg := &msgstream.SearchResultMsg{
BaseMsg: msgstream.BaseMsg{HashValues: []uint32{uint32(resultChannelInt)}},
SearchResults: internalpb2.SearchResults{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearchResult,
MsgID: searchMsg.Base.MsgID,
Timestamp: searchMsg.Base.Timestamp,
SourceID: searchMsg.Base.SourceID,
},
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR, Reason: errMsg},
ResultChannelID: searchMsg.ResultChannelID,
Hits: [][]byte{},
},
}
tsMsg := &msgstream.SearchResultMsg{
BaseMsg: msgstream.BaseMsg{HashValues: []uint32{uint32(searchMsg.ResultChannelID)}},
SearchResult: results,
}
msgPack.Msgs = append(msgPack.Msgs, tsMsg)
msgPack.Msgs = append(msgPack.Msgs, searchResultMsg)
err := ss.searchResultMsgStream.Produce(&msgPack)
if err != nil {
return err

View File

@ -13,7 +13,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/servicepb"
)
@ -79,12 +79,14 @@ func TestSearch_Search(t *testing.T) {
BaseMsg: msgstream.BaseMsg{
HashValues: []uint32{0},
},
SearchRequest: internalpb.SearchRequest{
MsgType: commonpb.MsgType_kSearch,
ReqID: int64(1),
ProxyID: int64(1),
Timestamp: uint64(10 + 1000),
ResultChannelID: int64(0),
SearchRequest: internalpb2.SearchRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearch,
MsgID: 1,
Timestamp: uint64(10 + 1000),
SourceID: 1,
},
ResultChannelID: "0",
Query: &blob,
},
}
@ -126,14 +128,17 @@ func TestSearch_Search(t *testing.T) {
uint32(i),
},
},
InsertRequest: internalpb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: int64(i),
InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: int64(i),
Timestamp: uint64(10 + 1000),
SourceID: 0,
},
CollectionName: "collection0",
PartitionTag: "default",
PartitionName: "default",
SegmentID: int64(0),
ChannelID: int64(0),
ProxyID: int64(0),
ChannelID: "0",
Timestamps: []uint64{uint64(i + 1000)},
RowIDs: []int64{int64(i)},
RowData: []*commonpb.Blob{
@ -157,10 +162,13 @@ func TestSearch_Search(t *testing.T) {
EndTimestamp: 0,
HashValues: []uint32{0},
}
timeTickResult := internalpb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: UniqueID(0),
Timestamp: math.MaxUint64,
timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: math.MaxUint64,
SourceID: 0,
},
}
timeTickMsg := &msgstream.TimeTickMsg{
BaseMsg: baseMsg,
@ -265,12 +273,14 @@ func TestSearch_SearchMultiSegments(t *testing.T) {
BaseMsg: msgstream.BaseMsg{
HashValues: []uint32{0},
},
SearchRequest: internalpb.SearchRequest{
MsgType: commonpb.MsgType_kSearch,
ReqID: int64(1),
ProxyID: int64(1),
Timestamp: uint64(10 + 1000),
ResultChannelID: int64(0),
SearchRequest: internalpb2.SearchRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kSearch,
MsgID: 1,
Timestamp: uint64(10 + 1000),
SourceID: 1,
},
ResultChannelID: "0",
Query: &blob,
},
}
@ -316,14 +326,17 @@ func TestSearch_SearchMultiSegments(t *testing.T) {
uint32(i),
},
},
InsertRequest: internalpb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: int64(i),
InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: int64(i),
Timestamp: uint64(i + 1000),
SourceID: 0,
},
CollectionName: "collection0",
PartitionTag: "default",
PartitionName: "default",
SegmentID: int64(segmentID),
ChannelID: int64(0),
ProxyID: int64(0),
ChannelID: "0",
Timestamps: []uint64{uint64(i + 1000)},
RowIDs: []int64{int64(i)},
RowData: []*commonpb.Blob{
@ -347,10 +360,13 @@ func TestSearch_SearchMultiSegments(t *testing.T) {
EndTimestamp: 0,
HashValues: []uint32{0},
}
timeTickResult := internalpb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: UniqueID(0),
Timestamp: math.MaxUint64,
timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: math.MaxUint64,
SourceID: 0,
},
}
timeTickMsg := &msgstream.TimeTickMsg{
BaseMsg: baseMsg,

View File

@ -7,10 +7,9 @@ import (
"strconv"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
)
type statsService struct {
@ -18,11 +17,11 @@ type statsService struct {
replica collectionReplica
fieldStatsChan chan []*internalpb.FieldStats
fieldStatsChan chan []*internalpb2.FieldStats
statsStream msgstream.MsgStream
}
func newStatsService(ctx context.Context, replica collectionReplica, fieldStatsChan chan []*internalpb.FieldStats) *statsService {
func newStatsService(ctx context.Context, replica collectionReplica, fieldStatsChan chan []*internalpb2.FieldStats) *statsService {
return &statsService{
ctx: ctx,
@ -71,12 +70,14 @@ func (sService *statsService) close() {
}
}
func (sService *statsService) publicStatistic(fieldStats []*internalpb.FieldStats) {
func (sService *statsService) publicStatistic(fieldStats []*internalpb2.FieldStats) {
segStats := sService.replica.getSegmentStatistics()
queryNodeStats := internalpb.QueryNodeStats{
MsgType: commonpb.MsgType_kQueryNodeStats,
PeerID: Params.QueryNodeID,
queryNodeStats := internalpb2.QueryNodeStats{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kQueryNodeStats,
SourceID: Params.QueryNodeID,
},
SegStats: segStats,
FieldStats: fieldStats,
}

View File

@ -7,7 +7,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
"github.com/zilliztech/milvus-distributed/internal/util/tsoutil"
)
@ -309,25 +309,25 @@ func printDDLPayloadValues(eventType EventTypeCode, colType schemapb.DataType, r
}
switch eventType {
case CreateCollectionEventType:
var req internalpb.CreateCollectionRequest
var req milvuspb.CreateCollectionRequest
if err := proto.UnmarshalText(val, &req); err != nil {
return err
}
fmt.Printf("\t\t%d : create collection: %v\n", i, req)
case DropCollectionEventType:
var req internalpb.DropCollectionRequest
var req milvuspb.DropCollectionRequest
if err := proto.UnmarshalText(val, &req); err != nil {
return err
}
fmt.Printf("\t\t%d : drop collection: %v\n", i, req)
case CreatePartitionEventType:
var req internalpb.CreatePartitionRequest
var req milvuspb.CreatePartitionRequest
if err := proto.UnmarshalText(val, &req); err != nil {
return err
}
fmt.Printf("\t\t%d : create partition: %v\n", i, req)
case DropPartitionEventType:
var req internalpb.DropPartitionRequest
var req milvuspb.DropPartitionRequest
if err := proto.UnmarshalText(val, &req); err != nil {
return err
}

View File

@ -7,7 +7,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/errors"
ms "github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
)
type timeSyncMsgProducer struct {
@ -78,10 +78,13 @@ func (syncMsgProducer *timeSyncMsgProducer) broadcastMsg(barrier TimeTickBarrier
EndTimestamp: timetick,
HashValues: []uint32{0},
}
timeTickResult := internalPb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: 0,
Timestamp: timetick,
timeTickResult := internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: timetick,
SourceID: 0,
},
}
timeTickMsg := &ms.TimeTickMsg{
BaseMsg: baseMsg,

View File

@ -73,15 +73,15 @@ func (ttBarrier *softTimeTickBarrier) Start() error {
if len(ttmsgs.Msgs) > 0 {
for _, timetickmsg := range ttmsgs.Msgs {
ttmsg := timetickmsg.(*ms.TimeTickMsg)
oldT, ok := ttBarrier.peer2LastTt[ttmsg.PeerID]
oldT, ok := ttBarrier.peer2LastTt[ttmsg.Base.SourceID]
// log.Printf("[softTimeTickBarrier] peer(%d)=%d\n", ttmsg.PeerID, ttmsg.Timestamp)
if !ok {
log.Printf("[softTimeTickBarrier] Warning: peerID %d not exist\n", ttmsg.PeerID)
log.Printf("[softTimeTickBarrier] Warning: peerID %d not exist\n", ttmsg.Base.SourceID)
continue
}
if ttmsg.Timestamp > oldT {
ttBarrier.peer2LastTt[ttmsg.PeerID] = ttmsg.Timestamp
if ttmsg.Base.Timestamp > oldT {
ttBarrier.peer2LastTt[ttmsg.Base.SourceID] = ttmsg.Base.Timestamp
// get a legal Timestamp
ts := ttBarrier.minTimestamp()
@ -169,18 +169,18 @@ func (ttBarrier *hardTimeTickBarrier) Start() error {
// that `ttmsg.Timestamp > oldT`
ttmsg := timetickmsg.(*ms.TimeTickMsg)
oldT, ok := ttBarrier.peer2Tt[ttmsg.PeerID]
oldT, ok := ttBarrier.peer2Tt[ttmsg.Base.SourceID]
if !ok {
log.Printf("[hardTimeTickBarrier] Warning: peerID %d not exist\n", ttmsg.PeerID)
log.Printf("[hardTimeTickBarrier] Warning: peerID %d not exist\n", ttmsg.Base.SourceID)
continue
}
if oldT > state {
log.Printf("[hardTimeTickBarrier] Warning: peer(%d) timestamp(%d) ahead\n",
ttmsg.PeerID, ttmsg.Timestamp)
ttmsg.Base.SourceID, ttmsg.Base.Timestamp)
}
ttBarrier.peer2Tt[ttmsg.PeerID] = ttmsg.Timestamp
ttBarrier.peer2Tt[ttmsg.Base.SourceID] = ttmsg.Base.Timestamp
newState := ttBarrier.minTimestamp()
if newState > state {

View File

@ -12,7 +12,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/kv"
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
pb "github.com/zilliztech/milvus-distributed/internal/proto/writerpb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
@ -57,12 +57,14 @@ func (c *Client) FlushSegment(segmentID UniqueID, collectionID UniqueID, partiti
HashValues: []uint32{0},
}
flushMsg := internalPb.FlushMsg{
MsgType: commonpb.MsgType_kFlush,
flushMsg := internalpb2.FlushMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kFlush,
Timestamp: timestamp,
},
SegmentID: segmentID,
CollectionID: collectionID,
PartitionTag: partitionTag,
Timestamp: timestamp,
}
fMsg := &msgstream.FlushMsg{

View File

@ -16,7 +16,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
)
@ -127,14 +127,18 @@ func TestDataSyncService_Start(t *testing.T) {
uint32(i),
},
},
InsertRequest: internalPb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: UniqueID(0),
InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: 0,
Timestamp: Timestamp(i + 1000),
SourceID: 0,
},
CollectionName: "col1",
PartitionTag: "default",
PartitionName: "default",
SegmentID: UniqueID(1),
ChannelID: UniqueID(0),
ProxyID: UniqueID(0),
ChannelID: "0",
Timestamps: []Timestamp{Timestamp(i + 1000)},
RowIDs: []UniqueID{UniqueID(i)},
@ -161,10 +165,13 @@ func TestDataSyncService_Start(t *testing.T) {
EndTimestamp: Timestamp(0),
HashValues: []uint32{0},
},
TimeTickMsg: internalPb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: UniqueID(0),
Timestamp: math.MaxUint64,
TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: math.MaxUint64,
SourceID: 0,
},
},
}
timeTickMsgPack.Msgs = append(timeTickMsgPack.Msgs, timeTickMsg)

View File

@ -227,7 +227,7 @@ func (ddNode *ddNode) createCollection(msg *msgstream.CreateCollectionMsg) {
// TODO: add default partition?
var schema schemapb.CollectionSchema
err := proto.Unmarshal((*msg.Schema).Value, &schema)
err := proto.Unmarshal(msg.Schema, &schema)
if err != nil {
log.Println(err)
return
@ -245,7 +245,7 @@ func (ddNode *ddNode) createCollection(msg *msgstream.CreateCollectionMsg) {
ddNode.ddMsg.collectionRecords[collectionName] = append(ddNode.ddMsg.collectionRecords[collectionName],
metaOperateRecord{
createOrDrop: true,
timestamp: msg.Timestamp,
timestamp: msg.Base.Timestamp,
})
_, ok := ddNode.ddBuffer.ddData[collectionID]
@ -258,7 +258,7 @@ func (ddNode *ddNode) createCollection(msg *msgstream.CreateCollectionMsg) {
}
ddNode.ddBuffer.ddData[collectionID].ddRequestString = append(ddNode.ddBuffer.ddData[collectionID].ddRequestString, msg.CreateCollectionRequest.String())
ddNode.ddBuffer.ddData[collectionID].timestamps = append(ddNode.ddBuffer.ddData[collectionID].timestamps, msg.Timestamp)
ddNode.ddBuffer.ddData[collectionID].timestamps = append(ddNode.ddBuffer.ddData[collectionID].timestamps, msg.Base.Timestamp)
ddNode.ddBuffer.ddData[collectionID].eventTypes = append(ddNode.ddBuffer.ddData[collectionID].eventTypes, storage.CreateCollectionEventType)
}
@ -278,11 +278,11 @@ func (ddNode *ddNode) dropCollection(msg *msgstream.DropCollectionMsg) {
}
delete(ddNode.ddRecords.collectionRecords, collectionID)
collectionName := msg.CollectionName.CollectionName
collectionName := msg.CollectionName
ddNode.ddMsg.collectionRecords[collectionName] = append(ddNode.ddMsg.collectionRecords[collectionName],
metaOperateRecord{
createOrDrop: false,
timestamp: msg.Timestamp,
timestamp: msg.Base.Timestamp,
})
_, ok := ddNode.ddBuffer.ddData[collectionID]
@ -295,7 +295,7 @@ func (ddNode *ddNode) dropCollection(msg *msgstream.DropCollectionMsg) {
}
ddNode.ddBuffer.ddData[collectionID].ddRequestString = append(ddNode.ddBuffer.ddData[collectionID].ddRequestString, msg.DropCollectionRequest.String())
ddNode.ddBuffer.ddData[collectionID].timestamps = append(ddNode.ddBuffer.ddData[collectionID].timestamps, msg.Timestamp)
ddNode.ddBuffer.ddData[collectionID].timestamps = append(ddNode.ddBuffer.ddData[collectionID].timestamps, msg.Base.Timestamp)
ddNode.ddBuffer.ddData[collectionID].eventTypes = append(ddNode.ddBuffer.ddData[collectionID].eventTypes, storage.DropCollectionEventType)
ddNode.ddMsg.gcRecord.collections = append(ddNode.ddMsg.gcRecord.collections, collectionID)
@ -313,11 +313,11 @@ func (ddNode *ddNode) createPartition(msg *msgstream.CreatePartitionMsg) {
}
ddNode.ddRecords.partitionRecords[partitionID] = nil
partitionTag := msg.PartitionName.Tag
partitionTag := msg.PartitionName
ddNode.ddMsg.partitionRecords[partitionTag] = append(ddNode.ddMsg.partitionRecords[partitionTag],
metaOperateRecord{
createOrDrop: true,
timestamp: msg.Timestamp,
timestamp: msg.Base.Timestamp,
})
_, ok := ddNode.ddBuffer.ddData[collectionID]
@ -330,7 +330,7 @@ func (ddNode *ddNode) createPartition(msg *msgstream.CreatePartitionMsg) {
}
ddNode.ddBuffer.ddData[collectionID].ddRequestString = append(ddNode.ddBuffer.ddData[collectionID].ddRequestString, msg.CreatePartitionRequest.String())
ddNode.ddBuffer.ddData[collectionID].timestamps = append(ddNode.ddBuffer.ddData[collectionID].timestamps, msg.Timestamp)
ddNode.ddBuffer.ddData[collectionID].timestamps = append(ddNode.ddBuffer.ddData[collectionID].timestamps, msg.Base.Timestamp)
ddNode.ddBuffer.ddData[collectionID].eventTypes = append(ddNode.ddBuffer.ddData[collectionID].eventTypes, storage.CreatePartitionEventType)
}
@ -346,11 +346,11 @@ func (ddNode *ddNode) dropPartition(msg *msgstream.DropPartitionMsg) {
}
delete(ddNode.ddRecords.partitionRecords, partitionID)
partitionTag := msg.PartitionName.Tag
partitionTag := msg.PartitionName
ddNode.ddMsg.partitionRecords[partitionTag] = append(ddNode.ddMsg.partitionRecords[partitionTag],
metaOperateRecord{
createOrDrop: false,
timestamp: msg.Timestamp,
timestamp: msg.Base.Timestamp,
})
_, ok := ddNode.ddBuffer.ddData[collectionID]
@ -363,7 +363,7 @@ func (ddNode *ddNode) dropPartition(msg *msgstream.DropPartitionMsg) {
}
ddNode.ddBuffer.ddData[collectionID].ddRequestString = append(ddNode.ddBuffer.ddData[collectionID].ddRequestString, msg.DropPartitionRequest.String())
ddNode.ddBuffer.ddData[collectionID].timestamps = append(ddNode.ddBuffer.ddData[collectionID].timestamps, msg.Timestamp)
ddNode.ddBuffer.ddData[collectionID].timestamps = append(ddNode.ddBuffer.ddData[collectionID].timestamps, msg.Base.Timestamp)
ddNode.ddBuffer.ddData[collectionID].eventTypes = append(ddNode.ddBuffer.ddData[collectionID].eventTypes, storage.DropPartitionEventType)
}

View File

@ -11,8 +11,7 @@ import (
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/servicepb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/util/flowgraph"
)
@ -51,13 +50,15 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
colID := UniqueID(0)
colName := "col-test-0"
// create collection
createColReq := internalpb.CreateCollectionRequest{
MsgType: commonpb.MsgType_kCreateCollection,
createColReq := internalpb2.CreateCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreateCollection,
MsgID: 1,
Timestamp: 1,
SourceID: 1,
},
CollectionID: colID,
ReqID: 1,
Timestamp: 1,
ProxyID: 1,
Schema: &commonpb.Blob{},
Schema: make([]byte, 0),
}
createColMsg := msgstream.CreateCollectionMsg{
BaseMsg: msgstream.BaseMsg{
@ -69,13 +70,15 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
}
// drop collection
dropColReq := internalpb.DropCollectionRequest{
MsgType: commonpb.MsgType_kDropCollection,
dropColReq := internalpb2.DropCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropCollection,
MsgID: 2,
Timestamp: 2,
SourceID: 2,
},
CollectionID: colID,
ReqID: 2,
Timestamp: 2,
ProxyID: 2,
CollectionName: &servicepb.CollectionName{CollectionName: colName},
CollectionName: colName,
}
dropColMsg := msgstream.DropCollectionMsg{
BaseMsg: msgstream.BaseMsg{
@ -89,17 +92,17 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
partitionID := UniqueID(100)
partitionTag := "partition-test-0"
// create partition
createPartitionReq := internalpb.CreatePartitionRequest{
MsgType: commonpb.MsgType_kCreatePartition,
CollectionID: colID,
PartitionID: partitionID,
ReqID: 3,
Timestamp: 3,
ProxyID: 3,
PartitionName: &servicepb.PartitionName{
CollectionName: colName,
Tag: partitionTag,
createPartitionReq := internalpb2.CreatePartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kCreatePartition,
MsgID: 3,
Timestamp: 3,
SourceID: 3,
},
CollectionID: colID,
PartitionID: partitionID,
CollectionName: colName,
PartitionName: partitionTag,
}
createPartitionMsg := msgstream.CreatePartitionMsg{
BaseMsg: msgstream.BaseMsg{
@ -111,17 +114,17 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
}
// drop partition
dropPartitionReq := internalpb.DropPartitionRequest{
MsgType: commonpb.MsgType_kDropPartition,
CollectionID: colID,
PartitionID: partitionID,
ReqID: 4,
Timestamp: 4,
ProxyID: 4,
PartitionName: &servicepb.PartitionName{
CollectionName: colName,
Tag: partitionTag,
dropPartitionReq := internalpb2.DropPartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDropPartition,
MsgID: 4,
Timestamp: 4,
SourceID: 4,
},
CollectionID: colID,
PartitionID: partitionID,
CollectionName: colName,
PartitionName: partitionTag,
}
dropPartitionMsg := msgstream.DropPartitionMsg{
BaseMsg: msgstream.BaseMsg{
@ -138,10 +141,14 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
EndTimestamp: Timestamp(5),
HashValues: []uint32{uint32(0)},
},
FlushMsg: internalpb.FlushMsg{
MsgType: commonpb.MsgType_kFlush,
FlushMsg: internalpb2.FlushMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kFlush,
MsgID: 1,
Timestamp: 6,
SourceID: 1,
},
SegmentID: 1,
Timestamp: Timestamp(6),
},
}

View File

@ -20,7 +20,7 @@ import (
miniokv "github.com/zilliztech/milvus-distributed/internal/kv/minio"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
"github.com/zilliztech/milvus-distributed/internal/storage"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
@ -382,7 +382,7 @@ func (ibNode *insertBufferNode) Operate(in []*Msg) []*Msg {
if ibNode.insertBuffer.full(currentSegID) {
log.Printf(". Insert Buffer full, auto flushing (%v) rows of data...", ibNode.insertBuffer.size(currentSegID))
// partitionTag -> partitionID
partitionTag := msg.GetPartitionTag()
partitionTag := msg.GetPartitionName()
partitionID, err := typeutil.Hash32String(partitionTag)
if err != nil {
log.Println("partitionTag to partitionID wrong")
@ -466,7 +466,7 @@ func (ibNode *insertBufferNode) Operate(in []*Msg) []*Msg {
// 1. insertBuffer(not empty) -> binLogs -> minIO/S3
for _, msg := range iMsg.flushMessages {
currentSegID := msg.GetSegmentID()
flushTs := msg.GetTimestamp()
flushTs := msg.Base.Timestamp
partitionTag := msg.GetPartitionTag()
collectionID := msg.GetCollectionID()
log.Printf(". Receiving flush message segID(%v)...", currentSegID)
@ -590,10 +590,13 @@ func (ibNode *insertBufferNode) writeHardTimeTick(ts Timestamp) error {
EndTimestamp: ts,
HashValues: []uint32{0},
},
TimeTickMsg: internalpb.TimeTickMsg{
MsgType: commonpb.MsgType_kTimeTick,
PeerID: Params.WriteNodeID,
Timestamp: ts,
TimeTickMsg: internalpb2.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kTimeTick,
MsgID: 0,
Timestamp: ts,
SourceID: Params.WriteNodeID,
},
},
}
msgPack.Msgs = append(msgPack.Msgs, &timeTickMsg)

View File

@ -13,10 +13,10 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/util/flowgraph"
)
@ -165,14 +165,17 @@ func genInsertMsg() insertMsg {
uint32(i),
},
},
InsertRequest: internalpb.InsertRequest{
MsgType: commonpb.MsgType_kInsert,
ReqID: UniqueID(0),
InsertRequest: internalpb2.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kInsert,
MsgID: 0,
Timestamp: Timestamp(i + 1000),
SourceID: 0,
},
CollectionName: "col1",
PartitionTag: "default",
PartitionName: "default",
SegmentID: UniqueID(1),
ChannelID: UniqueID(0),
ProxyID: UniqueID(0),
ChannelID: "0",
Timestamps: []Timestamp{
Timestamp(i + 1000),
Timestamp(i + 1000),
@ -187,7 +190,6 @@ func genInsertMsg() insertMsg {
UniqueID(i),
UniqueID(i),
},
RowData: []*commonpb.Blob{
{Value: rawData},
{Value: rawData},
@ -200,16 +202,20 @@ func genInsertMsg() insertMsg {
iMsg.insertMessages = append(iMsg.insertMessages, msg)
}
var fmsg msgstream.FlushMsg = msgstream.FlushMsg{
var fmsg = msgstream.FlushMsg{
BaseMsg: msgstream.BaseMsg{
HashValues: []uint32{
uint32(10),
},
},
FlushMsg: internalpb.FlushMsg{
MsgType: commonpb.MsgType_kFlush,
FlushMsg: internalpb2.FlushMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kFlush,
MsgID: 1,
Timestamp: 2000,
SourceID: 1,
},
SegmentID: UniqueID(1),
Timestamp: Timestamp(2000),
CollectionID: UniqueID(1),
PartitionTag: "default",
},

View File

@ -22,7 +22,7 @@ mkdir -p schemapb
mkdir -p etcdpb
mkdir -p indexcgopb
mkdir -p internalpb
#mkdir -p internalpb
mkdir -p servicepb
mkdir -p masterpb
mkdir -p indexbuilderpb
@ -32,38 +32,26 @@ mkdir -p writerpb
mkdir -p internalpb2
mkdir -p milvuspb
mkdir -p proxypb
mkdir -p masterpb2
mkdir -p indexpb
mkdir -p datapb
mkdir -p querypb
${protoc} --go_out=plugins=grpc,paths=source_relative:./commonpb common.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./schemapb schema.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./etcdpb etcd_meta.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./indexcgopb index_cgo_msg.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./internalpb internal_msg.proto
PROTOBUF_GOOGLE_SRC=${SCRIPTS_DIR}/../cmake_build/thirdparty/protobuf/protobuf-src/src/google
if [ -d ${PROTOBUF_GOOGLE_SRC} ]; then
echo ${PROTOBUF_GOOGLE_SRC}
ln -snf ${PROTOBUF_GOOGLE_SRC} google
${protoc} --go_out=plugins=grpc,paths=source_relative:./internalpb msg_header.proto
unlink google
fi
#${protoc} --go_out=plugins=grpc,paths=source_relative:./internalpb internal_msg.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./servicepb service_msg.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./servicepb service.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./masterpb master.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./indexbuilderpb index_builder.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./writerpb write_node.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./internalpb2 internal.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./milvuspb milvus.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./proxypb proxy_service.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./masterpb2 master_service.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./indexpb index_service.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./datapb data_service.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./querypb query_service.proto