Refactor interface and proto

Signed-off-by: godchen <qingxiang.chen@zilliz.com>
pull/4973/head^2
godchen 2021-03-12 14:22:09 +08:00 committed by yefu.chen
parent 846f801d29
commit f3649f0419
146 changed files with 9043 additions and 9144 deletions

View File

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

View File

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

View File

@ -19,10 +19,6 @@ extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal
namespace milvus {
namespace proto {
namespace common {
class EmptyDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Empty> _instance;
} _Empty_default_instance_;
class StatusDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Status> _instance;
@ -78,20 +74,6 @@ static void InitDefaultsscc_info_Blob_common_2eproto() {
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Blob_common_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Blob_common_2eproto}, {}};
static void InitDefaultsscc_info_Empty_common_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::milvus::proto::common::_Empty_default_instance_;
new (ptr) ::milvus::proto::common::Empty();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::milvus::proto::common::Empty::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Empty_common_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Empty_common_2eproto}, {}};
static void InitDefaultsscc_info_KeyValuePair_common_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
@ -149,16 +131,11 @@ 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[7];
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_common_2eproto[6];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_common_2eproto[4];
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) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::milvus::proto::common::Empty, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::milvus::proto::common::Status, _internal_metadata_),
~0u, // no _extensions_
@ -203,17 +180,15 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_common_2eproto::offsets[] PROT
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)},
{ 5, -1, sizeof(::milvus::proto::common::Status)},
{ 12, -1, sizeof(::milvus::proto::common::KeyValuePair)},
{ 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)},
{ 0, -1, sizeof(::milvus::proto::common::Status)},
{ 7, -1, sizeof(::milvus::proto::common::KeyValuePair)},
{ 14, -1, sizeof(::milvus::proto::common::Blob)},
{ 20, -1, sizeof(::milvus::proto::common::Address)},
{ 27, -1, sizeof(::milvus::proto::common::MsgBase)},
{ 36, -1, sizeof(::milvus::proto::common::MsgHeader)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::common::_Empty_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::common::_Status_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::common::_KeyValuePair_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::common::_Blob_default_instance_),
@ -223,63 +198,62 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] =
};
const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\014common.proto\022\023milvus.proto.common\"\007\n\005E"
"mpty\"L\n\006Status\0222\n\nerror_code\030\001 \001(\0162\036.mil"
"vus.proto.common.ErrorCode\022\016\n\006reason\030\002 \001"
"(\t\"*\n\014KeyValuePair\022\013\n\003key\030\001 \001(\t\022\r\n\005value"
"\030\002 \001(\t\"\025\n\004Blob\022\r\n\005value\030\001 \001(\014\"#\n\007Address"
"\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\"7\n\tMsgHeader\022*\n\004base\030\001"
" \001(\0132\034.milvus.proto.common.MsgBase*\245\004\n\tE"
"rrorCode\022\013\n\007Success\020\000\022\023\n\017UnexpectedError"
"\020\001\022\021\n\rConnectFailed\020\002\022\024\n\020PermissionDenie"
"d\020\003\022\027\n\023CollectionNotExists\020\004\022\023\n\017IllegalA"
"rgument\020\005\022\024\n\020IllegalDimension\020\007\022\024\n\020Illeg"
"alIndexType\020\010\022\031\n\025IllegalCollectionName\020\t"
"\022\017\n\013IllegalTOPK\020\n\022\024\n\020IllegalRowRecord\020\013\022"
"\023\n\017IllegalVectorID\020\014\022\027\n\023IllegalSearchRes"
"ult\020\r\022\020\n\014FileNotFound\020\016\022\016\n\nMetaFailed\020\017\022"
"\017\n\013CacheFailed\020\020\022\026\n\022CannotCreateFolder\020\021"
"\022\024\n\020CannotCreateFile\020\022\022\026\n\022CannotDeleteFo"
"lder\020\023\022\024\n\020CannotDeleteFile\020\024\022\023\n\017BuildInd"
"exError\020\025\022\020\n\014IllegalNLIST\020\026\022\025\n\021IllegalMe"
"tricType\020\027\022\017\n\013OutOfMemory\020\030\022\021\n\rIndexNotE"
"xist\020\031\022\022\n\rDDRequestRace\020\350\007*e\n\nIndexState"
"\022\022\n\016IndexStateNone\020\000\022\014\n\010Unissued\020\001\022\016\n\nIn"
"Progress\020\002\022\014\n\010Finished\020\003\022\n\n\006Failed\020\004\022\013\n\007"
"Deleted\020\005*X\n\014SegmentState\022\024\n\020SegmentStat"
"eNone\020\000\022\014\n\010NotExist\020\001\022\013\n\007Growing\020\002\022\n\n\006Se"
"aled\020\003\022\013\n\007Flushed\020\004*\372\005\n\007MsgType\022\r\n\tUndef"
"ined\020\000\022\024\n\020CreateCollection\020d\022\022\n\016DropColl"
"ection\020e\022\021\n\rHasCollection\020f\022\026\n\022DescribeC"
"ollection\020g\022\023\n\017ShowCollections\020h\022\024\n\020GetS"
"ystemConfigs\020i\022\022\n\016LoadCollection\020j\022\025\n\021Re"
"leaseCollection\020k\022\024\n\017CreatePartition\020\310\001\022"
"\022\n\rDropPartition\020\311\001\022\021\n\014HasPartition\020\312\001\022\026"
"\n\021DescribePartition\020\313\001\022\023\n\016ShowPartitions"
"\020\314\001\022\023\n\016LoadPartitions\020\315\001\022\026\n\021ReleaseParti"
"tions\020\316\001\022\021\n\014ShowSegments\020\372\001\022\024\n\017DescribeS"
"egment\020\373\001\022\020\n\013CreateIndex\020\254\002\022\022\n\rDescribeI"
"ndex\020\255\002\022\016\n\tDropIndex\020\256\002\022\013\n\006Insert\020\220\003\022\013\n\006"
"Delete\020\221\003\022\n\n\005Flush\020\222\003\022\013\n\006Search\020\364\003\022\021\n\014Se"
"archResult\020\365\003\022\022\n\rGetIndexState\020\366\003\022\034\n\027Get"
"CollectionStatistics\020\367\003\022\033\n\026GetPartitionS"
"tatistics\020\370\003\022\020\n\013SegmentInfo\020\330\004\022\r\n\010TimeTi"
"ck\020\260\t\022\023\n\016QueryNodeStats\020\261\t\022\016\n\tLoadIndex\020"
"\262\t\022\016\n\tRequestID\020\263\t\022\017\n\nRequestTSO\020\264\t\022\024\n\017A"
"llocateSegment\020\265\t\022\026\n\021SegmentStatistics\020\266"
"\t\022\025\n\020SegmentFlushDone\020\267\tBBZ@github.com/z"
"illiztech/milvus-distributed/internal/pr"
"oto/commonpbb\006proto3"
"\n\014common.proto\022\023milvus.proto.common\"L\n\006S"
"tatus\0222\n\nerror_code\030\001 \001(\0162\036.milvus.proto"
".common.ErrorCode\022\016\n\006reason\030\002 \001(\t\"*\n\014Key"
"ValuePair\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"\025\n"
"\004Blob\022\r\n\005value\030\001 \001(\014\"#\n\007Address\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.MsgType\022\r\n\005"
"msgID\030\002 \001(\003\022\021\n\ttimestamp\030\003 \001(\004\022\020\n\010source"
"ID\030\004 \001(\003\"7\n\tMsgHeader\022*\n\004base\030\001 \001(\0132\034.mi"
"lvus.proto.common.MsgBase*\245\004\n\tErrorCode\022"
"\013\n\007Success\020\000\022\023\n\017UnexpectedError\020\001\022\021\n\rCon"
"nectFailed\020\002\022\024\n\020PermissionDenied\020\003\022\027\n\023Co"
"llectionNotExists\020\004\022\023\n\017IllegalArgument\020\005"
"\022\024\n\020IllegalDimension\020\007\022\024\n\020IllegalIndexTy"
"pe\020\010\022\031\n\025IllegalCollectionName\020\t\022\017\n\013Illeg"
"alTOPK\020\n\022\024\n\020IllegalRowRecord\020\013\022\023\n\017Illega"
"lVectorID\020\014\022\027\n\023IllegalSearchResult\020\r\022\020\n\014"
"FileNotFound\020\016\022\016\n\nMetaFailed\020\017\022\017\n\013CacheF"
"ailed\020\020\022\026\n\022CannotCreateFolder\020\021\022\024\n\020Canno"
"tCreateFile\020\022\022\026\n\022CannotDeleteFolder\020\023\022\024\n"
"\020CannotDeleteFile\020\024\022\023\n\017BuildIndexError\020\025"
"\022\020\n\014IllegalNLIST\020\026\022\025\n\021IllegalMetricType\020"
"\027\022\017\n\013OutOfMemory\020\030\022\021\n\rIndexNotExist\020\031\022\022\n"
"\rDDRequestRace\020\350\007*e\n\nIndexState\022\022\n\016Index"
"StateNone\020\000\022\014\n\010Unissued\020\001\022\016\n\nInProgress\020"
"\002\022\014\n\010Finished\020\003\022\n\n\006Failed\020\004\022\013\n\007Deleted\020\005"
"*X\n\014SegmentState\022\024\n\020SegmentStateNone\020\000\022\014"
"\n\010NotExist\020\001\022\013\n\007Growing\020\002\022\n\n\006Sealed\020\003\022\013\n"
"\007Flushed\020\004*\372\005\n\007MsgType\022\r\n\tUndefined\020\000\022\024\n"
"\020CreateCollection\020d\022\022\n\016DropCollection\020e\022"
"\021\n\rHasCollection\020f\022\026\n\022DescribeCollection"
"\020g\022\023\n\017ShowCollections\020h\022\024\n\020GetSystemConf"
"igs\020i\022\022\n\016LoadCollection\020j\022\025\n\021ReleaseColl"
"ection\020k\022\024\n\017CreatePartition\020\310\001\022\022\n\rDropPa"
"rtition\020\311\001\022\021\n\014HasPartition\020\312\001\022\026\n\021Describ"
"ePartition\020\313\001\022\023\n\016ShowPartitions\020\314\001\022\023\n\016Lo"
"adPartitions\020\315\001\022\026\n\021ReleasePartitions\020\316\001\022"
"\021\n\014ShowSegments\020\372\001\022\024\n\017DescribeSegment\020\373\001"
"\022\020\n\013CreateIndex\020\254\002\022\022\n\rDescribeIndex\020\255\002\022\016"
"\n\tDropIndex\020\256\002\022\013\n\006Insert\020\220\003\022\013\n\006Delete\020\221\003"
"\022\n\n\005Flush\020\222\003\022\013\n\006Search\020\364\003\022\021\n\014SearchResul"
"t\020\365\003\022\022\n\rGetIndexState\020\366\003\022\034\n\027GetCollectio"
"nStatistics\020\367\003\022\033\n\026GetPartitionStatistics"
"\020\370\003\022\020\n\013SegmentInfo\020\330\004\022\r\n\010TimeTick\020\260\t\022\023\n\016"
"QueryNodeStats\020\261\t\022\016\n\tLoadIndex\020\262\t\022\016\n\tReq"
"uestID\020\263\t\022\017\n\nRequestTSO\020\264\t\022\024\n\017AllocateSe"
"gment\020\265\t\022\026\n\021SegmentStatistics\020\266\t\022\025\n\020Segm"
"entFlushDone\020\267\tBBZ@github.com/zilliztech"
"/milvus-distributed/internal/proto/commo"
"npbb\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[7] = {
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_common_2eproto_sccs[6] = {
&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,
@ -288,10 +262,10 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_com
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_common_2eproto_once;
static bool descriptor_table_common_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_common_2eproto = {
&descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 1980,
&descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_sccs, descriptor_table_common_2eproto_deps, 7, 0,
&descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 1971,
&descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_sccs, descriptor_table_common_2eproto_deps, 6, 0,
schemas, file_default_instances, TableStruct_common_2eproto::offsets,
file_level_metadata_common_2eproto, 7, file_level_enum_descriptors_common_2eproto, file_level_service_descriptors_common_2eproto,
file_level_metadata_common_2eproto, 6, file_level_enum_descriptors_common_2eproto, file_level_service_descriptors_common_2eproto,
};
// Force running AddDescriptors() at dynamic initialization time.
@ -423,205 +397,6 @@ bool MsgType_IsValid(int value) {
}
// ===================================================================
void Empty::InitAsDefaultInstance() {
}
class Empty::_Internal {
public:
};
Empty::Empty()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:milvus.proto.common.Empty)
}
Empty::Empty(const Empty& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:milvus.proto.common.Empty)
}
void Empty::SharedCtor() {
}
Empty::~Empty() {
// @@protoc_insertion_point(destructor:milvus.proto.common.Empty)
SharedDtor();
}
void Empty::SharedDtor() {
}
void Empty::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const Empty& Empty::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Empty_common_2eproto.base);
return *internal_default_instance();
}
void Empty::Clear() {
// @@protoc_insertion_point(message_clear_start:milvus.proto.common.Empty)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* Empty::_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) {
default: {
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 Empty::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.Empty)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
}
success:
// @@protoc_insertion_point(parse_success:milvus.proto.common.Empty)
return true;
failure:
// @@protoc_insertion_point(parse_failure:milvus.proto.common.Empty)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void Empty::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:milvus.proto.common.Empty)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
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.Empty)
}
::PROTOBUF_NAMESPACE_ID::uint8* Empty::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:milvus.proto.common.Empty)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
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.Empty)
return target;
}
size_t Empty::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:milvus.proto.common.Empty)
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;
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void Empty::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.common.Empty)
GOOGLE_DCHECK_NE(&from, this);
const Empty* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Empty>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.common.Empty)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.common.Empty)
MergeFrom(*source);
}
}
void Empty::MergeFrom(const Empty& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.common.Empty)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
}
void Empty::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.common.Empty)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Empty::CopyFrom(const Empty& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.common.Empty)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Empty::IsInitialized() const {
return true;
}
void Empty::InternalSwap(Empty* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Empty::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void Status::InitAsDefaultInstance() {
@ -2492,9 +2267,6 @@ void MsgHeader::InternalSwap(MsgHeader* other) {
} // namespace proto
} // namespace milvus
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::milvus::proto::common::Empty* Arena::CreateMaybeMessage< ::milvus::proto::common::Empty >(Arena* arena) {
return Arena::CreateInternal< ::milvus::proto::common::Empty >(arena);
}
template<> PROTOBUF_NOINLINE ::milvus::proto::common::Status* Arena::CreateMaybeMessage< ::milvus::proto::common::Status >(Arena* arena) {
return Arena::CreateInternal< ::milvus::proto::common::Status >(arena);
}

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[7]
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[6]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
@ -64,9 +64,6 @@ extern AddressDefaultTypeInternal _Address_default_instance_;
class Blob;
class BlobDefaultTypeInternal;
extern BlobDefaultTypeInternal _Blob_default_instance_;
class Empty;
class EmptyDefaultTypeInternal;
extern EmptyDefaultTypeInternal _Empty_default_instance_;
class KeyValuePair;
class KeyValuePairDefaultTypeInternal;
extern KeyValuePairDefaultTypeInternal _KeyValuePair_default_instance_;
@ -85,7 +82,6 @@ extern StatusDefaultTypeInternal _Status_default_instance_;
PROTOBUF_NAMESPACE_OPEN
template<> ::milvus::proto::common::Address* Arena::CreateMaybeMessage<::milvus::proto::common::Address>(Arena*);
template<> ::milvus::proto::common::Blob* Arena::CreateMaybeMessage<::milvus::proto::common::Blob>(Arena*);
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*);
@ -264,128 +260,6 @@ inline bool MsgType_Parse(
}
// ===================================================================
class Empty :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.common.Empty) */ {
public:
Empty();
virtual ~Empty();
Empty(const Empty& from);
Empty(Empty&& from) noexcept
: Empty() {
*this = ::std::move(from);
}
inline Empty& operator=(const Empty& from) {
CopyFrom(from);
return *this;
}
inline Empty& operator=(Empty&& 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 Empty& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const Empty* internal_default_instance() {
return reinterpret_cast<const Empty*>(
&_Empty_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(Empty& a, Empty& b) {
a.Swap(&b);
}
inline void Swap(Empty* other) {
if (other == this) return;
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline Empty* New() const final {
return CreateMaybeMessage<Empty>(nullptr);
}
Empty* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<Empty>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const Empty& from);
void MergeFrom(const Empty& 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(Empty* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "milvus.proto.common.Empty";
}
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 -------------------------------------------------------
// @@protoc_insertion_point(class_scope:milvus.proto.common.Empty)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_common_2eproto;
};
// -------------------------------------------------------------------
class Status :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.common.Status) */ {
public:
@ -428,7 +302,7 @@ class Status :
&_Status_default_instance_);
}
static constexpr int kIndexInFileMessages =
1;
0;
friend void swap(Status& a, Status& b) {
a.Swap(&b);
@ -572,7 +446,7 @@ class KeyValuePair :
&_KeyValuePair_default_instance_);
}
static constexpr int kIndexInFileMessages =
2;
1;
friend void swap(KeyValuePair& a, KeyValuePair& b) {
a.Swap(&b);
@ -722,7 +596,7 @@ class Blob :
&_Blob_default_instance_);
}
static constexpr int kIndexInFileMessages =
3;
2;
friend void swap(Blob& a, Blob& b) {
a.Swap(&b);
@ -859,7 +733,7 @@ class Address :
&_Address_default_instance_);
}
static constexpr int kIndexInFileMessages =
4;
3;
friend void swap(Address& a, Address& b) {
a.Swap(&b);
@ -1003,7 +877,7 @@ class MsgBase :
&_MsgBase_default_instance_);
}
static constexpr int kIndexInFileMessages =
5;
4;
friend void swap(MsgBase& a, MsgBase& b) {
a.Swap(&b);
@ -1155,7 +1029,7 @@ class MsgHeader :
&_MsgHeader_default_instance_);
}
static constexpr int kIndexInFileMessages =
6;
5;
friend void swap(MsgHeader& a, MsgHeader& b) {
a.Swap(&b);
@ -1254,10 +1128,6 @@ class MsgHeader :
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// Empty
// -------------------------------------------------------------------
// Status
// .milvus.proto.common.ErrorCode error_code = 1;
@ -1683,8 +1553,6 @@ inline void MsgHeader::set_allocated_base(::milvus::proto::common::MsgBase* base
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -109,13 +109,13 @@ const char descriptor_table_protodef_schema_2eproto[] PROTOBUF_SECTION_VARIABLE(
"roto.common.KeyValuePair\"w\n\020CollectionSc"
"hema\022\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022"
"\016\n\006autoID\030\003 \001(\010\0220\n\006fields\030\004 \003(\0132 .milvus"
".proto.schema.FieldSchema*\221\001\n\010DataType\022\010"
"\n\004NONE\020\000\022\010\n\004BOOL\020\001\022\010\n\004INT8\020\002\022\t\n\005INT16\020\003\022"
"\t\n\005INT32\020\004\022\t\n\005INT64\020\005\022\t\n\005FLOAT\020\n\022\n\n\006DOUB"
"LE\020\013\022\n\n\006STRING\020\024\022\021\n\rVECTOR_BINARY\020d\022\020\n\014V"
"ECTOR_FLOAT\020eBBZ@github.com/zilliztech/m"
"ilvus-distributed/internal/proto/schemap"
"bb\006proto3"
".proto.schema.FieldSchema*\217\001\n\010DataType\022\010"
"\n\004None\020\000\022\010\n\004Bool\020\001\022\010\n\004Int8\020\002\022\t\n\005Int16\020\003\022"
"\t\n\005Int32\020\004\022\t\n\005Int64\020\005\022\t\n\005Float\020\n\022\n\n\006Doub"
"le\020\013\022\n\n\006String\020\024\022\020\n\014BinaryVector\020d\022\017\n\013Fl"
"oatVector\020eBBZ@github.com/zilliztech/mil"
"vus-distributed/internal/proto/schemapbb"
"\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_schema_2eproto_deps[1] = {
&::descriptor_table_common_2eproto,
@ -127,7 +127,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_sch
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_schema_2eproto_once;
static bool descriptor_table_schema_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_schema_2eproto = {
&descriptor_table_schema_2eproto_initialized, descriptor_table_protodef_schema_2eproto, "schema.proto", 649,
&descriptor_table_schema_2eproto_initialized, descriptor_table_protodef_schema_2eproto, "schema.proto", 647,
&descriptor_table_schema_2eproto_once, descriptor_table_schema_2eproto_sccs, descriptor_table_schema_2eproto_deps, 2, 1,
schemas, file_default_instances, TableStruct_schema_2eproto::offsets,
file_level_metadata_schema_2eproto, 2, file_level_enum_descriptors_schema_2eproto, file_level_service_descriptors_schema_2eproto,

View File

@ -77,23 +77,23 @@ namespace proto {
namespace schema {
enum DataType : int {
NONE = 0,
BOOL = 1,
INT8 = 2,
INT16 = 3,
INT32 = 4,
INT64 = 5,
FLOAT = 10,
DOUBLE = 11,
STRING = 20,
VECTOR_BINARY = 100,
VECTOR_FLOAT = 101,
None = 0,
Bool = 1,
Int8 = 2,
Int16 = 3,
Int32 = 4,
Int64 = 5,
Float = 10,
Double = 11,
String = 20,
BinaryVector = 100,
FloatVector = 101,
DataType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
DataType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
};
bool DataType_IsValid(int value);
constexpr DataType DataType_MIN = NONE;
constexpr DataType DataType_MAX = VECTOR_FLOAT;
constexpr DataType DataType_MIN = None;
constexpr DataType DataType_MAX = FloatVector;
constexpr int DataType_ARRAYSIZE = DataType_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DataType_descriptor();

View File

@ -162,7 +162,7 @@ TEST(CApiTest, SearchTest) {
ser::PlaceholderGroup raw_group;
auto value = raw_group.add_placeholders();
value->set_tag("$0");
value->set_type(ser::PlaceholderType::VECTOR_FLOAT);
value->set_type(ser::PlaceholderType::FloatVector);
for (int i = 0; i < num_queries; ++i) {
std::vector<float> vec;
for (int d = 0; d < dim; ++d) {
@ -385,9 +385,9 @@ generate_collection_shema(std::string metric_type, std::string dim, bool is_bina
vec_field_schema->set_name("fakevec");
vec_field_schema->set_fieldid(100);
if (is_binary) {
vec_field_schema->set_data_type(schema::DataType::VECTOR_BINARY);
vec_field_schema->set_data_type(schema::DataType::BinaryVector);
} else {
vec_field_schema->set_data_type(schema::DataType::VECTOR_FLOAT);
vec_field_schema->set_data_type(schema::DataType::FloatVector);
}
auto metric_type_param = vec_field_schema->add_index_params();
metric_type_param->set_key("metric_type");
@ -400,7 +400,7 @@ generate_collection_shema(std::string metric_type, std::string dim, bool is_bina
;
other_field_schema->set_name("counter");
other_field_schema->set_fieldid(101);
other_field_schema->set_data_type(schema::DataType::INT64);
other_field_schema->set_data_type(schema::DataType::Int64);
std::string schema_string;
auto marshal = google::protobuf::TextFormat::PrintToString(collection_schema, &schema_string);
@ -680,7 +680,7 @@ TEST(CApiTest, Reduce) {
ser::PlaceholderGroup raw_group;
auto value = raw_group.add_placeholders();
value->set_tag("$0");
value->set_type(ser::PlaceholderType::VECTOR_FLOAT);
value->set_type(ser::PlaceholderType::FloatVector);
for (int i = 0; i < num_queries; ++i) {
std::vector<float> vec;
for (int d = 0; d < dim; ++d) {
@ -1527,7 +1527,7 @@ TEST(CApiTest, SealedSegmentTest) {
fields: <
fieldID: 100
name: "vec"
data_type: VECTOR_FLOAT
data_type: FloatVector
type_params: <
key: "dim"
value: "16"
@ -1540,7 +1540,7 @@ TEST(CApiTest, SealedSegmentTest) {
fields: <
fieldID: 101
name: "age"
data_type: INT32
data_type: Int32
type_params: <
key: "dim"
value: "1"

View File

@ -595,7 +595,7 @@ TEST(Query, FillSegment) {
field->set_is_primary_key(false);
field->set_description("asdgfsagf");
field->set_fieldid(100);
field->set_data_type(pb::schema::DataType::VECTOR_FLOAT);
field->set_data_type(pb::schema::DataType::FloatVector);
auto param = field->add_type_params();
param->set_key("dim");
param->set_value("16");
@ -610,7 +610,7 @@ TEST(Query, FillSegment) {
field->set_fieldid(101);
field->set_is_primary_key(true);
field->set_description("asdgfsagf");
field->set_data_type(pb::schema::DataType::INT64);
field->set_data_type(pb::schema::DataType::Int64);
}
{
@ -619,7 +619,7 @@ TEST(Query, FillSegment) {
field->set_fieldid(102);
field->set_is_primary_key(false);
field->set_description("asdgfsagf");
field->set_data_type(pb::schema::DataType::INT32);
field->set_data_type(pb::schema::DataType::Int32);
}
auto schema = Schema::ParseFrom(proto);

View File

@ -197,7 +197,7 @@ CreatePlaceholderGroup(int64_t num_queries, int dim, int64_t seed = 42) {
ser::PlaceholderGroup raw_group;
auto value = raw_group.add_placeholders();
value->set_tag("$0");
value->set_type(ser::PlaceholderType::VECTOR_FLOAT);
value->set_type(ser::PlaceholderType::FloatVector);
std::normal_distribution<double> dis(0, 1);
std::default_random_engine e(seed);
for (int i = 0; i < num_queries; ++i) {
@ -217,7 +217,7 @@ CreatePlaceholderGroupFromBlob(int64_t num_queries, int dim, const float* src) {
ser::PlaceholderGroup raw_group;
auto value = raw_group.add_placeholders();
value->set_tag("$0");
value->set_type(ser::PlaceholderType::VECTOR_FLOAT);
value->set_type(ser::PlaceholderType::FloatVector);
int64_t src_index = 0;
for (int i = 0; i < num_queries; ++i) {
@ -238,7 +238,7 @@ CreateBinaryPlaceholderGroup(int64_t num_queries, int64_t dim, int64_t seed = 42
ser::PlaceholderGroup raw_group;
auto value = raw_group.add_placeholders();
value->set_tag("$0");
value->set_type(ser::PlaceholderType::VECTOR_BINARY);
value->set_type(ser::PlaceholderType::BinaryVector);
std::default_random_engine e(seed);
for (int i = 0; i < num_queries; ++i) {
std::vector<uint8_t> vec;
@ -258,7 +258,7 @@ CreateBinaryPlaceholderGroupFromBlob(int64_t num_queries, int64_t dim, const uin
ser::PlaceholderGroup raw_group;
auto value = raw_group.add_placeholders();
value->set_tag("$0");
value->set_type(ser::PlaceholderType::VECTOR_BINARY);
value->set_type(ser::PlaceholderType::BinaryVector);
for (int i = 0; i < num_queries; ++i) {
std::vector<uint8_t> vec;
for (int d = 0; d < dim / 8; ++d) {

View File

@ -24,7 +24,7 @@ func newAllocator(s types.MasterService) *allocator {
func (alloc *allocator) allocID() (UniqueID, error) {
ctx := context.TODO()
resp, err := alloc.masterService.AllocID(ctx, &masterpb.IDRequest{
resp, err := alloc.masterService.AllocID(ctx, &masterpb.AllocIDRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_RequestID,
MsgID: 1, // GOOSE TODO

View File

@ -7,7 +7,7 @@ import (
"go.uber.org/zap"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
)
@ -25,7 +25,7 @@ type Replica interface {
removeSegment(segmentID UniqueID) error
hasSegment(segmentID UniqueID) bool
updateStatistics(segmentID UniqueID, numRows int64) error
getSegmentStatisticsUpdates(segmentID UniqueID) (*internalpb2.SegmentStatisticsUpdates, error)
getSegmentStatisticsUpdates(segmentID UniqueID) (*internalpb.SegmentStatisticsUpdates, error)
getSegmentByID(segmentID UniqueID) (*Segment, error)
}
@ -38,8 +38,8 @@ type Segment struct {
isNew bool
createTime Timestamp // not using
endTime Timestamp // not using
startPosition *internalpb2.MsgPosition
endPosition *internalpb2.MsgPosition // not using
startPosition *internalpb.MsgPosition
endPosition *internalpb.MsgPosition // not using
}
type CollectionSegmentReplica struct {
@ -82,7 +82,7 @@ func (replica *CollectionSegmentReplica) addSegment(
defer replica.mu.Unlock()
log.Debug("Add Segment", zap.Int64("Segment ID", segmentID))
position := &internalpb2.MsgPosition{
position := &internalpb.MsgPosition{
ChannelName: channelName,
}
@ -93,7 +93,7 @@ func (replica *CollectionSegmentReplica) addSegment(
isNew: true,
createTime: 0,
startPosition: position,
endPosition: new(internalpb2.MsgPosition),
endPosition: new(internalpb.MsgPosition),
}
replica.segments = append(replica.segments, seg)
return nil
@ -142,18 +142,18 @@ func (replica *CollectionSegmentReplica) updateStatistics(segmentID UniqueID, nu
return fmt.Errorf("Error, there's no segment %v", segmentID)
}
func (replica *CollectionSegmentReplica) getSegmentStatisticsUpdates(segmentID UniqueID) (*internalpb2.SegmentStatisticsUpdates, error) {
func (replica *CollectionSegmentReplica) getSegmentStatisticsUpdates(segmentID UniqueID) (*internalpb.SegmentStatisticsUpdates, error) {
replica.mu.Lock()
defer replica.mu.Unlock()
for _, ele := range replica.segments {
if ele.segmentID == segmentID {
updates := &internalpb2.SegmentStatisticsUpdates{
updates := &internalpb.SegmentStatisticsUpdates{
SegmentID: segmentID,
MemorySize: ele.memorySize,
NumRows: ele.numRows,
IsNewSegment: ele.isNew,
StartPosition: new(internalpb2.MsgPosition),
StartPosition: new(internalpb.MsgPosition),
}
if ele.isNew {

View File

@ -19,7 +19,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
)
@ -32,7 +32,7 @@ type DataNode struct {
cancel context.CancelFunc
NodeID UniqueID
Role string
State atomic.Value // internalpb2.StateCode_Initializing
State atomic.Value // internalpb.StateCode_Initializing
watchDm chan struct{}
dataSyncService *dataSyncService
@ -65,7 +65,7 @@ func NewDataNode(ctx context.Context, factory msgstream.Factory) *DataNode {
replica: nil,
msFactory: factory,
}
node.UpdateStateCode(internalpb2.StateCode_Abnormal)
node.UpdateStateCode(internalpb.StateCode_Abnormal)
return node
}
@ -150,22 +150,22 @@ func (node *DataNode) Init() error {
func (node *DataNode) Start() error {
node.metaService.init()
go node.dataSyncService.start()
node.UpdateStateCode(internalpb2.StateCode_Healthy)
node.UpdateStateCode(internalpb.StateCode_Healthy)
return nil
}
func (node *DataNode) UpdateStateCode(code internalpb2.StateCode) {
func (node *DataNode) UpdateStateCode(code internalpb.StateCode) {
node.State.Store(code)
}
func (node *DataNode) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelRequest) (*commonpb.Status, error) {
func (node *DataNode) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelsRequest) (*commonpb.Status, error) {
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
}
switch {
case node.State.Load() != internalpb2.StateCode_Initializing:
case node.State.Load() != internalpb.StateCode_Initializing:
status.Reason = fmt.Sprintf("DataNode %d not initializing!", node.NodeID)
return status, errors.New(status.GetReason())
@ -181,33 +181,36 @@ func (node *DataNode) WatchDmChannels(ctx context.Context, in *datapb.WatchDmCha
}
}
func (node *DataNode) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
func (node *DataNode) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
log.Debug("DataNode current state", zap.Any("State", node.State.Load()))
states := &internalpb2.ComponentStates{
State: &internalpb2.ComponentInfo{
states := &internalpb.ComponentStates{
State: &internalpb.ComponentInfo{
NodeID: Params.NodeID,
Role: node.Role,
StateCode: node.State.Load().(internalpb2.StateCode),
StateCode: node.State.Load().(internalpb.StateCode),
},
SubcomponentStates: make([]*internalpb2.ComponentInfo, 0),
SubcomponentStates: make([]*internalpb.ComponentInfo, 0),
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success},
}
return states, nil
}
func (node *DataNode) FlushSegments(ctx context.Context, in *datapb.FlushSegRequest) error {
func (node *DataNode) FlushSegments(ctx context.Context, req *datapb.FlushSegmentsRequest) (*commonpb.Status, error) {
ids := make([]UniqueID, 0)
ids = append(ids, in.SegmentIDs...)
ids = append(ids, req.SegmentIDs...)
flushmsg := &flushMsg{
msgID: in.Base.MsgID,
timestamp: in.Base.Timestamp,
msgID: req.Base.MsgID,
timestamp: req.Base.Timestamp,
segmentIDs: ids,
collectionID: in.CollectionID,
collectionID: req.CollectionID,
}
node.flushChan <- flushmsg
return nil
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
Reason: "",
}, nil
}
func (node *DataNode) Stop() error {

View File

@ -20,7 +20,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/masterpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
@ -123,7 +123,7 @@ func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionNa
FieldID: 0,
Name: "RowID",
Description: "RowID field",
DataType: schemapb.DataType_INT64,
DataType: schemapb.DataType_Int64,
TypeParams: []*commonpb.KeyValuePair{
{
Key: "f0_tk1",
@ -135,7 +135,7 @@ func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionNa
FieldID: 1,
Name: "Timestamp",
Description: "Timestamp field",
DataType: schemapb.DataType_INT64,
DataType: schemapb.DataType_Int64,
TypeParams: []*commonpb.KeyValuePair{
{
Key: "f1_tk1",
@ -147,7 +147,7 @@ func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionNa
FieldID: 100,
Name: "float_vector_field",
Description: "field 100",
DataType: schemapb.DataType_VECTOR_FLOAT,
DataType: schemapb.DataType_FloatVector,
TypeParams: []*commonpb.KeyValuePair{
{
Key: "dim",
@ -165,7 +165,7 @@ func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionNa
FieldID: 101,
Name: "binary_vector_field",
Description: "field 101",
DataType: schemapb.DataType_VECTOR_BINARY,
DataType: schemapb.DataType_BinaryVector,
TypeParams: []*commonpb.KeyValuePair{
{
Key: "dim",
@ -183,7 +183,7 @@ func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionNa
FieldID: 102,
Name: "bool_field",
Description: "field 102",
DataType: schemapb.DataType_BOOL,
DataType: schemapb.DataType_Bool,
TypeParams: []*commonpb.KeyValuePair{},
IndexParams: []*commonpb.KeyValuePair{},
},
@ -191,7 +191,7 @@ func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionNa
FieldID: 103,
Name: "int8_field",
Description: "field 103",
DataType: schemapb.DataType_INT8,
DataType: schemapb.DataType_Int8,
TypeParams: []*commonpb.KeyValuePair{},
IndexParams: []*commonpb.KeyValuePair{},
},
@ -199,7 +199,7 @@ func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionNa
FieldID: 104,
Name: "int16_field",
Description: "field 104",
DataType: schemapb.DataType_INT16,
DataType: schemapb.DataType_Int16,
TypeParams: []*commonpb.KeyValuePair{},
IndexParams: []*commonpb.KeyValuePair{},
},
@ -207,7 +207,7 @@ func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionNa
FieldID: 105,
Name: "int32_field",
Description: "field 105",
DataType: schemapb.DataType_INT32,
DataType: schemapb.DataType_Int32,
TypeParams: []*commonpb.KeyValuePair{},
IndexParams: []*commonpb.KeyValuePair{},
},
@ -215,7 +215,7 @@ func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionNa
FieldID: 106,
Name: "int64_field",
Description: "field 106",
DataType: schemapb.DataType_INT64,
DataType: schemapb.DataType_Int64,
TypeParams: []*commonpb.KeyValuePair{},
IndexParams: []*commonpb.KeyValuePair{},
},
@ -223,7 +223,7 @@ func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionNa
FieldID: 107,
Name: "float32_field",
Description: "field 107",
DataType: schemapb.DataType_FLOAT,
DataType: schemapb.DataType_Float,
TypeParams: []*commonpb.KeyValuePair{},
IndexParams: []*commonpb.KeyValuePair{},
},
@ -231,7 +231,7 @@ func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionNa
FieldID: 108,
Name: "float64_field",
Description: "field 108",
DataType: schemapb.DataType_DOUBLE,
DataType: schemapb.DataType_Double,
TypeParams: []*commonpb.KeyValuePair{},
IndexParams: []*commonpb.KeyValuePair{},
},
@ -337,7 +337,7 @@ func (df *DataFactory) GetMsgStreamTsInsertMsgs(n int) (inMsgs []msgstream.TsMsg
BaseMsg: msgstream.BaseMsg{
HashValues: []uint32{uint32(i)},
},
InsertRequest: internalpb2.InsertRequest{
InsertRequest: internalpb.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert,
MsgID: 0, // GOOSE TODO
@ -365,7 +365,7 @@ func (df *DataFactory) GetMsgStreamInsertMsgs(n int) (inMsgs []*msgstream.Insert
BaseMsg: msgstream.BaseMsg{
HashValues: []uint32{uint32(i)},
},
InsertRequest: internalpb2.InsertRequest{
InsertRequest: internalpb.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert,
MsgID: 0, // GOOSE TODO
@ -417,16 +417,16 @@ func (m *MasterServiceFactory) setCollectionName(name string) {
m.collectionName = name
}
func (m *MasterServiceFactory) AllocID(ctx context.Context, in *masterpb.IDRequest) (*masterpb.IDResponse, error) {
resp := &masterpb.IDResponse{
func (m *MasterServiceFactory) AllocID(ctx context.Context, in *masterpb.AllocIDRequest) (*masterpb.AllocIDResponse, error) {
resp := &masterpb.AllocIDResponse{
Status: &commonpb.Status{},
ID: m.ID,
}
return resp, nil
}
func (m *MasterServiceFactory) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error) {
resp := &milvuspb.ShowCollectionResponse{
func (m *MasterServiceFactory) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
resp := &milvuspb.ShowCollectionsResponse{
Status: &commonpb.Status{},
CollectionNames: []string{m.collectionName},
}
@ -444,10 +444,10 @@ func (m *MasterServiceFactory) DescribeCollection(ctx context.Context, in *milvu
return resp, nil
}
func (m *MasterServiceFactory) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
return &internalpb2.ComponentStates{
State: &internalpb2.ComponentInfo{},
SubcomponentStates: make([]*internalpb2.ComponentInfo, 0),
func (m *MasterServiceFactory) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
return &internalpb.ComponentStates{
State: &internalpb.ComponentInfo{},
SubcomponentStates: make([]*internalpb.ComponentInfo, 0),
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},

View File

@ -11,7 +11,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/msgstream/pulsarms"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
// NOTE: start pulsar before test
@ -72,7 +72,7 @@ func TestDataSyncService_Start(t *testing.T) {
EndTimestamp: Timestamp(0),
HashValues: []uint32{0},
},
TimeTickMsg: internalpb2.TimeTickMsg{
TimeTickMsg: internalpb.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_TimeTick,
MsgID: UniqueID(0),

View File

@ -9,7 +9,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/util/flowgraph"
)
@ -43,7 +43,7 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
collID := UniqueID(0)
collName := "col-test-0"
// create collection
createCollReq := internalpb2.CreateCollectionRequest{
createCollReq := internalpb.CreateCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_CreateCollection,
MsgID: 1,
@ -66,7 +66,7 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
}
// drop collection
dropCollReq := internalpb2.DropCollectionRequest{
dropCollReq := internalpb.DropCollectionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_DropCollection,
MsgID: 2,
@ -90,7 +90,7 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
partitionID := UniqueID(100)
partitionName := "partition-test-0"
// create partition
createPartitionReq := internalpb2.CreatePartitionRequest{
createPartitionReq := internalpb.CreatePartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_CreatePartition,
MsgID: 3,
@ -114,7 +114,7 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
}
// drop partition
dropPartitionReq := internalpb2.DropPartitionRequest{
dropPartitionReq := internalpb.DropPartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_DropPartition,
MsgID: 4,
@ -150,7 +150,7 @@ func TestFlowGraphDDNode_Operate(t *testing.T) {
tsMessages = append(tsMessages, msgstream.TsMsg(&dropCollMsg))
tsMessages = append(tsMessages, msgstream.TsMsg(&createPartitionMsg))
tsMessages = append(tsMessages, msgstream.TsMsg(&dropPartitionMsg))
msgStream := flowgraph.GenerateMsgStreamMsg(tsMessages, Timestamp(0), Timestamp(3), make([]*internalpb2.MsgPosition, 0))
msgStream := flowgraph.GenerateMsgStreamMsg(tsMessages, Timestamp(0), Timestamp(3), make([]*internalpb.MsgPosition, 0))
var inMsg Msg = msgStream
ddNode.Operate(ctx, []Msg{inMsg})
}

View File

@ -9,7 +9,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
type filterDmNode struct {
@ -49,7 +49,7 @@ func (fdmNode *filterDmNode) Operate(ctx context.Context, in []Msg) ([]Msg, cont
timestampMin: msgStreamMsg.TimestampMin(),
timestampMax: msgStreamMsg.TimestampMax(),
},
startPositions: make([]*internalpb2.MsgPosition, 0),
startPositions: make([]*internalpb.MsgPosition, 0),
}
iMsg.flushMessages = append(iMsg.flushMessages, ddMsg.flushMessages...)

View File

@ -19,7 +19,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
)
@ -178,7 +178,7 @@ func (ibNode *insertBufferNode) Operate(ctx context.Context, in []Msg) ([]Msg, c
var pos int = 0 // Record position of blob
for _, field := range collSchema.Fields {
switch field.DataType {
case schemapb.DataType_VECTOR_FLOAT:
case schemapb.DataType_FloatVector:
var dim int
for _, t := range field.TypeParams {
if t.Key == "dim" {
@ -221,7 +221,7 @@ func (ibNode *insertBufferNode) Operate(ctx context.Context, in []Msg) ([]Msg, c
pos += offset
fieldData.NumRows += len(msg.RowIDs)
case schemapb.DataType_VECTOR_BINARY:
case schemapb.DataType_BinaryVector:
var dim int
for _, t := range field.TypeParams {
if t.Key == "dim" {
@ -255,7 +255,7 @@ func (ibNode *insertBufferNode) Operate(ctx context.Context, in []Msg) ([]Msg, c
pos += offset
fieldData.NumRows += len(msg.RowData)
case schemapb.DataType_BOOL:
case schemapb.DataType_Bool:
if _, ok := idata.Data[field.FieldID]; !ok {
idata.Data[field.FieldID] = &storage.BoolFieldData{
NumRows: 0,
@ -276,7 +276,7 @@ func (ibNode *insertBufferNode) Operate(ctx context.Context, in []Msg) ([]Msg, c
pos += int(unsafe.Sizeof(*(&v)))
fieldData.NumRows += len(msg.RowIDs)
case schemapb.DataType_INT8:
case schemapb.DataType_Int8:
if _, ok := idata.Data[field.FieldID]; !ok {
idata.Data[field.FieldID] = &storage.Int8FieldData{
NumRows: 0,
@ -296,7 +296,7 @@ func (ibNode *insertBufferNode) Operate(ctx context.Context, in []Msg) ([]Msg, c
pos += int(unsafe.Sizeof(*(&v)))
fieldData.NumRows += len(msg.RowIDs)
case schemapb.DataType_INT16:
case schemapb.DataType_Int16:
if _, ok := idata.Data[field.FieldID]; !ok {
idata.Data[field.FieldID] = &storage.Int16FieldData{
NumRows: 0,
@ -316,7 +316,7 @@ func (ibNode *insertBufferNode) Operate(ctx context.Context, in []Msg) ([]Msg, c
pos += int(unsafe.Sizeof(*(&v)))
fieldData.NumRows += len(msg.RowIDs)
case schemapb.DataType_INT32:
case schemapb.DataType_Int32:
if _, ok := idata.Data[field.FieldID]; !ok {
idata.Data[field.FieldID] = &storage.Int32FieldData{
NumRows: 0,
@ -336,7 +336,7 @@ func (ibNode *insertBufferNode) Operate(ctx context.Context, in []Msg) ([]Msg, c
pos += int(unsafe.Sizeof(*(&v)))
fieldData.NumRows += len(msg.RowIDs)
case schemapb.DataType_INT64:
case schemapb.DataType_Int64:
if _, ok := idata.Data[field.FieldID]; !ok {
idata.Data[field.FieldID] = &storage.Int64FieldData{
NumRows: 0,
@ -367,7 +367,7 @@ func (ibNode *insertBufferNode) Operate(ctx context.Context, in []Msg) ([]Msg, c
fieldData.NumRows += len(msg.RowIDs)
}
case schemapb.DataType_FLOAT:
case schemapb.DataType_Float:
if _, ok := idata.Data[field.FieldID]; !ok {
idata.Data[field.FieldID] = &storage.FloatFieldData{
NumRows: 0,
@ -387,7 +387,7 @@ func (ibNode *insertBufferNode) Operate(ctx context.Context, in []Msg) ([]Msg, c
pos += int(unsafe.Sizeof(*(&v)))
fieldData.NumRows += len(msg.RowIDs)
case schemapb.DataType_DOUBLE:
case schemapb.DataType_Double:
if _, ok := idata.Data[field.FieldID]; !ok {
idata.Data[field.FieldID] = &storage.DoubleFieldData{
NumRows: 0,
@ -535,7 +535,7 @@ func (ibNode *insertBufferNode) flushSegment(segID UniqueID, partitionID UniqueI
func (ibNode *insertBufferNode) completeFlush(segID UniqueID) error {
msgPack := msgstream.MsgPack{}
completeFlushMsg := internalpb2.SegmentFlushCompletedMsg{
completeFlushMsg := internalpb.SegmentFlushCompletedMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_SegmentFlushDone,
MsgID: 0, // GOOSE TODO
@ -563,7 +563,7 @@ func (ibNode *insertBufferNode) writeHardTimeTick(ts Timestamp) error {
EndTimestamp: ts,
HashValues: []uint32{0},
},
TimeTickMsg: internalpb2.TimeTickMsg{
TimeTickMsg: internalpb.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_TimeTick,
MsgID: 0, // GOOSE TODO
@ -576,9 +576,9 @@ func (ibNode *insertBufferNode) writeHardTimeTick(ts Timestamp) error {
return ibNode.timeTickStream.Produce(context.TODO(), &msgPack)
}
func (ibNode *insertBufferNode) updateSegStatistics(segIDs []UniqueID, currentPosition *internalpb2.MsgPosition) error {
func (ibNode *insertBufferNode) updateSegStatistics(segIDs []UniqueID, currentPosition *internalpb.MsgPosition) error {
log.Debug("Updating segments statistics...")
statsUpdates := make([]*internalpb2.SegmentStatisticsUpdates, 0, len(segIDs))
statsUpdates := make([]*internalpb.SegmentStatisticsUpdates, 0, len(segIDs))
for _, segID := range segIDs {
updates, err := ibNode.replica.getSegmentStatisticsUpdates(segID)
if err != nil {
@ -590,7 +590,7 @@ func (ibNode *insertBufferNode) updateSegStatistics(segIDs []UniqueID, currentPo
statsUpdates = append(statsUpdates, updates)
}
segStats := internalpb2.SegmentStatistics{
segStats := internalpb.SegmentStatistics{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_SegmentStatistics,
MsgID: UniqueID(0), // GOOSE TODO

View File

@ -2,7 +2,7 @@ package datanode
import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/util/flowgraph"
)
@ -35,7 +35,7 @@ type (
flushMessages []*flushMsg
gcRecord *gcRecord
timeRange TimeRange
startPositions []*internalpb2.MsgPosition
startPositions []*internalpb.MsgPosition
}
deleteMsg struct {

View File

@ -54,7 +54,7 @@ func (mService *metaService) loadCollections(ctx context.Context) error {
}
func (mService *metaService) getCollectionNames(ctx context.Context) ([]string, error) {
req := &milvuspb.ShowCollectionRequest{
req := &milvuspb.ShowCollectionsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowCollections,
MsgID: 0, //GOOSE TODO

View File

@ -26,7 +26,7 @@ func newAllocator(masterClient types.MasterService) *allocator {
func (allocator *allocator) allocTimestamp() (Timestamp, error) {
ctx := context.TODO()
resp, err := allocator.masterClient.AllocTimestamp(ctx, &masterpb.TsoRequest{
resp, err := allocator.masterClient.AllocTimestamp(ctx, &masterpb.AllocTimestampRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowCollections,
MsgID: -1, // todo add msg id
@ -43,7 +43,7 @@ func (allocator *allocator) allocTimestamp() (Timestamp, error) {
func (allocator *allocator) allocID() (UniqueID, error) {
ctx := context.TODO()
resp, err := allocator.masterClient.AllocID(ctx, &masterpb.IDRequest{
resp, err := allocator.masterClient.AllocID(ctx, &masterpb.AllocIDRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowCollections,
MsgID: -1, // todo add msg id

View File

@ -12,7 +12,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
type dataNode struct {
@ -90,7 +90,7 @@ func (c *dataNodeCluster) WatchInsertChannels(channels []string) {
groups[i%length] = append(groups[i%length], channel)
}
for i, group := range groups {
resp, err := c.nodes[i].client.WatchDmChannels(ctx, &datapb.WatchDmChannelRequest{
resp, err := c.nodes[i].client.WatchDmChannels(ctx, &datapb.WatchDmChannelsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_DescribeCollection,
MsgID: -1, // todo
@ -107,10 +107,10 @@ func (c *dataNodeCluster) WatchInsertChannels(channels []string) {
}
}
func (c *dataNodeCluster) GetDataNodeStates(ctx context.Context) ([]*internalpb2.ComponentInfo, error) {
func (c *dataNodeCluster) GetDataNodeStates(ctx context.Context) ([]*internalpb.ComponentInfo, error) {
c.mu.RLock()
defer c.mu.RUnlock()
ret := make([]*internalpb2.ComponentInfo, 0)
ret := make([]*internalpb.ComponentInfo, 0)
for _, node := range c.nodes {
states, err := node.client.GetComponentStates(ctx)
if err != nil {
@ -122,7 +122,7 @@ func (c *dataNodeCluster) GetDataNodeStates(ctx context.Context) ([]*internalpb2
return ret, nil
}
func (c *dataNodeCluster) FlushSegment(request *datapb.FlushSegRequest) {
func (c *dataNodeCluster) FlushSegment(request *datapb.FlushSegmentsRequest) {
ctx := context.TODO()
c.mu.RLock()
defer c.mu.RUnlock()

View File

@ -10,7 +10,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
)
@ -396,12 +396,12 @@ func BuildSegment(collectionID UniqueID, partitionID UniqueID, segmentID UniqueI
NumRows: 0,
MemSize: 0,
State: commonpb.SegmentState_Growing,
StartPosition: &internalpb2.MsgPosition{
StartPosition: &internalpb.MsgPosition{
ChannelName: channelName,
MsgID: "0",
Timestamp: 0,
},
EndPosition: &internalpb2.MsgPosition{
EndPosition: &internalpb.MsgPosition{
ChannelName: channelName,
MsgID: "0",
Timestamp: 0,

View File

@ -10,7 +10,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
)
@ -46,8 +46,8 @@ func newTestSchema() *schemapb.CollectionSchema {
Description: "schema for test used",
AutoID: false,
Fields: []*schemapb.FieldSchema{
{FieldID: 1, Name: "field1", IsPrimaryKey: false, Description: "field no.1", DataType: schemapb.DataType_STRING},
{FieldID: 2, Name: "field2", IsPrimaryKey: false, Description: "field no.2", DataType: schemapb.DataType_VECTOR_FLOAT},
{FieldID: 1, Name: "field1", IsPrimaryKey: false, Description: "field no.1", DataType: schemapb.DataType_String},
{FieldID: 2, Name: "field2", IsPrimaryKey: false, Description: "field no.2", DataType: schemapb.DataType_FloatVector},
},
}
}
@ -63,7 +63,7 @@ func (c *mockDataNodeClient) Start() error {
return nil
}
func (c *mockDataNodeClient) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
func (c *mockDataNodeClient) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
//TODO
return nil, nil
}
@ -76,11 +76,11 @@ func newMockDataNodeClient() *mockDataNodeClient {
return &mockDataNodeClient{}
}
func (c *mockDataNodeClient) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelRequest) (*commonpb.Status, error) {
func (c *mockDataNodeClient) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelsRequest) (*commonpb.Status, error) {
return &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, nil
}
func (c *mockDataNodeClient) FlushSegments(ctx context.Context, in *datapb.FlushSegRequest) (*commonpb.Status, error) {
func (c *mockDataNodeClient) FlushSegments(ctx context.Context, in *datapb.FlushSegmentsRequest) (*commonpb.Status, error) {
return &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, nil
}

View File

@ -28,7 +28,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
)
@ -73,7 +73,7 @@ func CreateServer(ctx context.Context, factory msgstream.Factory) (*Server, erro
msFactory: factory,
}
s.insertChannels = s.getInsertChannels()
s.UpdateStateCode(internalpb2.StateCode_Abnormal)
s.UpdateStateCode(internalpb.StateCode_Abnormal)
return s, nil
}
@ -122,17 +122,17 @@ func (s *Server) Start() error {
return err
}
s.startServerLoop()
s.UpdateStateCode(internalpb2.StateCode_Healthy)
s.UpdateStateCode(internalpb.StateCode_Healthy)
log.Debug("start success")
return nil
}
func (s *Server) UpdateStateCode(code internalpb2.StateCode) {
func (s *Server) UpdateStateCode(code internalpb.StateCode) {
s.state.Store(code)
}
func (s *Server) checkStateIsHealthy() bool {
return s.state.Load().(internalpb2.StateCode) == internalpb2.StateCode_Healthy
return s.state.Load().(internalpb.StateCode) == internalpb.StateCode_Healthy
}
func (s *Server) initMeta() error {
@ -202,7 +202,7 @@ func (s *Server) loadMetaFromMaster() error {
}
s.ddChannelName = channel.Value
}
collections, err := s.masterClient.ShowCollections(ctx, &milvuspb.ShowCollectionRequest{
collections, err := s.masterClient.ShowCollections(ctx, &milvuspb.ShowCollectionsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowCollections,
MsgID: -1, // todo add msg id
@ -229,7 +229,7 @@ func (s *Server) loadMetaFromMaster() error {
log.Error("describe collection error", zap.String("collectionName", collectionName), zap.Error(err))
continue
}
partitions, err := s.masterClient.ShowPartitions(ctx, &milvuspb.ShowPartitionRequest{
partitions, err := s.masterClient.ShowPartitions(ctx, &milvuspb.ShowPartitionsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowPartitions,
MsgID: -1, // todo
@ -266,7 +266,7 @@ func (s *Server) checkMasterIsHealthy() error {
cancel()
}()
for {
var resp *internalpb2.ComponentStates
var resp *internalpb.ComponentStates
var err error
select {
case <-ctx.Done():
@ -277,7 +277,7 @@ func (s *Server) checkMasterIsHealthy() error {
return err
}
}
if resp.State.StateCode == internalpb2.StateCode_Healthy {
if resp.State.StateCode == internalpb.StateCode_Healthy {
break
}
}
@ -404,12 +404,12 @@ func (s *Server) stopServerLoop() {
s.serverLoopWg.Wait()
}
func (s *Server) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
resp := &internalpb2.ComponentStates{
State: &internalpb2.ComponentInfo{
func (s *Server) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
resp := &internalpb.ComponentStates{
State: &internalpb.ComponentInfo{
NodeID: Params.NodeID,
Role: role,
StateCode: s.state.Load().(internalpb2.StateCode),
StateCode: s.state.Load().(internalpb.StateCode),
},
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
@ -466,7 +466,7 @@ func (s *Server) RegisterNode(ctx context.Context, req *datapb.RegisterNodeReque
s.ddChannelName = resp.Value
}
ret.Status.ErrorCode = commonpb.ErrorCode_Success
ret.InitParams = &internalpb2.InitParams{
ret.InitParams = &internalpb.InitParams{
NodeID: Params.NodeID,
StartParams: []*commonpb.KeyValuePair{
{Key: "DDChannelName", Value: s.ddChannelName},
@ -511,26 +511,26 @@ func (s *Server) Flush(ctx context.Context, req *datapb.FlushRequest) (*commonpb
}, nil
}
func (s *Server) AssignSegmentID(ctx context.Context, req *datapb.AssignSegIDRequest) (*datapb.AssignSegIDResponse, error) {
resp := &datapb.AssignSegIDResponse{
func (s *Server) AssignSegmentID(ctx context.Context, req *datapb.AssignSegmentIDRequest) (*datapb.AssignSegmentIDResponse, error) {
resp := &datapb.AssignSegmentIDResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
SegIDAssignments: make([]*datapb.SegIDAssignment, 0),
SegIDAssignments: make([]*datapb.SegmentIDAssignment, 0),
}
if !s.checkStateIsHealthy() {
resp.Status.ErrorCode = commonpb.ErrorCode_UnexpectedError
resp.Status.Reason = "server is initializing"
return resp, nil
}
for _, r := range req.SegIDRequests {
for _, r := range req.SegmentIDRequests {
if !s.meta.HasCollection(r.CollectionID) {
if err := s.loadCollectionFromMaster(r.CollectionID); err != nil {
log.Error("load collection from master error", zap.Int64("collectionID", r.CollectionID), zap.Error(err))
continue
}
}
result := &datapb.SegIDAssignment{
result := &datapb.SegmentIDAssignment{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
},
@ -630,8 +630,8 @@ func (s *Server) openNewSegment(collectionID UniqueID, partitionID UniqueID, cha
return nil
}
func (s *Server) ShowSegments(ctx context.Context, req *datapb.ShowSegmentRequest) (*datapb.ShowSegmentResponse, error) {
resp := &datapb.ShowSegmentResponse{
func (s *Server) ShowSegments(ctx context.Context, req *datapb.ShowSegmentsRequest) (*datapb.ShowSegmentsResponse, error) {
resp := &datapb.ShowSegmentsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
},
@ -646,8 +646,8 @@ func (s *Server) ShowSegments(ctx context.Context, req *datapb.ShowSegmentReques
return resp, nil
}
func (s *Server) GetSegmentStates(ctx context.Context, req *datapb.SegmentStatesRequest) (*datapb.SegmentStatesResponse, error) {
resp := &datapb.SegmentStatesResponse{
func (s *Server) GetSegmentStates(ctx context.Context, req *datapb.GetSegmentStatesRequest) (*datapb.GetSegmentStatesResponse, error) {
resp := &datapb.GetSegmentStatesResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
},
@ -682,8 +682,8 @@ func (s *Server) GetSegmentStates(ctx context.Context, req *datapb.SegmentStates
return resp, nil
}
func (s *Server) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertBinlogPathRequest) (*datapb.InsertBinlogPathsResponse, error) {
resp := &datapb.InsertBinlogPathsResponse{
func (s *Server) GetInsertBinlogPaths(ctx context.Context, req *datapb.GetInsertBinlogPathsRequest) (*datapb.GetInsertBinlogPathsResponse, error) {
resp := &datapb.GetInsertBinlogPathsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
},
@ -701,10 +701,10 @@ func (s *Server) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertBin
return resp, nil
}
fields := make([]UniqueID, len(flushMeta.Fields))
paths := make([]*internalpb2.StringList, len(flushMeta.Fields))
paths := make([]*internalpb.StringList, len(flushMeta.Fields))
for i, field := range flushMeta.Fields {
fields[i] = field.FieldID
paths[i] = &internalpb2.StringList{Values: field.BinlogPaths}
paths[i] = &internalpb.StringList{Values: field.BinlogPaths}
}
resp.Status.ErrorCode = commonpb.ErrorCode_Success
resp.FieldIDs = fields
@ -712,8 +712,8 @@ func (s *Server) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertBin
return resp, nil
}
func (s *Server) GetInsertChannels(ctx context.Context, req *datapb.InsertChannelRequest) (*internalpb2.StringList, error) {
return &internalpb2.StringList{
func (s *Server) GetInsertChannels(ctx context.Context, req *datapb.GetInsertChannelsRequest) (*internalpb.StringList, error) {
return &internalpb.StringList{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
@ -721,8 +721,8 @@ func (s *Server) GetInsertChannels(ctx context.Context, req *datapb.InsertChanne
}, nil
}
func (s *Server) GetCollectionStatistics(ctx context.Context, req *datapb.CollectionStatsRequest) (*datapb.CollectionStatsResponse, error) {
resp := &datapb.CollectionStatsResponse{
func (s *Server) GetCollectionStatistics(ctx context.Context, req *datapb.GetCollectionStatisticsRequest) (*datapb.GetCollectionStatisticsResponse, error) {
resp := &datapb.GetCollectionStatisticsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
},
@ -737,7 +737,7 @@ func (s *Server) GetCollectionStatistics(ctx context.Context, req *datapb.Collec
return resp, nil
}
func (s *Server) GetPartitionStatistics(ctx context.Context, req *datapb.PartitionStatsRequest) (*datapb.PartitionStatsResponse, error) {
func (s *Server) GetPartitionStatistics(ctx context.Context, req *datapb.GetPartitionStatisticsRequest) (*datapb.GetPartitionStatisticsResponse, error) {
// todo implement
return nil, nil
}
@ -751,8 +751,8 @@ func (s *Server) GetSegmentInfoChannel(ctx context.Context) (*milvuspb.StringRes
}, nil
}
func (s *Server) GetSegmentInfo(ctx context.Context, req *datapb.SegmentInfoRequest) (*datapb.SegmentInfoResponse, error) {
resp := &datapb.SegmentInfoResponse{
func (s *Server) GetSegmentInfo(ctx context.Context, req *datapb.GetSegmentInfoRequest) (*datapb.GetSegmentInfoResponse, error) {
resp := &datapb.GetSegmentInfoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
},

View File

@ -1,7 +1,7 @@
package dataservice
import (
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
type statsHandler struct {
@ -14,7 +14,7 @@ func newStatsHandler(meta *meta) *statsHandler {
}
}
func (handler *statsHandler) HandleSegmentStat(segStats *internalpb2.SegmentStatisticsUpdates) error {
func (handler *statsHandler) HandleSegmentStat(segStats *internalpb.SegmentStatisticsUpdates) error {
segMeta, err := handler.meta.GetSegment(segStats.SegmentID)
if err != nil {
return err

View File

@ -96,7 +96,7 @@ func (watcher *dataNodeTimeTickWatcher) handleTimeTickMsg(msg *msgstream.TimeTic
log.Error("set segment state error", zap.Int64("segmentID", id), zap.Error(err))
continue
}
watcher.cluster.FlushSegment(&datapb.FlushSegRequest{
watcher.cluster.FlushSegment(&datapb.FlushSegmentsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Flush,
MsgID: -1, // todo add msg id

View File

@ -7,7 +7,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/stretchr/testify/assert"
)
@ -82,7 +82,7 @@ func TestDataNodeTTWatcher(t *testing.T) {
BaseMsg: msgstream.BaseMsg{
HashValues: []uint32{0},
},
TimeTickMsg: internalpb2.TimeTickMsg{
TimeTickMsg: internalpb.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_TimeTick,
Timestamp: ts,

View File

@ -11,7 +11,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"go.uber.org/zap"
@ -35,7 +35,7 @@ func NewClient(address string) *Client {
func (c *Client) Init() error {
tracer := opentracing.GlobalTracer()
connectGrpcFunc := func() error {
log.Debug("DataNode connect czs::", zap.String("address", c.address))
log.Debug("DataNode connect ", zap.String("address", c.address))
conn, err := grpc.DialContext(c.ctx, c.address, grpc.WithInsecure(), grpc.WithBlock(),
grpc.WithUnaryInterceptor(
otgrpc.OpenTracingClientInterceptor(tracer)),
@ -64,19 +64,18 @@ func (c *Client) Stop() error {
return c.conn.Close()
}
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
return c.grpc.GetComponentStates(ctx, &commonpb.Empty{})
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
return c.grpc.GetComponentStates(ctx, &internalpb.GetComponentStatesRequest{})
}
func (c *Client) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
//TODO: implement grpc GetStatisticsChannel interface
panic("implement me")
return c.grpc.GetStatisticsChannel(ctx, &internalpb.GetStatisticsChannelRequest{})
}
func (c *Client) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelRequest) (*commonpb.Status, error) {
return c.grpc.WatchDmChannels(ctx, in)
func (c *Client) WatchDmChannels(ctx context.Context, req *datapb.WatchDmChannelsRequest) (*commonpb.Status, error) {
return c.grpc.WatchDmChannels(ctx, req)
}
func (c *Client) FlushSegments(ctx context.Context, in *datapb.FlushSegRequest) (*commonpb.Status, error) {
return c.grpc.FlushSegments(ctx, in)
func (c *Client) FlushSegments(ctx context.Context, req *datapb.FlushSegmentsRequest) (*commonpb.Status, error) {
return c.grpc.FlushSegments(ctx, req)
}

View File

@ -25,7 +25,8 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
)
@ -214,7 +215,7 @@ func (s *Server) init() error {
dn.Params.IP = Params.IP
s.datanode.NodeID = dn.Params.NodeID
s.datanode.UpdateStateCode(internalpb2.StateCode_Initializing)
s.datanode.UpdateStateCode(internalpb.StateCode_Initializing)
if err := s.datanode.Init(); err != nil {
log.Warn("datanode init error: ", zap.Error(err))
@ -227,22 +228,24 @@ func (s *Server) start() error {
return s.datanode.Start()
}
func (s *Server) GetComponentStates(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error) {
func (s *Server) GetComponentStates(ctx context.Context, req *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
return s.datanode.GetComponentStates(ctx)
}
func (s *Server) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelRequest) (*commonpb.Status, error) {
return s.datanode.WatchDmChannels(ctx, in)
func (s *Server) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
return s.datanode.GetStatisticsChannel(ctx)
}
func (s *Server) FlushSegments(ctx context.Context, in *datapb.FlushSegRequest) (*commonpb.Status, error) {
if s.datanode.State.Load().(internalpb2.StateCode) != internalpb2.StateCode_Healthy {
func (s *Server) WatchDmChannels(ctx context.Context, req *datapb.WatchDmChannelsRequest) (*commonpb.Status, error) {
return s.datanode.WatchDmChannels(ctx, req)
}
func (s *Server) FlushSegments(ctx context.Context, req *datapb.FlushSegmentsRequest) (*commonpb.Status, error) {
if s.datanode.State.Load().(internalpb.StateCode) != internalpb.StateCode_Healthy {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: "DataNode isn't healthy.",
}, errors.New("DataNode is not ready yet")
}
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
}, s.datanode.FlushSegments(ctx, in)
return s.datanode.FlushSegments(ctx, req)
}

View File

@ -6,15 +6,15 @@ import (
otgrpc "github.com/opentracing-contrib/go-grpc"
"github.com/opentracing/opentracing-go"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/util/retry"
"go.uber.org/zap"
"google.golang.org/grpc"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
type Client struct {
@ -34,6 +34,7 @@ func NewClient(addr string) *Client {
func (c *Client) Init() error {
tracer := opentracing.GlobalTracer()
connectGrpcFunc := func() error {
log.Debug("dataservice connect ", zap.String("address", c.addr))
conn, err := grpc.DialContext(c.ctx, c.addr, grpc.WithInsecure(), grpc.WithBlock(),
grpc.WithUnaryInterceptor(
otgrpc.OpenTracingClientInterceptor(tracer)),
@ -63,16 +64,16 @@ func (c *Client) Stop() error {
return c.conn.Close()
}
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
return c.grpcClient.GetComponentStates(ctx, &commonpb.Empty{})
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
return c.grpcClient.GetComponentStates(ctx, &internalpb.GetComponentStatesRequest{})
}
func (c *Client) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetTimeTickChannel(ctx, &commonpb.Empty{})
return c.grpcClient.GetTimeTickChannel(ctx, &internalpb.GetTimeTickChannelRequest{})
}
func (c *Client) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetStatisticsChannel(ctx, &commonpb.Empty{})
return c.grpcClient.GetStatisticsChannel(ctx, &internalpb.GetStatisticsChannelRequest{})
}
func (c *Client) RegisterNode(ctx context.Context, req *datapb.RegisterNodeRequest) (*datapb.RegisterNodeResponse, error) {
@ -83,38 +84,38 @@ func (c *Client) Flush(ctx context.Context, req *datapb.FlushRequest) (*commonpb
return c.grpcClient.Flush(ctx, req)
}
func (c *Client) AssignSegmentID(ctx context.Context, req *datapb.AssignSegIDRequest) (*datapb.AssignSegIDResponse, error) {
func (c *Client) AssignSegmentID(ctx context.Context, req *datapb.AssignSegmentIDRequest) (*datapb.AssignSegmentIDResponse, error) {
return c.grpcClient.AssignSegmentID(ctx, req)
}
func (c *Client) ShowSegments(ctx context.Context, req *datapb.ShowSegmentRequest) (*datapb.ShowSegmentResponse, error) {
func (c *Client) ShowSegments(ctx context.Context, req *datapb.ShowSegmentsRequest) (*datapb.ShowSegmentsResponse, error) {
return c.grpcClient.ShowSegments(ctx, req)
}
func (c *Client) GetSegmentStates(ctx context.Context, req *datapb.SegmentStatesRequest) (*datapb.SegmentStatesResponse, error) {
func (c *Client) GetSegmentStates(ctx context.Context, req *datapb.GetSegmentStatesRequest) (*datapb.GetSegmentStatesResponse, error) {
return c.grpcClient.GetSegmentStates(ctx, req)
}
func (c *Client) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertBinlogPathRequest) (*datapb.InsertBinlogPathsResponse, error) {
func (c *Client) GetInsertBinlogPaths(ctx context.Context, req *datapb.GetInsertBinlogPathsRequest) (*datapb.GetInsertBinlogPathsResponse, error) {
return c.grpcClient.GetInsertBinlogPaths(ctx, req)
}
func (c *Client) GetInsertChannels(ctx context.Context, req *datapb.InsertChannelRequest) (*internalpb2.StringList, error) {
func (c *Client) GetInsertChannels(ctx context.Context, req *datapb.GetInsertChannelsRequest) (*internalpb.StringList, error) {
return c.grpcClient.GetInsertChannels(ctx, req)
}
func (c *Client) GetCollectionStatistics(ctx context.Context, req *datapb.CollectionStatsRequest) (*datapb.CollectionStatsResponse, error) {
func (c *Client) GetCollectionStatistics(ctx context.Context, req *datapb.GetCollectionStatisticsRequest) (*datapb.GetCollectionStatisticsResponse, error) {
return c.grpcClient.GetCollectionStatistics(ctx, req)
}
func (c *Client) GetPartitionStatistics(ctx context.Context, req *datapb.PartitionStatsRequest) (*datapb.PartitionStatsResponse, error) {
func (c *Client) GetPartitionStatistics(ctx context.Context, req *datapb.GetPartitionStatisticsRequest) (*datapb.GetPartitionStatisticsResponse, error) {
return c.grpcClient.GetPartitionStatistics(ctx, req)
}
func (c *Client) GetSegmentInfoChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetSegmentInfoChannel(ctx, &commonpb.Empty{})
return c.grpcClient.GetSegmentInfoChannel(ctx, &datapb.GetSegmentInfoChannelRequest{})
}
func (c *Client) GetSegmentInfo(ctx context.Context, req *datapb.SegmentInfoRequest) (*datapb.SegmentInfoResponse, error) {
func (c *Client) GetSegmentInfo(ctx context.Context, req *datapb.GetSegmentInfoRequest) (*datapb.GetSegmentInfoResponse, error) {
return c.grpcClient.GetSegmentInfo(ctx, req)
}

View File

@ -28,18 +28,18 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
)
type Server struct {
ctx context.Context
cancel context.CancelFunc
dataService *dataservice.Server
ctx context.Context
cancel context.CancelFunc
grpcErrChan chan error
wg sync.WaitGroup
dataService *dataservice.Server
grpcServer *grpc.Server
masterService types.MasterService
@ -101,7 +101,7 @@ func (s *Server) init() error {
if err = client.Start(); err != nil {
panic(err)
}
s.dataService.UpdateStateCode(internalpb2.StateCode_Initializing)
s.dataService.UpdateStateCode(internalpb.StateCode_Initializing)
ctx := context.Background()
err = funcutil.WaitForComponentInitOrHealthy(ctx, client, "MasterService", 100, time.Millisecond*200)
@ -188,58 +188,58 @@ func (s *Server) Run() error {
return nil
}
func (s *Server) GetSegmentInfo(ctx context.Context, request *datapb.SegmentInfoRequest) (*datapb.SegmentInfoResponse, error) {
return s.dataService.GetSegmentInfo(ctx, request)
}
func (s *Server) RegisterNode(ctx context.Context, request *datapb.RegisterNodeRequest) (*datapb.RegisterNodeResponse, error) {
return s.dataService.RegisterNode(ctx, request)
}
func (s *Server) Flush(ctx context.Context, request *datapb.FlushRequest) (*commonpb.Status, error) {
return s.dataService.Flush(ctx, request)
}
func (s *Server) AssignSegmentID(ctx context.Context, request *datapb.AssignSegIDRequest) (*datapb.AssignSegIDResponse, error) {
return s.dataService.AssignSegmentID(ctx, request)
}
func (s *Server) ShowSegments(ctx context.Context, request *datapb.ShowSegmentRequest) (*datapb.ShowSegmentResponse, error) {
return s.dataService.ShowSegments(ctx, request)
}
func (s *Server) GetSegmentStates(ctx context.Context, request *datapb.SegmentStatesRequest) (*datapb.SegmentStatesResponse, error) {
return s.dataService.GetSegmentStates(ctx, request)
}
func (s *Server) GetInsertBinlogPaths(ctx context.Context, request *datapb.InsertBinlogPathRequest) (*datapb.InsertBinlogPathsResponse, error) {
return s.dataService.GetInsertBinlogPaths(ctx, request)
}
func (s *Server) GetInsertChannels(ctx context.Context, request *datapb.InsertChannelRequest) (*internalpb2.StringList, error) {
return s.dataService.GetInsertChannels(ctx, request)
}
func (s *Server) GetCollectionStatistics(ctx context.Context, request *datapb.CollectionStatsRequest) (*datapb.CollectionStatsResponse, error) {
return s.dataService.GetCollectionStatistics(ctx, request)
}
func (s *Server) GetPartitionStatistics(ctx context.Context, request *datapb.PartitionStatsRequest) (*datapb.PartitionStatsResponse, error) {
return s.dataService.GetPartitionStatistics(ctx, request)
}
func (s *Server) GetComponentStates(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error) {
func (s *Server) GetComponentStates(ctx context.Context, req *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
return s.dataService.GetComponentStates(ctx)
}
func (s *Server) GetTimeTickChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
func (s *Server) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) {
return s.dataService.GetTimeTickChannel(ctx)
}
func (s *Server) GetStatisticsChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
func (s *Server) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
return s.dataService.GetStatisticsChannel(ctx)
}
func (s *Server) GetSegmentInfoChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
func (s *Server) GetSegmentInfo(ctx context.Context, req *datapb.GetSegmentInfoRequest) (*datapb.GetSegmentInfoResponse, error) {
return s.dataService.GetSegmentInfo(ctx, req)
}
func (s *Server) RegisterNode(ctx context.Context, req *datapb.RegisterNodeRequest) (*datapb.RegisterNodeResponse, error) {
return s.dataService.RegisterNode(ctx, req)
}
func (s *Server) Flush(ctx context.Context, req *datapb.FlushRequest) (*commonpb.Status, error) {
return s.dataService.Flush(ctx, req)
}
func (s *Server) AssignSegmentID(ctx context.Context, req *datapb.AssignSegmentIDRequest) (*datapb.AssignSegmentIDResponse, error) {
return s.dataService.AssignSegmentID(ctx, req)
}
func (s *Server) ShowSegments(ctx context.Context, req *datapb.ShowSegmentsRequest) (*datapb.ShowSegmentsResponse, error) {
return s.dataService.ShowSegments(ctx, req)
}
func (s *Server) GetSegmentStates(ctx context.Context, req *datapb.GetSegmentStatesRequest) (*datapb.GetSegmentStatesResponse, error) {
return s.dataService.GetSegmentStates(ctx, req)
}
func (s *Server) GetInsertBinlogPaths(ctx context.Context, req *datapb.GetInsertBinlogPathsRequest) (*datapb.GetInsertBinlogPathsResponse, error) {
return s.dataService.GetInsertBinlogPaths(ctx, req)
}
func (s *Server) GetInsertChannels(ctx context.Context, req *datapb.GetInsertChannelsRequest) (*internalpb.StringList, error) {
return s.dataService.GetInsertChannels(ctx, req)
}
func (s *Server) GetCollectionStatistics(ctx context.Context, req *datapb.GetCollectionStatisticsRequest) (*datapb.GetCollectionStatisticsResponse, error) {
return s.dataService.GetCollectionStatistics(ctx, req)
}
func (s *Server) GetPartitionStatistics(ctx context.Context, req *datapb.GetPartitionStatisticsRequest) (*datapb.GetPartitionStatisticsResponse, error) {
return s.dataService.GetPartitionStatistics(ctx, req)
}
func (s *Server) GetSegmentInfoChannel(ctx context.Context, req *datapb.GetSegmentInfoChannelRequest) (*milvuspb.StringResponse, error) {
return s.dataService.GetSegmentInfoChannel(ctx)
}

View File

@ -4,16 +4,17 @@ import (
"context"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/util/retry"
otgrpc "github.com/opentracing-contrib/go-grpc"
"github.com/opentracing/opentracing-go"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/util/retry"
"go.uber.org/zap"
"google.golang.org/grpc"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"google.golang.org/grpc"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
type Client struct {
@ -22,9 +23,17 @@ type Client struct {
ctx context.Context
}
func NewClient(nodeAddress string) (*Client, error) {
return &Client{
address: nodeAddress,
ctx: context.Background(),
}, nil
}
func (c *Client) Init() error {
tracer := opentracing.GlobalTracer()
connectGrpcFunc := func() error {
log.Debug("indexnode connect ", zap.String("address", c.address))
conn, err := grpc.DialContext(c.ctx, c.address, grpc.WithInsecure(), grpc.WithBlock(),
grpc.WithUnaryInterceptor(
otgrpc.OpenTracingClientInterceptor(tracer)),
@ -51,30 +60,22 @@ func (c *Client) Stop() error {
return nil
}
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
return c.grpcClient.GetComponentStates(ctx, &commonpb.Empty{})
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
return c.grpcClient.GetComponentStates(ctx, &internalpb.GetComponentStatesRequest{})
}
func (c *Client) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetTimeTickChannel(ctx, &commonpb.Empty{})
return c.grpcClient.GetTimeTickChannel(ctx, &internalpb.GetTimeTickChannelRequest{})
}
func (c *Client) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetStatisticsChannel(ctx, &commonpb.Empty{})
return c.grpcClient.GetStatisticsChannel(ctx, &internalpb.GetStatisticsChannelRequest{})
}
func (c *Client) BuildIndex(ctx context.Context, req *indexpb.BuildIndexCmd) (*commonpb.Status, error) {
func (c *Client) BuildIndex(ctx context.Context, req *indexpb.BuildIndexRequest) (*commonpb.Status, error) {
return c.grpcClient.BuildIndex(ctx, req)
}
func (c *Client) DropIndex(ctx context.Context, req *indexpb.DropIndexRequest) (*commonpb.Status, error) {
return c.grpcClient.DropIndex(ctx, req)
}
func NewClient(nodeAddress string) (*Client, error) {
return &Client{
address: nodeAddress,
ctx: context.Background(),
}, nil
}

View File

@ -16,7 +16,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
@ -119,7 +119,7 @@ func (s *Server) init() error {
indexnode.Params.IP = Params.IP
indexnode.Params.Address = Params.Address
s.indexnode.UpdateStateCode(internalpb2.StateCode_Initializing)
s.indexnode.UpdateStateCode(internalpb.StateCode_Initializing)
err = s.indexnode.Init()
if err != nil {
@ -149,7 +149,19 @@ func (s *Server) Stop() error {
return nil
}
func (s *Server) BuildIndex(ctx context.Context, req *indexpb.BuildIndexCmd) (*commonpb.Status, error) {
func (s *Server) GetComponentStates(ctx context.Context, req *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
return s.indexnode.GetComponentStates(ctx)
}
func (s *Server) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) {
return s.indexnode.GetTimeTickChannel(ctx)
}
func (s *Server) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
return s.indexnode.GetStatisticsChannel(ctx)
}
func (s *Server) BuildIndex(ctx context.Context, req *indexpb.BuildIndexRequest) (*commonpb.Status, error) {
return s.indexnode.BuildIndex(ctx, req)
}
@ -157,18 +169,6 @@ func (s *Server) DropIndex(ctx context.Context, request *indexpb.DropIndexReques
return s.indexnode.DropIndex(ctx, request)
}
func (s *Server) GetComponentStates(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error) {
return s.indexnode.GetComponentStates(ctx)
}
func (s *Server) GetTimeTickChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.indexnode.GetTimeTickChannel(ctx)
}
func (s *Server) GetStatisticsChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.indexnode.GetStatisticsChannel(ctx)
}
func NewServer(ctx context.Context) (*Server, error) {
ctx1, cancel := context.WithCancel(ctx)
node, err := indexnode.NewIndexNode(ctx1)

View File

@ -8,12 +8,15 @@ import (
otgrpc "github.com/opentracing-contrib/go-grpc"
"github.com/opentracing/opentracing-go"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/util/retry"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
"go.uber.org/zap"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
)
type UniqueID = typeutil.UniqueID
@ -24,9 +27,18 @@ type Client struct {
ctx context.Context
}
func NewClient(address string) *Client {
return &Client{
address: address,
ctx: context.Background(),
}
}
func (c *Client) Init() error {
tracer := opentracing.GlobalTracer()
connectGrpcFunc := func() error {
log.Debug("indexservice connect ", zap.String("address", c.address))
conn, err := grpc.DialContext(c.ctx, c.address, grpc.WithInsecure(), grpc.WithBlock(),
grpc.WithUnaryInterceptor(
otgrpc.OpenTracingClientInterceptor(tracer)),
@ -52,24 +64,16 @@ func (c *Client) Stop() error {
return nil
}
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
return c.grpcClient.GetComponentStates(ctx, &commonpb.Empty{})
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
return c.grpcClient.GetComponentStates(ctx, &internalpb.GetComponentStatesRequest{})
}
func (c *Client) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
}, nil
return c.grpcClient.GetTimeTickChannel(ctx, &internalpb.GetTimeTickChannelRequest{})
}
func (c *Client) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
}, nil
return c.grpcClient.GetStatisticsChannel(ctx, &internalpb.GetStatisticsChannelRequest{})
}
func (c *Client) RegisterNode(ctx context.Context, req *indexpb.RegisterNodeRequest) (*indexpb.RegisterNodeResponse, error) {
@ -84,21 +88,13 @@ func (c *Client) DropIndex(ctx context.Context, req *indexpb.DropIndexRequest) (
return c.grpcClient.DropIndex(ctx, req)
}
func (c *Client) GetIndexStates(ctx context.Context, req *indexpb.IndexStatesRequest) (*indexpb.IndexStatesResponse, error) {
func (c *Client) GetIndexStates(ctx context.Context, req *indexpb.GetIndexStatesRequest) (*indexpb.GetIndexStatesResponse, error) {
return c.grpcClient.GetIndexStates(ctx, req)
}
func (c *Client) GetIndexFilePaths(ctx context.Context, req *indexpb.IndexFilePathsRequest) (*indexpb.IndexFilePathsResponse, error) {
func (c *Client) GetIndexFilePaths(ctx context.Context, req *indexpb.GetIndexFilePathsRequest) (*indexpb.GetIndexFilePathsResponse, error) {
return c.grpcClient.GetIndexFilePaths(ctx, req)
}
func (c *Client) NotifyBuildIndex(ctx context.Context, nty *indexpb.BuildIndexNotification) (*commonpb.Status, error) {
func (c *Client) NotifyBuildIndex(ctx context.Context, nty *indexpb.NotifyBuildIndexRequest) (*commonpb.Status, error) {
return c.grpcClient.NotifyBuildIndex(ctx, nty)
}
func NewClient(address string) *Client {
return &Client{
address: address,
ctx: context.Background(),
}
}

View File

@ -18,7 +18,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
@ -63,7 +63,7 @@ func (s *Server) init() error {
if err := <-s.grpcErrChan; err != nil {
return err
}
s.indexservice.UpdateStateCode(internalpb2.StateCode_Initializing)
s.indexservice.UpdateStateCode(internalpb.StateCode_Initializing)
if err := s.indexservice.Init(); err != nil {
return err
@ -96,6 +96,18 @@ func (s *Server) Stop() error {
return nil
}
func (s *Server) GetComponentStates(ctx context.Context, req *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
return s.indexservice.GetComponentStates(ctx)
}
func (s *Server) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) {
return s.indexservice.GetTimeTickChannel(ctx)
}
func (s *Server) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
return s.indexservice.GetStatisticsChannel(ctx)
}
func (s *Server) RegisterNode(ctx context.Context, req *indexpb.RegisterNodeRequest) (*indexpb.RegisterNodeResponse, error) {
return s.indexservice.RegisterNode(ctx, req)
}
@ -104,7 +116,7 @@ func (s *Server) BuildIndex(ctx context.Context, req *indexpb.BuildIndexRequest)
return s.indexservice.BuildIndex(ctx, req)
}
func (s *Server) GetIndexStates(ctx context.Context, req *indexpb.IndexStatesRequest) (*indexpb.IndexStatesResponse, error) {
func (s *Server) GetIndexStates(ctx context.Context, req *indexpb.GetIndexStatesRequest) (*indexpb.GetIndexStatesResponse, error) {
return s.indexservice.GetIndexStates(ctx, req)
}
@ -112,11 +124,11 @@ func (s *Server) DropIndex(ctx context.Context, request *indexpb.DropIndexReques
return s.indexservice.DropIndex(ctx, request)
}
func (s *Server) GetIndexFilePaths(ctx context.Context, req *indexpb.IndexFilePathsRequest) (*indexpb.IndexFilePathsResponse, error) {
func (s *Server) GetIndexFilePaths(ctx context.Context, req *indexpb.GetIndexFilePathsRequest) (*indexpb.GetIndexFilePathsResponse, error) {
return s.indexservice.GetIndexFilePaths(ctx, req)
}
func (s *Server) NotifyBuildIndex(ctx context.Context, nty *indexpb.BuildIndexNotification) (*commonpb.Status, error) {
func (s *Server) NotifyBuildIndex(ctx context.Context, nty *indexpb.NotifyBuildIndexRequest) (*commonpb.Status, error) {
return s.indexservice.NotifyBuildIndex(ctx, nty)
}
@ -149,19 +161,6 @@ func (s *Server) startGrpcLoop(grpcPort int) {
if err := s.grpcServer.Serve(lis); err != nil {
s.grpcErrChan <- err
}
}
func (s *Server) GetComponentStates(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error) {
return s.indexservice.GetComponentStates(ctx)
}
func (s *Server) GetTimeTickChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.indexservice.GetTimeTickChannel(ctx)
}
func (s *Server) GetStatisticsChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.indexservice.GetStatisticsChannel(ctx)
}
func NewServer(ctx context.Context) (*Server, error) {

View File

@ -7,7 +7,7 @@ import (
otgrpc "github.com/opentracing-contrib/go-grpc"
"github.com/opentracing/opentracing-go"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/masterpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"google.golang.org/grpc"
@ -65,8 +65,21 @@ func (c *GrpcClient) Stop() error {
}
// TODO: timeout need to be propagated through ctx
func (c *GrpcClient) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
return c.grpcClient.GetComponentStatesRPC(ctx, &commonpb.Empty{})
func (c *GrpcClient) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
return c.grpcClient.GetComponentStates(ctx, &internalpb.GetComponentStatesRequest{})
}
func (c *GrpcClient) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetTimeTickChannel(ctx, &internalpb.GetTimeTickChannelRequest{})
}
//just define a channel, not used currently
func (c *GrpcClient) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetStatisticsChannel(ctx, &internalpb.GetStatisticsChannelRequest{})
}
//receive ddl from rpc and time tick from proxy service, and put them into this channel
func (c *GrpcClient) GetDdChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetDdChannel(ctx, &internalpb.GetDdChannelRequest{})
}
//DDL request
@ -84,7 +97,7 @@ func (c *GrpcClient) DescribeCollection(ctx context.Context, in *milvuspb.Descri
return c.grpcClient.DescribeCollection(ctx, in)
}
func (c *GrpcClient) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error) {
func (c *GrpcClient) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
return c.grpcClient.ShowCollections(ctx, in)
}
@ -100,7 +113,7 @@ func (c *GrpcClient) HasPartition(ctx context.Context, in *milvuspb.HasPartition
return c.grpcClient.HasPartition(ctx, in)
}
func (c *GrpcClient) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionRequest) (*milvuspb.ShowPartitionResponse, error) {
func (c *GrpcClient) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
return c.grpcClient.ShowPartitions(ctx, in)
}
@ -118,32 +131,18 @@ func (c *GrpcClient) DescribeIndex(ctx context.Context, in *milvuspb.DescribeInd
}
//global timestamp allocator
func (c *GrpcClient) AllocTimestamp(ctx context.Context, in *masterpb.TsoRequest) (*masterpb.TsoResponse, error) {
func (c *GrpcClient) AllocTimestamp(ctx context.Context, in *masterpb.AllocTimestampRequest) (*masterpb.AllocTimestampResponse, error) {
return c.grpcClient.AllocTimestamp(ctx, in)
}
func (c *GrpcClient) AllocID(ctx context.Context, in *masterpb.IDRequest) (*masterpb.IDResponse, error) {
func (c *GrpcClient) AllocID(ctx context.Context, in *masterpb.AllocIDRequest) (*masterpb.AllocIDResponse, error) {
return c.grpcClient.AllocID(ctx, in)
}
//receiver time tick from proxy service, and put it into this channel
func (c *GrpcClient) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetTimeTickChannelRPC(ctx, &commonpb.Empty{})
}
//receive ddl from rpc and time tick from proxy service, and put them into this channel
func (c *GrpcClient) GetDdChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetDdChannelRPC(ctx, &commonpb.Empty{})
}
//just define a channel, not used currently
func (c *GrpcClient) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetStatisticsChannelRPC(ctx, &commonpb.Empty{})
}
func (c *GrpcClient) DescribeSegment(ctx context.Context, in *milvuspb.DescribeSegmentRequest) (*milvuspb.DescribeSegmentResponse, error) {
return c.grpcClient.DescribeSegment(ctx, in)
}
func (c *GrpcClient) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentRequest) (*milvuspb.ShowSegmentResponse, error) {
func (c *GrpcClient) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) {
return c.grpcClient.ShowSegments(ctx, in)
}

View File

@ -19,7 +19,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream/pulsarms"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"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/typeutil"
@ -64,7 +64,7 @@ func TestGrpcService(t *testing.T) {
err = svr.startGrpc()
assert.Nil(t, err)
svr.masterService.UpdateStateCode(internalpb2.StateCode_Initializing)
svr.masterService.UpdateStateCode(internalpb.StateCode_Initializing)
core := svr.masterService
err = core.Init()
@ -79,29 +79,29 @@ func TestGrpcService(t *testing.T) {
timeTickArray = append(timeTickArray, ts)
return nil
}
createCollectionArray := make([]*internalpb2.CreateCollectionRequest, 0, 16)
core.DdCreateCollectionReq = func(req *internalpb2.CreateCollectionRequest) error {
createCollectionArray := make([]*internalpb.CreateCollectionRequest, 0, 16)
core.DdCreateCollectionReq = func(req *internalpb.CreateCollectionRequest) error {
t.Logf("Create Colllection %s", req.CollectionName)
createCollectionArray = append(createCollectionArray, req)
return nil
}
dropCollectionArray := make([]*internalpb2.DropCollectionRequest, 0, 16)
core.DdDropCollectionReq = func(req *internalpb2.DropCollectionRequest) error {
dropCollectionArray := make([]*internalpb.DropCollectionRequest, 0, 16)
core.DdDropCollectionReq = func(req *internalpb.DropCollectionRequest) error {
t.Logf("Drop Collection %s", req.CollectionName)
dropCollectionArray = append(dropCollectionArray, req)
return nil
}
createPartitionArray := make([]*internalpb2.CreatePartitionRequest, 0, 16)
core.DdCreatePartitionReq = func(req *internalpb2.CreatePartitionRequest) error {
createPartitionArray := make([]*internalpb.CreatePartitionRequest, 0, 16)
core.DdCreatePartitionReq = func(req *internalpb.CreatePartitionRequest) error {
t.Logf("Create Partition %s", req.PartitionName)
createPartitionArray = append(createPartitionArray, req)
return nil
}
dropPartitionArray := make([]*internalpb2.DropPartitionRequest, 0, 16)
core.DdDropPartitionReq = func(req *internalpb2.DropPartitionRequest) error {
dropPartitionArray := make([]*internalpb.DropPartitionRequest, 0, 16)
core.DdDropPartitionReq = func(req *internalpb.DropPartitionRequest) error {
t.Logf("Drop Partition %s", req.PartitionName)
dropPartitionArray = append(dropPartitionArray, req)
return nil
@ -147,7 +147,7 @@ func TestGrpcService(t *testing.T) {
err = svr.start()
assert.Nil(t, err)
svr.masterService.UpdateStateCode(internalpb2.StateCode_Healthy)
svr.masterService.UpdateStateCode(internalpb.StateCode_Healthy)
cli, err := grpcmasterserviceclient.NewClient(Params.Address, 3*time.Second)
assert.Nil(t, err)
@ -169,7 +169,7 @@ func TestGrpcService(t *testing.T) {
Name: "vector",
IsPrimaryKey: false,
Description: "vector",
DataType: schemapb.DataType_VECTOR_FLOAT,
DataType: schemapb.DataType_FloatVector,
TypeParams: nil,
IndexParams: []*commonpb.KeyValuePair{
{
@ -319,7 +319,7 @@ func TestGrpcService(t *testing.T) {
})
t.Run("show collection", func(t *testing.T) {
req := &milvuspb.ShowCollectionRequest{
req := &milvuspb.ShowCollectionsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowCollections,
MsgID: 130,
@ -380,7 +380,7 @@ func TestGrpcService(t *testing.T) {
t.Run("show partition", func(t *testing.T) {
coll, err := core.MetaTable.GetCollectionByName("testColl")
assert.Nil(t, err)
req := &milvuspb.ShowPartitionRequest{
req := &milvuspb.ShowPartitionsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowPartitions,
MsgID: 160,
@ -416,7 +416,7 @@ func TestGrpcService(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, len(part.SegmentIDs), 1)
req := &milvuspb.ShowSegmentRequest{
req := &milvuspb.ShowSegmentsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowSegments,
MsgID: 170,

View File

@ -26,7 +26,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/masterpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
@ -114,7 +114,7 @@ func (s *Server) init() error {
return err
}
s.masterService.UpdateStateCode(internalpb2.StateCode_Initializing)
s.masterService.UpdateStateCode(internalpb.StateCode_Initializing)
if s.connectProxyService {
log.Debug("proxy service", zap.String("address", Params.ProxyServiceAddress))
@ -261,10 +261,25 @@ func (s *Server) Stop() error {
return nil
}
func (s *Server) GetComponentStatesRPC(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error) {
func (s *Server) GetComponentStates(ctx context.Context, req *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
return s.masterService.GetComponentStates(ctx)
}
//receiver time tick from proxy service, and put it into this channel
func (s *Server) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) {
return s.masterService.GetTimeTickChannel(ctx)
}
//just define a channel, not used currently
func (s *Server) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
return s.masterService.GetStatisticsChannel(ctx)
}
//receive ddl from rpc and time tick from proxy service, and put them into this channel
func (s *Server) GetDdChannel(ctx context.Context, req *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error) {
return s.masterService.GetDdChannel(ctx)
}
//DDL request
func (s *Server) CreateCollection(ctx context.Context, in *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) {
return s.masterService.CreateCollection(ctx, in)
@ -282,7 +297,7 @@ func (s *Server) DescribeCollection(ctx context.Context, in *milvuspb.DescribeCo
return s.masterService.DescribeCollection(ctx, in)
}
func (s *Server) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error) {
func (s *Server) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
return s.masterService.ShowCollections(ctx, in)
}
@ -298,7 +313,7 @@ func (s *Server) HasPartition(ctx context.Context, in *milvuspb.HasPartitionRequ
return s.masterService.HasPartition(ctx, in)
}
func (s *Server) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionRequest) (*milvuspb.ShowPartitionResponse, error) {
func (s *Server) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
return s.masterService.ShowPartitions(ctx, in)
}
@ -316,33 +331,18 @@ func (s *Server) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRe
}
//global timestamp allocator
func (s *Server) AllocTimestamp(ctx context.Context, in *masterpb.TsoRequest) (*masterpb.TsoResponse, error) {
func (s *Server) AllocTimestamp(ctx context.Context, in *masterpb.AllocTimestampRequest) (*masterpb.AllocTimestampResponse, error) {
return s.masterService.AllocTimestamp(ctx, in)
}
func (s *Server) AllocID(ctx context.Context, in *masterpb.IDRequest) (*masterpb.IDResponse, error) {
func (s *Server) AllocID(ctx context.Context, in *masterpb.AllocIDRequest) (*masterpb.AllocIDResponse, error) {
return s.masterService.AllocID(ctx, in)
}
//receiver time tick from proxy service, and put it into this channel
func (s *Server) GetTimeTickChannelRPC(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.masterService.GetTimeTickChannel(ctx)
}
//receive ddl from rpc and time tick from proxy service, and put them into this channel
func (s *Server) GetDdChannelRPC(ctx context.Context, in *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.masterService.GetDdChannel(ctx)
}
//just define a channel, not used currently
func (s *Server) GetStatisticsChannelRPC(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.masterService.GetStatisticsChannel(ctx)
}
func (s *Server) DescribeSegment(ctx context.Context, in *milvuspb.DescribeSegmentRequest) (*milvuspb.DescribeSegmentResponse, error) {
return s.masterService.DescribeSegment(ctx, in)
}
func (s *Server) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentRequest) (*milvuspb.ShowSegmentResponse, error) {
func (s *Server) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) {
return s.masterService.ShowSegments(ctx, in)
}

View File

@ -6,11 +6,13 @@ import (
otgrpc "github.com/opentracing-contrib/go-grpc"
"github.com/opentracing/opentracing-go"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/util/retry"
"go.uber.org/zap"
"google.golang.org/grpc"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
)
@ -21,19 +23,17 @@ type Client struct {
ctx context.Context
}
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
//TODO
panic("implement me")
}
func (c *Client) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
//TODO
panic("implement me")
func NewClient(ctx context.Context, address string) *Client {
return &Client{
address: address,
ctx: ctx,
}
}
func (c *Client) Init() error {
tracer := opentracing.GlobalTracer()
connectGrpcFunc := func() error {
log.Debug("proxynode connect ", zap.String("address", c.address))
conn, err := grpc.DialContext(c.ctx, c.address, grpc.WithInsecure(), grpc.WithBlock(),
grpc.WithUnaryInterceptor(
otgrpc.OpenTracingClientInterceptor(tracer)),
@ -60,13 +60,14 @@ func (c *Client) Stop() error {
return nil
}
func (c *Client) InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) {
return c.grpcClient.InvalidateCollectionMetaCache(ctx, request)
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
return c.grpcClient.GetComponentStates(ctx, &internalpb.GetComponentStatesRequest{})
}
func NewClient(ctx context.Context, address string) *Client {
return &Client{
address: address,
ctx: ctx,
}
func (c *Client) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetStatisticsChannel(ctx, &internalpb.GetStatisticsChannelRequest{})
}
func (c *Client) InvalidateCollectionMetaCache(ctx context.Context, req *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) {
return c.grpcClient.InvalidateCollectionMetaCache(ctx, req)
}

View File

@ -26,7 +26,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
"github.com/zilliztech/milvus-distributed/internal/proxynode"
@ -40,7 +40,7 @@ const (
type Server struct {
ctx context.Context
wg sync.WaitGroup
impl *proxynode.ProxyNode
proxynode *proxynode.ProxyNode
grpcServer *grpc.Server
grpcErrChan chan error
@ -63,7 +63,7 @@ func NewServer(ctx context.Context, factory msgstream.Factory) (*Server, error)
grpcErrChan: make(chan error),
}
server.impl, err = proxynode.NewProxyNode(server.ctx, factory)
server.proxynode, err = proxynode.NewProxyNode(server.ctx, factory)
if err != nil {
return nil, err
}
@ -172,7 +172,7 @@ func (s *Server) init() error {
if err != nil {
return err
}
s.impl.SetProxyServiceClient(s.proxyServiceClient)
s.proxynode.SetProxyServiceClient(s.proxyServiceClient)
log.Debug("set proxy service client ...")
masterServiceAddr := Params.MasterAddress
@ -191,7 +191,7 @@ func (s *Server) init() error {
if err != nil {
panic(err)
}
s.impl.SetMasterClient(s.masterServiceClient)
s.proxynode.SetMasterClient(s.masterServiceClient)
log.Debug("set master client ...")
dataServiceAddr := Params.DataServiceAddress
@ -201,7 +201,7 @@ func (s *Server) init() error {
if err != nil {
return err
}
s.impl.SetDataServiceClient(s.dataServiceClient)
s.proxynode.SetDataServiceClient(s.dataServiceClient)
log.Debug("set data service address ...")
indexServiceAddr := Params.IndexServerAddress
@ -211,7 +211,7 @@ func (s *Server) init() error {
if err != nil {
return err
}
s.impl.SetIndexServiceClient(s.indexServiceClient)
s.proxynode.SetIndexServiceClient(s.indexServiceClient)
log.Debug("set index service client ...")
queryServiceAddr := Params.QueryServiceAddress
@ -224,7 +224,7 @@ func (s *Server) init() error {
if err != nil {
return err
}
s.impl.SetQueryServiceClient(s.queryServiceClient)
s.proxynode.SetQueryServiceClient(s.queryServiceClient)
log.Debug("set query service client ...")
proxynode.Params.Init()
@ -235,10 +235,10 @@ func (s *Server) init() error {
// for purpose of ID Allocator
proxynode.Params.MasterAddress = Params.MasterAddress
s.impl.UpdateStateCode(internalpb2.StateCode_Initializing)
s.proxynode.UpdateStateCode(internalpb.StateCode_Initializing)
if err := s.impl.Init(); err != nil {
log.Debug("proxynode", zap.String("impl init error", err.Error()))
if err := s.proxynode.Init(); err != nil {
log.Debug("proxynode", zap.String("proxynode init error", err.Error()))
return err
}
@ -246,7 +246,7 @@ func (s *Server) init() error {
}
func (s *Server) start() error {
return s.impl.Start()
return s.proxynode.Start()
}
func (s *Server) Stop() error {
@ -257,7 +257,7 @@ func (s *Server) Stop() error {
s.grpcServer.GracefulStop()
}
err = s.impl.Stop()
err = s.proxynode.Stop()
if err != nil {
return err
}
@ -267,111 +267,119 @@ func (s *Server) Stop() error {
return nil
}
func (s *Server) GetComponentStates(ctx context.Context, request *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
return s.proxynode.GetComponentStates(ctx)
}
func (s *Server) GetStatisticsChannel(ctx context.Context, request *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
return s.proxynode.GetStatisticsChannel(ctx)
}
func (s *Server) InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) {
return s.impl.InvalidateCollectionMetaCache(ctx, request)
return s.proxynode.InvalidateCollectionMetaCache(ctx, request)
}
func (s *Server) CreateCollection(ctx context.Context, request *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) {
return s.impl.CreateCollection(ctx, request)
return s.proxynode.CreateCollection(ctx, request)
}
func (s *Server) DropCollection(ctx context.Context, request *milvuspb.DropCollectionRequest) (*commonpb.Status, error) {
return s.impl.DropCollection(ctx, request)
return s.proxynode.DropCollection(ctx, request)
}
func (s *Server) HasCollection(ctx context.Context, request *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
return s.impl.HasCollection(ctx, request)
return s.proxynode.HasCollection(ctx, request)
}
func (s *Server) LoadCollection(ctx context.Context, request *milvuspb.LoadCollectionRequest) (*commonpb.Status, error) {
return s.impl.LoadCollection(ctx, request)
return s.proxynode.LoadCollection(ctx, request)
}
func (s *Server) ReleaseCollection(ctx context.Context, request *milvuspb.ReleaseCollectionRequest) (*commonpb.Status, error) {
return s.impl.ReleaseCollection(ctx, request)
return s.proxynode.ReleaseCollection(ctx, request)
}
func (s *Server) DescribeCollection(ctx context.Context, request *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
return s.impl.DescribeCollection(ctx, request)
return s.proxynode.DescribeCollection(ctx, request)
}
func (s *Server) GetCollectionStatistics(ctx context.Context, request *milvuspb.CollectionStatsRequest) (*milvuspb.CollectionStatsResponse, error) {
return s.impl.GetCollectionStatistics(ctx, request)
func (s *Server) GetCollectionStatistics(ctx context.Context, request *milvuspb.GetCollectionStatisticsRequest) (*milvuspb.GetCollectionStatisticsResponse, error) {
return s.proxynode.GetCollectionStatistics(ctx, request)
}
func (s *Server) ShowCollections(ctx context.Context, request *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error) {
return s.impl.ShowCollections(ctx, request)
func (s *Server) ShowCollections(ctx context.Context, request *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
return s.proxynode.ShowCollections(ctx, request)
}
func (s *Server) CreatePartition(ctx context.Context, request *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) {
return s.impl.CreatePartition(ctx, request)
return s.proxynode.CreatePartition(ctx, request)
}
func (s *Server) DropPartition(ctx context.Context, request *milvuspb.DropPartitionRequest) (*commonpb.Status, error) {
return s.impl.DropPartition(ctx, request)
return s.proxynode.DropPartition(ctx, request)
}
func (s *Server) HasPartition(ctx context.Context, request *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) {
return s.impl.HasPartition(ctx, request)
return s.proxynode.HasPartition(ctx, request)
}
func (s *Server) LoadPartitions(ctx context.Context, request *milvuspb.LoadPartitonRequest) (*commonpb.Status, error) {
return s.impl.LoadPartitions(ctx, request)
func (s *Server) LoadPartitions(ctx context.Context, request *milvuspb.LoadPartitionsRequest) (*commonpb.Status, error) {
return s.proxynode.LoadPartitions(ctx, request)
}
func (s *Server) ReleasePartitions(ctx context.Context, request *milvuspb.ReleasePartitionRequest) (*commonpb.Status, error) {
return s.impl.ReleasePartitions(ctx, request)
func (s *Server) ReleasePartitions(ctx context.Context, request *milvuspb.ReleasePartitionsRequest) (*commonpb.Status, error) {
return s.proxynode.ReleasePartitions(ctx, request)
}
func (s *Server) GetPartitionStatistics(ctx context.Context, request *milvuspb.PartitionStatsRequest) (*milvuspb.PartitionStatsResponse, error) {
return s.impl.GetPartitionStatistics(ctx, request)
func (s *Server) GetPartitionStatistics(ctx context.Context, request *milvuspb.GetPartitionStatisticsRequest) (*milvuspb.GetPartitionStatisticsResponse, error) {
return s.proxynode.GetPartitionStatistics(ctx, request)
}
func (s *Server) ShowPartitions(ctx context.Context, request *milvuspb.ShowPartitionRequest) (*milvuspb.ShowPartitionResponse, error) {
return s.impl.ShowPartitions(ctx, request)
func (s *Server) ShowPartitions(ctx context.Context, request *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
return s.proxynode.ShowPartitions(ctx, request)
}
func (s *Server) CreateIndex(ctx context.Context, request *milvuspb.CreateIndexRequest) (*commonpb.Status, error) {
return s.impl.CreateIndex(ctx, request)
return s.proxynode.CreateIndex(ctx, request)
}
func (s *Server) DropIndex(ctx context.Context, request *milvuspb.DropIndexRequest) (*commonpb.Status, error) {
return s.impl.DropIndex(ctx, request)
return s.proxynode.DropIndex(ctx, request)
}
func (s *Server) DescribeIndex(ctx context.Context, request *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) {
return s.impl.DescribeIndex(ctx, request)
return s.proxynode.DescribeIndex(ctx, request)
}
func (s *Server) GetIndexState(ctx context.Context, request *milvuspb.IndexStateRequest) (*milvuspb.IndexStateResponse, error) {
return s.impl.GetIndexState(ctx, request)
func (s *Server) GetIndexState(ctx context.Context, request *milvuspb.GetIndexStateRequest) (*milvuspb.GetIndexStateResponse, error) {
return s.proxynode.GetIndexState(ctx, request)
}
func (s *Server) Insert(ctx context.Context, request *milvuspb.InsertRequest) (*milvuspb.InsertResponse, error) {
return s.impl.Insert(ctx, request)
return s.proxynode.Insert(ctx, request)
}
func (s *Server) Search(ctx context.Context, request *milvuspb.SearchRequest) (*milvuspb.SearchResults, error) {
return s.impl.Search(ctx, request)
return s.proxynode.Search(ctx, request)
}
func (s *Server) Flush(ctx context.Context, request *milvuspb.FlushRequest) (*commonpb.Status, error) {
return s.impl.Flush(ctx, request)
return s.proxynode.Flush(ctx, request)
}
func (s *Server) GetDdChannel(ctx context.Context, request *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.impl.GetDdChannel(ctx, request)
func (s *Server) GetDdChannel(ctx context.Context, request *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error) {
return s.proxynode.GetDdChannel(ctx, request)
}
func (s *Server) GetPersistentSegmentInfo(ctx context.Context, request *milvuspb.PersistentSegmentInfoRequest) (*milvuspb.PersistentSegmentInfoResponse, error) {
return s.impl.GetPersistentSegmentInfo(ctx, request)
func (s *Server) GetPersistentSegmentInfo(ctx context.Context, request *milvuspb.GetPersistentSegmentInfoRequest) (*milvuspb.GetPersistentSegmentInfoResponse, error) {
return s.proxynode.GetPersistentSegmentInfo(ctx, request)
}
func (s *Server) GetQuerySegmentInfo(ctx context.Context, request *milvuspb.QuerySegmentInfoRequest) (*milvuspb.QuerySegmentInfoResponse, error) {
return s.impl.GetQuerySegmentInfo(ctx, request)
func (s *Server) GetQuerySegmentInfo(ctx context.Context, request *milvuspb.GetQuerySegmentInfoRequest) (*milvuspb.GetQuerySegmentInfoResponse, error) {
return s.proxynode.GetQuerySegmentInfo(ctx, request)
}
func (s *Server) RegisterLink(ctx context.Context, empty *commonpb.Empty) (*milvuspb.RegisterLinkResponse, error) {
return s.impl.RegisterLink(empty)
func (s *Server) RegisterLink(ctx context.Context, request *milvuspb.RegisterLinkRequest) (*milvuspb.RegisterLinkResponse, error) {
return s.proxynode.RegisterLink(ctx, request)
}

View File

@ -4,15 +4,17 @@ import (
"context"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
otgrpc "github.com/opentracing-contrib/go-grpc"
"github.com/opentracing/opentracing-go"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/util/retry"
"go.uber.org/zap"
"google.golang.org/grpc"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
)
type Client struct {
@ -21,8 +23,16 @@ type Client struct {
ctx context.Context
}
func NewClient(address string) *Client {
return &Client{
address: address,
ctx: context.Background(),
}
}
func (c *Client) Init() error {
tracer := opentracing.GlobalTracer()
log.Debug("proxyservice connect ", zap.String("address", c.address))
connectGrpcFunc := func() error {
conn, err := grpc.DialContext(c.ctx, c.address, grpc.WithInsecure(), grpc.WithBlock(),
grpc.WithUnaryInterceptor(
@ -50,33 +60,22 @@ func (c *Client) Stop() error {
return nil
}
func (c *Client) RegisterNode(ctx context.Context, request *proxypb.RegisterNodeRequest) (*proxypb.RegisterNodeResponse, error) {
return c.proxyServiceClient.RegisterNode(ctx, request)
}
func (c *Client) InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) {
return c.proxyServiceClient.InvalidateCollectionMetaCache(ctx, request)
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
return c.proxyServiceClient.GetComponentStates(ctx, &internalpb.GetComponentStatesRequest{})
}
func (c *Client) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.proxyServiceClient.GetTimeTickChannel(ctx, &commonpb.Empty{})
}
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
return c.proxyServiceClient.GetComponentStates(ctx, &commonpb.Empty{})
return c.proxyServiceClient.GetTimeTickChannel(ctx, &internalpb.GetTimeTickChannelRequest{})
}
func (c *Client) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
}, nil
return c.proxyServiceClient.GetStatisticsChannel(ctx, &internalpb.GetStatisticsChannelRequest{})
}
func NewClient(address string) *Client {
return &Client{
address: address,
ctx: context.Background(),
}
func (c *Client) RegisterNode(ctx context.Context, req *proxypb.RegisterNodeRequest) (*proxypb.RegisterNodeResponse, error) {
return c.proxyServiceClient.RegisterNode(ctx, req)
}
func (c *Client) InvalidateCollectionMetaCache(ctx context.Context, req *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) {
return c.proxyServiceClient.InvalidateCollectionMetaCache(ctx, req)
}

View File

@ -17,7 +17,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
"github.com/zilliztech/milvus-distributed/internal/proxyservice"
@ -33,7 +33,7 @@ type Server struct {
grpcServer *grpc.Server
grpcErrChan chan error
impl *proxyservice.ProxyService
proxyservice *proxyservice.ProxyService
tracer opentracing.Tracer
closer io.Closer
@ -63,7 +63,7 @@ func NewServer(ctx1 context.Context, factory msgstream.Factory) (*Server, error)
}
opentracing.SetGlobalTracer(server.tracer)
server.impl, err = proxyservice.NewProxyService(server.ctx, factory)
server.proxyservice, err = proxyservice.NewProxyService(server.ctx, factory)
if err != nil {
return nil, err
}
@ -94,10 +94,10 @@ func (s *Server) init() error {
if err := <-s.grpcErrChan; err != nil {
return err
}
s.impl.UpdateStateCode(internalpb2.StateCode_Initializing)
s.proxyservice.UpdateStateCode(internalpb.StateCode_Initializing)
log.Debug("grpc init done ...")
if err := s.impl.Init(); err != nil {
if err := s.proxyservice.Init(); err != nil {
return err
}
return nil
@ -138,7 +138,7 @@ func (s *Server) startGrpcLoop(grpcPort int) {
func (s *Server) start() error {
log.Debug("proxy ProxyService start ...")
if err := s.impl.Start(); err != nil {
if err := s.proxyservice.Start(); err != nil {
return err
}
return nil
@ -150,7 +150,7 @@ func (s *Server) Stop() error {
}
s.cancel()
s.closer.Close()
err := s.impl.Stop()
err := s.proxyservice.Stop()
if err != nil {
return err
}
@ -161,22 +161,26 @@ func (s *Server) Stop() error {
return nil
}
func (s *Server) RegisterLink(ctx context.Context, empty *commonpb.Empty) (*milvuspb.RegisterLinkResponse, error) {
return s.impl.RegisterLink(ctx)
func (s *Server) GetComponentStates(ctx context.Context, req *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
return s.proxyservice.GetComponentStates(ctx)
}
func (s *Server) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) {
return s.proxyservice.GetTimeTickChannel(ctx)
}
func (s *Server) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
return s.proxyservice.GetStatisticsChannel(ctx)
}
func (s *Server) RegisterLink(ctx context.Context, req *milvuspb.RegisterLinkRequest) (*milvuspb.RegisterLinkResponse, error) {
return s.proxyservice.RegisterLink(ctx)
}
func (s *Server) RegisterNode(ctx context.Context, request *proxypb.RegisterNodeRequest) (*proxypb.RegisterNodeResponse, error) {
return s.impl.RegisterNode(ctx, request)
return s.proxyservice.RegisterNode(ctx, request)
}
func (s *Server) InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) {
return s.impl.InvalidateCollectionMetaCache(ctx, request)
}
func (s *Server) GetTimeTickChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.impl.GetTimeTickChannel(ctx)
}
func (s *Server) GetComponentStates(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error) {
return s.impl.GetComponentStates(ctx)
return s.proxyservice.InvalidateCollectionMetaCache(ctx, request)
}

View File

@ -9,7 +9,7 @@ import (
otgrpc "github.com/opentracing-contrib/go-grpc"
"github.com/opentracing/opentracing-go"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/querypb"
)
@ -61,46 +61,46 @@ func (c *Client) Stop() error {
return c.conn.Close()
}
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
return c.grpcClient.GetComponentStates(ctx, nil)
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
return c.grpcClient.GetComponentStates(ctx, &internalpb.GetComponentStatesRequest{})
}
func (c *Client) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetTimeTickChannel(ctx, nil)
return c.grpcClient.GetTimeTickChannel(ctx, &internalpb.GetTimeTickChannelRequest{})
}
func (c *Client) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetStatsChannel(ctx, nil)
return c.grpcClient.GetStatisticsChannel(ctx, &internalpb.GetStatisticsChannelRequest{})
}
func (c *Client) AddQueryChannel(ctx context.Context, in *querypb.AddQueryChannelsRequest) (*commonpb.Status, error) {
return c.grpcClient.AddQueryChannel(ctx, in)
func (c *Client) AddQueryChannel(ctx context.Context, req *querypb.AddQueryChannelRequest) (*commonpb.Status, error) {
return c.grpcClient.AddQueryChannel(ctx, req)
}
func (c *Client) RemoveQueryChannel(ctx context.Context, in *querypb.RemoveQueryChannelsRequest) (*commonpb.Status, error) {
return c.grpcClient.RemoveQueryChannel(ctx, in)
func (c *Client) RemoveQueryChannel(ctx context.Context, req *querypb.RemoveQueryChannelRequest) (*commonpb.Status, error) {
return c.grpcClient.RemoveQueryChannel(ctx, req)
}
func (c *Client) WatchDmChannels(ctx context.Context, in *querypb.WatchDmChannelsRequest) (*commonpb.Status, error) {
return c.grpcClient.WatchDmChannels(ctx, in)
func (c *Client) WatchDmChannels(ctx context.Context, req *querypb.WatchDmChannelsRequest) (*commonpb.Status, error) {
return c.grpcClient.WatchDmChannels(ctx, req)
}
func (c *Client) LoadSegments(ctx context.Context, in *querypb.LoadSegmentRequest) (*commonpb.Status, error) {
return c.grpcClient.LoadSegments(ctx, in)
func (c *Client) LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) (*commonpb.Status, error) {
return c.grpcClient.LoadSegments(ctx, req)
}
func (c *Client) ReleaseCollection(ctx context.Context, in *querypb.ReleaseCollectionRequest) (*commonpb.Status, error) {
return c.grpcClient.ReleaseCollection(ctx, in)
func (c *Client) ReleaseCollection(ctx context.Context, req *querypb.ReleaseCollectionRequest) (*commonpb.Status, error) {
return c.grpcClient.ReleaseCollection(ctx, req)
}
func (c *Client) ReleasePartitions(ctx context.Context, in *querypb.ReleasePartitionRequest) (*commonpb.Status, error) {
return c.grpcClient.ReleasePartitions(ctx, in)
func (c *Client) ReleasePartitions(ctx context.Context, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error) {
return c.grpcClient.ReleasePartitions(ctx, req)
}
func (c *Client) ReleaseSegments(ctx context.Context, in *querypb.ReleaseSegmentRequest) (*commonpb.Status, error) {
return c.grpcClient.ReleaseSegments(ctx, in)
func (c *Client) ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error) {
return c.grpcClient.ReleaseSegments(ctx, req)
}
func (c *Client) GetSegmentInfo(ctx context.Context, in *querypb.SegmentInfoRequest) (*querypb.SegmentInfoResponse, error) {
return c.grpcClient.GetSegmentInfo(ctx, in)
func (c *Client) GetSegmentInfo(ctx context.Context, req *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error) {
return c.grpcClient.GetSegmentInfo(ctx, req)
}

View File

@ -9,7 +9,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/querypb"
)
@ -103,7 +103,7 @@ type DataServiceMock struct {
Count int
}
func (data *DataServiceMock) GetInsertBinlogPaths(req *datapb.InsertBinlogPathRequest) (*datapb.InsertBinlogPathsResponse, error) {
func (data *DataServiceMock) GetInsertBinlogPaths(req *datapb.GetInsertBinlogPathsRequest) (*datapb.GetInsertBinlogPathsResponse, error) {
if data.Count < 10 {
data.Count++
return nil, errors.New("binlog not exist")
@ -118,14 +118,14 @@ func (data *DataServiceMock) GetInsertBinlogPaths(req *datapb.InsertBinlogPathRe
Values: []string{pathKey},
}
}
rsp := &datapb.InsertBinlogPathsResponse{
rsp := &datapb.GetInsertBinlogPathsResponse{
FieldIDs: fieldIDs,
Paths: paths,
}
return rsp, nil
}
func (data *DataServiceMock) GetSegmentStates(req *datapb.SegmentStatesRequest) (*datapb.SegmentStatesResponse, error) {
func (data *DataServiceMock) GetSegmentStates(req *datapb.GetSegmentStatesRequest) (*datapb.GetSegmentStatesResponse, error) {
segmentGrowingInfo := &datapb.SegmentStateInfo{
State: commonpb.SegmentState_Growing,
}
@ -135,12 +135,12 @@ func (data *DataServiceMock) GetSegmentStates(req *datapb.SegmentStatesRequest)
if data.Count < 10 {
data.Count++
return &datapb.SegmentStatesResponse{
return &datapb.GetSegmentStatesResponse{
States: []*datapb.SegmentStateInfo{segmentGrowingInfo},
}, nil
}
return &datapb.SegmentStatesResponse{
return &datapb.GetSegmentStatesResponse{
States: []*datapb.SegmentStateInfo{segmentFlushedInfo},
}, nil
}
@ -149,7 +149,7 @@ type IndexServiceMock struct {
Count int
}
func (index *IndexServiceMock) GetIndexFilePaths(req *indexpb.IndexFilePathsRequest) (*indexpb.IndexFilePathsResponse, error) {
func (index *IndexServiceMock) GetIndexFilePaths(req *indexpb.GetIndexFilePathsRequest) (*indexpb.GetIndexFilePathsResponse, error) {
if index.Count < 30 {
index.Count++
return nil, errors.New("index path not exist")
@ -173,7 +173,7 @@ func (index *IndexServiceMock) GetIndexFilePaths(req *indexpb.IndexFilePathsRequ
},
IndexFilePaths: []string{indexPaths1, indexPaths2},
}
rsp := &indexpb.IndexFilePathsResponse{
rsp := &indexpb.GetIndexFilePathsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},

View File

@ -27,7 +27,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/querypb"
qn "github.com/zilliztech/milvus-distributed/internal/querynode"
@ -38,7 +38,7 @@ import (
type UniqueID = typeutil.UniqueID
type Server struct {
impl *qn.QueryNode
querynode *qn.QueryNode
wg sync.WaitGroup
ctx context.Context
cancel context.CancelFunc
@ -60,7 +60,7 @@ func NewServer(ctx context.Context, factory msgstream.Factory) (*Server, error)
s := &Server{
ctx: ctx1,
cancel: cancel,
impl: qn.NewQueryNodeWithoutID(ctx, factory),
querynode: qn.NewQueryNodeWithoutID(ctx, factory),
grpcErrChan: make(chan error),
}
return s, nil
@ -194,17 +194,17 @@ func (s *Server) init() error {
qn.Params.QueryNodePort = int64(Params.QueryNodePort)
qn.Params.QueryNodeID = Params.QueryNodeID
s.impl.UpdateStateCode(internalpb2.StateCode_Initializing)
s.querynode.UpdateStateCode(internalpb.StateCode_Initializing)
if err := s.impl.Init(); err != nil {
log.Error("impl init error: ", zap.Error(err))
if err := s.querynode.Init(); err != nil {
log.Error("querynode init error: ", zap.Error(err))
return err
}
return nil
}
func (s *Server) start() error {
return s.impl.Start()
return s.querynode.Start()
}
func (s *Server) startGrpcLoop(grpcPort int) {
@ -274,7 +274,7 @@ func (s *Server) Stop() error {
s.grpcServer.GracefulStop()
}
err := s.impl.Stop()
err := s.querynode.Stop()
if err != nil {
return err
}
@ -283,89 +283,69 @@ func (s *Server) Stop() error {
}
func (s *Server) SetMasterService(masterService types.MasterService) error {
return s.impl.SetMasterService(masterService)
return s.querynode.SetMasterService(masterService)
}
func (s *Server) SetQueryService(queryService types.QueryService) error {
return s.impl.SetQueryService(queryService)
return s.querynode.SetQueryService(queryService)
}
func (s *Server) SetIndexService(indexService types.IndexService) error {
return s.impl.SetIndexService(indexService)
return s.querynode.SetIndexService(indexService)
}
func (s *Server) SetDataService(dataService types.DataService) error {
return s.impl.SetDataService(dataService)
return s.querynode.SetDataService(dataService)
}
func (s *Server) GetTimeTickChannel(ctx context.Context, in *commonpb.Empty) (*milvuspb.StringResponse, error) {
func (s *Server) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) {
return s.querynode.GetTimeTickChannel(ctx)
}
func (s *Server) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
return s.querynode.GetStatisticsChannel(ctx)
}
func (s *Server) GetComponentStates(ctx context.Context, req *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
// ignore ctx and in
channel, err := s.impl.GetTimeTickChannel()
if err != nil {
return nil, err
}
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
Value: channel,
}, nil
return s.querynode.GetComponentStates(ctx)
}
func (s *Server) GetStatsChannel(ctx context.Context, in *commonpb.Empty) (*milvuspb.StringResponse, error) {
// ignore ctx and in
channel, err := s.impl.GetStatisticsChannel()
if err != nil {
return nil, err
}
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
Value: channel,
}, nil
}
func (s *Server) GetComponentStates(ctx context.Context, in *commonpb.Empty) (*internalpb2.ComponentStates, error) {
// ignore ctx and in
return s.impl.GetComponentStates()
}
func (s *Server) AddQueryChannel(ctx context.Context, in *querypb.AddQueryChannelsRequest) (*commonpb.Status, error) {
func (s *Server) AddQueryChannel(ctx context.Context, req *querypb.AddQueryChannelRequest) (*commonpb.Status, error) {
// ignore ctx
return s.impl.AddQueryChannel(in)
return s.querynode.AddQueryChannel(ctx, req)
}
func (s *Server) RemoveQueryChannel(ctx context.Context, in *querypb.RemoveQueryChannelsRequest) (*commonpb.Status, error) {
func (s *Server) RemoveQueryChannel(ctx context.Context, req *querypb.RemoveQueryChannelRequest) (*commonpb.Status, error) {
// ignore ctx
return s.impl.RemoveQueryChannel(in)
return s.querynode.RemoveQueryChannel(ctx, req)
}
func (s *Server) WatchDmChannels(ctx context.Context, in *querypb.WatchDmChannelsRequest) (*commonpb.Status, error) {
func (s *Server) WatchDmChannels(ctx context.Context, req *querypb.WatchDmChannelsRequest) (*commonpb.Status, error) {
// ignore ctx
return s.impl.WatchDmChannels(in)
return s.querynode.WatchDmChannels(ctx, req)
}
func (s *Server) LoadSegments(ctx context.Context, in *querypb.LoadSegmentRequest) (*commonpb.Status, error) {
func (s *Server) LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) (*commonpb.Status, error) {
// ignore ctx
return s.impl.LoadSegments(in)
return s.querynode.LoadSegments(ctx, req)
}
func (s *Server) ReleaseCollection(ctx context.Context, in *querypb.ReleaseCollectionRequest) (*commonpb.Status, error) {
func (s *Server) ReleaseCollection(ctx context.Context, req *querypb.ReleaseCollectionRequest) (*commonpb.Status, error) {
// ignore ctx
return s.impl.ReleaseCollection(in)
return s.querynode.ReleaseCollection(ctx, req)
}
func (s *Server) ReleasePartitions(ctx context.Context, in *querypb.ReleasePartitionRequest) (*commonpb.Status, error) {
func (s *Server) ReleasePartitions(ctx context.Context, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error) {
// ignore ctx
return s.impl.ReleasePartitions(in)
return s.querynode.ReleasePartitions(ctx, req)
}
func (s *Server) ReleaseSegments(ctx context.Context, in *querypb.ReleaseSegmentRequest) (*commonpb.Status, error) {
func (s *Server) ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error) {
// ignore ctx
return s.impl.ReleaseSegments(in)
return s.querynode.ReleaseSegments(ctx, req)
}
func (s *Server) GetSegmentInfo(ctx context.Context, in *querypb.SegmentInfoRequest) (*querypb.SegmentInfoResponse, error) {
return s.impl.GetSegmentInfo(in)
func (s *Server) GetSegmentInfo(ctx context.Context, req *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error) {
return s.querynode.GetSegmentInfo(ctx, req)
}

View File

@ -17,7 +17,7 @@ package grpcqueryserviceclient
// "github.com/zilliztech/milvus-distributed/internal/msgstream/pulsarms"
// "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
// "github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
// "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
// "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
// "github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
// "github.com/zilliztech/milvus-distributed/internal/storage"
// "github.com/zilliztech/milvus-distributed/internal/util/typeutil"
@ -63,7 +63,7 @@ package grpcqueryserviceclient
// BaseMsg: msgstream.BaseMsg{
// HashValues: []uint32{uint32((n - 1) % numDmChannels)},
// },
// InsertRequest: internalpb2.InsertRequest{
// InsertRequest: internalpb.InsertRequest{
// Base: &commonpb.MsgBase{
// MsgType: commonpb.MsgType_kInsert,
// MsgID: 0,
@ -96,7 +96,7 @@ package grpcqueryserviceclient
// EndTimestamp: 0,
// HashValues: []uint32{0},
// },
// TimeTickMsg: internalpb2.TimeTickMsg{
// TimeTickMsg: internalpb.TimeTickMsg{
// Base: &commonpb.MsgBase{
// MsgType: commonpb.MsgType_kTimeTick,
// MsgID: 0,

View File

@ -11,7 +11,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/querypb"
)
@ -68,23 +68,23 @@ func (c *Client) Stop() error {
return c.conn.Close()
}
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
return c.grpcClient.GetComponentStates(ctx, &commonpb.Empty{})
func (c *Client) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
return c.grpcClient.GetComponentStates(ctx, &internalpb.GetComponentStatesRequest{})
}
func (c *Client) GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetTimeTickChannel(ctx, &commonpb.Empty{})
return c.grpcClient.GetTimeTickChannel(ctx, &internalpb.GetTimeTickChannelRequest{})
}
func (c *Client) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return c.grpcClient.GetStatisticsChannel(ctx, &commonpb.Empty{})
return c.grpcClient.GetStatisticsChannel(ctx, &internalpb.GetStatisticsChannelRequest{})
}
func (c *Client) RegisterNode(ctx context.Context, req *querypb.RegisterNodeRequest) (*querypb.RegisterNodeResponse, error) {
return c.grpcClient.RegisterNode(ctx, req)
}
func (c *Client) ShowCollections(ctx context.Context, req *querypb.ShowCollectionRequest) (*querypb.ShowCollectionResponse, error) {
func (c *Client) ShowCollections(ctx context.Context, req *querypb.ShowCollectionsRequest) (*querypb.ShowCollectionsResponse, error) {
return c.grpcClient.ShowCollections(ctx, req)
}
@ -96,26 +96,26 @@ func (c *Client) ReleaseCollection(ctx context.Context, req *querypb.ReleaseColl
return c.grpcClient.ReleaseCollection(ctx, req)
}
func (c *Client) ShowPartitions(ctx context.Context, req *querypb.ShowPartitionRequest) (*querypb.ShowPartitionResponse, error) {
func (c *Client) ShowPartitions(ctx context.Context, req *querypb.ShowPartitionsRequest) (*querypb.ShowPartitionsResponse, error) {
return c.grpcClient.ShowPartitions(ctx, req)
}
func (c *Client) LoadPartitions(ctx context.Context, req *querypb.LoadPartitionRequest) (*commonpb.Status, error) {
func (c *Client) LoadPartitions(ctx context.Context, req *querypb.LoadPartitionsRequest) (*commonpb.Status, error) {
return c.grpcClient.LoadPartitions(ctx, req)
}
func (c *Client) ReleasePartitions(ctx context.Context, req *querypb.ReleasePartitionRequest) (*commonpb.Status, error) {
func (c *Client) ReleasePartitions(ctx context.Context, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error) {
return c.grpcClient.ReleasePartitions(ctx, req)
}
func (c *Client) CreateQueryChannel(ctx context.Context) (*querypb.CreateQueryChannelResponse, error) {
return c.grpcClient.CreateQueryChannel(ctx, &commonpb.Empty{})
return c.grpcClient.CreateQueryChannel(ctx, &querypb.CreateQueryChannelRequest{})
}
func (c *Client) GetPartitionStates(ctx context.Context, req *querypb.PartitionStatesRequest) (*querypb.PartitionStatesResponse, error) {
func (c *Client) GetPartitionStates(ctx context.Context, req *querypb.GetPartitionStatesRequest) (*querypb.GetPartitionStatesResponse, error) {
return c.grpcClient.GetPartitionStates(ctx, req)
}
func (c *Client) GetSegmentInfo(ctx context.Context, req *querypb.SegmentInfoRequest) (*querypb.SegmentInfoResponse, error) {
func (c *Client) GetSegmentInfo(ctx context.Context, req *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error) {
return c.grpcClient.GetSegmentInfo(ctx, req)
}

View File

@ -15,7 +15,7 @@ package grpcqueryserviceclient
// "github.com/zilliztech/milvus-distributed/internal/msgstream"
// "github.com/zilliztech/milvus-distributed/internal/msgstream/pulsarms"
// "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
// "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
// "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
// "github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
// "github.com/zilliztech/milvus-distributed/internal/proto/querypb"
// qs "github.com/zilliztech/milvus-distributed/internal/queryservice"
@ -61,7 +61,7 @@ package grpcqueryserviceclient
// ddStream.Start()
//
// // showCollection
// showCollectionRequest := &querypb.ShowCollectionRequest{
// showCollectionRequest := &querypb.ShowCollectionsRequest{
// DbID: 0,
// }
// showCollectionRes, err := client.ShowCollections(showCollectionRequest)
@ -150,7 +150,7 @@ package grpcqueryserviceclient
// err = client.Start()
// assert.Nil(t, err)
//
// loadPartitionRequest := &querypb.LoadPartitionRequest{
// loadPartitionRequest := &querypb.LoadPartitionsRequest{
// CollectionID: 1,
// Schema: genSchema(1),
// }
@ -235,7 +235,7 @@ package grpcqueryserviceclient
// BaseMsg: msgstream.BaseMsg{
// HashValues: []uint32{0},
// },
// SearchRequest: internalpb2.SearchRequest{
// SearchRequest: internalpb.SearchRequest{
// Base: &commonpb.MsgBase{
// MsgType: commonpb.MsgType_kSearch,
// MsgID: 1,

View File

@ -10,19 +10,20 @@ import (
otgrpc "github.com/opentracing-contrib/go-grpc"
"github.com/opentracing/opentracing-go"
"go.uber.org/zap"
"google.golang.org/grpc"
dsc "github.com/zilliztech/milvus-distributed/internal/distributed/dataservice/client"
msc "github.com/zilliztech/milvus-distributed/internal/distributed/masterservice/client"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
qs "github.com/zilliztech/milvus-distributed/internal/queryservice"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
"go.uber.org/zap"
"google.golang.org/grpc"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/querypb"
qs "github.com/zilliztech/milvus-distributed/internal/queryservice"
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
)
type Server struct {
@ -33,7 +34,7 @@ type Server struct {
grpcErrChan chan error
impl *qs.QueryService
queryservice *qs.QueryService
msFactory msgstream.Factory
@ -50,11 +51,11 @@ func NewServer(ctx context.Context, factory msgstream.Factory) (*Server, error)
}
return &Server{
impl: svr,
loopCtx: ctx1,
loopCancel: cancel,
msFactory: factory,
grpcErrChan: make(chan error),
queryservice: svr,
loopCtx: ctx1,
loopCancel: cancel,
msFactory: factory,
grpcErrChan: make(chan error),
}, nil
}
@ -129,9 +130,9 @@ func (s *Server) init() error {
}
qs.Params.Init()
s.impl.UpdateStateCode(internalpb2.StateCode_Initializing)
s.queryservice.UpdateStateCode(internalpb.StateCode_Initializing)
if err := s.impl.Init(); err != nil {
if err := s.queryservice.Init(); err != nil {
return err
}
return nil
@ -169,11 +170,11 @@ func (s *Server) startGrpcLoop(grpcPort int) {
}
func (s *Server) start() error {
return s.impl.Start()
return s.queryservice.Start()
}
func (s *Server) Stop() error {
err := s.impl.Stop()
err := s.queryservice.Stop()
s.loopCancel()
if s.grpcServer != nil {
s.grpcServer.GracefulStop()
@ -181,64 +182,64 @@ func (s *Server) Stop() error {
return err
}
func (s *Server) GetComponentStates(ctx context.Context, req *commonpb.Empty) (*internalpb2.ComponentStates, error) {
return s.impl.GetComponentStates(ctx)
}
func (s *Server) GetTimeTickChannel(ctx context.Context, req *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.impl.GetTimeTickChannel(ctx)
}
func (s *Server) GetStatisticsChannel(ctx context.Context, req *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.impl.GetStatisticsChannel(ctx)
}
func (s *Server) SetMasterService(m qs.MasterServiceInterface) error {
s.impl.SetMasterService(m)
func (s *Server) SetMasterService(m types.MasterService) error {
s.queryservice.SetMasterService(m)
return nil
}
func (s *Server) SetDataService(d qs.DataServiceInterface) error {
s.impl.SetDataService(d)
func (s *Server) SetDataService(d types.DataService) error {
s.queryservice.SetDataService(d)
return nil
}
func (s *Server) GetComponentStates(ctx context.Context, req *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
return s.queryservice.GetComponentStates(ctx)
}
func (s *Server) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) {
return s.queryservice.GetTimeTickChannel(ctx)
}
func (s *Server) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
return s.queryservice.GetStatisticsChannel(ctx)
}
func (s *Server) RegisterNode(ctx context.Context, req *querypb.RegisterNodeRequest) (*querypb.RegisterNodeResponse, error) {
return s.impl.RegisterNode(ctx, req)
return s.queryservice.RegisterNode(ctx, req)
}
func (s *Server) ShowCollections(ctx context.Context, req *querypb.ShowCollectionRequest) (*querypb.ShowCollectionResponse, error) {
return s.impl.ShowCollections(ctx, req)
func (s *Server) ShowCollections(ctx context.Context, req *querypb.ShowCollectionsRequest) (*querypb.ShowCollectionsResponse, error) {
return s.queryservice.ShowCollections(ctx, req)
}
func (s *Server) LoadCollection(ctx context.Context, req *querypb.LoadCollectionRequest) (*commonpb.Status, error) {
return s.impl.LoadCollection(ctx, req)
return s.queryservice.LoadCollection(ctx, req)
}
func (s *Server) ReleaseCollection(ctx context.Context, req *querypb.ReleaseCollectionRequest) (*commonpb.Status, error) {
return s.impl.ReleaseCollection(ctx, req)
return s.queryservice.ReleaseCollection(ctx, req)
}
func (s *Server) ShowPartitions(ctx context.Context, req *querypb.ShowPartitionRequest) (*querypb.ShowPartitionResponse, error) {
return s.impl.ShowPartitions(ctx, req)
func (s *Server) ShowPartitions(ctx context.Context, req *querypb.ShowPartitionsRequest) (*querypb.ShowPartitionsResponse, error) {
return s.queryservice.ShowPartitions(ctx, req)
}
func (s *Server) GetPartitionStates(ctx context.Context, req *querypb.PartitionStatesRequest) (*querypb.PartitionStatesResponse, error) {
return s.impl.GetPartitionStates(ctx, req)
func (s *Server) GetPartitionStates(ctx context.Context, req *querypb.GetPartitionStatesRequest) (*querypb.GetPartitionStatesResponse, error) {
return s.queryservice.GetPartitionStates(ctx, req)
}
func (s *Server) LoadPartitions(ctx context.Context, req *querypb.LoadPartitionRequest) (*commonpb.Status, error) {
return s.impl.LoadPartitions(ctx, req)
func (s *Server) LoadPartitions(ctx context.Context, req *querypb.LoadPartitionsRequest) (*commonpb.Status, error) {
return s.queryservice.LoadPartitions(ctx, req)
}
func (s *Server) ReleasePartitions(ctx context.Context, req *querypb.ReleasePartitionRequest) (*commonpb.Status, error) {
return s.impl.ReleasePartitions(ctx, req)
func (s *Server) ReleasePartitions(ctx context.Context, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error) {
return s.queryservice.ReleasePartitions(ctx, req)
}
func (s *Server) CreateQueryChannel(ctx context.Context, req *commonpb.Empty) (*querypb.CreateQueryChannelResponse, error) {
return s.impl.CreateQueryChannel(ctx)
func (s *Server) CreateQueryChannel(ctx context.Context, req *querypb.CreateQueryChannelRequest) (*querypb.CreateQueryChannelResponse, error) {
return s.queryservice.CreateQueryChannel(ctx)
}
func (s *Server) GetSegmentInfo(ctx context.Context, req *querypb.SegmentInfoRequest) (*querypb.SegmentInfoResponse, error) {
return s.impl.GetSegmentInfo(ctx, req)
func (s *Server) GetSegmentInfo(ctx context.Context, req *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error) {
return s.queryservice.GetSegmentInfo(ctx, req)
}

View File

@ -17,7 +17,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
@ -32,7 +32,7 @@ type UniqueID = typeutil.UniqueID
type Timestamp = typeutil.Timestamp
type IndexNode struct {
stateCode internalpb2.StateCode
stateCode internalpb.StateCode
loopCtx context.Context
loopCancel func()
@ -123,7 +123,7 @@ func (i *IndexNode) Init() error {
return err
}
i.UpdateStateCode(internalpb2.StateCode_Healthy)
i.UpdateStateCode(internalpb.StateCode_Healthy)
return nil
}
@ -154,7 +154,7 @@ func (i *IndexNode) Stop() error {
return nil
}
func (i *IndexNode) UpdateStateCode(code internalpb2.StateCode) {
func (i *IndexNode) UpdateStateCode(code internalpb.StateCode) {
i.stateCode = code
}
@ -162,13 +162,13 @@ func (i *IndexNode) SetIndexServiceClient(serviceClient types.IndexService) {
i.serviceClient = serviceClient
}
func (i *IndexNode) BuildIndex(ctx context.Context, request *indexpb.BuildIndexCmd) (*commonpb.Status, error) {
func (i *IndexNode) BuildIndex(ctx context.Context, request *indexpb.BuildIndexRequest) (*commonpb.Status, error) {
t := &IndexBuildTask{
BaseTask: BaseTask{
ctx: ctx,
done: make(chan error),
},
cmd: request,
req: request,
kv: i.kv,
serviceClient: i.serviceClient,
nodeID: Params.NodeID,
@ -206,15 +206,15 @@ func (i *IndexNode) AddCloseCallback(callbacks ...func()) {
i.closeCallbacks = append(i.closeCallbacks, callbacks...)
}
func (i *IndexNode) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
func (i *IndexNode) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
stateInfo := &internalpb2.ComponentInfo{
stateInfo := &internalpb.ComponentInfo{
NodeID: Params.NodeID,
Role: "NodeImpl",
StateCode: i.stateCode,
}
ret := &internalpb2.ComponentStates{
ret := &internalpb.ComponentStates{
State: stateInfo,
SubcomponentStates: nil, // todo add subcomponents states
Status: &commonpb.Status{

View File

@ -12,7 +12,7 @@ import (
"github.com/spf13/cast"
"github.com/spf13/viper"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/util/paramtable"
)
@ -59,7 +59,7 @@ func (pt *ParamTable) initParams() {
pt.initLogCfg()
}
func (pt *ParamTable) LoadConfigFromInitParams(initParams *internalpb2.InitParams) error {
func (pt *ParamTable) LoadConfigFromInitParams(initParams *internalpb.InitParams) error {
pt.NodeID = initParams.NodeID
config := viper.New()

View File

@ -73,7 +73,7 @@ type IndexBuildTask struct {
index Index
kv kv.Base
savePaths []string
cmd *indexpb.BuildIndexCmd
req *indexpb.BuildIndexRequest
serviceClient types.IndexService
nodeID UniqueID
}
@ -95,7 +95,7 @@ func (bt *BaseTask) Name() string {
}
func (it *IndexBuildTask) OnEnqueue() error {
it.SetID(it.cmd.IndexBuildID)
it.SetID(it.req.IndexBuildID)
log.Debug("indexnode", zap.Int64("[IndexBuilderTask] Enqueue TaskID", it.ID()))
return nil
}
@ -120,11 +120,11 @@ func (it *IndexBuildTask) PostExecute(ctx context.Context) error {
return err
}
nty := &indexpb.BuildIndexNotification{
nty := &indexpb.NotifyBuildIndexRequest{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
IndexBuildID: it.cmd.IndexBuildID,
IndexBuildID: it.req.IndexBuildID,
NodeID: it.nodeID,
IndexFilePaths: it.savePaths,
}
@ -151,7 +151,7 @@ func (it *IndexBuildTask) Execute(ctx context.Context) error {
var err error
typeParams := make(map[string]string)
for _, kvPair := range it.cmd.Req.GetTypeParams() {
for _, kvPair := range it.req.GetTypeParams() {
key, value := kvPair.GetKey(), kvPair.GetValue()
_, ok := typeParams[key]
if ok {
@ -171,7 +171,7 @@ func (it *IndexBuildTask) Execute(ctx context.Context) error {
}
indexParams := make(map[string]string)
for _, kvPair := range it.cmd.Req.GetIndexParams() {
for _, kvPair := range it.req.GetIndexParams() {
key, value := kvPair.GetKey(), kvPair.GetValue()
_, ok := indexParams[key]
if ok {
@ -228,7 +228,7 @@ func (it *IndexBuildTask) Execute(ctx context.Context) error {
return blobs
}
toLoadDataPaths := it.cmd.Req.GetDataPaths()
toLoadDataPaths := it.req.GetDataPaths()
keys := make([]string, 0)
blobs := make([]*Blob, 0)
for _, path := range toLoadDataPaths {
@ -284,14 +284,14 @@ func (it *IndexBuildTask) Execute(ctx context.Context) error {
}
var indexCodec storage.IndexCodec
serializedIndexBlobs, err := indexCodec.Serialize(getStorageBlobs(indexBlobs), indexParams, it.cmd.Req.IndexName, it.cmd.Req.IndexID)
serializedIndexBlobs, err := indexCodec.Serialize(getStorageBlobs(indexBlobs), indexParams, it.req.IndexName, it.req.IndexID)
if err != nil {
return err
}
getSavePathByKey := func(key string) string {
// TODO: fix me, use more reasonable method
return strconv.Itoa(int(it.cmd.IndexBuildID)) + "/" + strconv.Itoa(int(partitionID)) + "/" + strconv.Itoa(int(segmentID)) + "/" + key
return strconv.Itoa(int(it.req.IndexBuildID)) + "/" + strconv.Itoa(int(partitionID)) + "/" + strconv.Itoa(int(segmentID)) + "/" + key
}
saveBlob := func(path string, value []byte) error {
return it.kv.Save(path, string(value))

View File

@ -130,7 +130,7 @@ func (queue *BaseTaskQueue) tryToRemoveUselessIndexBuildTask(indexID UniqueID) {
if !ok {
continue
}
if indexBuildTask.cmd.Req.IndexID == indexID {
if indexBuildTask.req.IndexID == indexID {
queue.unissuedTasks.Remove(e)
}
}

View File

@ -17,7 +17,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/tso"
"github.com/zilliztech/milvus-distributed/internal/util/retry"
@ -32,8 +32,8 @@ const (
type IndexService struct {
nodeClients *PriorityQueue
nodeStates map[UniqueID]*internalpb2.ComponentStates
stateCode internalpb2.StateCode
nodeStates map[UniqueID]*internalpb.ComponentStates
stateCode internalpb.StateCode
ID UniqueID
@ -122,7 +122,7 @@ func (i *IndexService) Init() error {
if err != nil {
return err
}
i.UpdateStateCode(internalpb2.StateCode_Healthy)
i.UpdateStateCode(internalpb.StateCode_Healthy)
return nil
}
@ -149,19 +149,18 @@ func (i *IndexService) Stop() error {
return nil
}
func (i *IndexService) UpdateStateCode(code internalpb2.StateCode) {
func (i *IndexService) UpdateStateCode(code internalpb.StateCode) {
i.stateCode = code
}
func (i *IndexService) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
stateInfo := &internalpb2.ComponentInfo{
func (i *IndexService) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
stateInfo := &internalpb.ComponentInfo{
NodeID: i.ID,
Role: "IndexService",
StateCode: i.stateCode,
}
ret := &internalpb2.ComponentStates{
ret := &internalpb.ComponentStates{
State: stateInfo,
SubcomponentStates: nil, // todo add subcomponents states
Status: &commonpb.Status{
@ -246,7 +245,7 @@ func (i *IndexService) BuildIndex(ctx context.Context, req *indexpb.BuildIndexRe
return ret, nil
}
func (i *IndexService) GetIndexStates(ctx context.Context, req *indexpb.IndexStatesRequest) (*indexpb.IndexStatesResponse, error) {
func (i *IndexService) GetIndexStates(ctx context.Context, req *indexpb.GetIndexStatesRequest) (*indexpb.GetIndexStatesResponse, error) {
var indexStates []*indexpb.IndexInfo
for _, indexID := range req.IndexBuildIDs {
indexState, err := i.metaTable.GetIndexState(indexID)
@ -255,7 +254,7 @@ func (i *IndexService) GetIndexStates(ctx context.Context, req *indexpb.IndexSta
}
indexStates = append(indexStates, indexState)
}
ret := &indexpb.IndexStatesResponse{
ret := &indexpb.GetIndexStatesResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
@ -293,7 +292,7 @@ func (i *IndexService) DropIndex(ctx context.Context, req *indexpb.DropIndexRequ
}, nil
}
func (i *IndexService) GetIndexFilePaths(ctx context.Context, req *indexpb.IndexFilePathsRequest) (*indexpb.IndexFilePathsResponse, error) {
func (i *IndexService) GetIndexFilePaths(ctx context.Context, req *indexpb.GetIndexFilePathsRequest) (*indexpb.GetIndexFilePathsResponse, error) {
var indexPaths []*indexpb.IndexFilePathInfo = nil
for _, indexID := range req.IndexBuildIDs {
@ -304,7 +303,7 @@ func (i *IndexService) GetIndexFilePaths(ctx context.Context, req *indexpb.Index
indexPaths = append(indexPaths, indexPathInfo)
}
ret := &indexpb.IndexFilePathsResponse{
ret := &indexpb.GetIndexFilePathsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
@ -313,7 +312,7 @@ func (i *IndexService) GetIndexFilePaths(ctx context.Context, req *indexpb.Index
return ret, nil
}
func (i *IndexService) NotifyBuildIndex(ctx context.Context, nty *indexpb.BuildIndexNotification) (*commonpb.Status, error) {
func (i *IndexService) NotifyBuildIndex(ctx context.Context, nty *indexpb.NotifyBuildIndexRequest) (*commonpb.Status, error) {
ret := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
}

View File

@ -102,7 +102,7 @@ func (mt *metaTable) MarkIndexAsDeleted(indexID UniqueID) error {
return nil
}
func (mt *metaTable) NotifyBuildIndex(nty *indexpb.BuildIndexNotification) error {
func (mt *metaTable) NotifyBuildIndex(nty *indexpb.NotifyBuildIndexRequest) error {
mt.lock.Lock()
defer mt.lock.Unlock()
indexBuildID := nty.IndexBuildID

View File

@ -8,7 +8,7 @@ import (
grpcindexnodeclient "github.com/zilliztech/milvus-distributed/internal/distributed/indexnode/client"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
func (i *IndexService) removeNode(nodeID UniqueID) {
@ -76,7 +76,7 @@ func (i *IndexService) RegisterNode(ctx context.Context, req *indexpb.RegisterNo
ret.Status.ErrorCode = commonpb.ErrorCode_Success
params := i.prepareNodeInitParams()
ret.InitParams = &internalpb2.InitParams{
ret.InitParams = &internalpb.InitParams{
NodeID: nodeID,
StartParams: params,
}

View File

@ -112,12 +112,9 @@ func (it *IndexAddTask) PreExecute(ctx context.Context) error {
}
func (it *IndexAddTask) Execute(ctx context.Context) error {
cmd := &indexpb.BuildIndexCmd{
IndexBuildID: it.indexBuildID,
Req: it.req,
}
it.req.IndexBuildID = it.indexBuildID
log.Debug("before index ...")
resp, err := it.builderClient.BuildIndex(ctx, cmd)
resp, err := it.builderClient.BuildIndex(ctx, it.req)
if err != nil {
return err
}

View File

@ -25,14 +25,14 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/masterpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
"github.com/zilliztech/milvus-distributed/internal/proto/querypb"
)
// internalpb2 -> internalpb
// internalpb -> internalpb
// proxypb(proxy_service)
// querypb(query_service)
// datapb(data_service)
@ -76,16 +76,16 @@ type Core struct {
SendTimeTick func(t typeutil.Timestamp) error
//setMsgStreams, send create collection into dd channel
DdCreateCollectionReq func(req *internalpb2.CreateCollectionRequest) error
DdCreateCollectionReq func(req *internalpb.CreateCollectionRequest) error
//setMsgStreams, send drop collection into dd channel, and notify the proxy to delete this collection
DdDropCollectionReq func(req *internalpb2.DropCollectionRequest) error
DdDropCollectionReq func(req *internalpb.DropCollectionRequest) error
//setMsgStreams, send create partition into dd channel
DdCreatePartitionReq func(req *internalpb2.CreatePartitionRequest) error
DdCreatePartitionReq func(req *internalpb.CreatePartitionRequest) error
//setMsgStreams, send drop partition into dd channel
DdDropPartitionReq func(req *internalpb2.DropPartitionRequest) error
DdDropPartitionReq func(req *internalpb.DropPartitionRequest) error
//setMsgStreams segment channel, receive segment info from data service, if master create segment
DataServiceSegmentChan chan *datapb.SegmentInfo
@ -138,11 +138,11 @@ func NewCore(c context.Context, factory ms.Factory) (*Core, error) {
cancel: cancel,
msFactory: factory,
}
core.UpdateStateCode(internalpb2.StateCode_Abnormal)
core.UpdateStateCode(internalpb.StateCode_Abnormal)
return core, nil
}
func (c *Core) UpdateStateCode(code internalpb2.StateCode) {
func (c *Core) UpdateStateCode(code internalpb.StateCode) {
c.stateCode.Store(code)
}
@ -431,7 +431,7 @@ func (c *Core) setMsgStreams() error {
EndTimestamp: t,
HashValues: []uint32{0},
}
timeTickResult := internalpb2.TimeTickMsg{
timeTickResult := internalpb.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_TimeTick,
MsgID: 0,
@ -453,7 +453,7 @@ func (c *Core) setMsgStreams() error {
return nil
}
c.DdCreateCollectionReq = func(req *internalpb2.CreateCollectionRequest) error {
c.DdCreateCollectionReq = func(req *internalpb.CreateCollectionRequest) error {
msgPack := ms.MsgPack{}
baseMsg := ms.BaseMsg{
BeginTimestamp: req.Base.Timestamp,
@ -471,7 +471,7 @@ func (c *Core) setMsgStreams() error {
return nil
}
c.DdDropCollectionReq = func(req *internalpb2.DropCollectionRequest) error {
c.DdDropCollectionReq = func(req *internalpb.DropCollectionRequest) error {
msgPack := ms.MsgPack{}
baseMsg := ms.BaseMsg{
BeginTimestamp: req.Base.Timestamp,
@ -489,7 +489,7 @@ func (c *Core) setMsgStreams() error {
return nil
}
c.DdCreatePartitionReq = func(req *internalpb2.CreatePartitionRequest) error {
c.DdCreatePartitionReq = func(req *internalpb.CreatePartitionRequest) error {
msgPack := ms.MsgPack{}
baseMsg := ms.BaseMsg{
BeginTimestamp: req.Base.Timestamp,
@ -507,7 +507,7 @@ func (c *Core) setMsgStreams() error {
return nil
}
c.DdDropPartitionReq = func(req *internalpb2.DropPartitionRequest) error {
c.DdDropPartitionReq = func(req *internalpb.DropPartitionRequest) error {
msgPack := ms.MsgPack{}
baseMsg := ms.BaseMsg{
BeginTimestamp: req.Base.Timestamp,
@ -636,7 +636,7 @@ func (c *Core) SetDataService(ctx context.Context, s types.DataService) error {
if err != nil {
return nil, err
}
binlog, err := s.GetInsertBinlogPaths(ctx, &datapb.InsertBinlogPathRequest{
binlog, err := s.GetInsertBinlogPaths(ctx, &datapb.GetInsertBinlogPathsRequest{
Base: &commonpb.MsgBase{
MsgType: 0, //TODO, msg type
MsgID: 0,
@ -664,7 +664,7 @@ func (c *Core) SetDataService(ctx context.Context, s types.DataService) error {
if err != nil {
return 0, err
}
segInfo, err := s.GetSegmentInfo(ctx, &datapb.SegmentInfoRequest{
segInfo, err := s.GetSegmentInfo(ctx, &datapb.GetSegmentInfoRequest{
Base: &commonpb.MsgBase{
MsgType: 0, //TODO, msg type
MsgID: 0,
@ -782,7 +782,7 @@ func (c *Core) Init() error {
initError = c.setMsgStreams()
})
if initError == nil {
log.Debug("Master service", zap.String("State Code", internalpb2.StateCode_name[int32(internalpb2.StateCode_Initializing)]))
log.Debug("Master service", zap.String("State Code", internalpb.StateCode_name[int32(internalpb.StateCode_Initializing)]))
}
return initError
}
@ -798,24 +798,24 @@ func (c *Core) Start() error {
go c.startCreateIndexLoop()
go c.startSegmentFlushCompletedLoop()
go c.tsLoop()
c.stateCode.Store(internalpb2.StateCode_Healthy)
c.stateCode.Store(internalpb.StateCode_Healthy)
})
log.Debug("Master service", zap.String("State Code", internalpb2.StateCode_name[int32(internalpb2.StateCode_Healthy)]))
log.Debug("Master service", zap.String("State Code", internalpb.StateCode_name[int32(internalpb.StateCode_Healthy)]))
return nil
}
func (c *Core) Stop() error {
c.cancel()
c.stateCode.Store(internalpb2.StateCode_Abnormal)
c.stateCode.Store(internalpb.StateCode_Abnormal)
return nil
}
func (c *Core) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
log.Debug("GetComponentStates", zap.String("State Code", internalpb2.StateCode_name[int32(code)]))
func (c *Core) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
code := c.stateCode.Load().(internalpb.StateCode)
log.Debug("GetComponentStates", zap.String("State Code", internalpb.StateCode_name[int32(code)]))
return &internalpb2.ComponentStates{
State: &internalpb2.ComponentInfo{
return &internalpb.ComponentStates{
State: &internalpb.ComponentInfo{
NodeID: int64(Params.NodeID),
Role: typeutil.MasterServiceRole,
StateCode: code,
@ -825,7 +825,7 @@ func (c *Core) GetComponentStates(ctx context.Context) (*internalpb2.ComponentSt
ErrorCode: commonpb.ErrorCode_Success,
Reason: "",
},
SubcomponentStates: []*internalpb2.ComponentInfo{
SubcomponentStates: []*internalpb.ComponentInfo{
{
NodeID: int64(Params.NodeID),
Role: typeutil.MasterServiceRole,
@ -867,11 +867,11 @@ func (c *Core) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringRespon
}
func (c *Core) CreateCollection(ctx context.Context, in *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
}, nil
}
log.Debug("CreateCollection ", zap.String("name", in.CollectionName))
@ -899,11 +899,11 @@ func (c *Core) CreateCollection(ctx context.Context, in *milvuspb.CreateCollecti
}
func (c *Core) DropCollection(ctx context.Context, in *milvuspb.DropCollectionRequest) (*commonpb.Status, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
}, nil
}
log.Debug("DropCollection", zap.String("name", in.CollectionName))
@ -931,12 +931,12 @@ func (c *Core) DropCollection(ctx context.Context, in *milvuspb.DropCollectionRe
}
func (c *Core) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
},
Value: false,
}, nil
@ -973,12 +973,12 @@ func (c *Core) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequ
}
func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &milvuspb.DescribeCollectionResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
},
Schema: nil,
CollectionID: 0,
@ -1013,13 +1013,13 @@ func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeColl
return t.Rsp, nil
}
func (c *Core) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
return &milvuspb.ShowCollectionResponse{
func (c *Core) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &milvuspb.ShowCollectionsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
},
CollectionNames: nil,
}, nil
@ -1031,7 +1031,7 @@ func (c *Core) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionR
core: c,
},
Req: in,
Rsp: &milvuspb.ShowCollectionResponse{
Rsp: &milvuspb.ShowCollectionsResponse{
CollectionNames: nil,
},
}
@ -1039,7 +1039,7 @@ func (c *Core) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionR
err := t.WaitToFinish()
if err != nil {
log.Debug("ShowCollections failed", zap.String("dbname", in.DbName))
return &milvuspb.ShowCollectionResponse{
return &milvuspb.ShowCollectionsResponse{
CollectionNames: nil,
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
@ -1056,11 +1056,11 @@ func (c *Core) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionR
}
func (c *Core) CreatePartition(ctx context.Context, in *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
}, nil
}
log.Debug("CreatePartition", zap.String("collection name", in.CollectionName), zap.String("partition name", in.PartitionName))
@ -1088,11 +1088,11 @@ func (c *Core) CreatePartition(ctx context.Context, in *milvuspb.CreatePartition
}
func (c *Core) DropPartition(ctx context.Context, in *milvuspb.DropPartitionRequest) (*commonpb.Status, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
}, nil
}
log.Debug("DropPartition", zap.String("collection name", in.CollectionName), zap.String("partition name", in.PartitionName))
@ -1120,12 +1120,12 @@ func (c *Core) DropPartition(ctx context.Context, in *milvuspb.DropPartitionRequ
}
func (c *Core) HasPartition(ctx context.Context, in *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &milvuspb.BoolResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
},
Value: false,
}, nil
@ -1161,13 +1161,13 @@ func (c *Core) HasPartition(ctx context.Context, in *milvuspb.HasPartitionReques
}, nil
}
func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionRequest) (*milvuspb.ShowPartitionResponse, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
return &milvuspb.ShowPartitionResponse{
func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &milvuspb.ShowPartitionsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
},
PartitionNames: nil,
PartitionIDs: nil,
@ -1180,7 +1180,7 @@ func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionReq
core: c,
},
Req: in,
Rsp: &milvuspb.ShowPartitionResponse{
Rsp: &milvuspb.ShowPartitionsResponse{
PartitionNames: nil,
Status: nil,
},
@ -1188,7 +1188,7 @@ func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionReq
c.ddReqQueue <- t
err := t.WaitToFinish()
if err != nil {
return &milvuspb.ShowPartitionResponse{
return &milvuspb.ShowPartitionsResponse{
PartitionNames: nil,
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
@ -1205,11 +1205,11 @@ func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionReq
}
func (c *Core) CreateIndex(ctx context.Context, in *milvuspb.CreateIndexRequest) (*commonpb.Status, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
}, nil
}
log.Debug("CreateIndex", zap.String("collection name", in.CollectionName), zap.String("field name", in.FieldName))
@ -1237,12 +1237,12 @@ func (c *Core) CreateIndex(ctx context.Context, in *milvuspb.CreateIndexRequest)
}
func (c *Core) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &milvuspb.DescribeIndexResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
},
IndexDescriptions: nil,
}, nil
@ -1290,11 +1290,11 @@ func (c *Core) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRequ
}
func (c *Core) DropIndex(ctx context.Context, in *milvuspb.DropIndexRequest) (*commonpb.Status, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
}, nil
}
log.Debug("DropIndex", zap.String("collection name", in.CollectionName), zap.String("field name", in.FieldName), zap.String("index name", in.IndexName))
@ -1322,12 +1322,12 @@ func (c *Core) DropIndex(ctx context.Context, in *milvuspb.DropIndexRequest) (*c
}
func (c *Core) DescribeSegment(ctx context.Context, in *milvuspb.DescribeSegmentRequest) (*milvuspb.DescribeSegmentResponse, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &milvuspb.DescribeSegmentResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
},
IndexID: 0,
}, nil
@ -1364,13 +1364,13 @@ func (c *Core) DescribeSegment(ctx context.Context, in *milvuspb.DescribeSegment
return t.Rsp, nil
}
func (c *Core) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentRequest) (*milvuspb.ShowSegmentResponse, error) {
code := c.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
return &milvuspb.ShowSegmentResponse{
func (c *Core) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) {
code := c.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &milvuspb.ShowSegmentsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: fmt.Sprintf("state code = %s", internalpb2.StateCode_name[int32(code)]),
Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]),
},
SegmentIDs: nil,
}, nil
@ -1382,7 +1382,7 @@ func (c *Core) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentRequest
core: c,
},
Req: in,
Rsp: &milvuspb.ShowSegmentResponse{
Rsp: &milvuspb.ShowSegmentsResponse{
Status: nil,
SegmentIDs: nil,
},
@ -1390,7 +1390,7 @@ func (c *Core) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentRequest
c.ddReqQueue <- t
err := t.WaitToFinish()
if err != nil {
return &milvuspb.ShowSegmentResponse{
return &milvuspb.ShowSegmentsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: "ShowSegments failed, error: " + err.Error(),
@ -1406,10 +1406,10 @@ func (c *Core) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentRequest
return t.Rsp, nil
}
func (c *Core) AllocTimestamp(ctx context.Context, in *masterpb.TsoRequest) (*masterpb.TsoResponse, error) {
func (c *Core) AllocTimestamp(ctx context.Context, in *masterpb.AllocTimestampRequest) (*masterpb.AllocTimestampResponse, error) {
ts, err := c.tsoAllocator.Alloc(in.Count)
if err != nil {
return &masterpb.TsoResponse{
return &masterpb.AllocTimestampResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: "AllocTimestamp failed: " + err.Error(),
@ -1419,7 +1419,7 @@ func (c *Core) AllocTimestamp(ctx context.Context, in *masterpb.TsoRequest) (*ma
}, nil
}
// log.Printf("AllocTimestamp : %d", ts)
return &masterpb.TsoResponse{
return &masterpb.AllocTimestampResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
Reason: "",
@ -1429,10 +1429,10 @@ func (c *Core) AllocTimestamp(ctx context.Context, in *masterpb.TsoRequest) (*ma
}, nil
}
func (c *Core) AllocID(ctx context.Context, in *masterpb.IDRequest) (*masterpb.IDResponse, error) {
func (c *Core) AllocID(ctx context.Context, in *masterpb.AllocIDRequest) (*masterpb.AllocIDResponse, error) {
start, _, err := c.idAllocator.Alloc(in.Count)
if err != nil {
return &masterpb.IDResponse{
return &masterpb.AllocIDResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: "AllocID failed: " + err.Error(),
@ -1442,7 +1442,7 @@ func (c *Core) AllocID(ctx context.Context, in *masterpb.IDRequest) (*masterpb.I
}, nil
}
log.Debug("AllocID", zap.Int64("id start", start), zap.Uint32("count", in.Count))
return &masterpb.IDResponse{
return &masterpb.AllocIDResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
Reason: "",

View File

@ -15,7 +15,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
"github.com/zilliztech/milvus-distributed/internal/proto/querypb"
@ -60,10 +60,10 @@ type dataMock struct {
randVal int
}
func (d *dataMock) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertBinlogPathRequest) (*datapb.InsertBinlogPathsResponse, error) {
rst := &datapb.InsertBinlogPathsResponse{
func (d *dataMock) GetInsertBinlogPaths(ctx context.Context, req *datapb.GetInsertBinlogPathsRequest) (*datapb.GetInsertBinlogPathsResponse, error) {
rst := &datapb.GetInsertBinlogPathsResponse{
FieldIDs: []int64{},
Paths: []*internalpb2.StringList{},
Paths: []*internalpb.StringList{},
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
Reason: "",
@ -71,7 +71,7 @@ func (d *dataMock) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertB
}
for i := 0; i < 200; i++ {
rst.FieldIDs = append(rst.FieldIDs, int64(i))
path := &internalpb2.StringList{
path := &internalpb.StringList{
Values: []string{fmt.Sprintf("file0-%d", i), fmt.Sprintf("file1-%d", i), fmt.Sprintf("file2-%d", i)},
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
@ -83,8 +83,8 @@ func (d *dataMock) GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertB
return rst, nil
}
func (d *dataMock) GetSegmentInfo(ctx context.Context, req *datapb.SegmentInfoRequest) (*datapb.SegmentInfoResponse, error) {
return &datapb.SegmentInfoResponse{
func (d *dataMock) GetSegmentInfo(ctx context.Context, req *datapb.GetSegmentInfoRequest) (*datapb.GetSegmentInfoResponse, error) {
return &datapb.GetSegmentInfoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
Reason: "",
@ -260,7 +260,7 @@ func TestMasterService(t *testing.T) {
EndTimestamp: timeTick,
HashValues: []uint32{0},
}
timeTickResult := internalpb2.TimeTickMsg{
timeTickResult := internalpb.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_TimeTick,
MsgID: 0,
@ -302,7 +302,7 @@ func TestMasterService(t *testing.T) {
Name: "vector",
IsPrimaryKey: false,
Description: "vector",
DataType: schemapb.DataType_VECTOR_FLOAT,
DataType: schemapb.DataType_FloatVector,
TypeParams: nil,
IndexParams: []*commonpb.KeyValuePair{
{
@ -461,7 +461,7 @@ func TestMasterService(t *testing.T) {
})
t.Run("show collection", func(t *testing.T) {
req := &milvuspb.ShowCollectionRequest{
req := &milvuspb.ShowCollectionsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowCollections,
MsgID: 130,
@ -530,7 +530,7 @@ func TestMasterService(t *testing.T) {
t.Run("show partition", func(t *testing.T) {
coll, err := core.MetaTable.GetCollectionByName("testColl")
assert.Nil(t, err)
req := &milvuspb.ShowPartitionRequest{
req := &milvuspb.ShowPartitionsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowCollections,
MsgID: 160,
@ -589,7 +589,7 @@ func TestMasterService(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, len(part.SegmentIDs), 1)
req := &milvuspb.ShowSegmentRequest{
req := &milvuspb.ShowSegmentsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowSegments,
MsgID: 170,
@ -750,7 +750,7 @@ func TestMasterService(t *testing.T) {
flushMsg := &ms.FlushCompletedMsg{
BaseMsg: baseMsg,
SegmentFlushCompletedMsg: internalpb2.SegmentFlushCompletedMsg{
SegmentFlushCompletedMsg: internalpb.SegmentFlushCompletedMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_SegmentFlushDone,
MsgID: 0,

View File

@ -10,7 +10,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"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/typeutil"
@ -82,14 +82,14 @@ func (t *CreateCollectionReqTask) Execute() error {
Name: RowIDFieldName,
IsPrimaryKey: false,
Description: "row id",
DataType: schemapb.DataType_INT64,
DataType: schemapb.DataType_Int64,
}
timeStampField := &schemapb.FieldSchema{
FieldID: int64(TimeStampField),
Name: TimeStampFieldName,
IsPrimaryKey: false,
Description: "time stamp",
DataType: schemapb.DataType_INT64,
DataType: schemapb.DataType_Int64,
}
schema.Fields = append(schema.Fields, rowIDField, timeStampField)
@ -120,7 +120,7 @@ func (t *CreateCollectionReqTask) Execute() error {
idxInfo := make([]*etcdpb.IndexInfo, 0, 16)
/////////////////////// ignore index param from create_collection /////////////////////////
//for _, field := range schema.Fields {
// if field.DataType == schemapb.DataType_VECTOR_FLOAT || field.DataType == schemapb.DataType_VECTOR_BINARY {
// if field.DataType == schemapb.DataType_VectorFloat || field.DataType == schemapb.DataType_VectorBinary {
// if len(field.IndexParams) > 0 {
// idxID, err := t.core.idAllocator.AllocOne()
// if err != nil {
@ -150,7 +150,7 @@ func (t *CreateCollectionReqTask) Execute() error {
return err
}
ddReq := internalpb2.CreateCollectionRequest{
ddReq := internalpb.CreateCollectionRequest{
Base: t.Req.Base,
DbName: t.Req.DbName,
CollectionName: t.Req.CollectionName,
@ -164,7 +164,7 @@ func (t *CreateCollectionReqTask) Execute() error {
return err
}
ddPart := internalpb2.CreatePartitionRequest{
ddPart := internalpb.CreatePartitionRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_CreatePartition,
MsgID: t.Req.Base.MsgID, //TODO, msg id
@ -220,7 +220,7 @@ func (t *DropCollectionReqTask) Execute() error {
//data service should drop segments , which belong to this collection, from the segment manager
ddReq := internalpb2.DropCollectionRequest{
ddReq := internalpb.DropCollectionRequest{
Base: t.Req.Base,
DbName: t.Req.DbName,
CollectionName: t.Req.CollectionName,
@ -319,8 +319,8 @@ func (t *DescribeCollectionReqTask) Execute() error {
type ShowCollectionReqTask struct {
baseReqTask
Req *milvuspb.ShowCollectionRequest
Rsp *milvuspb.ShowCollectionResponse
Req *milvuspb.ShowCollectionsRequest
Rsp *milvuspb.ShowCollectionsResponse
}
func (t *ShowCollectionReqTask) Type() commonpb.MsgType {
@ -375,7 +375,7 @@ func (t *CreatePartitionReqTask) Execute() error {
return err
}
ddReq := internalpb2.CreatePartitionRequest{
ddReq := internalpb.CreatePartitionRequest{
Base: t.Req.Base,
DbName: t.Req.DbName,
CollectionName: t.Req.CollectionName,
@ -420,7 +420,7 @@ func (t *DropPartitionReqTask) Execute() error {
return err
}
ddReq := internalpb2.DropPartitionRequest{
ddReq := internalpb.DropPartitionRequest{
Base: t.Req.Base,
DbName: t.Req.DbName,
CollectionName: t.Req.CollectionName,
@ -466,8 +466,8 @@ func (t *HasPartitionReqTask) Execute() error {
type ShowPartitionReqTask struct {
baseReqTask
Req *milvuspb.ShowPartitionRequest
Rsp *milvuspb.ShowPartitionResponse
Req *milvuspb.ShowPartitionsRequest
Rsp *milvuspb.ShowPartitionsResponse
}
func (t *ShowPartitionReqTask) Type() commonpb.MsgType {
@ -559,8 +559,8 @@ func (t *DescribeSegmentReqTask) Execute() error {
type ShowSegmentReqTask struct {
baseReqTask
Req *milvuspb.ShowSegmentRequest
Rsp *milvuspb.ShowSegmentResponse
Req *milvuspb.ShowSegmentsRequest
Rsp *milvuspb.ShowSegmentsResponse
}
func (t *ShowSegmentReqTask) Type() commonpb.MsgType {
@ -630,7 +630,7 @@ func (t *CreateIndexReqTask) Execute() error {
if err != nil {
return err
}
if field.DataType != schemapb.DataType_VECTOR_FLOAT && field.DataType != schemapb.DataType_VECTOR_BINARY {
if field.DataType != schemapb.DataType_FloatVector && field.DataType != schemapb.DataType_BinaryVector {
return fmt.Errorf("field name = %s, data type = %s", t.Req.FieldName, schemapb.DataType_name[int32(field.DataType)])
}
for _, seg := range segIDs {

View File

@ -6,7 +6,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
type MsgType = commonpb.MsgType
@ -63,7 +63,7 @@ func ConvertToByteArray(input interface{}) ([]byte, error) {
/////////////////////////////////////////Insert//////////////////////////////////////////
type InsertMsg struct {
BaseMsg
internalpb2.InsertRequest
internalpb.InsertRequest
}
func (it *InsertMsg) ID() UniqueID {
@ -85,7 +85,7 @@ func (it *InsertMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (it *InsertMsg) Unmarshal(input MarshalType) (TsMsg, error) {
insertRequest := internalpb2.InsertRequest{}
insertRequest := internalpb.InsertRequest{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -115,7 +115,7 @@ func (it *InsertMsg) Unmarshal(input MarshalType) (TsMsg, error) {
/////////////////////////////////////////FlushCompletedMsg//////////////////////////////////////////
type FlushCompletedMsg struct {
BaseMsg
internalpb2.SegmentFlushCompletedMsg
internalpb.SegmentFlushCompletedMsg
}
func (fl *FlushCompletedMsg) ID() UniqueID {
@ -137,7 +137,7 @@ func (fl *FlushCompletedMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (fl *FlushCompletedMsg) Unmarshal(input MarshalType) (TsMsg, error) {
flushCompletedMsg := internalpb2.SegmentFlushCompletedMsg{}
flushCompletedMsg := internalpb.SegmentFlushCompletedMsg{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -157,7 +157,7 @@ func (fl *FlushCompletedMsg) Unmarshal(input MarshalType) (TsMsg, error) {
// GOOSE TODO remove this
type FlushMsg struct {
BaseMsg
internalpb2.FlushMsg
internalpb.FlushMsg
}
func (fl *FlushMsg) ID() UniqueID {
@ -179,7 +179,7 @@ func (fl *FlushMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (fl *FlushMsg) Unmarshal(input MarshalType) (TsMsg, error) {
flushMsg := internalpb2.FlushMsg{}
flushMsg := internalpb.FlushMsg{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -198,7 +198,7 @@ func (fl *FlushMsg) Unmarshal(input MarshalType) (TsMsg, error) {
/////////////////////////////////////////Delete//////////////////////////////////////////
type DeleteMsg struct {
BaseMsg
internalpb2.DeleteRequest
internalpb.DeleteRequest
}
func (dt *DeleteMsg) ID() UniqueID {
@ -221,7 +221,7 @@ func (dt *DeleteMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (dt *DeleteMsg) Unmarshal(input MarshalType) (TsMsg, error) {
deleteRequest := internalpb2.DeleteRequest{}
deleteRequest := internalpb.DeleteRequest{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -251,7 +251,7 @@ func (dt *DeleteMsg) Unmarshal(input MarshalType) (TsMsg, error) {
/////////////////////////////////////////Search//////////////////////////////////////////
type SearchMsg struct {
BaseMsg
internalpb2.SearchRequest
internalpb.SearchRequest
}
func (st *SearchMsg) ID() UniqueID {
@ -273,7 +273,7 @@ func (st *SearchMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (st *SearchMsg) Unmarshal(input MarshalType) (TsMsg, error) {
searchRequest := internalpb2.SearchRequest{}
searchRequest := internalpb.SearchRequest{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -292,7 +292,7 @@ func (st *SearchMsg) Unmarshal(input MarshalType) (TsMsg, error) {
/////////////////////////////////////////SearchResult//////////////////////////////////////////
type SearchResultMsg struct {
BaseMsg
internalpb2.SearchResults
internalpb.SearchResults
}
func (srt *SearchResultMsg) ID() UniqueID {
@ -314,7 +314,7 @@ func (srt *SearchResultMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (srt *SearchResultMsg) Unmarshal(input MarshalType) (TsMsg, error) {
searchResultRequest := internalpb2.SearchResults{}
searchResultRequest := internalpb.SearchResults{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -333,7 +333,7 @@ func (srt *SearchResultMsg) Unmarshal(input MarshalType) (TsMsg, error) {
/////////////////////////////////////////TimeTick//////////////////////////////////////////
type TimeTickMsg struct {
BaseMsg
internalpb2.TimeTickMsg
internalpb.TimeTickMsg
}
func (tst *TimeTickMsg) ID() UniqueID {
@ -355,7 +355,7 @@ func (tst *TimeTickMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (tst *TimeTickMsg) Unmarshal(input MarshalType) (TsMsg, error) {
timeTickMsg := internalpb2.TimeTickMsg{}
timeTickMsg := internalpb.TimeTickMsg{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -375,7 +375,7 @@ func (tst *TimeTickMsg) Unmarshal(input MarshalType) (TsMsg, error) {
// GOOSE TODO: remove QueryNodeStats
type QueryNodeStatsMsg struct {
BaseMsg
internalpb2.QueryNodeStats
internalpb.QueryNodeStats
}
func (qs *QueryNodeStatsMsg) ID() UniqueID {
@ -397,7 +397,7 @@ func (qs *QueryNodeStatsMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (qs *QueryNodeStatsMsg) Unmarshal(input MarshalType) (TsMsg, error) {
queryNodeSegStats := internalpb2.QueryNodeStats{}
queryNodeSegStats := internalpb.QueryNodeStats{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -414,7 +414,7 @@ func (qs *QueryNodeStatsMsg) Unmarshal(input MarshalType) (TsMsg, error) {
/////////////////////////////////////////SegmentStatisticsMsg//////////////////////////////////////////
type SegmentStatisticsMsg struct {
BaseMsg
internalpb2.SegmentStatistics
internalpb.SegmentStatistics
}
func (ss *SegmentStatisticsMsg) ID() UniqueID {
@ -436,7 +436,7 @@ func (ss *SegmentStatisticsMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (ss *SegmentStatisticsMsg) Unmarshal(input MarshalType) (TsMsg, error) {
segStats := internalpb2.SegmentStatistics{}
segStats := internalpb.SegmentStatistics{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -453,7 +453,7 @@ func (ss *SegmentStatisticsMsg) Unmarshal(input MarshalType) (TsMsg, error) {
///////////////////////////////////////////Key2Seg//////////////////////////////////////////
//type Key2SegMsg struct {
// BaseMsg
// internalpb2.Key2SegMsg
// internalpb.Key2SegMsg
//}
//
//func (k2st *Key2SegMsg) Type() MsgType {
@ -463,7 +463,7 @@ func (ss *SegmentStatisticsMsg) Unmarshal(input MarshalType) (TsMsg, error) {
/////////////////////////////////////////CreateCollection//////////////////////////////////////////
type CreateCollectionMsg struct {
BaseMsg
internalpb2.CreateCollectionRequest
internalpb.CreateCollectionRequest
}
func (cc *CreateCollectionMsg) ID() UniqueID {
@ -485,7 +485,7 @@ func (cc *CreateCollectionMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (cc *CreateCollectionMsg) Unmarshal(input MarshalType) (TsMsg, error) {
createCollectionRequest := internalpb2.CreateCollectionRequest{}
createCollectionRequest := internalpb.CreateCollectionRequest{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -504,7 +504,7 @@ func (cc *CreateCollectionMsg) Unmarshal(input MarshalType) (TsMsg, error) {
/////////////////////////////////////////DropCollection//////////////////////////////////////////
type DropCollectionMsg struct {
BaseMsg
internalpb2.DropCollectionRequest
internalpb.DropCollectionRequest
}
func (dc *DropCollectionMsg) ID() UniqueID {
@ -526,7 +526,7 @@ func (dc *DropCollectionMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (dc *DropCollectionMsg) Unmarshal(input MarshalType) (TsMsg, error) {
dropCollectionRequest := internalpb2.DropCollectionRequest{}
dropCollectionRequest := internalpb.DropCollectionRequest{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -545,7 +545,7 @@ func (dc *DropCollectionMsg) Unmarshal(input MarshalType) (TsMsg, error) {
/////////////////////////////////////////CreatePartition//////////////////////////////////////////
type CreatePartitionMsg struct {
BaseMsg
internalpb2.CreatePartitionRequest
internalpb.CreatePartitionRequest
}
func (cc *CreatePartitionMsg) ID() UniqueID {
@ -567,7 +567,7 @@ func (cc *CreatePartitionMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (cc *CreatePartitionMsg) Unmarshal(input MarshalType) (TsMsg, error) {
createPartitionRequest := internalpb2.CreatePartitionRequest{}
createPartitionRequest := internalpb.CreatePartitionRequest{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -586,7 +586,7 @@ func (cc *CreatePartitionMsg) Unmarshal(input MarshalType) (TsMsg, error) {
/////////////////////////////////////////DropPartition//////////////////////////////////////////
type DropPartitionMsg struct {
BaseMsg
internalpb2.DropPartitionRequest
internalpb.DropPartitionRequest
}
func (dc *DropPartitionMsg) ID() UniqueID {
@ -608,7 +608,7 @@ func (dc *DropPartitionMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (dc *DropPartitionMsg) Unmarshal(input MarshalType) (TsMsg, error) {
dropPartitionRequest := internalpb2.DropPartitionRequest{}
dropPartitionRequest := internalpb.DropPartitionRequest{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err
@ -627,7 +627,7 @@ func (dc *DropPartitionMsg) Unmarshal(input MarshalType) (TsMsg, error) {
/////////////////////////////////////////LoadIndex//////////////////////////////////////////
type LoadIndexMsg struct {
BaseMsg
internalpb2.LoadIndex
internalpb.LoadIndex
}
func (lim *LoadIndexMsg) ID() UniqueID {
@ -649,7 +649,7 @@ func (lim *LoadIndexMsg) Marshal(input TsMsg) (MarshalType, error) {
}
func (lim *LoadIndexMsg) Unmarshal(input MarshalType) (TsMsg, error) {
loadIndexRequest := internalpb2.LoadIndex{}
loadIndexRequest := internalpb.LoadIndex{}
in, err := ConvertToByteArray(input)
if err != nil {
return nil, err

View File

@ -3,14 +3,14 @@ package msgstream
import (
"context"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
type UniqueID = typeutil.UniqueID
type Timestamp = typeutil.Timestamp
type IntPrimaryKey = typeutil.IntPrimaryKey
type MsgPosition = internalpb2.MsgPosition
type MsgPosition = internalpb.MsgPosition
type MsgPack struct {
BeginTs Timestamp

View File

@ -12,7 +12,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
type MarshalType = msgstream.MarshalType
@ -33,7 +33,7 @@ func (tt *InsertTask) Marshal(input msgstream.TsMsg) (MarshalType, error) {
}
func (tt *InsertTask) Unmarshal(input MarshalType) (msgstream.TsMsg, error) {
insertRequest := internalpb2.InsertRequest{}
insertRequest := internalpb.InsertRequest{}
in, err := msgstream.ConvertToByteArray(input)
if err != nil {
return nil, err
@ -72,7 +72,7 @@ func newRepackFunc(tsMsgs []msgstream.TsMsg, hashKeys [][]int32) (map[int32]*msg
result[key] = &msgPack
}
sliceRequest := internalpb2.InsertRequest{
sliceRequest := internalpb.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert,
MsgID: insertRequest.Base.MsgID,
@ -104,7 +104,7 @@ func getInsertTask(reqID msgstream.UniqueID, hashValue uint32) msgstream.TsMsg {
EndTimestamp: 0,
HashValues: []uint32{hashValue},
}
insertRequest := internalpb2.InsertRequest{
insertRequest := internalpb.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert,
MsgID: reqID,

View File

@ -17,7 +17,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/msgstream/util"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/util/trace"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
"go.uber.org/zap"
@ -468,7 +468,7 @@ func (ms *PulsarMsgStream) Chan() <-chan *MsgPack {
return ms.receiveBuf
}
func (ms *PulsarMsgStream) Seek(mp *internalpb2.MsgPosition) error {
func (ms *PulsarMsgStream) Seek(mp *internalpb.MsgPosition) error {
for index, channel := range ms.consumerChannels {
if channel == mp.ChannelName {
messageID, err := typeutil.StringToPulsarMsgID(mp.MsgID)
@ -612,7 +612,7 @@ func (ms *PulsarTtMsgStream) bufMsgPackToChannel() {
continue
}
timeTickBuf := make([]TsMsg, 0)
msgPositions := make([]*internalpb2.MsgPosition, 0)
msgPositions := make([]*internalpb.MsgPosition, 0)
ms.unsolvedMutex.Lock()
for consumer, msgs := range ms.unsolvedBuf {
if len(msgs) == 0 {
@ -634,13 +634,13 @@ func (ms *PulsarTtMsgStream) bufMsgPackToChannel() {
ms.unsolvedBuf[consumer] = tempBuffer
if len(tempBuffer) > 0 {
msgPositions = append(msgPositions, &internalpb2.MsgPosition{
msgPositions = append(msgPositions, &internalpb.MsgPosition{
ChannelName: tempBuffer[0].Position().ChannelName,
MsgID: tempBuffer[0].Position().MsgID,
Timestamp: timeStamp,
})
} else {
msgPositions = append(msgPositions, &internalpb2.MsgPosition{
msgPositions = append(msgPositions, &internalpb.MsgPosition{
ChannelName: timeTickMsg.Position().ChannelName,
MsgID: timeTickMsg.Position().MsgID,
Timestamp: timeStamp,
@ -717,7 +717,7 @@ func (ms *PulsarTtMsgStream) findTimeTick(consumer Consumer,
}
}
func (ms *PulsarTtMsgStream) Seek(mp *internalpb2.MsgPosition) error {
func (ms *PulsarTtMsgStream) Seek(mp *internalpb.MsgPosition) error {
var consumer Consumer
var messageID MessageID
for index, channel := range ms.consumerChannels {

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/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/util/paramtable"
)
@ -49,7 +49,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
switch msgType {
case commonpb.MsgType_Insert:
insertRequest := internalpb2.InsertRequest{
insertRequest := internalpb.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert,
MsgID: reqID,
@ -70,7 +70,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return insertMsg
case commonpb.MsgType_Delete:
deleteRequest := internalpb2.DeleteRequest{
deleteRequest := internalpb.DeleteRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Delete,
MsgID: reqID,
@ -88,7 +88,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return deleteMsg
case commonpb.MsgType_Search:
searchRequest := internalpb2.SearchRequest{
searchRequest := internalpb.SearchRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Search,
MsgID: reqID,
@ -104,7 +104,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return searchMsg
case commonpb.MsgType_SearchResult:
searchResult := internalpb2.SearchResults{
searchResult := internalpb.SearchResults{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_SearchResult,
MsgID: reqID,
@ -120,7 +120,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return searchResultMsg
case commonpb.MsgType_TimeTick:
timeTickResult := internalpb2.TimeTickMsg{
timeTickResult := internalpb.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_TimeTick,
MsgID: reqID,
@ -134,7 +134,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return timeTickMsg
case commonpb.MsgType_QueryNodeStats:
queryNodeSegStats := internalpb2.QueryNodeStats{
queryNodeSegStats := internalpb.QueryNodeStats{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_QueryNodeStats,
SourceID: reqID,
@ -155,7 +155,7 @@ func getTimeTickMsg(reqID UniqueID, hashValue uint32, time uint64) TsMsg {
EndTimestamp: 0,
HashValues: []uint32{hashValue},
}
timeTickResult := internalpb2.TimeTickMsg{
timeTickResult := internalpb.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_TimeTick,
MsgID: reqID,
@ -403,7 +403,7 @@ func TestStream_PulsarMsgStream_InsertRepackFunc(t *testing.T) {
HashValues: []uint32{1, 3},
}
insertRequest := internalpb2.InsertRequest{
insertRequest := internalpb.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert,
MsgID: 1,
@ -459,7 +459,7 @@ func TestStream_PulsarMsgStream_DeleteRepackFunc(t *testing.T) {
HashValues: []uint32{1, 3},
}
deleteRequest := internalpb2.DeleteRequest{
deleteRequest := internalpb.DeleteRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Delete,
MsgID: 1,

View File

@ -15,7 +15,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
func repackFunc(msgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, error) {
@ -42,7 +42,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
switch msgType {
case commonpb.MsgType_Insert:
insertRequest := internalpb2.InsertRequest{
insertRequest := internalpb.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert,
MsgID: reqID,
@ -63,7 +63,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return insertMsg
case commonpb.MsgType_Delete:
deleteRequest := internalpb2.DeleteRequest{
deleteRequest := internalpb.DeleteRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Delete,
MsgID: reqID,
@ -81,7 +81,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return deleteMsg
case commonpb.MsgType_Search:
searchRequest := internalpb2.SearchRequest{
searchRequest := internalpb.SearchRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Search,
MsgID: reqID,
@ -97,7 +97,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return searchMsg
case commonpb.MsgType_SearchResult:
searchResult := internalpb2.SearchResults{
searchResult := internalpb.SearchResults{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_SearchResult,
MsgID: reqID,
@ -113,7 +113,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return searchResultMsg
case commonpb.MsgType_TimeTick:
timeTickResult := internalpb2.TimeTickMsg{
timeTickResult := internalpb.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_TimeTick,
MsgID: reqID,
@ -127,7 +127,7 @@ func getTsMsg(msgType MsgType, reqID UniqueID, hashValue uint32) TsMsg {
}
return timeTickMsg
case commonpb.MsgType_QueryNodeStats:
queryNodeSegStats := internalpb2.QueryNodeStats{
queryNodeSegStats := internalpb.QueryNodeStats{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_QueryNodeStats,
SourceID: reqID,
@ -148,7 +148,7 @@ func getTimeTickMsg(reqID UniqueID, hashValue uint32, time uint64) TsMsg {
EndTimestamp: 0,
HashValues: []uint32{hashValue},
}
timeTickResult := internalpb2.TimeTickMsg{
timeTickResult := internalpb.TimeTickMsg{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_TimeTick,
MsgID: reqID,

View File

@ -7,14 +7,14 @@ import (
"github.com/golang/protobuf/proto"
"github.com/stretchr/testify/assert"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/util/paramtable"
)
var Params paramtable.BaseTable
func newInsertMsgUnmarshal(input []byte) (TsMsg, error) {
insertRequest := internalpb2.InsertRequest{}
insertRequest := internalpb.InsertRequest{}
err := proto.Unmarshal(input, &insertRequest)
insertMsg := &InsertMsg{InsertRequest: insertRequest}
fmt.Println("use func newInsertMsgUnmarshal unmarshal")
@ -33,7 +33,7 @@ func TestStream_unmarshal_Insert(t *testing.T) {
EndTimestamp: 0,
HashValues: []uint32{1},
},
InsertRequest: internalpb2.InsertRequest{
InsertRequest: internalpb.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert,
MsgID: 1,

View File

@ -5,7 +5,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
)
type MsgStream = msgstream.MsgStream
@ -37,7 +37,7 @@ func InsertRepackFunc(tsMsgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, e
result[key] = &msgPack
}
sliceRequest := internalpb2.InsertRequest{
sliceRequest := internalpb.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert,
MsgID: insertRequest.Base.MsgID,
@ -89,7 +89,7 @@ func DeleteRepackFunc(tsMsgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, e
result[key] = &msgPack
}
sliceRequest := internalpb2.DeleteRequest{
sliceRequest := internalpb.DeleteRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Delete,
MsgID: deleteRequest.Base.MsgID,

View File

@ -3,6 +3,7 @@ syntax = "proto3";
package milvus.proto.common;
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/commonpb";
enum ErrorCode {
Success = 0;
UnexpectedError = 1;
@ -51,26 +52,20 @@ enum SegmentState {
Flushed = 4;
}
message Empty{}
message Status {
ErrorCode error_code = 1;
string reason = 2;
}
message KeyValuePair {
string key = 1;
string value = 2;
}
message Blob {
bytes value = 1;
}
message Address {
string ip = 1;
int64 port = 2;

View File

@ -330,37 +330,6 @@ func (MsgType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{3}
}
type Empty struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Empty) Reset() { *m = Empty{} }
func (m *Empty) String() string { return proto.CompactTextString(m) }
func (*Empty) ProtoMessage() {}
func (*Empty) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{0}
}
func (m *Empty) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Empty.Unmarshal(m, b)
}
func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
}
func (m *Empty) XXX_Merge(src proto.Message) {
xxx_messageInfo_Empty.Merge(m, src)
}
func (m *Empty) XXX_Size() int {
return xxx_messageInfo_Empty.Size(m)
}
func (m *Empty) XXX_DiscardUnknown() {
xxx_messageInfo_Empty.DiscardUnknown(m)
}
var xxx_messageInfo_Empty proto.InternalMessageInfo
type Status struct {
ErrorCode ErrorCode `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3,enum=milvus.proto.common.ErrorCode" json:"error_code,omitempty"`
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
@ -373,7 +342,7 @@ func (m *Status) Reset() { *m = Status{} }
func (m *Status) String() string { return proto.CompactTextString(m) }
func (*Status) ProtoMessage() {}
func (*Status) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{1}
return fileDescriptor_555bd8c177793206, []int{0}
}
func (m *Status) XXX_Unmarshal(b []byte) error {
@ -420,7 +389,7 @@ func (m *KeyValuePair) Reset() { *m = KeyValuePair{} }
func (m *KeyValuePair) String() string { return proto.CompactTextString(m) }
func (*KeyValuePair) ProtoMessage() {}
func (*KeyValuePair) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{2}
return fileDescriptor_555bd8c177793206, []int{1}
}
func (m *KeyValuePair) XXX_Unmarshal(b []byte) error {
@ -466,7 +435,7 @@ func (m *Blob) Reset() { *m = Blob{} }
func (m *Blob) String() string { return proto.CompactTextString(m) }
func (*Blob) ProtoMessage() {}
func (*Blob) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{3}
return fileDescriptor_555bd8c177793206, []int{2}
}
func (m *Blob) XXX_Unmarshal(b []byte) error {
@ -506,7 +475,7 @@ func (m *Address) Reset() { *m = Address{} }
func (m *Address) String() string { return proto.CompactTextString(m) }
func (*Address) ProtoMessage() {}
func (*Address) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{4}
return fileDescriptor_555bd8c177793206, []int{3}
}
func (m *Address) XXX_Unmarshal(b []byte) error {
@ -555,7 +524,7 @@ func (m *MsgBase) Reset() { *m = MsgBase{} }
func (m *MsgBase) String() string { return proto.CompactTextString(m) }
func (*MsgBase) ProtoMessage() {}
func (*MsgBase) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{5}
return fileDescriptor_555bd8c177793206, []int{4}
}
func (m *MsgBase) XXX_Unmarshal(b []byte) error {
@ -616,7 +585,7 @@ 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}
return fileDescriptor_555bd8c177793206, []int{5}
}
func (m *MsgHeader) XXX_Unmarshal(b []byte) error {
@ -649,7 +618,6 @@ func init() {
proto.RegisterEnum("milvus.proto.common.IndexState", IndexState_name, IndexState_value)
proto.RegisterEnum("milvus.proto.common.SegmentState", SegmentState_name, SegmentState_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")
proto.RegisterType((*KeyValuePair)(nil), "milvus.proto.common.KeyValuePair")
proto.RegisterType((*Blob)(nil), "milvus.proto.common.Blob")
@ -661,77 +629,77 @@ func init() {
func init() { proto.RegisterFile("common.proto", fileDescriptor_555bd8c177793206) }
var fileDescriptor_555bd8c177793206 = []byte{
// 1149 bytes of a gzipped FileDescriptorProto
// 1142 bytes of a gzipped File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 0xef, 0xbf, 0xfb, 0x56, 0x22, 0xec, 0x38, 0x1f, 0xd1, 0x23, 0xb0,
0xf7, 0x54, 0xa4, 0xa9, 0x78, 0x6a, 0x31, 0x1a, 0xef, 0x15, 0x0f, 0xc4, 0xf5, 0x58, 0x18, 0xab,
0xc5, 0x28, 0xb7, 0x18, 0xef, 0x09, 0x69, 0x51, 0xcb, 0x30, 0xdd, 0x73, 0xaf, 0xc6, 0x5e, 0xf1,
0x6a, 0x4c, 0x46, 0xa3, 0x79, 0x27, 0xbf, 0xfe, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xfc,
0x13, 0xb2, 0x0f, 0x08, 0x00, 0x00,
}

View File

@ -8,6 +8,35 @@ import "common.proto";
import "internal.proto";
import "milvus.proto";
service DataService {
rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {}
rpc GetTimeTickChannel(internal.GetTimeTickChannelRequest) returns(milvus.StringResponse) {}
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) {}
rpc Flush(FlushRequest) returns (common.Status) {}
rpc AssignSegmentID(AssignSegmentIDRequest) returns (AssignSegmentIDResponse) {}
rpc ShowSegments(ShowSegmentsRequest) returns (ShowSegmentsResponse) {}
rpc GetSegmentInfo(GetSegmentInfoRequest) returns (GetSegmentInfoResponse) {}
rpc GetSegmentStates(GetSegmentStatesRequest) returns (GetSegmentStatesResponse) {}
rpc GetInsertBinlogPaths(GetInsertBinlogPathsRequest) returns (GetInsertBinlogPathsResponse) {}
rpc GetInsertChannels(GetInsertChannelsRequest) returns (internal.StringList) {}
rpc GetCollectionStatistics(GetCollectionStatisticsRequest) returns (GetCollectionStatisticsResponse) {}
rpc GetPartitionStatistics(GetPartitionStatisticsRequest) returns (GetPartitionStatisticsResponse) {}
rpc GetSegmentInfoChannel(GetSegmentInfoChannelRequest) returns (milvus.StringResponse){}
}
service DataNode {
rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {}
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
rpc WatchDmChannels(WatchDmChannelsRequest) returns (common.Status) {}
rpc FlushSegments(FlushSegmentsRequest) returns(common.Status) {}
}
message RegisterNodeRequest {
common.MsgBase base = 1;
@ -19,61 +48,55 @@ message RegisterNodeResponse {
common.Status status = 2;
}
message SegIDRequest {
uint32 count = 1;
string channelName = 2;
int64 collectionID = 3;
int64 partitionID = 4;
string coll_name = 5;// todo remove
string partition_name = 6; // todo remove
}
message AssignSegIDRequest {
int64 nodeID = 1;
string peer_role = 2;
repeated SegIDRequest segIDRequests = 3;
}
message SegIDAssignment {
int64 segID = 1;
string channelName = 2;
uint32 count = 3;
int64 collectionID = 4;
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 {
repeated SegIDAssignment segIDAssignments = 1;
common.Status status = 2;
}
message FlushRequest {
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 4;
}
message ShowSegmentRequest {
common.MsgBase base = 1;
int64 collectionID = 2;
int64 partitionID = 3;
int64 dbID = 4;
message SegmentIDRequest {
uint32 count = 1;
string channel_name = 2;
int64 collectionID = 3;
int64 partitionID = 4;
}
message ShowSegmentResponse {
message AssignSegmentIDRequest {
int64 nodeID = 1;
string peer_role = 2;
repeated SegmentIDRequest segmentIDRequests = 3;
}
message SegmentIDAssignment {
int64 segID = 1;
string channel_name = 2;
uint32 count = 3;
int64 collectionID = 4;
int64 partitionID = 5;
uint64 expire_time = 6;
common.Status status = 7;
}
message AssignSegmentIDResponse {
repeated SegmentIDAssignment segIDAssignments = 1;
common.Status status = 2;
}
message ShowSegmentsRequest {
common.MsgBase base = 1;
int64 collectionID = 2;
int64 partitionID = 3;
int64 dbID = 4;
}
message ShowSegmentsResponse {
repeated int64 segmentIDs = 1;
common.Status status = 2;
}
message SegmentStatesRequest {
message GetSegmentStatesRequest {
common.MsgBase base = 1;
repeated int64 segmentIDs = 2;
repeated int64 segmentIDs = 2;
}
message SegmentStateInfo {
@ -87,51 +110,14 @@ message SegmentStateInfo {
common.Status status = 8;
}
message SegmentInfoRequest {
common.MsgBase base = 1;
repeated int64 segmentIDs = 2;
}
message SegmentInfoResponse {
common.Status status = 1;
repeated SegmentInfo infos = 2;
}
message SegmentStatesResponse {
message GetSegmentStatesResponse {
common.Status status = 1;
repeated SegmentStateInfo states = 2;
}
message InsertBinlogPathRequest {
message GetSegmentInfoRequest {
common.MsgBase base = 1;
int64 segmentID = 2;
}
message InsertBinlogPathsResponse {
repeated int64 fieldIDs = 1;
repeated internal.StringList paths = 2;
common.Status status = 3;
}
message InsertChannelRequest {
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 3;
}
message WatchDmChannelRequest {
common.MsgBase base = 1;
repeated string channelNames = 2;
}
message FlushSegRequest {
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 3;
repeated int64 segmentIDs = 4;
repeated int64 segmentIDs = 2;
}
message SegmentInfo {
@ -149,75 +135,83 @@ message SegmentInfo {
internal.MsgPosition end_position = 12;
}
message SegmentMsg{
common.MsgBase base = 1;
SegmentInfo segment = 2;
message GetSegmentInfoResponse {
common.Status status = 1;
repeated SegmentInfo infos = 2;
}
message CollectionStatsRequest{
message GetInsertBinlogPathsRequest {
common.MsgBase base = 1;
int64 segmentID = 2;
}
message GetInsertBinlogPathsResponse {
repeated int64 fieldIDs = 1;
repeated internal.StringList paths = 2;
common.Status status = 3;
}
message GetInsertChannelsRequest {
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 3;
}
message CollectionStatsResponse {
message GetCollectionStatisticsRequest {
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 3;
}
message GetCollectionStatisticsResponse {
repeated common.KeyValuePair stats = 1;
common.Status status = 2;
}
message PartitionStatsRequest{
message GetPartitionStatisticsRequest{
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 3;
int64 partitionID = 4;
}
message PartitionStatsResponse {
message GetPartitionStatisticsResponse {
repeated common.KeyValuePair stats = 1;
common.Status status = 2;
}
message GetSegmentInfoChannelRequest {
}
message WatchDmChannelsRequest {
common.MsgBase base = 1;
repeated string channel_names = 2;
}
message FlushSegmentsRequest {
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 3;
repeated int64 segmentIDs = 4;
}
message SegmentMsg{
common.MsgBase base = 1;
SegmentInfo segment = 2;
}
message FieldFlushMeta {
int64 fieldID = 1;
repeated string binlog_paths = 2;
int64 fieldID = 1;
repeated string binlog_paths = 2;
}
message SegmentFlushMeta{
int64 segmentID = 1;
bool is_flushed = 2;
repeated FieldFlushMeta fields = 5;
int64 segmentID = 1;
bool is_flushed = 2;
repeated FieldFlushMeta fields = 5;
}
message DDLFlushMeta {
int64 collectionID = 1;
repeated string binlog_paths = 2;
}
service DataService {
rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) {}
rpc Flush(FlushRequest) returns (common.Status) {}
rpc AssignSegmentID(AssignSegIDRequest) returns (AssignSegIDResponse) {}
rpc ShowSegments(ShowSegmentRequest) returns (ShowSegmentResponse) {}
rpc GetSegmentInfo(SegmentInfoRequest) returns (SegmentInfoResponse) {}
rpc GetSegmentStates(SegmentStatesRequest) returns (SegmentStatesResponse) {}
rpc GetInsertBinlogPaths(InsertBinlogPathRequest) returns (InsertBinlogPathsResponse) {}
rpc GetInsertChannels(InsertChannelRequest) returns (internal.StringList) {}
rpc GetCollectionStatistics(CollectionStatsRequest) returns (CollectionStatsResponse) {}
rpc GetPartitionStatistics(PartitionStatsRequest) returns (PartitionStatsResponse) {}
rpc GetComponentStates(common.Empty) returns (internal.ComponentStates) {}
rpc GetTimeTickChannel(common.Empty) returns(milvus.StringResponse) {}
rpc GetStatisticsChannel(common.Empty) returns(milvus.StringResponse){}
rpc GetSegmentInfoChannel(common.Empty) returns (milvus.StringResponse){}
}
service DataNode {
rpc GetComponentStates(common.Empty) returns (internal.ComponentStates) {}
rpc WatchDmChannels(WatchDmChannelRequest) returns (common.Status) {}
rpc FlushSegments(FlushSegRequest) returns(common.Status) {}
}
int64 collectionID = 1;
repeated string binlog_paths = 2;
}

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ message ProxyMeta {
message PartitionInfo {
string partition_name = 1;
int64 partitionID = 2;
int64 partitionID = 2;
repeated int64 segmentIDs = 3;
}
@ -43,8 +43,6 @@ message CollectionInfo {
repeated FieldIndexInfo field_indexes = 5;
}
message SegmentIndexInfo {
int64 segmentID = 1;
int64 fieldID = 2;
@ -59,7 +57,7 @@ message CollectionMeta {
uint64 create_time=3;
repeated int64 segmentIDs=4;
repeated string partition_tags=5;
repeated int64 partitionIDs=6;
repeated int64 partitionIDs=6;
}
message FieldBinlogFiles {

View File

@ -8,6 +8,25 @@ import "common.proto";
import "internal.proto";
import "milvus.proto";
service IndexService {
rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {}
rpc GetTimeTickChannel(internal.GetTimeTickChannelRequest) returns(milvus.StringResponse) {}
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) {}
rpc BuildIndex(BuildIndexRequest) returns (BuildIndexResponse){}
rpc GetIndexStates(GetIndexStatesRequest) returns (GetIndexStatesResponse) {}
rpc GetIndexFilePaths(GetIndexFilePathsRequest) returns (GetIndexFilePathsResponse){}
rpc NotifyBuildIndex(NotifyBuildIndexRequest) returns (common.Status) {}
rpc DropIndex(DropIndexRequest) returns (common.Status) {}
}
service IndexNode {
rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {}
rpc GetTimeTickChannel(internal.GetTimeTickChannelRequest) returns(milvus.StringResponse) {}
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
rpc BuildIndex(BuildIndexRequest) returns (common.Status){}
rpc DropIndex(DropIndexRequest) returns (common.Status) {}
}
message RegisterNodeRequest {
common.MsgBase base = 1;
@ -19,7 +38,7 @@ message RegisterNodeResponse {
internal.InitParams init_params = 2;
}
message IndexStatesRequest {
message GetIndexStatesRequest {
repeated int64 indexBuildIDs = 1;
}
@ -28,20 +47,21 @@ message IndexInfo {
int64 indexBuildID = 2;
int64 indexID = 3;
string index_name = 4;
string Reason = 5;
string reason = 5;
}
message IndexStatesResponse {
message GetIndexStatesResponse {
common.Status status = 1;
repeated IndexInfo states = 2;
}
message BuildIndexRequest {
string index_name = 1;
int64 indexID = 2;
repeated string data_paths = 3;
repeated common.KeyValuePair type_params = 4;
repeated common.KeyValuePair index_params = 5;
int64 indexBuildID = 1;
string index_name = 2;
int64 indexID = 3;
repeated string data_paths = 4;
repeated common.KeyValuePair type_params = 5;
repeated common.KeyValuePair index_params = 6;
}
message BuildIndexResponse {
@ -49,19 +69,14 @@ message BuildIndexResponse {
int64 indexBuildID = 2;
}
message BuildIndexCmd {
int64 indexBuildID = 1;
BuildIndexRequest req = 2;
}
message BuildIndexNotification {
message NotifyBuildIndexRequest {
common.Status status = 1;
int64 indexBuildID = 2;
repeated string index_file_paths = 3;
int64 nodeID = 4;
}
message IndexFilePathsRequest {
message GetIndexFilePathsRequest {
repeated int64 indexBuildIDs = 1;
}
@ -71,13 +86,13 @@ message IndexFilePathInfo {
repeated string index_file_paths = 3;
}
message IndexFilePathsResponse {
message GetIndexFilePathsResponse {
common.Status status = 1;
repeated IndexFilePathInfo file_paths = 2;
}
message IndexMeta {
int64 indexBuildID = 1;
int64 indexBuildID = 1;
common.IndexState state = 2;
string fail_reason = 3;
BuildIndexRequest req = 4;
@ -87,41 +102,3 @@ message IndexMeta {
message DropIndexRequest {
int64 indexID = 1;
}
/****************IndexService************************/
service IndexService {
/**
* @brief This method is used to create collection
*
* @param CollectionSchema, use to provide collection information to be created.
*
* @return Status
*/
rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) {}
rpc BuildIndex(BuildIndexRequest) returns (BuildIndexResponse){}
rpc GetIndexStates(IndexStatesRequest) returns (IndexStatesResponse) {}
rpc GetIndexFilePaths(IndexFilePathsRequest) returns (IndexFilePathsResponse){}
rpc NotifyBuildIndex(BuildIndexNotification) returns (common.Status) {}
rpc DropIndex(DropIndexRequest) returns (common.Status) {}
rpc GetComponentStates(common.Empty) returns (internal.ComponentStates) {}
rpc GetTimeTickChannel(common.Empty) returns(milvus.StringResponse) {}
rpc GetStatisticsChannel(common.Empty) returns(milvus.StringResponse){}
}
service IndexNode {
/**
* @brief This method is used to create collection
*
* @param CollectionSchema, use to provide collection information to be created.
*
* @return Status
*/
rpc BuildIndex(BuildIndexCmd) returns (common.Status){}
rpc DropIndex(DropIndexRequest) returns (common.Status) {}
rpc GetComponentStates(common.Empty) returns (internal.ComponentStates) {}
rpc GetTimeTickChannel(common.Empty) returns(milvus.StringResponse) {}
rpc GetStatisticsChannel(common.Empty) returns(milvus.StringResponse){}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
syntax = "proto3";
package milvus.proto.internal;
option go_package = "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2";
option go_package = "github.com/zilliztech/milvus-distributed/internal/proto/internalpb";
import "common.proto";
@ -11,7 +11,7 @@ enum StateCode {
}
message ComponentInfo {
int64 nodeID = 1;
int64 nodeID = 1;
string role = 2;
StateCode state_code = 3;
repeated common.KeyValuePair extra_info = 4;
@ -23,7 +23,19 @@ message ComponentStates {
common.Status status = 3;
}
message NodeInfo {
message GetComponentStatesRequest {
}
message GetTimeTickChannelRequest {
}
message GetStatisticsChannelRequest {
}
message GetDdChannelRequest {
}
message NodeInfo {
common.Address address = 1;
string role = 2;
}
@ -42,7 +54,6 @@ message TimeTickMsg {
common.MsgBase base = 1;
}
message CreateCollectionRequest {
common.MsgBase base = 1;
string db_name = 2;
@ -53,7 +64,6 @@ message CreateCollectionRequest {
bytes schema = 6;
}
message DropCollectionRequest {
common.MsgBase base = 1;
string db_name = 2;
@ -67,23 +77,21 @@ message CreatePartitionRequest {
string db_name = 2;
string collection_name = 3;
string partition_name = 4;
int64 dbID = 5;
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 dbID = 5;
int64 collectionID = 6;
int64 partitionID = 7;
}
message CreateIndexRequest {
common.MsgBase base = 1;
string db_name = 2;
@ -93,10 +101,8 @@ message CreateIndexRequest {
int64 collectionID = 6;
int64 fieldID = 7;
repeated common.KeyValuePair extra_params = 8;
}
message InsertRequest {
common.MsgBase base = 1;
string db_name = 2;
@ -112,7 +118,6 @@ message InsertRequest {
repeated common.Blob row_data = 12;
}
message SearchRequest {
common.MsgBase base = 1;
string result_channelID = 2;
@ -125,7 +130,6 @@ message SearchRequest {
common.Blob query = 8;
}
message SearchResults {
common.MsgBase base = 1;
common.Status status = 2;
@ -134,7 +138,6 @@ message SearchResults {
repeated bytes hits = 5;
}
message DeleteRequest {
common.MsgBase base = 1;
string collection_name = 2;
@ -150,20 +153,6 @@ message FlushMsg {
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;

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: internal.proto
package internalpb2
package internalpb
import (
fmt "fmt"
@ -167,6 +167,130 @@ func (m *ComponentStates) GetStatus() *commonpb.Status {
return nil
}
type GetComponentStatesRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetComponentStatesRequest) Reset() { *m = GetComponentStatesRequest{} }
func (m *GetComponentStatesRequest) String() string { return proto.CompactTextString(m) }
func (*GetComponentStatesRequest) ProtoMessage() {}
func (*GetComponentStatesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{2}
}
func (m *GetComponentStatesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetComponentStatesRequest.Unmarshal(m, b)
}
func (m *GetComponentStatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetComponentStatesRequest.Marshal(b, m, deterministic)
}
func (m *GetComponentStatesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetComponentStatesRequest.Merge(m, src)
}
func (m *GetComponentStatesRequest) XXX_Size() int {
return xxx_messageInfo_GetComponentStatesRequest.Size(m)
}
func (m *GetComponentStatesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetComponentStatesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetComponentStatesRequest proto.InternalMessageInfo
type GetTimeTickChannelRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetTimeTickChannelRequest) Reset() { *m = GetTimeTickChannelRequest{} }
func (m *GetTimeTickChannelRequest) String() string { return proto.CompactTextString(m) }
func (*GetTimeTickChannelRequest) ProtoMessage() {}
func (*GetTimeTickChannelRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{3}
}
func (m *GetTimeTickChannelRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetTimeTickChannelRequest.Unmarshal(m, b)
}
func (m *GetTimeTickChannelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetTimeTickChannelRequest.Marshal(b, m, deterministic)
}
func (m *GetTimeTickChannelRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetTimeTickChannelRequest.Merge(m, src)
}
func (m *GetTimeTickChannelRequest) XXX_Size() int {
return xxx_messageInfo_GetTimeTickChannelRequest.Size(m)
}
func (m *GetTimeTickChannelRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetTimeTickChannelRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetTimeTickChannelRequest proto.InternalMessageInfo
type GetStatisticsChannelRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetStatisticsChannelRequest) Reset() { *m = GetStatisticsChannelRequest{} }
func (m *GetStatisticsChannelRequest) String() string { return proto.CompactTextString(m) }
func (*GetStatisticsChannelRequest) ProtoMessage() {}
func (*GetStatisticsChannelRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{4}
}
func (m *GetStatisticsChannelRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetStatisticsChannelRequest.Unmarshal(m, b)
}
func (m *GetStatisticsChannelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetStatisticsChannelRequest.Marshal(b, m, deterministic)
}
func (m *GetStatisticsChannelRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetStatisticsChannelRequest.Merge(m, src)
}
func (m *GetStatisticsChannelRequest) XXX_Size() int {
return xxx_messageInfo_GetStatisticsChannelRequest.Size(m)
}
func (m *GetStatisticsChannelRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetStatisticsChannelRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetStatisticsChannelRequest proto.InternalMessageInfo
type GetDdChannelRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetDdChannelRequest) Reset() { *m = GetDdChannelRequest{} }
func (m *GetDdChannelRequest) String() string { return proto.CompactTextString(m) }
func (*GetDdChannelRequest) ProtoMessage() {}
func (*GetDdChannelRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{5}
}
func (m *GetDdChannelRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDdChannelRequest.Unmarshal(m, b)
}
func (m *GetDdChannelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetDdChannelRequest.Marshal(b, m, deterministic)
}
func (m *GetDdChannelRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetDdChannelRequest.Merge(m, src)
}
func (m *GetDdChannelRequest) XXX_Size() int {
return xxx_messageInfo_GetDdChannelRequest.Size(m)
}
func (m *GetDdChannelRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetDdChannelRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetDdChannelRequest proto.InternalMessageInfo
type NodeInfo struct {
Address *commonpb.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
@ -179,7 +303,7 @@ func (m *NodeInfo) Reset() { *m = NodeInfo{} }
func (m *NodeInfo) String() string { return proto.CompactTextString(m) }
func (*NodeInfo) ProtoMessage() {}
func (*NodeInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{2}
return fileDescriptor_41f4a519b878ee3b, []int{6}
}
func (m *NodeInfo) XXX_Unmarshal(b []byte) error {
@ -226,7 +350,7 @@ func (m *InitParams) Reset() { *m = InitParams{} }
func (m *InitParams) String() string { return proto.CompactTextString(m) }
func (*InitParams) ProtoMessage() {}
func (*InitParams) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{3}
return fileDescriptor_41f4a519b878ee3b, []int{7}
}
func (m *InitParams) XXX_Unmarshal(b []byte) error {
@ -273,7 +397,7 @@ func (m *StringList) Reset() { *m = StringList{} }
func (m *StringList) String() string { return proto.CompactTextString(m) }
func (*StringList) ProtoMessage() {}
func (*StringList) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{4}
return fileDescriptor_41f4a519b878ee3b, []int{8}
}
func (m *StringList) XXX_Unmarshal(b []byte) error {
@ -319,7 +443,7 @@ func (m *TimeTickMsg) Reset() { *m = TimeTickMsg{} }
func (m *TimeTickMsg) String() string { return proto.CompactTextString(m) }
func (*TimeTickMsg) ProtoMessage() {}
func (*TimeTickMsg) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{5}
return fileDescriptor_41f4a519b878ee3b, []int{9}
}
func (m *TimeTickMsg) XXX_Unmarshal(b []byte) error {
@ -364,7 +488,7 @@ func (m *CreateCollectionRequest) Reset() { *m = CreateCollectionRequest
func (m *CreateCollectionRequest) String() string { return proto.CompactTextString(m) }
func (*CreateCollectionRequest) ProtoMessage() {}
func (*CreateCollectionRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{6}
return fileDescriptor_41f4a519b878ee3b, []int{10}
}
func (m *CreateCollectionRequest) XXX_Unmarshal(b []byte) error {
@ -442,7 +566,7 @@ func (m *DropCollectionRequest) Reset() { *m = DropCollectionRequest{} }
func (m *DropCollectionRequest) String() string { return proto.CompactTextString(m) }
func (*DropCollectionRequest) ProtoMessage() {}
func (*DropCollectionRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{7}
return fileDescriptor_41f4a519b878ee3b, []int{11}
}
func (m *DropCollectionRequest) XXX_Unmarshal(b []byte) error {
@ -515,7 +639,7 @@ func (m *CreatePartitionRequest) Reset() { *m = CreatePartitionRequest{}
func (m *CreatePartitionRequest) String() string { return proto.CompactTextString(m) }
func (*CreatePartitionRequest) ProtoMessage() {}
func (*CreatePartitionRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{8}
return fileDescriptor_41f4a519b878ee3b, []int{12}
}
func (m *CreatePartitionRequest) XXX_Unmarshal(b []byte) error {
@ -602,7 +726,7 @@ func (m *DropPartitionRequest) Reset() { *m = DropPartitionRequest{} }
func (m *DropPartitionRequest) String() string { return proto.CompactTextString(m) }
func (*DropPartitionRequest) ProtoMessage() {}
func (*DropPartitionRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{9}
return fileDescriptor_41f4a519b878ee3b, []int{13}
}
func (m *DropPartitionRequest) XXX_Unmarshal(b []byte) error {
@ -690,7 +814,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_41f4a519b878ee3b, []int{10}
return fileDescriptor_41f4a519b878ee3b, []int{14}
}
func (m *CreateIndexRequest) XXX_Unmarshal(b []byte) error {
@ -789,7 +913,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_41f4a519b878ee3b, []int{11}
return fileDescriptor_41f4a519b878ee3b, []int{15}
}
func (m *InsertRequest) XXX_Unmarshal(b []byte) error {
@ -913,7 +1037,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_41f4a519b878ee3b, []int{12}
return fileDescriptor_41f4a519b878ee3b, []int{16}
}
func (m *SearchRequest) XXX_Unmarshal(b []byte) error {
@ -1005,7 +1129,7 @@ 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_41f4a519b878ee3b, []int{13}
return fileDescriptor_41f4a519b878ee3b, []int{17}
}
func (m *SearchResults) XXX_Unmarshal(b []byte) error {
@ -1076,7 +1200,7 @@ func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteRequest) ProtoMessage() {}
func (*DeleteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{14}
return fileDescriptor_41f4a519b878ee3b, []int{18}
}
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
@ -1146,7 +1270,7 @@ func (m *FlushMsg) Reset() { *m = FlushMsg{} }
func (m *FlushMsg) String() string { return proto.CompactTextString(m) }
func (*FlushMsg) ProtoMessage() {}
func (*FlushMsg) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{15}
return fileDescriptor_41f4a519b878ee3b, []int{19}
}
func (m *FlushMsg) XXX_Unmarshal(b []byte) error {
@ -1211,7 +1335,7 @@ func (m *LoadIndex) Reset() { *m = LoadIndex{} }
func (m *LoadIndex) String() string { return proto.CompactTextString(m) }
func (*LoadIndex) ProtoMessage() {}
func (*LoadIndex) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{16}
return fileDescriptor_41f4a519b878ee3b, []int{20}
}
func (m *LoadIndex) XXX_Unmarshal(b []byte) error {
@ -1292,7 +1416,7 @@ func (m *SegmentStatisticsUpdates) Reset() { *m = SegmentStatisticsUpdat
func (m *SegmentStatisticsUpdates) String() string { return proto.CompactTextString(m) }
func (*SegmentStatisticsUpdates) ProtoMessage() {}
func (*SegmentStatisticsUpdates) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{17}
return fileDescriptor_41f4a519b878ee3b, []int{21}
}
func (m *SegmentStatisticsUpdates) XXX_Unmarshal(b []byte) error {
@ -1381,7 +1505,7 @@ func (m *SegmentStatistics) Reset() { *m = SegmentStatistics{} }
func (m *SegmentStatistics) String() string { return proto.CompactTextString(m) }
func (*SegmentStatistics) ProtoMessage() {}
func (*SegmentStatistics) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{18}
return fileDescriptor_41f4a519b878ee3b, []int{22}
}
func (m *SegmentStatistics) XXX_Unmarshal(b []byte) error {
@ -1428,7 +1552,7 @@ func (m *SegmentFlushCompletedMsg) Reset() { *m = SegmentFlushCompletedM
func (m *SegmentFlushCompletedMsg) String() string { return proto.CompactTextString(m) }
func (*SegmentFlushCompletedMsg) ProtoMessage() {}
func (*SegmentFlushCompletedMsg) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{19}
return fileDescriptor_41f4a519b878ee3b, []int{23}
}
func (m *SegmentFlushCompletedMsg) XXX_Unmarshal(b []byte) error {
@ -1475,7 +1599,7 @@ func (m *IndexStats) Reset() { *m = IndexStats{} }
func (m *IndexStats) String() string { return proto.CompactTextString(m) }
func (*IndexStats) ProtoMessage() {}
func (*IndexStats) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{20}
return fileDescriptor_41f4a519b878ee3b, []int{24}
}
func (m *IndexStats) XXX_Unmarshal(b []byte) error {
@ -1523,7 +1647,7 @@ func (m *FieldStats) Reset() { *m = FieldStats{} }
func (m *FieldStats) String() string { return proto.CompactTextString(m) }
func (*FieldStats) ProtoMessage() {}
func (*FieldStats) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{21}
return fileDescriptor_41f4a519b878ee3b, []int{25}
}
func (m *FieldStats) XXX_Unmarshal(b []byte) error {
@ -1579,7 +1703,7 @@ func (m *SegmentStats) Reset() { *m = SegmentStats{} }
func (m *SegmentStats) String() string { return proto.CompactTextString(m) }
func (*SegmentStats) ProtoMessage() {}
func (*SegmentStats) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{22}
return fileDescriptor_41f4a519b878ee3b, []int{26}
}
func (m *SegmentStats) XXX_Unmarshal(b []byte) error {
@ -1641,7 +1765,7 @@ func (m *QueryNodeStats) Reset() { *m = QueryNodeStats{} }
func (m *QueryNodeStats) String() string { return proto.CompactTextString(m) }
func (*QueryNodeStats) ProtoMessage() {}
func (*QueryNodeStats) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{23}
return fileDescriptor_41f4a519b878ee3b, []int{27}
}
func (m *QueryNodeStats) XXX_Unmarshal(b []byte) error {
@ -1696,7 +1820,7 @@ func (m *MsgPosition) Reset() { *m = MsgPosition{} }
func (m *MsgPosition) String() string { return proto.CompactTextString(m) }
func (*MsgPosition) ProtoMessage() {}
func (*MsgPosition) Descriptor() ([]byte, []int) {
return fileDescriptor_41f4a519b878ee3b, []int{24}
return fileDescriptor_41f4a519b878ee3b, []int{28}
}
func (m *MsgPosition) XXX_Unmarshal(b []byte) error {
@ -1742,6 +1866,10 @@ func init() {
proto.RegisterEnum("milvus.proto.internal.StateCode", StateCode_name, StateCode_value)
proto.RegisterType((*ComponentInfo)(nil), "milvus.proto.internal.ComponentInfo")
proto.RegisterType((*ComponentStates)(nil), "milvus.proto.internal.ComponentStates")
proto.RegisterType((*GetComponentStatesRequest)(nil), "milvus.proto.internal.GetComponentStatesRequest")
proto.RegisterType((*GetTimeTickChannelRequest)(nil), "milvus.proto.internal.GetTimeTickChannelRequest")
proto.RegisterType((*GetStatisticsChannelRequest)(nil), "milvus.proto.internal.GetStatisticsChannelRequest")
proto.RegisterType((*GetDdChannelRequest)(nil), "milvus.proto.internal.GetDdChannelRequest")
proto.RegisterType((*NodeInfo)(nil), "milvus.proto.internal.NodeInfo")
proto.RegisterType((*InitParams)(nil), "milvus.proto.internal.InitParams")
proto.RegisterType((*StringList)(nil), "milvus.proto.internal.StringList")
@ -1770,100 +1898,102 @@ func init() {
func init() { proto.RegisterFile("internal.proto", fileDescriptor_41f4a519b878ee3b) }
var fileDescriptor_41f4a519b878ee3b = []byte{
// 1505 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xc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0x00, 0xff, 0xff, 0xbb, 0xfe, 0x6d, 0x1a, 0x3d, 0x14, 0x00,
0x00,
// 1539 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0x1b, 0x45,
0x14, 0x67, 0x6d, 0x27, 0xb6, 0xdf, 0x3a, 0xa9, 0xbb, 0xfd, 0xda, 0xd0, 0x94, 0xba, 0xcb, 0x57,
0xa0, 0x22, 0xa9, 0x52, 0x84, 0x10, 0x97, 0xb6, 0x89, 0x69, 0xb0, 0xda, 0x44, 0x61, 0x9d, 0x56,
0x82, 0xcb, 0x6a, 0xbc, 0x3b, 0xb1, 0xa7, 0xdd, 0x0f, 0x77, 0x66, 0xb6, 0xa9, 0x73, 0xe6, 0x86,
0xe0, 0x80, 0xc4, 0x3f, 0xc0, 0x1f, 0xc0, 0x99, 0x13, 0x48, 0x9c, 0x90, 0xb8, 0x23, 0x21, 0x71,
0xe4, 0xaf, 0xe0, 0x84, 0xe6, 0x63, 0xd7, 0x1f, 0x75, 0xd2, 0xd4, 0x50, 0x21, 0x04, 0x37, 0xcf,
0x6f, 0xde, 0xbe, 0x99, 0xdf, 0xef, 0xbd, 0x37, 0x6f, 0xc6, 0xb0, 0x48, 0x62, 0x8e, 0x69, 0x8c,
0xc2, 0xd5, 0x3e, 0x4d, 0x78, 0x62, 0x9d, 0x8b, 0x48, 0xf8, 0x38, 0x65, 0x6a, 0xb4, 0x9a, 0x4d,
0xbe, 0x5c, 0xf3, 0x93, 0x28, 0x4a, 0x62, 0x05, 0x3b, 0xdf, 0x1b, 0xb0, 0xb0, 0x99, 0x44, 0xfd,
0x24, 0xc6, 0x31, 0x6f, 0xc5, 0xfb, 0x89, 0x75, 0x1e, 0xe6, 0xe3, 0x24, 0xc0, 0xad, 0xa6, 0x6d,
0x34, 0x8c, 0x95, 0xa2, 0xab, 0x47, 0x96, 0x05, 0x25, 0x9a, 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0d,
0x2a, 0xb7, 0x3a, 0x71, 0x42, 0x23, 0x14, 0xd6, 0x0b, 0x1b, 0xcd, 0x4f, 0x37, 0xba, 0x84, 0xf7,
0xd2, 0x8e, 0x10, 0x71, 0xed, 0x90, 0x84, 0x21, 0x39, 0xe4, 0xd8, 0xef, 0xad, 0x29, 0x96, 0xef,
0x04, 0x84, 0x71, 0x4a, 0x3a, 0x29, 0xc7, 0xc1, 0x5a, 0xc6, 0x75, 0x4d, 0x52, 0xcf, 0x87, 0xfd,
0x4e, 0x67, 0x5e, 0x22, 0xd7, 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x5f, 0x40, 0xbb, 0xac,
0x14, 0x00, 0x00,
}

View File

@ -7,29 +7,10 @@ import "common.proto";
import "milvus.proto";
import "internal.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 {
rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {}
rpc GetTimeTickChannel(internal.GetTimeTickChannelRequest) returns(milvus.StringResponse) {}
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
/**
* @brief This method is used to create collection
*
@ -38,7 +19,7 @@ service MasterService {
* @return Status
*/
rpc CreateCollection(milvus.CreateCollectionRequest) returns (common.Status){}
/**
* @brief This method is used to delete collection.
*
@ -71,7 +52,7 @@ service MasterService {
*
* @return StringListResponse, collection name list
*/
rpc ShowCollections(milvus.ShowCollectionRequest) returns (milvus.ShowCollectionResponse) {}
rpc ShowCollections(milvus.ShowCollectionsRequest) returns (milvus.ShowCollectionsResponse) {}
/**
* @brief This method is used to create partition
@ -101,24 +82,39 @@ service MasterService {
*
* @return StringListResponse
*/
rpc ShowPartitions(milvus.ShowPartitionRequest) returns (milvus.ShowPartitionResponse) {}
rpc ShowPartitions(milvus.ShowPartitionsRequest) returns (milvus.ShowPartitionsResponse) {}
rpc DescribeSegment(milvus.DescribeSegmentRequest) returns (milvus.DescribeSegmentResponse) {}
rpc ShowSegments(milvus.ShowSegmentRequest) returns (milvus.ShowSegmentResponse) {}
rpc ShowSegments(milvus.ShowSegmentsRequest) returns (milvus.ShowSegmentsResponse) {}
rpc CreateIndex(milvus.CreateIndexRequest) returns (common.Status) {}
rpc DescribeIndex(milvus.DescribeIndexRequest) returns (milvus.DescribeIndexResponse) {}
rpc DropIndex(milvus.DropIndexRequest) returns (common.Status) {}
rpc AllocTimestamp(TsoRequest) returns (TsoResponse) {}
rpc AllocID(IDRequest) returns (IDResponse) {}
rpc AllocTimestamp(AllocTimestampRequest) returns (AllocTimestampResponse) {}
rpc AllocID(AllocIDRequest) returns (AllocIDResponse) {}
rpc GetComponentStatesRPC(common.Empty) returns (internal.ComponentStates) {}
rpc GetDdChannel(internal.GetDdChannelRequest) returns (milvus.StringResponse) {}
}
rpc GetTimeTickChannelRPC(common.Empty) returns (milvus.StringResponse) {}
message AllocTimestampRequest {
common.MsgBase base = 1;
uint32 count = 3;
}
rpc GetDdChannelRPC(common.Empty) returns (milvus.StringResponse) {}
message AllocTimestampResponse {
common.Status status = 1;
uint64 timestamp = 2;
uint32 count = 3;
}
rpc GetStatisticsChannelRPC(common.Empty) returns (milvus.StringResponse) {}
message AllocIDRequest {
common.MsgBase base = 1;
uint32 count = 2;
}
}
message AllocIDResponse {
common.Status status = 1;
int64 ID = 2;
uint32 count = 3;
}

View File

@ -8,7 +8,7 @@ import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
commonpb "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalpb2 "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
internalpb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
milvuspb "github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@ -27,109 +27,7 @@ var _ = math.Inf
// 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_f9c348dec43a6705, []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_f9c348dec43a6705, []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 {
type AllocTimestampRequest 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:"-"`
@ -137,46 +35,46 @@ type TsoRequest struct {
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_f9c348dec43a6705, []int{2}
func (m *AllocTimestampRequest) Reset() { *m = AllocTimestampRequest{} }
func (m *AllocTimestampRequest) String() string { return proto.CompactTextString(m) }
func (*AllocTimestampRequest) ProtoMessage() {}
func (*AllocTimestampRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f9c348dec43a6705, []int{0}
}
func (m *TsoRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TsoRequest.Unmarshal(m, b)
func (m *AllocTimestampRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AllocTimestampRequest.Unmarshal(m, b)
}
func (m *TsoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TsoRequest.Marshal(b, m, deterministic)
func (m *AllocTimestampRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AllocTimestampRequest.Marshal(b, m, deterministic)
}
func (m *TsoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_TsoRequest.Merge(m, src)
func (m *AllocTimestampRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AllocTimestampRequest.Merge(m, src)
}
func (m *TsoRequest) XXX_Size() int {
return xxx_messageInfo_TsoRequest.Size(m)
func (m *AllocTimestampRequest) XXX_Size() int {
return xxx_messageInfo_AllocTimestampRequest.Size(m)
}
func (m *TsoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_TsoRequest.DiscardUnknown(m)
func (m *AllocTimestampRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AllocTimestampRequest.DiscardUnknown(m)
}
var xxx_messageInfo_TsoRequest proto.InternalMessageInfo
var xxx_messageInfo_AllocTimestampRequest proto.InternalMessageInfo
func (m *TsoRequest) GetBase() *commonpb.MsgBase {
func (m *AllocTimestampRequest) GetBase() *commonpb.MsgBase {
if m != nil {
return m.Base
}
return nil
}
func (m *TsoRequest) GetCount() uint32 {
func (m *AllocTimestampRequest) GetCount() uint32 {
if m != nil {
return m.Count
}
return 0
}
type TsoResponse struct {
type AllocTimestampResponse 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"`
@ -185,46 +83,148 @@ type TsoResponse struct {
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_f9c348dec43a6705, []int{3}
func (m *AllocTimestampResponse) Reset() { *m = AllocTimestampResponse{} }
func (m *AllocTimestampResponse) String() string { return proto.CompactTextString(m) }
func (*AllocTimestampResponse) ProtoMessage() {}
func (*AllocTimestampResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f9c348dec43a6705, []int{1}
}
func (m *TsoResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TsoResponse.Unmarshal(m, b)
func (m *AllocTimestampResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AllocTimestampResponse.Unmarshal(m, b)
}
func (m *TsoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TsoResponse.Marshal(b, m, deterministic)
func (m *AllocTimestampResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AllocTimestampResponse.Marshal(b, m, deterministic)
}
func (m *TsoResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_TsoResponse.Merge(m, src)
func (m *AllocTimestampResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AllocTimestampResponse.Merge(m, src)
}
func (m *TsoResponse) XXX_Size() int {
return xxx_messageInfo_TsoResponse.Size(m)
func (m *AllocTimestampResponse) XXX_Size() int {
return xxx_messageInfo_AllocTimestampResponse.Size(m)
}
func (m *TsoResponse) XXX_DiscardUnknown() {
xxx_messageInfo_TsoResponse.DiscardUnknown(m)
func (m *AllocTimestampResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AllocTimestampResponse.DiscardUnknown(m)
}
var xxx_messageInfo_TsoResponse proto.InternalMessageInfo
var xxx_messageInfo_AllocTimestampResponse proto.InternalMessageInfo
func (m *TsoResponse) GetStatus() *commonpb.Status {
func (m *AllocTimestampResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *TsoResponse) GetTimestamp() uint64 {
func (m *AllocTimestampResponse) GetTimestamp() uint64 {
if m != nil {
return m.Timestamp
}
return 0
}
func (m *TsoResponse) GetCount() uint32 {
func (m *AllocTimestampResponse) GetCount() uint32 {
if m != nil {
return m.Count
}
return 0
}
type AllocIDRequest 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 *AllocIDRequest) Reset() { *m = AllocIDRequest{} }
func (m *AllocIDRequest) String() string { return proto.CompactTextString(m) }
func (*AllocIDRequest) ProtoMessage() {}
func (*AllocIDRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f9c348dec43a6705, []int{2}
}
func (m *AllocIDRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AllocIDRequest.Unmarshal(m, b)
}
func (m *AllocIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AllocIDRequest.Marshal(b, m, deterministic)
}
func (m *AllocIDRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AllocIDRequest.Merge(m, src)
}
func (m *AllocIDRequest) XXX_Size() int {
return xxx_messageInfo_AllocIDRequest.Size(m)
}
func (m *AllocIDRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AllocIDRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AllocIDRequest proto.InternalMessageInfo
func (m *AllocIDRequest) GetBase() *commonpb.MsgBase {
if m != nil {
return m.Base
}
return nil
}
func (m *AllocIDRequest) GetCount() uint32 {
if m != nil {
return m.Count
}
return 0
}
type AllocIDResponse 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 *AllocIDResponse) Reset() { *m = AllocIDResponse{} }
func (m *AllocIDResponse) String() string { return proto.CompactTextString(m) }
func (*AllocIDResponse) ProtoMessage() {}
func (*AllocIDResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f9c348dec43a6705, []int{3}
}
func (m *AllocIDResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AllocIDResponse.Unmarshal(m, b)
}
func (m *AllocIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AllocIDResponse.Marshal(b, m, deterministic)
}
func (m *AllocIDResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AllocIDResponse.Merge(m, src)
}
func (m *AllocIDResponse) XXX_Size() int {
return xxx_messageInfo_AllocIDResponse.Size(m)
}
func (m *AllocIDResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AllocIDResponse.DiscardUnknown(m)
}
var xxx_messageInfo_AllocIDResponse proto.InternalMessageInfo
func (m *AllocIDResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *AllocIDResponse) GetID() int64 {
if m != nil {
return m.ID
}
return 0
}
func (m *AllocIDResponse) GetCount() uint32 {
if m != nil {
return m.Count
}
@ -232,59 +232,60 @@ func (m *TsoResponse) GetCount() uint32 {
}
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")
proto.RegisterType((*AllocTimestampRequest)(nil), "milvus.proto.master.AllocTimestampRequest")
proto.RegisterType((*AllocTimestampResponse)(nil), "milvus.proto.master.AllocTimestampResponse")
proto.RegisterType((*AllocIDRequest)(nil), "milvus.proto.master.AllocIDRequest")
proto.RegisterType((*AllocIDResponse)(nil), "milvus.proto.master.AllocIDResponse")
}
func init() { proto.RegisterFile("master.proto", fileDescriptor_f9c348dec43a6705) }
var fileDescriptor_f9c348dec43a6705 = []byte{
// 679 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x6b, 0x6f, 0xd3, 0x3c,
0x14, 0xc7, 0x77, 0x7b, 0xf6, 0x68, 0x67, 0xbd, 0x20, 0x03, 0x62, 0x0a, 0x13, 0x1b, 0x45, 0x40,
0x77, 0xa1, 0x45, 0xdb, 0x17, 0x80, 0x36, 0x68, 0xab, 0xc4, 0xa4, 0x91, 0x76, 0x2f, 0x18, 0x4c,
0x53, 0x9a, 0x1e, 0xb5, 0x16, 0x89, 0x1d, 0x62, 0x77, 0x83, 0x7d, 0x10, 0x3e, 0x2f, 0x8a, 0xd3,
0xb8, 0x49, 0x97, 0x6c, 0x99, 0xe8, 0x4b, 0xf7, 0xfc, 0xfd, 0xfb, 0x9f, 0x9b, 0xe2, 0x42, 0xc9,
0xb3, 0x85, 0xc4, 0xa0, 0xe1, 0x07, 0x5c, 0x72, 0xf2, 0xd8, 0xa3, 0xee, 0xd5, 0x58, 0x44, 0xa7,
0x46, 0x14, 0x32, 0x4a, 0x0e, 0xf7, 0x3c, 0xce, 0xa2, 0x1f, 0x8d, 0x52, 0x52, 0x62, 0x54, 0x28,
0x93, 0x18, 0x30, 0xdb, 0x8d, 0xce, 0xb5, 0x2e, 0xac, 0x75, 0x4c, 0x0b, 0x7f, 0x8e, 0x51, 0x48,
0xf2, 0x1e, 0x56, 0xfa, 0xb6, 0xc0, 0x8d, 0xc5, 0xed, 0xc5, 0xfa, 0x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, 0xc8,
0x78, 0x64, 0x1b, 0xd3, 0x77, 0xc7, 0xd8, 0xce, 0x17, 0xe8, 0x4c, 0x3f, 0xc3, 0xff, 0x0a, 0xdb,
0x31, 0xc9, 0x8b, 0x4c, 0xb9, 0x7e, 0x85, 0x8d, 0xad, 0xdc, 0x78, 0xe2, 0x8b, 0xf0, 0xf4, 0x08,
0x65, 0x9b, 0x7b, 0x3e, 0x67, 0xc8, 0x64, 0x98, 0x3c, 0x0a, 0xeb, 0xb4, 0x4d, 0x8c, 0xcc, 0xe2,
0x3e, 0x79, 0xbe, 0xfc, 0x6d, 0xbc, 0x49, 0xc7, 0xf4, 0x1f, 0x81, 0x19, 0x4c, 0x6d, 0x81, 0x9c,
0x2b, 0x7c, 0xd8, 0x81, 0x1e, 0x75, 0x7e, 0xb4, 0x47, 0x36, 0x63, 0xe8, 0xde, 0x87, 0x7f, 0x95,
0xbd, 0x78, 0x32, 0xa0, 0x6c, 0x98, 0x48, 0xbd, 0x07, 0xd5, 0x23, 0x94, 0xe6, 0x60, 0xbe, 0xd4,
0xef, 0xf0, 0xec, 0x08, 0x55, 0x01, 0x54, 0x48, 0xea, 0x88, 0xb9, 0xd2, 0x5b, 0xad, 0xf3, 0x0f,
0x43, 0x2a, 0x47, 0xe3, 0x7e, 0x78, 0xbb, 0x79, 0x43, 0x5d, 0x97, 0xde, 0x48, 0x74, 0x46, 0xcd,
0xe8, 0xc2, 0xbb, 0x01, 0x15, 0x32, 0xa0, 0xfd, 0xb1, 0xc4, 0x41, 0x33, 0x6e, 0x6b, 0x53, 0x21,
0x9b, 0xd1, 0xf4, 0xfc, 0x7e, 0x7f, 0x55, 0x9d, 0x0f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x03,
0xc7, 0x66, 0xf5, 0xc0, 0x09, 0x00, 0x00,
// 700 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xdb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0xfc, 0x88, 0xf4, 0x61, 0x1e, 0x54, 0x17, 0xf0, 0x19,
0x36, 0xdc, 0x68, 0xfa, 0x2e, 0x6f, 0x52, 0xa3, 0xbb, 0xcc, 0xe1, 0x6f, 0x83, 0x6b, 0x5a, 0xbf,
0x14, 0x62, 0xb9, 0xf2, 0x9f, 0x3e, 0x89, 0x0f, 0x96, 0x58, 0xae, 0x92, 0x59, 0x7d, 0xfe, 0xaf,
0xf0, 0x34, 0xb8, 0xb9, 0xc9, 0x41, 0xfa, 0x4e, 0xfd, 0x62, 0xa8, 0xbe, 0xce, 0x86, 0xb4, 0xae,
0x01, 0xa5, 0x73, 0x94, 0xdd, 0x91, 0xba, 0xa8, 0x0e, 0xd3, 0x2f, 0x2a, 0x0d, 0x2d, 0x77, 0x41,
0xb5, 0xdb, 0x3f, 0x3e, 0x8c, 0xa9, 0x9c, 0xcc, 0x86, 0x6e, 0x07, 0x5b, 0x8f, 0xd4, 0xb2, 0xe8,
0xa3, 0x44, 0x73, 0xd2, 0xf2, 0x37, 0xbc, 0x1f, 0x51, 0x21, 0x1d, 0x3a, 0x9c, 0x49, 0x1c, 0xb5,
0x94, 0x5f, 0xcb, 0x93, 0x6c, 0xf9, 0xc7, 0x9e, 0x0e, 0x87, 0xeb, 0xde, 0xfa, 0xec, 0x6f, 0x00,
0x00, 0x00, 0xff, 0xff, 0x4e, 0x76, 0xbc, 0x6d, 0x4f, 0x0a, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -299,6 +300,9 @@ const _ = grpc.SupportPackageIsVersion4
//
// 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 {
GetComponentStates(ctx context.Context, in *internalpb.GetComponentStatesRequest, opts ...grpc.CallOption) (*internalpb.ComponentStates, error)
GetTimeTickChannel(ctx context.Context, in *internalpb.GetTimeTickChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error)
GetStatisticsChannel(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error)
//*
// @brief This method is used to create collection
//
@ -331,7 +335,7 @@ type MasterServiceClient interface {
// @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)
ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowCollectionsResponse, error)
//*
// @brief This method is used to create partition
//
@ -353,18 +357,15 @@ type MasterServiceClient interface {
// @param ShowPartitionRequest, target collection name.
//
// @return StringListResponse
ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionResponse, error)
ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionsResponse, error)
DescribeSegment(ctx context.Context, in *milvuspb.DescribeSegmentRequest, opts ...grpc.CallOption) (*milvuspb.DescribeSegmentResponse, error)
ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentRequest, opts ...grpc.CallOption) (*milvuspb.ShowSegmentResponse, error)
ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentsRequest, opts ...grpc.CallOption) (*milvuspb.ShowSegmentsResponse, 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)
DropIndex(ctx context.Context, in *milvuspb.DropIndexRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
AllocTimestamp(ctx context.Context, in *TsoRequest, opts ...grpc.CallOption) (*TsoResponse, error)
AllocID(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*IDResponse, error)
GetComponentStatesRPC(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*internalpb2.ComponentStates, error)
GetTimeTickChannelRPC(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*milvuspb.StringResponse, error)
GetDdChannelRPC(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*milvuspb.StringResponse, error)
GetStatisticsChannelRPC(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*milvuspb.StringResponse, error)
AllocTimestamp(ctx context.Context, in *AllocTimestampRequest, opts ...grpc.CallOption) (*AllocTimestampResponse, error)
AllocID(ctx context.Context, in *AllocIDRequest, opts ...grpc.CallOption) (*AllocIDResponse, error)
GetDdChannel(ctx context.Context, in *internalpb.GetDdChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error)
}
type masterServiceClient struct {
@ -375,6 +376,33 @@ func NewMasterServiceClient(cc *grpc.ClientConn) MasterServiceClient {
return &masterServiceClient{cc}
}
func (c *masterServiceClient) GetComponentStates(ctx context.Context, in *internalpb.GetComponentStatesRequest, opts ...grpc.CallOption) (*internalpb.ComponentStates, error) {
out := new(internalpb.ComponentStates)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/GetComponentStates", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) GetTimeTickChannel(ctx context.Context, in *internalpb.GetTimeTickChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
out := new(milvuspb.StringResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/GetTimeTickChannel", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) GetStatisticsChannel(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
out := new(milvuspb.StringResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/GetStatisticsChannel", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
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...)
@ -411,8 +439,8 @@ func (c *masterServiceClient) DescribeCollection(ctx context.Context, in *milvus
return out, nil
}
func (c *masterServiceClient) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionRequest, opts ...grpc.CallOption) (*milvuspb.ShowCollectionResponse, error) {
out := new(milvuspb.ShowCollectionResponse)
func (c *masterServiceClient) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowCollectionsResponse, error) {
out := new(milvuspb.ShowCollectionsResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/ShowCollections", in, out, opts...)
if err != nil {
return nil, err
@ -447,8 +475,8 @@ func (c *masterServiceClient) HasPartition(ctx context.Context, in *milvuspb.Has
return out, nil
}
func (c *masterServiceClient) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionResponse, error) {
out := new(milvuspb.ShowPartitionResponse)
func (c *masterServiceClient) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionsResponse, error) {
out := new(milvuspb.ShowPartitionsResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/ShowPartitions", in, out, opts...)
if err != nil {
return nil, err
@ -465,8 +493,8 @@ func (c *masterServiceClient) DescribeSegment(ctx context.Context, in *milvuspb.
return out, nil
}
func (c *masterServiceClient) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentRequest, opts ...grpc.CallOption) (*milvuspb.ShowSegmentResponse, error) {
out := new(milvuspb.ShowSegmentResponse)
func (c *masterServiceClient) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentsRequest, opts ...grpc.CallOption) (*milvuspb.ShowSegmentsResponse, error) {
out := new(milvuspb.ShowSegmentsResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/ShowSegments", in, out, opts...)
if err != nil {
return nil, err
@ -501,8 +529,8 @@ func (c *masterServiceClient) DropIndex(ctx context.Context, in *milvuspb.DropIn
return out, nil
}
func (c *masterServiceClient) AllocTimestamp(ctx context.Context, in *TsoRequest, opts ...grpc.CallOption) (*TsoResponse, error) {
out := new(TsoResponse)
func (c *masterServiceClient) AllocTimestamp(ctx context.Context, in *AllocTimestampRequest, opts ...grpc.CallOption) (*AllocTimestampResponse, error) {
out := new(AllocTimestampResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/AllocTimestamp", in, out, opts...)
if err != nil {
return nil, err
@ -510,8 +538,8 @@ func (c *masterServiceClient) AllocTimestamp(ctx context.Context, in *TsoRequest
return out, nil
}
func (c *masterServiceClient) AllocID(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*IDResponse, error) {
out := new(IDResponse)
func (c *masterServiceClient) AllocID(ctx context.Context, in *AllocIDRequest, opts ...grpc.CallOption) (*AllocIDResponse, error) {
out := new(AllocIDResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/AllocID", in, out, opts...)
if err != nil {
return nil, err
@ -519,36 +547,9 @@ func (c *masterServiceClient) AllocID(ctx context.Context, in *IDRequest, opts .
return out, nil
}
func (c *masterServiceClient) GetComponentStatesRPC(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*internalpb2.ComponentStates, error) {
out := new(internalpb2.ComponentStates)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/GetComponentStatesRPC", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) GetTimeTickChannelRPC(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
func (c *masterServiceClient) GetDdChannel(ctx context.Context, in *internalpb.GetDdChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
out := new(milvuspb.StringResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/GetTimeTickChannelRPC", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) GetDdChannelRPC(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
out := new(milvuspb.StringResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/GetDdChannelRPC", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterServiceClient) GetStatisticsChannelRPC(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
out := new(milvuspb.StringResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/GetStatisticsChannelRPC", in, out, opts...)
err := c.cc.Invoke(ctx, "/milvus.proto.master.MasterService/GetDdChannel", in, out, opts...)
if err != nil {
return nil, err
}
@ -557,6 +558,9 @@ func (c *masterServiceClient) GetStatisticsChannelRPC(ctx context.Context, in *c
// MasterServiceServer is the server API for MasterService service.
type MasterServiceServer interface {
GetComponentStates(context.Context, *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error)
GetTimeTickChannel(context.Context, *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)
GetStatisticsChannel(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)
//*
// @brief This method is used to create collection
//
@ -589,7 +593,7 @@ type MasterServiceServer interface {
// @brief This method is used to list all collections.
//
// @return StringListResponse, collection name list
ShowCollections(context.Context, *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error)
ShowCollections(context.Context, *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error)
//*
// @brief This method is used to create partition
//
@ -611,24 +615,30 @@ type MasterServiceServer interface {
// @param ShowPartitionRequest, target collection name.
//
// @return StringListResponse
ShowPartitions(context.Context, *milvuspb.ShowPartitionRequest) (*milvuspb.ShowPartitionResponse, error)
ShowPartitions(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)
DescribeSegment(context.Context, *milvuspb.DescribeSegmentRequest) (*milvuspb.DescribeSegmentResponse, error)
ShowSegments(context.Context, *milvuspb.ShowSegmentRequest) (*milvuspb.ShowSegmentResponse, error)
ShowSegments(context.Context, *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error)
CreateIndex(context.Context, *milvuspb.CreateIndexRequest) (*commonpb.Status, error)
DescribeIndex(context.Context, *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error)
DropIndex(context.Context, *milvuspb.DropIndexRequest) (*commonpb.Status, error)
AllocTimestamp(context.Context, *TsoRequest) (*TsoResponse, error)
AllocID(context.Context, *IDRequest) (*IDResponse, error)
GetComponentStatesRPC(context.Context, *commonpb.Empty) (*internalpb2.ComponentStates, error)
GetTimeTickChannelRPC(context.Context, *commonpb.Empty) (*milvuspb.StringResponse, error)
GetDdChannelRPC(context.Context, *commonpb.Empty) (*milvuspb.StringResponse, error)
GetStatisticsChannelRPC(context.Context, *commonpb.Empty) (*milvuspb.StringResponse, error)
AllocTimestamp(context.Context, *AllocTimestampRequest) (*AllocTimestampResponse, error)
AllocID(context.Context, *AllocIDRequest) (*AllocIDResponse, error)
GetDdChannel(context.Context, *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error)
}
// UnimplementedMasterServiceServer can be embedded to have forward compatible implementations.
type UnimplementedMasterServiceServer struct {
}
func (*UnimplementedMasterServiceServer) GetComponentStates(ctx context.Context, req *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetComponentStates not implemented")
}
func (*UnimplementedMasterServiceServer) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTimeTickChannel not implemented")
}
func (*UnimplementedMasterServiceServer) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStatisticsChannel not implemented")
}
func (*UnimplementedMasterServiceServer) CreateCollection(ctx context.Context, req *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateCollection not implemented")
}
@ -641,7 +651,7 @@ func (*UnimplementedMasterServiceServer) HasCollection(ctx context.Context, req
func (*UnimplementedMasterServiceServer) DescribeCollection(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DescribeCollection not implemented")
}
func (*UnimplementedMasterServiceServer) ShowCollections(ctx context.Context, req *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error) {
func (*UnimplementedMasterServiceServer) ShowCollections(ctx context.Context, req *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ShowCollections not implemented")
}
func (*UnimplementedMasterServiceServer) CreatePartition(ctx context.Context, req *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) {
@ -653,13 +663,13 @@ func (*UnimplementedMasterServiceServer) DropPartition(ctx context.Context, req
func (*UnimplementedMasterServiceServer) HasPartition(ctx context.Context, req *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HasPartition not implemented")
}
func (*UnimplementedMasterServiceServer) ShowPartitions(ctx context.Context, req *milvuspb.ShowPartitionRequest) (*milvuspb.ShowPartitionResponse, error) {
func (*UnimplementedMasterServiceServer) ShowPartitions(ctx context.Context, req *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ShowPartitions not implemented")
}
func (*UnimplementedMasterServiceServer) DescribeSegment(ctx context.Context, req *milvuspb.DescribeSegmentRequest) (*milvuspb.DescribeSegmentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DescribeSegment not implemented")
}
func (*UnimplementedMasterServiceServer) ShowSegments(ctx context.Context, req *milvuspb.ShowSegmentRequest) (*milvuspb.ShowSegmentResponse, error) {
func (*UnimplementedMasterServiceServer) ShowSegments(ctx context.Context, req *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ShowSegments not implemented")
}
func (*UnimplementedMasterServiceServer) CreateIndex(ctx context.Context, req *milvuspb.CreateIndexRequest) (*commonpb.Status, error) {
@ -671,29 +681,74 @@ func (*UnimplementedMasterServiceServer) DescribeIndex(ctx context.Context, req
func (*UnimplementedMasterServiceServer) DropIndex(ctx context.Context, req *milvuspb.DropIndexRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method DropIndex not implemented")
}
func (*UnimplementedMasterServiceServer) AllocTimestamp(ctx context.Context, req *TsoRequest) (*TsoResponse, error) {
func (*UnimplementedMasterServiceServer) AllocTimestamp(ctx context.Context, req *AllocTimestampRequest) (*AllocTimestampResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AllocTimestamp not implemented")
}
func (*UnimplementedMasterServiceServer) AllocID(ctx context.Context, req *IDRequest) (*IDResponse, error) {
func (*UnimplementedMasterServiceServer) AllocID(ctx context.Context, req *AllocIDRequest) (*AllocIDResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AllocID not implemented")
}
func (*UnimplementedMasterServiceServer) GetComponentStatesRPC(ctx context.Context, req *commonpb.Empty) (*internalpb2.ComponentStates, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetComponentStatesRPC not implemented")
}
func (*UnimplementedMasterServiceServer) GetTimeTickChannelRPC(ctx context.Context, req *commonpb.Empty) (*milvuspb.StringResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTimeTickChannelRPC not implemented")
}
func (*UnimplementedMasterServiceServer) GetDdChannelRPC(ctx context.Context, req *commonpb.Empty) (*milvuspb.StringResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDdChannelRPC not implemented")
}
func (*UnimplementedMasterServiceServer) GetStatisticsChannelRPC(ctx context.Context, req *commonpb.Empty) (*milvuspb.StringResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStatisticsChannelRPC not implemented")
func (*UnimplementedMasterServiceServer) GetDdChannel(ctx context.Context, req *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDdChannel not implemented")
}
func RegisterMasterServiceServer(s *grpc.Server, srv MasterServiceServer) {
s.RegisterService(&_MasterService_serviceDesc, srv)
}
func _MasterService_GetComponentStates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(internalpb.GetComponentStatesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).GetComponentStates(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/GetComponentStates",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).GetComponentStates(ctx, req.(*internalpb.GetComponentStatesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_GetTimeTickChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(internalpb.GetTimeTickChannelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).GetTimeTickChannel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/GetTimeTickChannel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).GetTimeTickChannel(ctx, req.(*internalpb.GetTimeTickChannelRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_GetStatisticsChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(internalpb.GetStatisticsChannelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).GetStatisticsChannel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/GetStatisticsChannel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).GetStatisticsChannel(ctx, req.(*internalpb.GetStatisticsChannelRequest))
}
return interceptor(ctx, in, info, handler)
}
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 {
@ -767,7 +822,7 @@ func _MasterService_DescribeCollection_Handler(srv interface{}, ctx context.Cont
}
func _MasterService_ShowCollections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.ShowCollectionRequest)
in := new(milvuspb.ShowCollectionsRequest)
if err := dec(in); err != nil {
return nil, err
}
@ -779,7 +834,7 @@ func _MasterService_ShowCollections_Handler(srv interface{}, ctx context.Context
FullMethod: "/milvus.proto.master.MasterService/ShowCollections",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).ShowCollections(ctx, req.(*milvuspb.ShowCollectionRequest))
return srv.(MasterServiceServer).ShowCollections(ctx, req.(*milvuspb.ShowCollectionsRequest))
}
return interceptor(ctx, in, info, handler)
}
@ -839,7 +894,7 @@ func _MasterService_HasPartition_Handler(srv interface{}, ctx context.Context, d
}
func _MasterService_ShowPartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.ShowPartitionRequest)
in := new(milvuspb.ShowPartitionsRequest)
if err := dec(in); err != nil {
return nil, err
}
@ -851,7 +906,7 @@ func _MasterService_ShowPartitions_Handler(srv interface{}, ctx context.Context,
FullMethod: "/milvus.proto.master.MasterService/ShowPartitions",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).ShowPartitions(ctx, req.(*milvuspb.ShowPartitionRequest))
return srv.(MasterServiceServer).ShowPartitions(ctx, req.(*milvuspb.ShowPartitionsRequest))
}
return interceptor(ctx, in, info, handler)
}
@ -875,7 +930,7 @@ func _MasterService_DescribeSegment_Handler(srv interface{}, ctx context.Context
}
func _MasterService_ShowSegments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(milvuspb.ShowSegmentRequest)
in := new(milvuspb.ShowSegmentsRequest)
if err := dec(in); err != nil {
return nil, err
}
@ -887,7 +942,7 @@ func _MasterService_ShowSegments_Handler(srv interface{}, ctx context.Context, d
FullMethod: "/milvus.proto.master.MasterService/ShowSegments",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).ShowSegments(ctx, req.(*milvuspb.ShowSegmentRequest))
return srv.(MasterServiceServer).ShowSegments(ctx, req.(*milvuspb.ShowSegmentsRequest))
}
return interceptor(ctx, in, info, handler)
}
@ -947,7 +1002,7 @@ func _MasterService_DropIndex_Handler(srv interface{}, ctx context.Context, dec
}
func _MasterService_AllocTimestamp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TsoRequest)
in := new(AllocTimestampRequest)
if err := dec(in); err != nil {
return nil, err
}
@ -959,13 +1014,13 @@ func _MasterService_AllocTimestamp_Handler(srv interface{}, ctx context.Context,
FullMethod: "/milvus.proto.master.MasterService/AllocTimestamp",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).AllocTimestamp(ctx, req.(*TsoRequest))
return srv.(MasterServiceServer).AllocTimestamp(ctx, req.(*AllocTimestampRequest))
}
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)
in := new(AllocIDRequest)
if err := dec(in); err != nil {
return nil, err
}
@ -977,79 +1032,25 @@ func _MasterService_AllocID_Handler(srv interface{}, ctx context.Context, dec fu
FullMethod: "/milvus.proto.master.MasterService/AllocID",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).AllocID(ctx, req.(*IDRequest))
return srv.(MasterServiceServer).AllocID(ctx, req.(*AllocIDRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_GetComponentStatesRPC_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(commonpb.Empty)
func _MasterService_GetDdChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(internalpb.GetDdChannelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).GetComponentStatesRPC(ctx, in)
return srv.(MasterServiceServer).GetDdChannel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/GetComponentStatesRPC",
FullMethod: "/milvus.proto.master.MasterService/GetDdChannel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).GetComponentStatesRPC(ctx, req.(*commonpb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_GetTimeTickChannelRPC_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(commonpb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).GetTimeTickChannelRPC(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/GetTimeTickChannelRPC",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).GetTimeTickChannelRPC(ctx, req.(*commonpb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_GetDdChannelRPC_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(commonpb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).GetDdChannelRPC(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/GetDdChannelRPC",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).GetDdChannelRPC(ctx, req.(*commonpb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _MasterService_GetStatisticsChannelRPC_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(commonpb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServiceServer).GetStatisticsChannelRPC(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.master.MasterService/GetStatisticsChannelRPC",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServiceServer).GetStatisticsChannelRPC(ctx, req.(*commonpb.Empty))
return srv.(MasterServiceServer).GetDdChannel(ctx, req.(*internalpb.GetDdChannelRequest))
}
return interceptor(ctx, in, info, handler)
}
@ -1058,6 +1059,18 @@ var _MasterService_serviceDesc = grpc.ServiceDesc{
ServiceName: "milvus.proto.master.MasterService",
HandlerType: (*MasterServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetComponentStates",
Handler: _MasterService_GetComponentStates_Handler,
},
{
MethodName: "GetTimeTickChannel",
Handler: _MasterService_GetTimeTickChannel_Handler,
},
{
MethodName: "GetStatisticsChannel",
Handler: _MasterService_GetStatisticsChannel_Handler,
},
{
MethodName: "CreateCollection",
Handler: _MasterService_CreateCollection_Handler,
@ -1123,20 +1136,8 @@ var _MasterService_serviceDesc = grpc.ServiceDesc{
Handler: _MasterService_AllocID_Handler,
},
{
MethodName: "GetComponentStatesRPC",
Handler: _MasterService_GetComponentStatesRPC_Handler,
},
{
MethodName: "GetTimeTickChannelRPC",
Handler: _MasterService_GetTimeTickChannelRPC_Handler,
},
{
MethodName: "GetDdChannelRPC",
Handler: _MasterService_GetDdChannelRPC_Handler,
},
{
MethodName: "GetStatisticsChannelRPC",
Handler: _MasterService_GetStatisticsChannelRPC_Handler,
MethodName: "GetDdChannel",
Handler: _MasterService_GetDdChannel_Handler,
},
},
Streams: []grpc.StreamDesc{},

View File

@ -6,6 +6,40 @@ option go_package = "github.com/zilliztech/milvus-distributed/internal/proto/mil
import "common.proto";
import "schema.proto";
service MilvusService {
rpc CreateCollection(CreateCollectionRequest) returns (common.Status) {}
rpc DropCollection(DropCollectionRequest) returns (common.Status) {}
rpc HasCollection(HasCollectionRequest) returns (BoolResponse) {}
rpc LoadCollection(LoadCollectionRequest) returns (common.Status) {}
rpc ReleaseCollection(ReleaseCollectionRequest) returns (common.Status) {}
rpc DescribeCollection(DescribeCollectionRequest) returns (DescribeCollectionResponse) {}
rpc GetCollectionStatistics(GetCollectionStatisticsRequest) returns (GetCollectionStatisticsResponse) {}
rpc ShowCollections(ShowCollectionsRequest) returns (ShowCollectionsResponse) {}
rpc CreatePartition(CreatePartitionRequest) returns (common.Status) {}
rpc DropPartition(DropPartitionRequest) returns (common.Status) {}
rpc HasPartition(HasPartitionRequest) returns (BoolResponse) {}
rpc LoadPartitions(LoadPartitionsRequest) returns (common.Status) {}
rpc ReleasePartitions(ReleasePartitionsRequest) returns (common.Status) {}
rpc GetPartitionStatistics(GetPartitionStatisticsRequest) returns (GetPartitionStatisticsResponse) {}
rpc ShowPartitions(ShowPartitionsRequest) returns (ShowPartitionsResponse) {}
rpc CreateIndex(CreateIndexRequest) returns (common.Status) {}
rpc DescribeIndex(DescribeIndexRequest) returns (DescribeIndexResponse) {}
rpc GetIndexState(GetIndexStateRequest) returns (GetIndexStateResponse) {}
rpc DropIndex(DropIndexRequest) returns (common.Status) {}
rpc Insert(InsertRequest) returns (InsertResponse) {}
rpc Search(SearchRequest) returns (SearchResults) {}
rpc Flush(FlushRequest) returns (common.Status) {}
rpc GetPersistentSegmentInfo(GetPersistentSegmentInfoRequest) returns (GetPersistentSegmentInfoResponse) {}
rpc GetQuerySegmentInfo(GetQuerySegmentInfoRequest) returns (GetQuerySegmentInfoResponse) {}
// TODO: remove
rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
}
message CreateCollectionRequest {
common.MsgBase base = 1;
string db_name = 2;
@ -14,7 +48,6 @@ message CreateCollectionRequest {
bytes schema = 4;
}
message DropCollectionRequest {
common.MsgBase base = 1;
string db_name = 2;
@ -62,29 +95,27 @@ message ReleaseCollectionRequest {
string collection_name = 3;
}
message CollectionStatsRequest {
message GetCollectionStatisticsRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
}
message CollectionStatsResponse {
message GetCollectionStatisticsResponse {
common.Status status = 1;
repeated common.KeyValuePair stats = 2;
}
message ShowCollectionRequest {
message ShowCollectionsRequest {
common.MsgBase base = 1;
string db_name = 2;
}
message ShowCollectionResponse {
message ShowCollectionsResponse {
common.Status status = 1;
repeated string collection_names = 2;
}
message CreatePartitionRequest {
common.MsgBase base = 1;
string db_name = 2;
@ -107,40 +138,40 @@ message HasPartitionRequest {
string partition_name = 4;
}
message LoadPartitonRequest {
message LoadPartitionsRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
repeated string partition_names = 4;
}
message ReleasePartitionRequest {
message ReleasePartitionsRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
repeated string partition_names = 4;
repeated string partition_names = 4;
}
message PartitionStatsRequest {
message GetPartitionStatisticsRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
string partition_name = 4;
}
message PartitionStatsResponse {
message GetPartitionStatisticsResponse {
common.Status status = 1;
repeated common.KeyValuePair stats = 2;
}
message ShowPartitionRequest {
message ShowPartitionsRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
int64 collectionID = 4;
}
message ShowPartitionResponse {
message ShowPartitionsResponse {
common.Status status = 1;
repeated string partition_names = 2;
repeated int64 partitionIDs = 3;
@ -159,13 +190,13 @@ message DescribeSegmentResponse {
bool enable_index = 4;
}
message ShowSegmentRequest {
message ShowSegmentsRequest {
common.MsgBase base = 1;
int64 collectionID = 2;
int64 partitionID = 3;
}
message ShowSegmentResponse {
message ShowSegmentsResponse {
common.Status status = 1;
repeated int64 segmentIDs = 2;
}
@ -188,7 +219,7 @@ message DescribeIndexRequest {
message IndexDescription {
string index_name = 1;
int64 indexID = 2;
int64 indexID = 2;
repeated common.KeyValuePair params = 3;
}
@ -197,7 +228,7 @@ message DescribeIndexResponse {
repeated IndexDescription index_descriptions = 2;
}
message IndexStateRequest {
message GetIndexStateRequest {
common.MsgBase base = 1;
string db_name = 2 ;
string collection_name = 3;
@ -205,7 +236,7 @@ message IndexStateRequest {
string index_name = 5;
}
message IndexStateResponse {
message GetIndexStateResponse {
common.Status status = 1;
common.IndexState state = 2;
}
@ -224,19 +255,19 @@ message InsertRequest {
string collection_name = 3;
string partition_name = 4;
repeated common.Blob row_data = 5;
repeated uint32 hash_keys = 6;
repeated uint32 hash_keys = 6;
}
message InsertResponse {
common.Status status = 1;
int64 rowID_begin = 2;
int64 rowID_end = 3;
int64 rowID_begin = 2;
int64 rowID_end = 3;
}
enum PlaceholderType {
NONE = 0;
VECTOR_BINARY = 100;
VECTOR_FLOAT = 101;
None = 0;
BinaryVector = 100;
FloatVector = 101;
}
message PlaceholderValue {
@ -254,7 +285,7 @@ message SearchRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
repeated string partition_names = 4;
repeated string partition_names = 4;
string dsl = 5;
// serialized `PlaceholderGroup`
bytes placeholder_group = 6;
@ -277,7 +308,6 @@ message FlushRequest {
repeated string collection_names = 3;
}
message PersistentSegmentInfo {
int64 segmentID = 1;
int64 collectionID = 2;
@ -290,13 +320,13 @@ message PersistentSegmentInfo {
common.SegmentState state = 9;
}
message PersistentSegmentInfoRequest {
message GetPersistentSegmentInfoRequest {
common.MsgBase base = 1;
string dbName = 2;
string collectionName = 3;
}
message PersistentSegmentInfoResponse {
message GetPersistentSegmentInfoResponse {
common.Status status = 1;
repeated PersistentSegmentInfo infos = 2;
}
@ -311,50 +341,19 @@ message QuerySegmentInfo {
int64 indexID = 7;
}
message QuerySegmentInfoRequest {
message GetQuerySegmentInfoRequest {
common.MsgBase base = 1;
string dbName = 2;
string collectionName = 3;
}
message QuerySegmentInfoResponse {
message GetQuerySegmentInfoResponse {
common.Status status = 1;
repeated QuerySegmentInfo infos = 2;
}
service MilvusService {
rpc CreateCollection(CreateCollectionRequest) returns (common.Status) {}
rpc DropCollection(DropCollectionRequest) returns (common.Status) {}
rpc HasCollection(HasCollectionRequest) returns (BoolResponse) {}
rpc LoadCollection(LoadCollectionRequest) returns (common.Status) {}
rpc ReleaseCollection(ReleaseCollectionRequest) returns (common.Status) {}
rpc DescribeCollection(DescribeCollectionRequest) returns (DescribeCollectionResponse) {}
rpc GetCollectionStatistics(CollectionStatsRequest) returns (CollectionStatsResponse) {}
rpc ShowCollections(ShowCollectionRequest) returns (ShowCollectionResponse) {}
rpc CreatePartition(CreatePartitionRequest) returns (common.Status) {}
rpc DropPartition(DropPartitionRequest) returns (common.Status) {}
rpc HasPartition(HasPartitionRequest) returns (BoolResponse) {}
rpc LoadPartitions(LoadPartitonRequest) returns (common.Status) {}
rpc ReleasePartitions(ReleasePartitionRequest) returns (common.Status) {}
rpc GetPartitionStatistics(PartitionStatsRequest) returns (PartitionStatsResponse) {}
rpc ShowPartitions(ShowPartitionRequest) returns (ShowPartitionResponse) {}
rpc CreateIndex(CreateIndexRequest) returns (common.Status) {}
rpc DescribeIndex(DescribeIndexRequest) returns (DescribeIndexResponse) {}
rpc GetIndexState(IndexStateRequest) returns (IndexStateResponse) {}
rpc DropIndex(DropIndexRequest) returns (common.Status) {}
rpc Insert(InsertRequest) returns (InsertResponse) {}
rpc Search(SearchRequest) returns (SearchResults) {}
rpc Flush(FlushRequest) returns (common.Status) {}
rpc GetDdChannel(common.Empty) returns (StringResponse) {}
rpc GetPersistentSegmentInfo(PersistentSegmentInfoRequest) returns (PersistentSegmentInfoResponse) {}
rpc GetQuerySegmentInfo(QuerySegmentInfoRequest) returns (QuerySegmentInfoResponse) {}
rpc RegisterLink(common.Empty) returns (RegisterLinkResponse) {}
message RegisterLinkRequest {
}
message RegisterLinkResponse {
@ -363,5 +362,5 @@ message RegisterLinkResponse {
}
service ProxyService {
rpc RegisterLink(common.Empty) returns (RegisterLinkResponse) {}
rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
}

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,22 @@ import "common.proto";
import "internal.proto";
import "milvus.proto";
service ProxyService {
rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {}
rpc GetTimeTickChannel(internal.GetTimeTickChannelRequest) returns(milvus.StringResponse) {}
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) {}
rpc InvalidateCollectionMetaCache(InvalidateCollMetaCacheRequest) returns (common.Status) {}
}
service ProxyNodeService {
rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {}
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
rpc InvalidateCollectionMetaCache(InvalidateCollMetaCacheRequest) returns (common.Status) {}
rpc GetDdChannel(internal.GetDdChannelRequest) returns (milvus.StringResponse) {}
}
message RegisterNodeRequest {
common.MsgBase base = 1;
@ -23,14 +39,3 @@ message InvalidateCollMetaCacheRequest {
string db_name = 2;
string collection_name = 3;
}
service ProxyService {
rpc GetTimeTickChannel(common.Empty) returns (milvus.StringResponse) {}
rpc GetComponentStates(common.Empty) returns (internal.ComponentStates) {}
rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) {}
rpc InvalidateCollectionMetaCache(InvalidateCollMetaCacheRequest) returns (common.Status) {}
}
service ProxyNodeService {
rpc InvalidateCollectionMetaCache(InvalidateCollMetaCacheRequest) returns (common.Status) {}
}

View File

@ -8,7 +8,7 @@ import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
commonpb "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
internalpb2 "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
internalpb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
milvuspb "github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@ -75,11 +75,11 @@ func (m *RegisterNodeRequest) GetAddress() *commonpb.Address {
}
type RegisterNodeResponse struct {
InitParams *internalpb2.InitParams `protobuf:"bytes,1,opt,name=init_params,json=initParams,proto3" json:"init_params,omitempty"`
Status *commonpb.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
InitParams *internalpb.InitParams `protobuf:"bytes,1,opt,name=init_params,json=initParams,proto3" json:"init_params,omitempty"`
Status *commonpb.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RegisterNodeResponse) Reset() { *m = RegisterNodeResponse{} }
@ -107,7 +107,7 @@ func (m *RegisterNodeResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_RegisterNodeResponse proto.InternalMessageInfo
func (m *RegisterNodeResponse) GetInitParams() *internalpb2.InitParams {
func (m *RegisterNodeResponse) GetInitParams() *internalpb.InitParams {
if m != nil {
return m.InitParams
}
@ -185,37 +185,40 @@ func init() {
func init() { proto.RegisterFile("proxy_service.proto", fileDescriptor_34ca2fbc94d169de) }
var fileDescriptor_34ca2fbc94d169de = []byte{
// 469 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x92, 0xcd, 0x6f, 0xd3, 0x40,
0x10, 0xc5, 0x13, 0x8a, 0x52, 0xb1, 0x8d, 0x0a, 0xda, 0x22, 0x51, 0x99, 0x0f, 0x81, 0x91, 0x68,
0x2f, 0xd8, 0x28, 0x95, 0xb8, 0xa2, 0x26, 0x42, 0xa8, 0x87, 0x56, 0x95, 0x53, 0x09, 0xa9, 0x97,
0x68, 0x6d, 0x8f, 0x92, 0x11, 0xfb, 0x61, 0x76, 0xc7, 0x11, 0xed, 0x85, 0x1b, 0x57, 0x2e, 0x1c,
0xf9, 0x63, 0x91, 0xd7, 0x76, 0xa8, 0x21, 0x84, 0x03, 0x07, 0x6e, 0x1e, 0xef, 0x6f, 0xde, 0xbe,
0x9d, 0x37, 0x6c, 0xaf, 0xb0, 0xe6, 0xd3, 0xd5, 0xcc, 0x81, 0x5d, 0x62, 0x06, 0x51, 0x61, 0x0d,
0x19, 0xce, 0x15, 0xca, 0x65, 0xe9, 0xea, 0x2a, 0xf2, 0x44, 0x30, 0xcc, 0x8c, 0x52, 0x46, 0xd7,
0xff, 0x82, 0x5d, 0xd4, 0x04, 0x56, 0x0b, 0xd9, 0xd4, 0xc3, 0x9b, 0x1d, 0xe1, 0x67, 0xb6, 0x97,
0xc0, 0x1c, 0x1d, 0x81, 0x3d, 0x33, 0x39, 0x24, 0xf0, 0xb1, 0x04, 0x47, 0xfc, 0x15, 0xbb, 0x9d,
0x0a, 0x07, 0xfb, 0xfd, 0xa7, 0xfd, 0xc3, 0x9d, 0xd1, 0x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0x0d, 0xe6, 0xcd, 0xd6, 0x47, 0xb2, 0xb3, 0x2e, 0xda, 0x5e, 0xa3, 0xff, 0x6b, 0x8b, 0x3d,
0x76, 0xe9, 0xc9, 0x66, 0xd9, 0x5c, 0x82, 0x36, 0xb0, 0xd2, 0x0d, 0xdc, 0x36, 0x17, 0xac, 0x3d,
0x02, 0xfa, 0x18, 0x95, 0xf6, 0xde, 0xae, 0xb6, 0x57, 0x41, 0x0f, 0xb3, 0x35, 0x38, 0xfb, 0xf4,
0x61, 0x8a, 0x34, 0x4b, 0x83, 0x4c, 0xbc, 0x77, 0x8b, 0x52, 0xe2, 0x2d, 0x41, 0x38, 0xeb, 0xe5,
0x05, 0xef, 0x22, 0xb4, 0x64, 0x30, 0x48, 0x09, 0xa2, 0x5e, 0xa9, 0xd7, 0x73, 0x2d, 0x7b, 0xce,
0x61, 0x12, 0x04, 0x2d, 0x77, 0x3c, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x43, 0x20, 0x9d, 0x77,
0x59, 0x06, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -230,8 +233,9 @@ const _ = grpc.SupportPackageIsVersion4
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ProxyServiceClient interface {
GetTimeTickChannel(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*milvuspb.StringResponse, error)
GetComponentStates(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*internalpb2.ComponentStates, error)
GetComponentStates(ctx context.Context, in *internalpb.GetComponentStatesRequest, opts ...grpc.CallOption) (*internalpb.ComponentStates, error)
GetTimeTickChannel(ctx context.Context, in *internalpb.GetTimeTickChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error)
GetStatisticsChannel(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error)
RegisterNode(ctx context.Context, in *RegisterNodeRequest, opts ...grpc.CallOption) (*RegisterNodeResponse, error)
InvalidateCollectionMetaCache(ctx context.Context, in *InvalidateCollMetaCacheRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
}
@ -244,7 +248,16 @@ func NewProxyServiceClient(cc *grpc.ClientConn) ProxyServiceClient {
return &proxyServiceClient{cc}
}
func (c *proxyServiceClient) GetTimeTickChannel(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
func (c *proxyServiceClient) GetComponentStates(ctx context.Context, in *internalpb.GetComponentStatesRequest, opts ...grpc.CallOption) (*internalpb.ComponentStates, error) {
out := new(internalpb.ComponentStates)
err := c.cc.Invoke(ctx, "/milvus.proto.proxy.ProxyService/GetComponentStates", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *proxyServiceClient) GetTimeTickChannel(ctx context.Context, in *internalpb.GetTimeTickChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
out := new(milvuspb.StringResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.proxy.ProxyService/GetTimeTickChannel", in, out, opts...)
if err != nil {
@ -253,9 +266,9 @@ func (c *proxyServiceClient) GetTimeTickChannel(ctx context.Context, in *commonp
return out, nil
}
func (c *proxyServiceClient) GetComponentStates(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*internalpb2.ComponentStates, error) {
out := new(internalpb2.ComponentStates)
err := c.cc.Invoke(ctx, "/milvus.proto.proxy.ProxyService/GetComponentStates", in, out, opts...)
func (c *proxyServiceClient) GetStatisticsChannel(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
out := new(milvuspb.StringResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.proxy.ProxyService/GetStatisticsChannel", in, out, opts...)
if err != nil {
return nil, err
}
@ -282,8 +295,9 @@ func (c *proxyServiceClient) InvalidateCollectionMetaCache(ctx context.Context,
// ProxyServiceServer is the server API for ProxyService service.
type ProxyServiceServer interface {
GetTimeTickChannel(context.Context, *commonpb.Empty) (*milvuspb.StringResponse, error)
GetComponentStates(context.Context, *commonpb.Empty) (*internalpb2.ComponentStates, error)
GetComponentStates(context.Context, *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error)
GetTimeTickChannel(context.Context, *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)
GetStatisticsChannel(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)
RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error)
InvalidateCollectionMetaCache(context.Context, *InvalidateCollMetaCacheRequest) (*commonpb.Status, error)
}
@ -292,11 +306,14 @@ type ProxyServiceServer interface {
type UnimplementedProxyServiceServer struct {
}
func (*UnimplementedProxyServiceServer) GetTimeTickChannel(ctx context.Context, req *commonpb.Empty) (*milvuspb.StringResponse, error) {
func (*UnimplementedProxyServiceServer) GetComponentStates(ctx context.Context, req *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetComponentStates not implemented")
}
func (*UnimplementedProxyServiceServer) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTimeTickChannel not implemented")
}
func (*UnimplementedProxyServiceServer) GetComponentStates(ctx context.Context, req *commonpb.Empty) (*internalpb2.ComponentStates, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetComponentStates not implemented")
func (*UnimplementedProxyServiceServer) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStatisticsChannel not implemented")
}
func (*UnimplementedProxyServiceServer) RegisterNode(ctx context.Context, req *RegisterNodeRequest) (*RegisterNodeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterNode not implemented")
@ -309,26 +326,8 @@ func RegisterProxyServiceServer(s *grpc.Server, srv ProxyServiceServer) {
s.RegisterService(&_ProxyService_serviceDesc, srv)
}
func _ProxyService_GetTimeTickChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(commonpb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProxyServiceServer).GetTimeTickChannel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.proxy.ProxyService/GetTimeTickChannel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProxyServiceServer).GetTimeTickChannel(ctx, req.(*commonpb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _ProxyService_GetComponentStates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(commonpb.Empty)
in := new(internalpb.GetComponentStatesRequest)
if err := dec(in); err != nil {
return nil, err
}
@ -340,7 +339,43 @@ func _ProxyService_GetComponentStates_Handler(srv interface{}, ctx context.Conte
FullMethod: "/milvus.proto.proxy.ProxyService/GetComponentStates",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProxyServiceServer).GetComponentStates(ctx, req.(*commonpb.Empty))
return srv.(ProxyServiceServer).GetComponentStates(ctx, req.(*internalpb.GetComponentStatesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ProxyService_GetTimeTickChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(internalpb.GetTimeTickChannelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProxyServiceServer).GetTimeTickChannel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.proxy.ProxyService/GetTimeTickChannel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProxyServiceServer).GetTimeTickChannel(ctx, req.(*internalpb.GetTimeTickChannelRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ProxyService_GetStatisticsChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(internalpb.GetStatisticsChannelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProxyServiceServer).GetStatisticsChannel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.proxy.ProxyService/GetStatisticsChannel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProxyServiceServer).GetStatisticsChannel(ctx, req.(*internalpb.GetStatisticsChannelRequest))
}
return interceptor(ctx, in, info, handler)
}
@ -385,13 +420,17 @@ var _ProxyService_serviceDesc = grpc.ServiceDesc{
ServiceName: "milvus.proto.proxy.ProxyService",
HandlerType: (*ProxyServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetComponentStates",
Handler: _ProxyService_GetComponentStates_Handler,
},
{
MethodName: "GetTimeTickChannel",
Handler: _ProxyService_GetTimeTickChannel_Handler,
},
{
MethodName: "GetComponentStates",
Handler: _ProxyService_GetComponentStates_Handler,
MethodName: "GetStatisticsChannel",
Handler: _ProxyService_GetStatisticsChannel_Handler,
},
{
MethodName: "RegisterNode",
@ -410,7 +449,10 @@ var _ProxyService_serviceDesc = grpc.ServiceDesc{
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ProxyNodeServiceClient interface {
GetComponentStates(ctx context.Context, in *internalpb.GetComponentStatesRequest, opts ...grpc.CallOption) (*internalpb.ComponentStates, error)
GetStatisticsChannel(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error)
InvalidateCollectionMetaCache(ctx context.Context, in *InvalidateCollMetaCacheRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
GetDdChannel(ctx context.Context, in *internalpb.GetDdChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error)
}
type proxyNodeServiceClient struct {
@ -421,6 +463,24 @@ func NewProxyNodeServiceClient(cc *grpc.ClientConn) ProxyNodeServiceClient {
return &proxyNodeServiceClient{cc}
}
func (c *proxyNodeServiceClient) GetComponentStates(ctx context.Context, in *internalpb.GetComponentStatesRequest, opts ...grpc.CallOption) (*internalpb.ComponentStates, error) {
out := new(internalpb.ComponentStates)
err := c.cc.Invoke(ctx, "/milvus.proto.proxy.ProxyNodeService/GetComponentStates", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *proxyNodeServiceClient) GetStatisticsChannel(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
out := new(milvuspb.StringResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.proxy.ProxyNodeService/GetStatisticsChannel", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *proxyNodeServiceClient) InvalidateCollectionMetaCache(ctx context.Context, in *InvalidateCollMetaCacheRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
out := new(commonpb.Status)
err := c.cc.Invoke(ctx, "/milvus.proto.proxy.ProxyNodeService/InvalidateCollectionMetaCache", in, out, opts...)
@ -430,23 +490,80 @@ func (c *proxyNodeServiceClient) InvalidateCollectionMetaCache(ctx context.Conte
return out, nil
}
func (c *proxyNodeServiceClient) GetDdChannel(ctx context.Context, in *internalpb.GetDdChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
out := new(milvuspb.StringResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.proxy.ProxyNodeService/GetDdChannel", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ProxyNodeServiceServer is the server API for ProxyNodeService service.
type ProxyNodeServiceServer interface {
GetComponentStates(context.Context, *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error)
GetStatisticsChannel(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)
InvalidateCollectionMetaCache(context.Context, *InvalidateCollMetaCacheRequest) (*commonpb.Status, error)
GetDdChannel(context.Context, *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error)
}
// UnimplementedProxyNodeServiceServer can be embedded to have forward compatible implementations.
type UnimplementedProxyNodeServiceServer struct {
}
func (*UnimplementedProxyNodeServiceServer) GetComponentStates(ctx context.Context, req *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetComponentStates not implemented")
}
func (*UnimplementedProxyNodeServiceServer) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStatisticsChannel not implemented")
}
func (*UnimplementedProxyNodeServiceServer) InvalidateCollectionMetaCache(ctx context.Context, req *InvalidateCollMetaCacheRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method InvalidateCollectionMetaCache not implemented")
}
func (*UnimplementedProxyNodeServiceServer) GetDdChannel(ctx context.Context, req *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDdChannel not implemented")
}
func RegisterProxyNodeServiceServer(s *grpc.Server, srv ProxyNodeServiceServer) {
s.RegisterService(&_ProxyNodeService_serviceDesc, srv)
}
func _ProxyNodeService_GetComponentStates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(internalpb.GetComponentStatesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProxyNodeServiceServer).GetComponentStates(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.proxy.ProxyNodeService/GetComponentStates",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProxyNodeServiceServer).GetComponentStates(ctx, req.(*internalpb.GetComponentStatesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ProxyNodeService_GetStatisticsChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(internalpb.GetStatisticsChannelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProxyNodeServiceServer).GetStatisticsChannel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.proxy.ProxyNodeService/GetStatisticsChannel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProxyNodeServiceServer).GetStatisticsChannel(ctx, req.(*internalpb.GetStatisticsChannelRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ProxyNodeService_InvalidateCollectionMetaCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InvalidateCollMetaCacheRequest)
if err := dec(in); err != nil {
@ -465,14 +582,44 @@ func _ProxyNodeService_InvalidateCollectionMetaCache_Handler(srv interface{}, ct
return interceptor(ctx, in, info, handler)
}
func _ProxyNodeService_GetDdChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(internalpb.GetDdChannelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProxyNodeServiceServer).GetDdChannel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.proxy.ProxyNodeService/GetDdChannel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProxyNodeServiceServer).GetDdChannel(ctx, req.(*internalpb.GetDdChannelRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ProxyNodeService_serviceDesc = grpc.ServiceDesc{
ServiceName: "milvus.proto.proxy.ProxyNodeService",
HandlerType: (*ProxyNodeServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetComponentStates",
Handler: _ProxyNodeService_GetComponentStates_Handler,
},
{
MethodName: "GetStatisticsChannel",
Handler: _ProxyNodeService_GetStatisticsChannel_Handler,
},
{
MethodName: "InvalidateCollectionMetaCache",
Handler: _ProxyNodeService_InvalidateCollectionMetaCache_Handler,
},
{
MethodName: "GetDdChannel",
Handler: _ProxyNodeService_GetDdChannel_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proxy_service.proto",

View File

@ -10,6 +10,41 @@ import "internal.proto";
import "data_service.proto";
import "schema.proto";
service QueryService {
rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {}
rpc GetTimeTickChannel(internal.GetTimeTickChannelRequest) returns(milvus.StringResponse) {}
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) {}
rpc ShowCollections(ShowCollectionsRequest) returns (ShowCollectionsResponse) {}
rpc ShowPartitions(ShowPartitionsRequest) returns (ShowPartitionsResponse) {}
rpc LoadPartitions(LoadPartitionsRequest) returns (common.Status) {}
rpc ReleasePartitions(ReleasePartitionsRequest) returns (common.Status) {}
rpc LoadCollection(LoadCollectionRequest) returns (common.Status) {}
rpc ReleaseCollection(ReleaseCollectionRequest) returns (common.Status) {}
rpc CreateQueryChannel(CreateQueryChannelRequest) returns (CreateQueryChannelResponse) {}
rpc GetPartitionStates(GetPartitionStatesRequest) returns (GetPartitionStatesResponse) {}
rpc GetSegmentInfo(GetSegmentInfoRequest) returns (GetSegmentInfoResponse) {}
}
service QueryNode {
rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {}
rpc GetTimeTickChannel(internal.GetTimeTickChannelRequest) returns(milvus.StringResponse) {}
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
rpc AddQueryChannel(AddQueryChannelRequest) returns (common.Status) {}
rpc RemoveQueryChannel(RemoveQueryChannelRequest) returns (common.Status) {}
rpc WatchDmChannels(WatchDmChannelsRequest) returns (common.Status) {}
rpc LoadSegments(LoadSegmentsRequest) returns (common.Status) {}
rpc ReleaseCollection(ReleaseCollectionRequest) returns (common.Status) {}
rpc ReleasePartitions(ReleasePartitionsRequest) returns (common.Status) {}
rpc ReleaseSegments(ReleaseSegmentsRequest) returns (common.Status) {}
rpc GetSegmentInfo(GetSegmentInfoRequest) returns (GetSegmentInfoResponse) {}
}
message RegisterNodeRequest {
common.MsgBase base = 1;
common.Address address = 2;
@ -20,12 +55,12 @@ message RegisterNodeResponse {
internal.InitParams init_params = 2;
}
message ShowCollectionRequest {
message ShowCollectionsRequest {
common.MsgBase base = 1;
int64 dbID = 2;
}
message ShowCollectionResponse {
message ShowCollectionsResponse {
common.Status status = 1;
repeated int64 collectionIDs = 2;
}
@ -43,13 +78,13 @@ message ReleaseCollectionRequest {
int64 collectionID = 3;
}
message ShowPartitionRequest {
message ShowPartitionsRequest {
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 3;
}
message ShowPartitionResponse {
message ShowPartitionsResponse {
common.Status status = 1;
repeated int64 partitionIDs = 2;
}
@ -69,19 +104,19 @@ message PartitionStates {
PartitionState state = 2;
}
message PartitionStatesRequest {
message GetPartitionStatesRequest {
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 3;
repeated int64 partitionIDs = 4;
repeated int64 partitionIDs = 4;
}
message PartitionStatesResponse {
message GetPartitionStatesResponse {
common.Status status = 1;
repeated PartitionStates partition_descriptions = 2;
}
message LoadPartitionRequest {
message LoadPartitionsRequest {
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 3;
@ -89,7 +124,7 @@ message LoadPartitionRequest {
schema.CollectionSchema schema = 5;
}
message ReleasePartitionRequest {
message ReleasePartitionsRequest {
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 3;
@ -102,13 +137,13 @@ message CreateQueryChannelResponse {
string result_channel = 3;
}
message AddQueryChannelsRequest {
message AddQueryChannelRequest {
common.MsgBase base = 1;
string request_channelID = 2;
string result_channelID = 3;
}
message RemoveQueryChannelsRequest {
message RemoveQueryChannelRequest {
common.Status status = 1;
common.MsgBase base = 2;
string request_channelID = 3;
@ -121,14 +156,14 @@ message WatchDmChannelInfo {
repeated int64 excluded_segments = 3;
}
message WatchDmChannelsRequest {
message WatchDmChannelsRequest {
common.MsgBase base = 1;
int64 collectionID = 2;
repeated string channelIDs = 3;
repeated WatchDmChannelInfo infos = 4;
}
message LoadSegmentRequest {
message LoadSegmentsRequest {
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 3;
@ -139,7 +174,7 @@ message LoadSegmentRequest {
schema.CollectionSchema schema = 8;
}
message ReleaseSegmentRequest {
message ReleaseSegmentsRequest {
common.MsgBase base = 1;
int64 dbID = 2;
int64 collectionID = 3;
@ -157,46 +192,15 @@ message SegmentInfo {
int64 indexID = 7;
}
message SegmentInfoRequest {
message GetSegmentInfoRequest {
common.MsgBase base = 1;
repeated int64 segmentIDs = 2;
}
message SegmentInfoResponse {
message GetSegmentInfoResponse {
common.Status status = 1;
repeated SegmentInfo infos = 2;
}
service QueryService {
rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) {}
rpc ShowCollections(ShowCollectionRequest) returns (ShowCollectionResponse) {}
rpc ShowPartitions(ShowPartitionRequest) returns (ShowPartitionResponse) {}
rpc LoadPartitions(LoadPartitionRequest) returns (common.Status) {}
rpc ReleasePartitions(ReleasePartitionRequest) returns (common.Status) {}
rpc LoadCollection(LoadCollectionRequest) returns (common.Status) {}
rpc ReleaseCollection(ReleaseCollectionRequest) returns (common.Status) {}
rpc CreateQueryChannel(common.Empty) returns (CreateQueryChannelResponse) {}
rpc GetTimeTickChannel(common.Empty) returns (milvus.StringResponse) {}
rpc GetStatisticsChannel(common.Empty) returns (milvus.StringResponse) {}
rpc GetPartitionStates(PartitionStatesRequest) returns (PartitionStatesResponse) {}
rpc GetComponentStates(common.Empty) returns (internal.ComponentStates) {}
rpc GetSegmentInfo(SegmentInfoRequest) returns (SegmentInfoResponse) {}
message CreateQueryChannelRequest {
}
service QueryNode {
rpc GetTimeTickChannel(common.Empty) returns (milvus.StringResponse) {}
rpc GetStatsChannel(common.Empty) returns (milvus.StringResponse) {}
rpc GetComponentStates(common.Empty) returns (internal.ComponentStates) {}
rpc AddQueryChannel(AddQueryChannelsRequest) returns (common.Status) {}
rpc RemoveQueryChannel(RemoveQueryChannelsRequest) returns (common.Status) {}
rpc WatchDmChannels(WatchDmChannelsRequest) returns (common.Status) {}
rpc LoadSegments(LoadSegmentRequest) returns (common.Status) {}
rpc ReleaseCollection(ReleaseCollectionRequest) returns (common.Status) {}
rpc ReleasePartitions(ReleasePartitionRequest) returns (common.Status) {}
rpc ReleaseSegments(ReleaseSegmentRequest) returns (common.Status) {}
rpc GetSegmentInfo(SegmentInfoRequest) returns (SegmentInfoResponse) {}
}

File diff suppressed because it is too large Load Diff

View File

@ -9,41 +9,41 @@ import "common.proto";
* @brief Field data type
*/
enum DataType {
NONE = 0;
BOOL = 1;
INT8 = 2;
INT16 = 3;
INT32 = 4;
INT64 = 5;
None = 0;
Bool = 1;
Int8 = 2;
Int16 = 3;
Int32 = 4;
Int64 = 5;
FLOAT = 10;
DOUBLE = 11;
Float = 10;
Double = 11;
STRING = 20;
String = 20;
VECTOR_BINARY = 100;
VECTOR_FLOAT = 101;
BinaryVector = 100;
FloatVector = 101;
}
/**
* @brief Field schema
*/
message FieldSchema {
int64 fieldID = 1;
string name = 2;
bool is_primary_key = 3;
string description = 4;
DataType data_type = 5;
repeated common.KeyValuePair type_params = 6;
repeated common.KeyValuePair index_params = 7;
int64 fieldID = 1;
string name = 2;
bool is_primary_key = 3;
string description = 4;
DataType data_type = 5;
repeated common.KeyValuePair type_params = 6;
repeated common.KeyValuePair index_params = 7;
}
/**
* @brief Collection schema
*/
message CollectionSchema {
string name = 1;
string description = 2;
bool autoID = 3;
repeated FieldSchema fields = 4;
string name = 1;
string description = 2;
bool autoID = 3;
repeated FieldSchema fields = 4;
}

View File

@ -26,45 +26,45 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type DataType int32
const (
DataType_NONE DataType = 0
DataType_BOOL DataType = 1
DataType_INT8 DataType = 2
DataType_INT16 DataType = 3
DataType_INT32 DataType = 4
DataType_INT64 DataType = 5
DataType_FLOAT DataType = 10
DataType_DOUBLE DataType = 11
DataType_STRING DataType = 20
DataType_VECTOR_BINARY DataType = 100
DataType_VECTOR_FLOAT DataType = 101
DataType_None DataType = 0
DataType_Bool DataType = 1
DataType_Int8 DataType = 2
DataType_Int16 DataType = 3
DataType_Int32 DataType = 4
DataType_Int64 DataType = 5
DataType_Float DataType = 10
DataType_Double DataType = 11
DataType_String DataType = 20
DataType_BinaryVector DataType = 100
DataType_FloatVector DataType = 101
)
var DataType_name = map[int32]string{
0: "NONE",
1: "BOOL",
2: "INT8",
3: "INT16",
4: "INT32",
5: "INT64",
10: "FLOAT",
11: "DOUBLE",
20: "STRING",
100: "VECTOR_BINARY",
101: "VECTOR_FLOAT",
0: "None",
1: "Bool",
2: "Int8",
3: "Int16",
4: "Int32",
5: "Int64",
10: "Float",
11: "Double",
20: "String",
100: "BinaryVector",
101: "FloatVector",
}
var DataType_value = map[string]int32{
"NONE": 0,
"BOOL": 1,
"INT8": 2,
"INT16": 3,
"INT32": 4,
"INT64": 5,
"FLOAT": 10,
"DOUBLE": 11,
"STRING": 20,
"VECTOR_BINARY": 100,
"VECTOR_FLOAT": 101,
"None": 0,
"Bool": 1,
"Int8": 2,
"Int16": 3,
"Int32": 4,
"Int64": 5,
"Float": 10,
"Double": 11,
"String": 20,
"BinaryVector": 100,
"FloatVector": 101,
}
func (x DataType) String() string {
@ -147,7 +147,7 @@ func (m *FieldSchema) GetDataType() DataType {
if m != nil {
return m.DataType
}
return DataType_NONE
return DataType_None
}
func (m *FieldSchema) GetTypeParams() []*commonpb.KeyValuePair {
@ -238,35 +238,34 @@ func init() {
func init() { proto.RegisterFile("schema.proto", fileDescriptor_1c5fb4d8cc22d66a) }
var fileDescriptor_1c5fb4d8cc22d66a = []byte{
// 467 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xdf, 0x8a, 0xd3, 0x40,
0x18, 0xc5, 0x4d, 0x9b, 0x66, 0xdb, 0x2f, 0x71, 0x19, 0x47, 0x91, 0x20, 0x08, 0x71, 0xf1, 0x22,
0x08, 0x36, 0xd8, 0x95, 0x65, 0xf1, 0xca, 0xcd, 0xa6, 0x2b, 0x61, 0x4b, 0x52, 0xb2, 0x71, 0x41,
0x6f, 0xc2, 0x34, 0x19, 0xed, 0x60, 0xfe, 0x91, 0x4c, 0xc4, 0xec, 0x5b, 0x78, 0xeb, 0x1b, 0xf9,
0x56, 0x92, 0x64, 0x0a, 0x55, 0x7b, 0xb1, 0x77, 0xe7, 0x7c, 0x33, 0xe7, 0x63, 0xce, 0x6f, 0x40,
0xab, 0xe3, 0x2d, 0xcd, 0xc8, 0xbc, 0xac, 0x0a, 0x5e, 0xe0, 0xc7, 0x19, 0x4b, 0xbf, 0x37, 0xf5,
0xe0, 0xe6, 0xc3, 0xd1, 0x33, 0x2d, 0x2e, 0xb2, 0xac, 0xc8, 0x87, 0xe1, 0xc9, 0xef, 0x11, 0xa8,
0x57, 0x8c, 0xa6, 0xc9, 0x4d, 0x7f, 0x8a, 0x75, 0x38, 0xfa, 0xd2, 0x59, 0xd7, 0xd1, 0x25, 0x43,
0x32, 0xc7, 0xc1, 0xce, 0x62, 0x0c, 0x72, 0x4e, 0x32, 0xaa, 0x8f, 0x0c, 0xc9, 0x9c, 0x05, 0xbd,
0xc6, 0x2f, 0xe1, 0x98, 0xd5, 0x51, 0x59, 0xb1, 0x8c, 0x54, 0x6d, 0xf4, 0x8d, 0xb6, 0xfa, 0xd8,
0x90, 0xcc, 0x69, 0xa0, 0xb1, 0x7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, 0xc8,
0xd3, 0x05, 0x92, 0x85, 0x3c, 0x7b, 0x8b, 0x26, 0x9d, 0xbc, 0x5a, 0xf9, 0x17, 0x21, 0x02, 0x0c,
0xa0, 0x38, 0xfe, 0x47, 0x7b, 0xb5, 0x44, 0x6a, 0xa7, 0x6f, 0xc2, 0xc0, 0xf5, 0x3e, 0xa0, 0x27,
0xf8, 0x11, 0x3c, 0xbc, 0x5d, 0x5e, 0x86, 0x7e, 0x10, 0xd9, 0xae, 0x77, 0x11, 0x7c, 0x42, 0x09,
0x46, 0xa0, 0x89, 0xd1, 0x10, 0xa6, 0xb6, 0xfd, 0xf9, 0xfd, 0x57, 0xc6, 0xb7, 0xcd, 0xa6, 0x63,
0x6b, 0xdd, 0xb1, 0x34, 0x65, 0x77, 0x9c, 0xc6, 0x5b, 0x6b, 0x28, 0xf5, 0x3a, 0x61, 0x35, 0xaf,
0xd8, 0xa6, 0xe1, 0x34, 0xb1, 0x58, 0xce, 0x69, 0x95, 0x93, 0xd4, 0xea, 0x9b, 0x5a, 0x43, 0xd3,
0x72, 0xb3, 0x51, 0x7a, 0x7f, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0x8a, 0xaf, 0x4d, 0x07, 0xfa,
0x02, 0x00, 0x00,
// 458 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x5f, 0x8b, 0xd4, 0x3c,
0x14, 0xc6, 0xdf, 0xce, 0x9f, 0xee, 0xcc, 0x69, 0xd9, 0x37, 0x44, 0x91, 0x22, 0x08, 0x75, 0xf1,
0xa2, 0x08, 0x4e, 0x71, 0x56, 0x96, 0xc5, 0x2b, 0xa9, 0x65, 0x61, 0x58, 0x90, 0xa1, 0x2b, 0x7b,
0xe1, 0xcd, 0x90, 0xb6, 0xc7, 0x9d, 0x60, 0x9a, 0x94, 0x34, 0x15, 0xbb, 0x5f, 0xc2, 0x7b, 0xbf,
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e, 0x0d, 0x6a,
0xc9, 0x44, 0x6c, 0x7b, 0xc6, 0x43, 0xcf, 0x3a, 0xcf, 0x5d, 0xeb, 0xcf, 0x7f, 0x05, 0x00, 0x00,
0xff, 0xff, 0xf5, 0xe4, 0xb1, 0x24, 0xf8, 0x02, 0x00, 0x00,
}

View File

@ -1,24 +0,0 @@
// GOOSE TODO remove this proto file
syntax = "proto3";
package milvus.proto.service;
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/writerpb";
message FieldFlushMeta {
int64 fieldID = 1;
repeated string binlog_paths = 2;
}
//etcd meta
message SegmentFlushMeta{
int64 segmentID = 1;
bool is_closed = 2;
uint64 open_time =3;
uint64 close_time = 4;
repeated FieldFlushMeta fields = 5;
}
message DDLFlushMeta {
int64 collectionID = 1;
repeated string binlog_paths = 2;
}

View File

@ -1,219 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: write_node.proto
package writerpb
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
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 FieldFlushMeta struct {
FieldID int64 `protobuf:"varint,1,opt,name=fieldID,proto3" json:"fieldID,omitempty"`
BinlogPaths []string `protobuf:"bytes,2,rep,name=binlog_paths,json=binlogPaths,proto3" json:"binlog_paths,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *FieldFlushMeta) Reset() { *m = FieldFlushMeta{} }
func (m *FieldFlushMeta) String() string { return proto.CompactTextString(m) }
func (*FieldFlushMeta) ProtoMessage() {}
func (*FieldFlushMeta) Descriptor() ([]byte, []int) {
return fileDescriptor_8ec4781d562c3e8f, []int{0}
}
func (m *FieldFlushMeta) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FieldFlushMeta.Unmarshal(m, b)
}
func (m *FieldFlushMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_FieldFlushMeta.Marshal(b, m, deterministic)
}
func (m *FieldFlushMeta) XXX_Merge(src proto.Message) {
xxx_messageInfo_FieldFlushMeta.Merge(m, src)
}
func (m *FieldFlushMeta) XXX_Size() int {
return xxx_messageInfo_FieldFlushMeta.Size(m)
}
func (m *FieldFlushMeta) XXX_DiscardUnknown() {
xxx_messageInfo_FieldFlushMeta.DiscardUnknown(m)
}
var xxx_messageInfo_FieldFlushMeta proto.InternalMessageInfo
func (m *FieldFlushMeta) GetFieldID() int64 {
if m != nil {
return m.FieldID
}
return 0
}
func (m *FieldFlushMeta) GetBinlogPaths() []string {
if m != nil {
return m.BinlogPaths
}
return nil
}
//etcd meta
type SegmentFlushMeta struct {
SegmentID int64 `protobuf:"varint,1,opt,name=segmentID,proto3" json:"segmentID,omitempty"`
IsClosed bool `protobuf:"varint,2,opt,name=is_closed,json=isClosed,proto3" json:"is_closed,omitempty"`
OpenTime uint64 `protobuf:"varint,3,opt,name=open_time,json=openTime,proto3" json:"open_time,omitempty"`
CloseTime uint64 `protobuf:"varint,4,opt,name=close_time,json=closeTime,proto3" json:"close_time,omitempty"`
Fields []*FieldFlushMeta `protobuf:"bytes,5,rep,name=fields,proto3" json:"fields,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SegmentFlushMeta) Reset() { *m = SegmentFlushMeta{} }
func (m *SegmentFlushMeta) String() string { return proto.CompactTextString(m) }
func (*SegmentFlushMeta) ProtoMessage() {}
func (*SegmentFlushMeta) Descriptor() ([]byte, []int) {
return fileDescriptor_8ec4781d562c3e8f, []int{1}
}
func (m *SegmentFlushMeta) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SegmentFlushMeta.Unmarshal(m, b)
}
func (m *SegmentFlushMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SegmentFlushMeta.Marshal(b, m, deterministic)
}
func (m *SegmentFlushMeta) XXX_Merge(src proto.Message) {
xxx_messageInfo_SegmentFlushMeta.Merge(m, src)
}
func (m *SegmentFlushMeta) XXX_Size() int {
return xxx_messageInfo_SegmentFlushMeta.Size(m)
}
func (m *SegmentFlushMeta) XXX_DiscardUnknown() {
xxx_messageInfo_SegmentFlushMeta.DiscardUnknown(m)
}
var xxx_messageInfo_SegmentFlushMeta proto.InternalMessageInfo
func (m *SegmentFlushMeta) GetSegmentID() int64 {
if m != nil {
return m.SegmentID
}
return 0
}
func (m *SegmentFlushMeta) GetIsClosed() bool {
if m != nil {
return m.IsClosed
}
return false
}
func (m *SegmentFlushMeta) GetOpenTime() uint64 {
if m != nil {
return m.OpenTime
}
return 0
}
func (m *SegmentFlushMeta) GetCloseTime() uint64 {
if m != nil {
return m.CloseTime
}
return 0
}
func (m *SegmentFlushMeta) GetFields() []*FieldFlushMeta {
if m != nil {
return m.Fields
}
return nil
}
type DDLFlushMeta struct {
CollectionID int64 `protobuf:"varint,1,opt,name=collectionID,proto3" json:"collectionID,omitempty"`
BinlogPaths []string `protobuf:"bytes,2,rep,name=binlog_paths,json=binlogPaths,proto3" json:"binlog_paths,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DDLFlushMeta) Reset() { *m = DDLFlushMeta{} }
func (m *DDLFlushMeta) String() string { return proto.CompactTextString(m) }
func (*DDLFlushMeta) ProtoMessage() {}
func (*DDLFlushMeta) Descriptor() ([]byte, []int) {
return fileDescriptor_8ec4781d562c3e8f, []int{2}
}
func (m *DDLFlushMeta) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DDLFlushMeta.Unmarshal(m, b)
}
func (m *DDLFlushMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DDLFlushMeta.Marshal(b, m, deterministic)
}
func (m *DDLFlushMeta) XXX_Merge(src proto.Message) {
xxx_messageInfo_DDLFlushMeta.Merge(m, src)
}
func (m *DDLFlushMeta) XXX_Size() int {
return xxx_messageInfo_DDLFlushMeta.Size(m)
}
func (m *DDLFlushMeta) XXX_DiscardUnknown() {
xxx_messageInfo_DDLFlushMeta.DiscardUnknown(m)
}
var xxx_messageInfo_DDLFlushMeta proto.InternalMessageInfo
func (m *DDLFlushMeta) GetCollectionID() int64 {
if m != nil {
return m.CollectionID
}
return 0
}
func (m *DDLFlushMeta) GetBinlogPaths() []string {
if m != nil {
return m.BinlogPaths
}
return nil
}
func init() {
proto.RegisterType((*FieldFlushMeta)(nil), "milvus.proto.service.FieldFlushMeta")
proto.RegisterType((*SegmentFlushMeta)(nil), "milvus.proto.service.SegmentFlushMeta")
proto.RegisterType((*DDLFlushMeta)(nil), "milvus.proto.service.DDLFlushMeta")
}
func init() { proto.RegisterFile("write_node.proto", fileDescriptor_8ec4781d562c3e8f) }
var fileDescriptor_8ec4781d562c3e8f = []byte{
// 311 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0xc3, 0x40,
0x10, 0x85, 0x49, 0x53, 0x6b, 0xb3, 0x2d, 0x52, 0x82, 0x87, 0x80, 0x0a, 0x31, 0x78, 0xc8, 0xc5,
0x04, 0xf4, 0xea, 0x41, 0x6a, 0x29, 0x08, 0x16, 0x24, 0xea, 0xc5, 0x4b, 0x68, 0x92, 0xb1, 0x19,
0xd8, 0xec, 0x86, 0xdd, 0x49, 0x85, 0xfe, 0x41, 0xff, 0x96, 0x64, 0xa3, 0x0d, 0x05, 0x0f, 0x1e,
0xdf, 0xf7, 0x98, 0xe1, 0xbd, 0x19, 0x36, 0xfb, 0x54, 0x48, 0x90, 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x2e, 0xab, 0x78, 0x87, 0x9c, 0xe3, 0x8e, 0x20, 0x2f, 0xe3, 0x2e,
0xdb, 0x75, 0x81, 0x9a, 0x14, 0x66, 0x0d, 0x41, 0x11, 0xa3, 0x20, 0x50, 0x62, 0xcd, 0x63, 0x13,
0x38, 0x36, 0x1f, 0x55, 0x75, 0x96, 0x8d, 0x8c, 0xbe, 0xfd, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x9b,
0x77, 0xb3, 0x5c, 0xe4, 0x01, 0x00, 0x00,
}

View File

@ -12,20 +12,55 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
"github.com/zilliztech/milvus-distributed/internal/proto/querypb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
const (
reqTimeoutInterval = time.Second * 10
)
func (node *ProxyNode) UpdateStateCode(code internalpb2.StateCode) {
func (node *ProxyNode) UpdateStateCode(code internalpb.StateCode) {
node.stateCode.Store(code)
}
func (node *ProxyNode) GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error) {
stats := &internalpb.ComponentStates{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
}
code, ok := node.stateCode.Load().(internalpb.StateCode)
if !ok {
errMsg := "unexpected error in type assertion"
stats.Status = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: errMsg,
}
return stats, errors.New(errMsg)
}
info := &internalpb.ComponentInfo{
NodeID: Params.ProxyID,
Role: typeutil.ProxyNodeRole,
StateCode: code,
}
stats.State = info
return stats, nil
}
func (node *ProxyNode) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return &milvuspb.StringResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
Reason: "",
},
Value: "",
}, nil
}
func (node *ProxyNode) InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) {
collectionName := request.CollectionName
globalMetaCache.RemoveCollection(ctx, collectionName) // no need to return error, though collection may be not cached
@ -220,18 +255,18 @@ func (node *ProxyNode) DescribeCollection(ctx context.Context, request *milvuspb
return dct.result, nil
}
func (node *ProxyNode) GetCollectionStatistics(ctx context.Context, request *milvuspb.CollectionStatsRequest) (*milvuspb.CollectionStatsResponse, error) {
func (node *ProxyNode) GetCollectionStatistics(ctx context.Context, request *milvuspb.GetCollectionStatisticsRequest) (*milvuspb.GetCollectionStatisticsResponse, error) {
log.Debug("get collection statistics...")
g := &GetCollectionsStatisticsTask{
ctx: ctx,
Condition: NewTaskCondition(ctx),
CollectionStatsRequest: request,
dataService: node.dataService,
ctx: ctx,
Condition: NewTaskCondition(ctx),
GetCollectionStatisticsRequest: request,
dataService: node.dataService,
}
err := node.sched.DdQueue.Enqueue(g)
if err != nil {
return &milvuspb.CollectionStatsResponse{
return &milvuspb.GetCollectionStatisticsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: err.Error(),
@ -241,7 +276,7 @@ func (node *ProxyNode) GetCollectionStatistics(ctx context.Context, request *mil
err = g.WaitToFinish()
if err != nil {
return &milvuspb.CollectionStatsResponse{
return &milvuspb.GetCollectionStatisticsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: err.Error(),
@ -252,18 +287,18 @@ func (node *ProxyNode) GetCollectionStatistics(ctx context.Context, request *mil
return g.result, nil
}
func (node *ProxyNode) ShowCollections(ctx context.Context, request *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error) {
func (node *ProxyNode) ShowCollections(ctx context.Context, request *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
log.Debug("show collections...")
sct := &ShowCollectionsTask{
ctx: ctx,
Condition: NewTaskCondition(ctx),
ShowCollectionRequest: request,
masterService: node.masterService,
ctx: ctx,
Condition: NewTaskCondition(ctx),
ShowCollectionsRequest: request,
masterService: node.masterService,
}
err := node.sched.DdQueue.Enqueue(sct)
if err != nil {
return &milvuspb.ShowCollectionResponse{
return &milvuspb.ShowCollectionsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: err.Error(),
@ -273,7 +308,7 @@ func (node *ProxyNode) ShowCollections(ctx context.Context, request *milvuspb.Sh
err = sct.WaitToFinish()
if err != nil {
return &milvuspb.ShowCollectionResponse{
return &milvuspb.ShowCollectionsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: err.Error(),
@ -373,14 +408,14 @@ func (node *ProxyNode) HasPartition(ctx context.Context, request *milvuspb.HasPa
return hpt.result, nil
}
func (node *ProxyNode) LoadPartitions(ctx context.Context, request *milvuspb.LoadPartitonRequest) (*commonpb.Status, error) {
func (node *ProxyNode) LoadPartitions(ctx context.Context, request *milvuspb.LoadPartitionsRequest) (*commonpb.Status, error) {
log.Debug("load partitions...")
lpt := &LoadPartitionTask{
ctx: ctx,
Condition: NewTaskCondition(ctx),
LoadPartitonRequest: request,
queryService: node.queryService,
ctx: ctx,
Condition: NewTaskCondition(ctx),
LoadPartitionsRequest: request,
queryService: node.queryService,
}
err := node.sched.DdQueue.Enqueue(lpt)
@ -402,14 +437,14 @@ func (node *ProxyNode) LoadPartitions(ctx context.Context, request *milvuspb.Loa
return lpt.result, nil
}
func (node *ProxyNode) ReleasePartitions(ctx context.Context, request *milvuspb.ReleasePartitionRequest) (*commonpb.Status, error) {
func (node *ProxyNode) ReleasePartitions(ctx context.Context, request *milvuspb.ReleasePartitionsRequest) (*commonpb.Status, error) {
log.Debug("load partitions...")
rpt := &ReleasePartitionTask{
ctx: ctx,
Condition: NewTaskCondition(ctx),
ReleasePartitionRequest: request,
queryService: node.queryService,
ctx: ctx,
Condition: NewTaskCondition(ctx),
ReleasePartitionsRequest: request,
queryService: node.queryService,
}
err := node.sched.DdQueue.Enqueue(rpt)
@ -431,24 +466,24 @@ func (node *ProxyNode) ReleasePartitions(ctx context.Context, request *milvuspb.
return rpt.result, nil
}
func (node *ProxyNode) GetPartitionStatistics(ctx context.Context, request *milvuspb.PartitionStatsRequest) (*milvuspb.PartitionStatsResponse, error) {
func (node *ProxyNode) GetPartitionStatistics(ctx context.Context, request *milvuspb.GetPartitionStatisticsRequest) (*milvuspb.GetPartitionStatisticsResponse, error) {
panic("implement me")
}
func (node *ProxyNode) ShowPartitions(ctx context.Context, request *milvuspb.ShowPartitionRequest) (*milvuspb.ShowPartitionResponse, error) {
func (node *ProxyNode) ShowPartitions(ctx context.Context, request *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
log.Debug("show partitions...")
spt := &ShowPartitionsTask{
ctx: ctx,
Condition: NewTaskCondition(ctx),
ShowPartitionRequest: request,
masterService: node.masterService,
result: nil,
ctx: ctx,
Condition: NewTaskCondition(ctx),
ShowPartitionsRequest: request,
masterService: node.masterService,
result: nil,
}
err := node.sched.DdQueue.Enqueue(spt)
if err != nil {
return &milvuspb.ShowPartitionResponse{
return &milvuspb.ShowPartitionsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: err.Error(),
@ -458,7 +493,7 @@ func (node *ProxyNode) ShowPartitions(ctx context.Context, request *milvuspb.Sho
err = spt.WaitToFinish()
if err != nil {
return &milvuspb.ShowPartitionResponse{
return &milvuspb.ShowPartitionsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: err.Error(),
@ -553,18 +588,18 @@ func (node *ProxyNode) DropIndex(ctx context.Context, request *milvuspb.DropInde
return dit.result, nil
}
func (node *ProxyNode) GetIndexState(ctx context.Context, request *milvuspb.IndexStateRequest) (*milvuspb.IndexStateResponse, error) {
func (node *ProxyNode) GetIndexState(ctx context.Context, request *milvuspb.GetIndexStateRequest) (*milvuspb.GetIndexStateResponse, error) {
dipt := &GetIndexStateTask{
ctx: ctx,
Condition: NewTaskCondition(ctx),
IndexStateRequest: request,
indexService: node.indexService,
masterService: node.masterService,
ctx: ctx,
Condition: NewTaskCondition(ctx),
GetIndexStateRequest: request,
indexService: node.indexService,
masterService: node.masterService,
}
err := node.sched.DdQueue.Enqueue(dipt)
if err != nil {
return &milvuspb.IndexStateResponse{
return &milvuspb.GetIndexStateResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: err.Error(),
@ -574,7 +609,7 @@ func (node *ProxyNode) GetIndexState(ctx context.Context, request *milvuspb.Inde
err = dipt.WaitToFinish()
if err != nil {
return &milvuspb.IndexStateResponse{
return &milvuspb.GetIndexStateResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: err.Error(),
@ -594,7 +629,7 @@ func (node *ProxyNode) Insert(ctx context.Context, request *milvuspb.InsertReque
BaseMsg: msgstream.BaseMsg{
HashValues: request.HashKeys,
},
InsertRequest: internalpb2.InsertRequest{
InsertRequest: internalpb.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert,
MsgID: 0,
@ -638,7 +673,7 @@ func (node *ProxyNode) Search(ctx context.Context, request *milvuspb.SearchReque
qt := &SearchTask{
ctx: ctx,
Condition: NewTaskCondition(ctx),
SearchRequest: &internalpb2.SearchRequest{
SearchRequest: &internalpb.SearchRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Search,
SourceID: Params.ProxyID,
@ -646,7 +681,7 @@ func (node *ProxyNode) Search(ctx context.Context, request *milvuspb.SearchReque
ResultChannelID: strconv.FormatInt(Params.ProxyID, 10),
},
queryMsgStream: node.queryMsgStream,
resultBuf: make(chan []*internalpb2.SearchResults),
resultBuf: make(chan []*internalpb.SearchResults),
query: request,
}
@ -701,12 +736,12 @@ func (node *ProxyNode) Flush(ctx context.Context, request *milvuspb.FlushRequest
return ft.result, nil
}
func (node *ProxyNode) GetDdChannel(ctx context.Context, request *commonpb.Empty) (*milvuspb.StringResponse, error) {
func (node *ProxyNode) GetDdChannel(ctx context.Context, request *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error) {
panic("implement me")
}
func (node *ProxyNode) GetPersistentSegmentInfo(ctx context.Context, req *milvuspb.PersistentSegmentInfoRequest) (*milvuspb.PersistentSegmentInfoResponse, error) {
resp := &milvuspb.PersistentSegmentInfoResponse{
func (node *ProxyNode) GetPersistentSegmentInfo(ctx context.Context, req *milvuspb.GetPersistentSegmentInfoRequest) (*milvuspb.GetPersistentSegmentInfoResponse, error) {
resp := &milvuspb.GetPersistentSegmentInfoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
},
@ -716,7 +751,7 @@ func (node *ProxyNode) GetPersistentSegmentInfo(ctx context.Context, req *milvus
resp.Status.Reason = err.Error()
return resp, nil
}
infoResp, err := node.dataService.GetSegmentInfo(ctx, &datapb.SegmentInfoRequest{
infoResp, err := node.dataService.GetSegmentInfo(ctx, &datapb.GetSegmentInfoRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_SegmentInfo,
MsgID: 0,
@ -752,8 +787,8 @@ func (node *ProxyNode) GetPersistentSegmentInfo(ctx context.Context, req *milvus
return resp, nil
}
func (node *ProxyNode) GetQuerySegmentInfo(ctx context.Context, req *milvuspb.QuerySegmentInfoRequest) (*milvuspb.QuerySegmentInfoResponse, error) {
resp := &milvuspb.QuerySegmentInfoResponse{
func (node *ProxyNode) GetQuerySegmentInfo(ctx context.Context, req *milvuspb.GetQuerySegmentInfoRequest) (*milvuspb.GetQuerySegmentInfoResponse, error) {
resp := &milvuspb.GetQuerySegmentInfoResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
},
@ -763,7 +798,7 @@ func (node *ProxyNode) GetQuerySegmentInfo(ctx context.Context, req *milvuspb.Qu
resp.Status.Reason = err.Error()
return resp, nil
}
infoResp, err := node.queryService.GetSegmentInfo(ctx, &querypb.SegmentInfoRequest{
infoResp, err := node.queryService.GetSegmentInfo(ctx, &querypb.GetSegmentInfoRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_SegmentInfo,
MsgID: 0,
@ -815,7 +850,7 @@ func (node *ProxyNode) getSegmentsOfCollection(ctx context.Context, dbName strin
return nil, errors.New(describeCollectionResponse.Status.Reason)
}
collectionID := describeCollectionResponse.CollectionID
showPartitionsResp, err := node.masterService.ShowPartitions(ctx, &milvuspb.ShowPartitionRequest{
showPartitionsResp, err := node.masterService.ShowPartitions(ctx, &milvuspb.ShowPartitionsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowPartitions,
MsgID: 0,
@ -835,7 +870,7 @@ func (node *ProxyNode) getSegmentsOfCollection(ctx context.Context, dbName strin
ret := make([]UniqueID, 0)
for _, partitionID := range showPartitionsResp.PartitionIDs {
showSegmentResponse, err := node.masterService.ShowSegments(ctx, &milvuspb.ShowSegmentRequest{
showSegmentResponse, err := node.masterService.ShowSegments(ctx, &milvuspb.ShowSegmentsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowSegments,
MsgID: 0,
@ -856,9 +891,9 @@ func (node *ProxyNode) getSegmentsOfCollection(ctx context.Context, dbName strin
return ret, nil
}
func (node *ProxyNode) RegisterLink(request *commonpb.Empty) (*milvuspb.RegisterLinkResponse, error) {
code := node.stateCode.Load().(internalpb2.StateCode)
if code != internalpb2.StateCode_Healthy {
func (node *ProxyNode) RegisterLink(ctx context.Context, req *milvuspb.RegisterLinkRequest) (*milvuspb.RegisterLinkResponse, error) {
code := node.stateCode.Load().(internalpb.StateCode)
if code != internalpb.StateCode_Healthy {
return &milvuspb.RegisterLinkResponse{
Address: nil,
Status: &commonpb.Status{

View File

@ -161,7 +161,7 @@ func (m *MetaCache) GetPartitionID(ctx context.Context, collectionName string, p
m.mu.Lock()
defer m.mu.Unlock()
req := &milvuspb.ShowPartitionRequest{
req := &milvuspb.ShowPartitionsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowPartitions,
},

View File

@ -17,9 +17,9 @@ type MockMasterClientInterface struct {
types.MasterService
}
func (m *MockMasterClientInterface) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionRequest) (*milvuspb.ShowPartitionResponse, error) {
func (m *MockMasterClientInterface) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
if in.CollectionName == "collection1" {
return &milvuspb.ShowPartitionResponse{
return &milvuspb.ShowPartitionsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
@ -27,7 +27,7 @@ func (m *MockMasterClientInterface) ShowPartitions(ctx context.Context, in *milv
PartitionNames: []string{"par1", "par2"},
}, nil
}
return &milvuspb.ShowPartitionResponse{
return &milvuspb.ShowPartitionsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},

View File

@ -14,7 +14,7 @@ import (
"go.uber.org/zap"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/util/paramtable"
)
@ -64,7 +64,7 @@ type ParamTable struct {
var Params ParamTable
var once sync.Once
func (pt *ParamTable) LoadConfigFromInitParams(initParams *internalpb2.InitParams) error {
func (pt *ParamTable) LoadConfigFromInitParams(initParams *internalpb.InitParams) error {
pt.ProxyID = initParams.NodeID
config := viper.New()

View File

@ -14,7 +14,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
@ -29,7 +29,7 @@ type ProxyNode struct {
cancel func()
wg sync.WaitGroup
initParams *internalpb2.InitParams
initParams *internalpb.InitParams
ip string
port int
@ -65,7 +65,7 @@ func NewProxyNode(ctx context.Context, factory msgstream.Factory) (*ProxyNode, e
cancel: cancel,
msFactory: factory,
}
node.UpdateStateCode(internalpb2.StateCode_Abnormal)
node.UpdateStateCode(internalpb.StateCode_Abnormal)
return node, nil
}
@ -236,7 +236,7 @@ func (node *ProxyNode) Start() error {
cb()
}
node.UpdateStateCode(internalpb2.StateCode_Healthy)
node.UpdateStateCode(internalpb.StateCode_Healthy)
log.Debug("proxy node is healthy ...")
return nil

View File

@ -8,7 +8,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
@ -239,7 +239,7 @@ func insertRepackFunc(tsMsgs []msgstream.TsMsg,
}
segmentID := getSegmentID(reqID, key)
channelID := channelNames[int(key)%len(channelNames)]
sliceRequest := internalpb2.InsertRequest{
sliceRequest := internalpb.InsertRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert,
MsgID: reqID,

View File

@ -124,7 +124,7 @@ func (info *assignInfo) IsActive(now time.Time) bool {
type SegIDAssigner struct {
Allocator
assignInfos map[UniqueID]*list.List // collectionID -> *list.List
segReqs []*datapb.SegIDRequest
segReqs []*datapb.SegmentIDRequest
getTickFunc func() Timestamp
PeerID UniqueID
@ -198,7 +198,7 @@ func (sa *SegIDAssigner) pickCanDoFunc() {
records[collID][partitionID][channelName] += segRequest.count
assign, err := sa.getAssign(segRequest.collID, segRequest.partitionID, segRequest.channelName)
if err != nil || assign.Capacity(segRequest.timestamp) < records[collID][partitionID][channelName] {
sa.segReqs = append(sa.segReqs, &datapb.SegIDRequest{
sa.segReqs = append(sa.segReqs, &datapb.SegmentIDRequest{
ChannelName: channelName,
Count: segRequest.count,
CollectionID: collID,
@ -234,7 +234,7 @@ func (sa *SegIDAssigner) checkSyncFunc(timeout bool) bool {
return timeout || len(sa.segReqs) != 0
}
func (sa *SegIDAssigner) checkSegReqEqual(req1, req2 *datapb.SegIDRequest) bool {
func (sa *SegIDAssigner) checkSegReqEqual(req1, req2 *datapb.SegmentIDRequest) bool {
if req1 == nil || req2 == nil {
return false
}
@ -251,9 +251,9 @@ func (sa *SegIDAssigner) reduceSegReqs() {
return
}
var newSegReqs []*datapb.SegIDRequest
var newSegReqs []*datapb.SegmentIDRequest
for _, req1 := range sa.segReqs {
var req2 *datapb.SegIDRequest
var req2 *datapb.SegmentIDRequest
for _, req3 := range newSegReqs {
if sa.checkSegReqEqual(req1, req3) {
req2 = req3
@ -282,13 +282,13 @@ func (sa *SegIDAssigner) syncSegments() bool {
sa.reduceSegReqs()
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
req := &datapb.AssignSegIDRequest{
NodeID: sa.PeerID,
PeerRole: typeutil.ProxyNodeRole,
SegIDRequests: sa.segReqs,
req := &datapb.AssignSegmentIDRequest{
NodeID: sa.PeerID,
PeerRole: typeutil.ProxyNodeRole,
SegmentIDRequests: sa.segReqs,
}
sa.segReqs = []*datapb.SegIDRequest{}
sa.segReqs = []*datapb.SegmentIDRequest{}
resp, err := sa.dataService.AssignSegmentID(ctx, req)
if err != nil {

View File

@ -16,7 +16,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/indexpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/querypb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
@ -199,7 +199,7 @@ func (it *InsertTask) Execute(ctx context.Context) error {
stream, err := globalInsertChannelsMap.getInsertMsgStream(collID)
if err != nil {
resp, _ := it.dataService.GetInsertChannels(ctx, &datapb.InsertChannelRequest{
resp, _ := it.dataService.GetInsertChannels(ctx, &datapb.GetInsertChannelsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert, // todo
MsgID: it.Base.MsgID, // todo
@ -320,7 +320,7 @@ func (cct *CreateCollectionTask) PreExecute(ctx context.Context) error {
if err := ValidateFieldName(field.Name); err != nil {
return err
}
if field.DataType == schemapb.DataType_VECTOR_FLOAT || field.DataType == schemapb.DataType_VECTOR_BINARY {
if field.DataType == schemapb.DataType_FloatVector || field.DataType == schemapb.DataType_BinaryVector {
exist := false
var dim int64 = 0
for _, param := range field.TypeParams {
@ -337,7 +337,7 @@ func (cct *CreateCollectionTask) PreExecute(ctx context.Context) error {
if !exist {
return errors.New("dimension is not defined in field type params")
}
if field.DataType == schemapb.DataType_VECTOR_FLOAT {
if field.DataType == schemapb.DataType_FloatVector {
if err := ValidateDimension(dim, false); err != nil {
return err
}
@ -363,7 +363,7 @@ func (cct *CreateCollectionTask) Execute(ctx context.Context) error {
if err != nil {
return err
}
resp, _ := cct.dataServiceClient.GetInsertChannels(ctx, &datapb.InsertChannelRequest{
resp, _ := cct.dataServiceClient.GetInsertChannels(ctx, &datapb.GetInsertChannelsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_Insert, // todo
MsgID: cct.Base.MsgID, // todo
@ -472,10 +472,10 @@ func (dct *DropCollectionTask) PostExecute(ctx context.Context) error {
type SearchTask struct {
Condition
*internalpb2.SearchRequest
*internalpb.SearchRequest
ctx context.Context
queryMsgStream msgstream.MsgStream
resultBuf chan []*internalpb2.SearchResults
resultBuf chan []*internalpb.SearchResults
result *milvuspb.SearchResults
query *milvuspb.SearchRequest
}
@ -596,7 +596,7 @@ func (st *SearchTask) PostExecute(ctx context.Context) error {
return fmt.Errorf("SearchTask:wait to finish failed, timeout: %d", st.ID())
case searchResults := <-st.resultBuf:
// fmt.Println("searchResults: ", searchResults)
filterSearchResult := make([]*internalpb2.SearchResults, 0)
filterSearchResult := make([]*internalpb.SearchResults, 0)
var filterReason string
for _, partialSearchResult := range searchResults {
if partialSearchResult.Status.ErrorCode == commonpb.ErrorCode_Success {
@ -885,10 +885,10 @@ func (dct *DescribeCollectionTask) PostExecute(ctx context.Context) error {
type GetCollectionsStatisticsTask struct {
Condition
*milvuspb.CollectionStatsRequest
*milvuspb.GetCollectionStatisticsRequest
ctx context.Context
dataService types.DataService
result *milvuspb.CollectionStatsResponse
result *milvuspb.GetCollectionStatisticsResponse
}
func (g *GetCollectionsStatisticsTask) Ctx() context.Context {
@ -939,7 +939,7 @@ func (g *GetCollectionsStatisticsTask) Execute(ctx context.Context) error {
if err != nil {
return err
}
req := &datapb.CollectionStatsRequest{
req := &datapb.GetCollectionStatisticsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_GetCollectionStatistics,
MsgID: g.Base.MsgID,
@ -956,7 +956,7 @@ func (g *GetCollectionsStatisticsTask) Execute(ctx context.Context) error {
if result.Status.ErrorCode != commonpb.ErrorCode_Success {
return errors.New(result.Status.Reason)
}
g.result = &milvuspb.CollectionStatsResponse{
g.result = &milvuspb.GetCollectionStatisticsResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
Reason: "",
@ -972,10 +972,10 @@ func (g *GetCollectionsStatisticsTask) PostExecute(ctx context.Context) error {
type ShowCollectionsTask struct {
Condition
*milvuspb.ShowCollectionRequest
*milvuspb.ShowCollectionsRequest
ctx context.Context
masterService types.MasterService
result *milvuspb.ShowCollectionResponse
result *milvuspb.ShowCollectionsResponse
}
func (sct *ShowCollectionsTask) Ctx() context.Context {
@ -1024,7 +1024,7 @@ func (sct *ShowCollectionsTask) PreExecute(ctx context.Context) error {
func (sct *ShowCollectionsTask) Execute(ctx context.Context) error {
var err error
sct.result, err = sct.masterService.ShowCollections(ctx, sct.ShowCollectionRequest)
sct.result, err = sct.masterService.ShowCollections(ctx, sct.ShowCollectionsRequest)
if sct.result == nil {
return errors.New("get collection statistics resp is nil")
}
@ -1270,10 +1270,10 @@ func (hpt *HasPartitionTask) PostExecute(ctx context.Context) error {
type ShowPartitionsTask struct {
Condition
*milvuspb.ShowPartitionRequest
*milvuspb.ShowPartitionsRequest
ctx context.Context
masterService types.MasterService
result *milvuspb.ShowPartitionResponse
result *milvuspb.ShowPartitionsResponse
}
func (spt *ShowPartitionsTask) Ctx() context.Context {
@ -1325,7 +1325,7 @@ func (spt *ShowPartitionsTask) PreExecute(ctx context.Context) error {
func (spt *ShowPartitionsTask) Execute(ctx context.Context) error {
var err error
spt.result, err = spt.masterService.ShowPartitions(ctx, spt.ShowPartitionRequest)
spt.result, err = spt.masterService.ShowPartitions(ctx, spt.ShowPartitionsRequest)
if spt.result == nil {
return errors.New("get collection statistics resp is nil")
}
@ -1580,11 +1580,11 @@ func (dit *DropIndexTask) PostExecute(ctx context.Context) error {
type GetIndexStateTask struct {
Condition
*milvuspb.IndexStateRequest
*milvuspb.GetIndexStateRequest
ctx context.Context
indexService types.IndexService
masterService types.MasterService
result *milvuspb.IndexStateResponse
result *milvuspb.GetIndexStateResponse
}
func (gist *GetIndexStateTask) Ctx() context.Context {
@ -1648,7 +1648,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
return err
}
showPartitionRequest := &milvuspb.ShowPartitionRequest{
showPartitionRequest := &milvuspb.ShowPartitionsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowPartitions,
MsgID: gist.Base.MsgID,
@ -1701,7 +1701,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
var allSegmentIDs []UniqueID
for _, partitionID := range partitions.PartitionIDs {
showSegmentsRequest := &milvuspb.ShowSegmentRequest{
showSegmentsRequest := &milvuspb.ShowSegmentsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ShowSegments,
MsgID: gist.Base.MsgID,
@ -1721,7 +1721,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
allSegmentIDs = append(allSegmentIDs, segments.SegmentIDs...)
}
getIndexStatesRequest := &indexpb.IndexStatesRequest{
getIndexStatesRequest := &indexpb.GetIndexStatesRequest{
IndexBuildIDs: make([]UniqueID, 0),
}
enableIndexBitMap := make([]bool, 0)
@ -1755,7 +1755,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
log.Debug("proxynode", zap.Int("GetIndexState:: len of allSegmentIDs", len(allSegmentIDs)))
log.Debug("proxynode", zap.Int("GetIndexState:: len of IndexBuildIDs", len(indexBuildIDs)))
if len(allSegmentIDs) != len(indexBuildIDs) {
gist.result = &milvuspb.IndexStateResponse{
gist.result = &milvuspb.GetIndexStateResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
Reason: "",
@ -1776,7 +1776,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
}
if states.Status.ErrorCode != commonpb.ErrorCode_Success {
gist.result = &milvuspb.IndexStateResponse{
gist.result = &milvuspb.GetIndexStateResponse{
Status: states.Status,
State: commonpb.IndexState_Failed,
}
@ -1786,7 +1786,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
for _, state := range states.States {
if state.State != commonpb.IndexState_Finished {
gist.result = &milvuspb.IndexStateResponse{
gist.result = &milvuspb.GetIndexStateResponse{
Status: states.Status,
State: state.State,
}
@ -1795,7 +1795,7 @@ func (gist *GetIndexStateTask) Execute(ctx context.Context) error {
}
}
gist.result = &milvuspb.IndexStateResponse{
gist.result = &milvuspb.GetIndexStateResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
Reason: "",
@ -2066,7 +2066,7 @@ func (rct *ReleaseCollectionTask) PostExecute(ctx context.Context) error {
type LoadPartitionTask struct {
Condition
*milvuspb.LoadPartitonRequest
*milvuspb.LoadPartitionsRequest
ctx context.Context
queryService types.QueryService
result *commonpb.Status
@ -2135,7 +2135,7 @@ func (lpt *LoadPartitionTask) Execute(ctx context.Context) error {
}
partitionIDs = append(partitionIDs, partitionID)
}
request := &querypb.LoadPartitionRequest{
request := &querypb.LoadPartitionsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_LoadPartitions,
MsgID: lpt.Base.MsgID,
@ -2157,7 +2157,7 @@ func (lpt *LoadPartitionTask) PostExecute(ctx context.Context) error {
type ReleasePartitionTask struct {
Condition
*milvuspb.ReleasePartitionRequest
*milvuspb.ReleasePartitionsRequest
ctx context.Context
queryService types.QueryService
result *commonpb.Status
@ -2226,7 +2226,7 @@ func (rpt *ReleasePartitionTask) Execute(ctx context.Context) (err error) {
}
partitionIDs = append(partitionIDs, partitionID)
}
request := &querypb.ReleasePartitionRequest{
request := &querypb.ReleasePartitionsRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_ReleasePartitions,
MsgID: rpt.Base.MsgID,

View File

@ -15,7 +15,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/allocator"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/util/trace"
)
@ -391,7 +391,7 @@ func (sched *TaskScheduler) queryResultLoop() {
queryResultMsgStream.Start()
defer queryResultMsgStream.Close()
queryResultBuf := make(map[UniqueID][]*internalpb2.SearchResults)
queryResultBuf := make(map[UniqueID][]*internalpb.SearchResults)
for {
select {
@ -416,7 +416,7 @@ func (sched *TaskScheduler) queryResultLoop() {
_, ok = queryResultBuf[reqID]
if !ok {
queryResultBuf[reqID] = make([]*internalpb2.SearchResults, 0)
queryResultBuf[reqID] = make([]*internalpb.SearchResults, 0)
}
queryResultBuf[reqID] = append(queryResultBuf[reqID], &searchResultMsg.SearchResults)

Some files were not shown because too many files have changed in this diff Show More