Add proxy service to ci workflow

Signed-off-by: dragondriver <jiquan.long@zilliz.com>
This commit is contained in:
dragondriver 2021-01-22 12:57:23 +08:00 committed by yefu.chen
parent 90a0b8b2f5
commit cd52adc18b
32 changed files with 2036 additions and 367 deletions

View File

@ -21,6 +21,10 @@ dir ('build/docker/deploy') {
sh 'docker-compose build --force-rm indexbuilder'
sh 'docker-compose push indexbuilder'
sh 'docker pull ${SOURCE_REPO}/proxyservice:${SOURCE_TAG} || true'
sh 'docker-compose build --force-rm proxyservice'
sh 'docker-compose push proxyservice'
sh 'docker pull ${SOURCE_REPO}/proxynode:${SOURCE_TAG} || true'
sh 'docker-compose build --force-rm proxynode'
sh 'docker-compose push proxynode'

View File

@ -7,6 +7,7 @@ try {
sh 'docker-compose -p ${DOCKER_COMPOSE_PROJECT_NAME} pull'
sh 'docker-compose -p ${DOCKER_COMPOSE_PROJECT_NAME} up -d master'
sh 'docker-compose -p ${DOCKER_COMPOSE_PROJECT_NAME} up -d indexbuilder'
sh 'docker-compose -p ${DOCKER_COMPOSE_PROJECT_NAME} up -d proxyservice'
sh 'docker-compose -p ${DOCKER_COMPOSE_PROJECT_NAME} up -d proxynode'
sh 'docker-compose -p ${DOCKER_COMPOSE_PROJECT_NAME} run -e QUERY_NODE_ID=1 -d querynode'
sh 'docker-compose -p ${DOCKER_COMPOSE_PROJECT_NAME} run -e QUERY_NODE_ID=2 -d querynode'

View File

@ -113,6 +113,8 @@ build-go: build-cpp
@echo "Building each component's binary to './bin'"
@echo "Building master ..."
@mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="0" && GO111MODULE=on $(GO) build -o $(INSTALL_PATH)/master $(PWD)/cmd/master/main.go 1>/dev/null
@echo "Building proxy service ..."
@mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="0" && GO111MODULE=on $(GO) build -o $(INSTALL_PATH)/proxyservice $(PWD)/cmd/proxy/service/proxy_service.go 1>/dev/null
@echo "Building proxy node ..."
@mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="0" && GO111MODULE=on $(GO) build -o $(INSTALL_PATH)/proxynode $(PWD)/cmd/proxy/node/proxy_node.go 1>/dev/null
@echo "Building query node ..."
@ -166,6 +168,7 @@ install: all
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/bin/querynode $(GOPATH)/bin/querynode
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/bin/master $(GOPATH)/bin/master
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/bin/proxynode $(GOPATH)/bin/proxynode
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/bin/proxyservice $(GOPATH)/bin/proxyservice
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/bin/writenode $(GOPATH)/bin/writenode
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/bin/indexbuilder $(GOPATH)/bin/indexbuilder
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/bin/singlenode $(GOPATH)/bin/singlenode
@ -180,6 +183,7 @@ clean:
@rm -rf lib/
@rm -rf $(GOPATH)/bin/master
@rm -rf $(GOPATH)/bin/proxynode
@rm -rf $(GOPATH)/bin/proxyservice
@rm -rf $(GOPATH)/bin/querynode
@rm -rf $(GOPATH)/bin/writenode
@rm -rf $(GOPATH)/bin/indexbuilder

View File

@ -7,3 +7,5 @@ ETCD_ADDRESS=etcd:2379
MASTER_ADDRESS=master:53100
MINIO_ADDRESS=minio:9000
INDEX_BUILDER_ADDRESS=indexbuilder:31000
PROXY_NODE_HOST=proxynode
PROXY_SERVICE_ADDRESS=proxyservice:19530

View File

@ -15,6 +15,16 @@ services:
networks:
- milvus
proxyservice:
image: ${TARGET_REPO}/proxyservice:${TARGET_TAG}
build:
context: ../../../
dockerfile: build/docker/deploy/proxyservice/DockerFile
cache_from:
- ${SOURCE_REPO}/proxyservice:${SOURCE_TAG}
networks:
- milvus
proxynode:
image: ${TARGET_REPO}/proxynode:${TARGET_TAG}
build:
@ -25,6 +35,8 @@ services:
environment:
PULSAR_ADDRESS: ${PULSAR_ADDRESS}
MASTER_ADDRESS: ${MASTER_ADDRESS}
PROXY_NODE_HOST: ${PROXY_NODE_HOST}
PROXY_SERVICE_ADDRESS: ${PROXY_SERVICE_ADDRESS}
networks:
- milvus

View File

@ -0,0 +1,22 @@
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under the License.
FROM alpine:3.12.1
COPY ./bin/proxyservice /milvus-distributed/bin/proxyservice
COPY ./configs/ /milvus-distributed/configs/
WORKDIR /milvus-distributed/
CMD ["./bin/proxyservice"]
EXPOSE 19530

View File

@ -12,7 +12,7 @@ services:
- ../../..:/milvus-distributed:delegated
working_dir: "/milvus-distributed/tests/python"
command: >
/bin/bash -c "pytest --ip proxynode"
/bin/bash -c "pytest --ip proxyservice"
networks:
- milvus

View File

@ -0,0 +1,59 @@
package main
import (
"context"
"log"
"os"
"os/signal"
"syscall"
grpcproxyservice "github.com/zilliztech/milvus-distributed/internal/distributed/proxyservice"
"go.uber.org/zap"
)
func main() {
ctx, cancel := context.WithCancel(context.Background())
svr, err := grpcproxyservice.CreateProxyServiceServer()
if err != nil {
log.Print("create server failed", zap.Error(err))
}
sc := make(chan os.Signal, 1)
signal.Notify(sc,
syscall.SIGHUP,
syscall.SIGINT,
syscall.SIGTERM,
syscall.SIGQUIT)
var sig os.Signal
go func() {
sig = <-sc
cancel()
}()
if err := svr.Init(); err != nil {
log.Fatal("init server failed", zap.Error(err))
}
if err := svr.Start(); err != nil {
log.Fatal("run server failed", zap.Error(err))
}
<-ctx.Done()
log.Print("Got signal to exit", zap.String("signal", sig.String()))
if err := svr.Stop(); err != nil {
log.Fatal("stop server failed", zap.Error(err))
}
switch sig {
case syscall.SIGTERM:
exit(0)
default:
exit(1)
}
}
func exit(code int) {
os.Exit(code)
}

View File

@ -16,7 +16,7 @@ import (
"github.com/zilliztech/milvus-distributed/internal/indexnode"
"github.com/zilliztech/milvus-distributed/internal/master"
proxynodeimpl "github.com/zilliztech/milvus-distributed/internal/proxynode"
"github.com/zilliztech/milvus-distributed/internal/proxynode"
"github.com/zilliztech/milvus-distributed/internal/querynode"
"github.com/zilliztech/milvus-distributed/internal/writenode"
)
@ -62,10 +62,10 @@ func InitMaster(cpuprofile *string, wg *sync.WaitGroup) {
func InitProxy(wg *sync.WaitGroup) {
defer wg.Done()
//proxynodeimpl.Init()
//fmt.Println("ProxyID is", proxynodeimpl.Params.ProxyID())
//proxynode.Init()
//fmt.Println("ProxyID is", proxynode.Params.ProxyID())
ctx, cancel := context.WithCancel(context.Background())
svr, err := proxynodeimpl.CreateProxyNodeImpl(ctx)
svr, err := proxynode.CreateProxyNodeImpl(ctx)
if err != nil {
log.Print("create server failed", zap.Error(err))
}
@ -220,9 +220,13 @@ func main() {
wg.Add(1)
go InitMaster(cpuprofile, &wg)
time.Sleep(time.Second * 1)
wg.Add(1)
go InitProxy(&wg)
wg.Add(1)
go InitQueryNode(&wg)
wg.Add(1)
go InitIndexBuilder(&wg)
wg.Add(1)
go InitWriteNode(&wg)
wg.Wait()
}

View File

@ -51,7 +51,6 @@ proxyNode:
address: localhost
port: 19530
# not used now
proxyService:
address: localhost
port: 19530

View File

@ -15,6 +15,7 @@
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Address_common_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Blob_common_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_KeyValuePair_common_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MsgBase_common_2eproto;
@ -185,6 +186,10 @@ class FlushRequestDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<FlushRequest> _instance;
} _FlushRequest_default_instance_;
class RegisterLinkResponseDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RegisterLinkResponse> _instance;
} _RegisterLinkResponse_default_instance_;
} // namespace milvus
} // namespace proto
} // namespace milvus
@ -627,6 +632,22 @@ static void InitDefaultsscc_info_PlaceholderValue_milvus_2eproto() {
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PlaceholderValue_milvus_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_PlaceholderValue_milvus_2eproto}, {}};
static void InitDefaultsscc_info_RegisterLinkResponse_milvus_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::milvus::proto::milvus::_RegisterLinkResponse_default_instance_;
new (ptr) ::milvus::proto::milvus::RegisterLinkResponse();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::milvus::proto::milvus::RegisterLinkResponse::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_RegisterLinkResponse_milvus_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_RegisterLinkResponse_milvus_2eproto}, {
&scc_info_Address_common_2eproto.base,
&scc_info_Status_common_2eproto.base,}};
static void InitDefaultsscc_info_ReleaseCollectionRequest_milvus_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
@ -792,7 +813,7 @@ static void InitDefaultsscc_info_StringResponse_milvus_2eproto() {
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_StringResponse_milvus_2eproto}, {
&scc_info_Status_common_2eproto.base,}};
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_milvus_2eproto[40];
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_milvus_2eproto[41];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_milvus_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_milvus_2eproto = nullptr;
@ -1122,6 +1143,13 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_milvus_2eproto::offsets[] PROT
PROTOBUF_FIELD_OFFSET(::milvus::proto::milvus::FlushRequest, base_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::milvus::FlushRequest, db_name_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::milvus::FlushRequest, collection_name_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::milvus::proto::milvus::RegisterLinkResponse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::milvus::proto::milvus::RegisterLinkResponse, address_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::milvus::RegisterLinkResponse, status_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::milvus::proto::milvus::CreateCollectionRequest)},
@ -1164,6 +1192,7 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB
{ 302, -1, sizeof(::milvus::proto::milvus::Hits)},
{ 310, -1, sizeof(::milvus::proto::milvus::SearchResults)},
{ 317, -1, sizeof(::milvus::proto::milvus::FlushRequest)},
{ 325, -1, sizeof(::milvus::proto::milvus::RegisterLinkResponse)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
@ -1207,6 +1236,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] =
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::milvus::_Hits_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::milvus::_SearchResults_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::milvus::_FlushRequest_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::milvus::_RegisterLinkResponse_default_instance_),
};
const char descriptor_table_protodef_milvus_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
@ -1328,71 +1358,76 @@ const char descriptor_table_protodef_milvus_2eproto[] PROTOBUF_SECTION_VARIABLE(
"(\0132\033.milvus.proto.common.Status\022\014\n\004hits\030"
"\002 \003(\014\"d\n\014FlushRequest\022*\n\004base\030\001 \001(\0132\034.mi"
"lvus.proto.common.MsgBase\022\017\n\007db_name\030\002 \001"
"(\t\022\027\n\017collection_name\030\003 \001(\t*@\n\017Placehold"
"erType\022\010\n\004NONE\020\000\022\021\n\rVECTOR_BINARY\020d\022\020\n\014V"
"ECTOR_FLOAT\020e2\357\020\n\rMilvusService\022_\n\020Creat"
"eCollection\022,.milvus.proto.milvus.Create"
"CollectionRequest\032\033.milvus.proto.common."
"Status\"\000\022[\n\016DropCollection\022*.milvus.prot"
"o.milvus.DropCollectionRequest\032\033.milvus."
"proto.common.Status\"\000\022_\n\rHasCollection\022)"
".milvus.proto.milvus.HasCollectionReques"
"t\032!.milvus.proto.milvus.BoolResponse\"\000\022["
"\n\016LoadCollection\022*.milvus.proto.milvus.L"
"oadCollectionRequest\032\033.milvus.proto.comm"
"on.Status\"\000\022a\n\021ReleaseCollection\022-.milvu"
"s.proto.milvus.ReleaseCollectionRequest\032"
"\033.milvus.proto.common.Status\"\000\022w\n\022Descri"
"beCollection\022..milvus.proto.milvus.Descr"
"ibeCollectionRequest\032/.milvus.proto.milv"
"us.DescribeCollectionResponse\"\000\022v\n\027GetCo"
"llectionStatistics\022+.milvus.proto.milvus"
".CollectionStatsRequest\032,.milvus.proto.m"
"ilvus.CollectionStatsResponse\"\000\022l\n\017ShowC"
"ollections\022*.milvus.proto.milvus.ShowCol"
"lectionRequest\032+.milvus.proto.milvus.Sho"
"wCollectionResponse\"\000\022]\n\017CreatePartition"
"\022+.milvus.proto.milvus.CreatePartitionRe"
"quest\032\033.milvus.proto.common.Status\"\000\022Y\n\r"
"DropPartition\022).milvus.proto.milvus.Drop"
"(\t\022\027\n\017collection_name\030\003 \001(\t\"r\n\024RegisterL"
"inkResponse\022-\n\007address\030\001 \001(\0132\034.milvus.pr"
"oto.common.Address\022+\n\006status\030\002 \001(\0132\033.mil"
"vus.proto.common.Status*@\n\017PlaceholderTy"
"pe\022\010\n\004NONE\020\000\022\021\n\rVECTOR_BINARY\020d\022\020\n\014VECTO"
"R_FLOAT\020e2\357\020\n\rMilvusService\022_\n\020CreateCol"
"lection\022,.milvus.proto.milvus.CreateColl"
"ectionRequest\032\033.milvus.proto.common.Stat"
"us\"\000\022[\n\016DropCollection\022*.milvus.proto.mi"
"lvus.DropCollectionRequest\032\033.milvus.prot"
"o.common.Status\"\000\022_\n\rHasCollection\022).mil"
"vus.proto.milvus.HasCollectionRequest\032!."
"milvus.proto.milvus.BoolResponse\"\000\022[\n\016Lo"
"adCollection\022*.milvus.proto.milvus.LoadC"
"ollectionRequest\032\033.milvus.proto.common.S"
"tatus\"\000\022a\n\021ReleaseCollection\022-.milvus.pr"
"oto.milvus.ReleaseCollectionRequest\032\033.mi"
"lvus.proto.common.Status\"\000\022w\n\022DescribeCo"
"llection\022..milvus.proto.milvus.DescribeC"
"ollectionRequest\032/.milvus.proto.milvus.D"
"escribeCollectionResponse\"\000\022v\n\027GetCollec"
"tionStatistics\022+.milvus.proto.milvus.Col"
"lectionStatsRequest\032,.milvus.proto.milvu"
"s.CollectionStatsResponse\"\000\022l\n\017ShowColle"
"ctions\022*.milvus.proto.milvus.ShowCollect"
"ionRequest\032+.milvus.proto.milvus.ShowCol"
"lectionResponse\"\000\022]\n\017CreatePartition\022+.m"
"ilvus.proto.milvus.CreatePartitionReques"
"t\032\033.milvus.proto.common.Status\"\000\022Y\n\rDrop"
"Partition\022).milvus.proto.milvus.DropPart"
"itionRequest\032\033.milvus.proto.common.Statu"
"s\"\000\022]\n\014HasPartition\022(.milvus.proto.milvu"
"s.HasPartitionRequest\032!.milvus.proto.mil"
"vus.BoolResponse\"\000\022Y\n\016LoadPartitions\022(.m"
"ilvus.proto.milvus.LoadPartitonRequest\032\033"
".milvus.proto.common.Status\"\000\022`\n\021Release"
"Partitions\022,.milvus.proto.milvus.Release"
"PartitionRequest\032\033.milvus.proto.common.S"
"tatus\"\000\022]\n\014HasPartition\022(.milvus.proto.m"
"ilvus.HasPartitionRequest\032!.milvus.proto"
".milvus.BoolResponse\"\000\022Y\n\016LoadPartitions"
"\022(.milvus.proto.milvus.LoadPartitonReque"
"st\032\033.milvus.proto.common.Status\"\000\022`\n\021Rel"
"easePartitions\022,.milvus.proto.milvus.Rel"
"easePartitionRequest\032\033.milvus.proto.comm"
"on.Status\"\000\022s\n\026GetPartitionStatistics\022*."
"milvus.proto.milvus.PartitionStatsReques"
"t\032+.milvus.proto.milvus.PartitionStatsRe"
"sponse\"\000\022i\n\016ShowPartitions\022).milvus.prot"
"o.milvus.ShowPartitionRequest\032*.milvus.p"
"roto.milvus.ShowPartitionResponse\"\000\022U\n\013C"
"reateIndex\022\'.milvus.proto.milvus.CreateI"
"ndexRequest\032\033.milvus.proto.common.Status"
"\"\000\022h\n\rDescribeIndex\022).milvus.proto.milvu"
"s.DescribeIndexRequest\032*.milvus.proto.mi"
"lvus.DescribeIndexResponse\"\000\022b\n\rGetIndex"
"State\022&.milvus.proto.milvus.IndexStateRe"
"quest\032\'.milvus.proto.milvus.IndexStateRe"
"sponse\"\000\022S\n\006Insert\022\".milvus.proto.milvus"
".InsertRequest\032#.milvus.proto.milvus.Ins"
"ertResponse\"\000\022R\n\006Search\022\".milvus.proto.m"
"ilvus.SearchRequest\032\".milvus.proto.milvu"
"s.SearchResults\"\000\022I\n\005Flush\022!.milvus.prot"
"o.milvus.FlushRequest\032\033.milvus.proto.com"
"mon.Status\"\000\022Q\n\014GetDdChannel\022\032.milvus.pr"
"oto.common.Empty\032#.milvus.proto.milvus.S"
"tringResponse\"\000BBZ@github.com/zilliztech"
"/milvus-distributed/internal/proto/milvu"
"spbb\006proto3"
"tatus\"\000\022s\n\026GetPartitionStatistics\022*.milv"
"us.proto.milvus.PartitionStatsRequest\032+."
"milvus.proto.milvus.PartitionStatsRespon"
"se\"\000\022i\n\016ShowPartitions\022).milvus.proto.mi"
"lvus.ShowPartitionRequest\032*.milvus.proto"
".milvus.ShowPartitionResponse\"\000\022U\n\013Creat"
"eIndex\022\'.milvus.proto.milvus.CreateIndex"
"Request\032\033.milvus.proto.common.Status\"\000\022h"
"\n\rDescribeIndex\022).milvus.proto.milvus.De"
"scribeIndexRequest\032*.milvus.proto.milvus"
".DescribeIndexResponse\"\000\022b\n\rGetIndexStat"
"e\022&.milvus.proto.milvus.IndexStateReques"
"t\032\'.milvus.proto.milvus.IndexStateRespon"
"se\"\000\022S\n\006Insert\022\".milvus.proto.milvus.Ins"
"ertRequest\032#.milvus.proto.milvus.InsertR"
"esponse\"\000\022R\n\006Search\022\".milvus.proto.milvu"
"s.SearchRequest\032\".milvus.proto.milvus.Se"
"archResults\"\000\022I\n\005Flush\022!.milvus.proto.mi"
"lvus.FlushRequest\032\033.milvus.proto.common."
"Status\"\000\022Q\n\014GetDdChannel\022\032.milvus.proto."
"common.Empty\032#.milvus.proto.milvus.Strin"
"gResponse\"\0002g\n\014ProxyService\022W\n\014RegisterL"
"ink\022\032.milvus.proto.common.Empty\032).milvus"
".proto.milvus.RegisterLinkResponse\"\000BBZ@"
"github.com/zilliztech/milvus-distributed"
"/internal/proto/milvuspbb\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_milvus_2eproto_deps[2] = {
&::descriptor_table_common_2eproto,
&::descriptor_table_schema_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_milvus_2eproto_sccs[40] = {
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_milvus_2eproto_sccs[41] = {
&scc_info_BoolResponse_milvus_2eproto.base,
&scc_info_CollectionStatsRequest_milvus_2eproto.base,
&scc_info_CollectionStatsResponse_milvus_2eproto.base,
@ -1422,6 +1457,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mil
&scc_info_PartitionStatsResponse_milvus_2eproto.base,
&scc_info_PlaceholderGroup_milvus_2eproto.base,
&scc_info_PlaceholderValue_milvus_2eproto.base,
&scc_info_RegisterLinkResponse_milvus_2eproto.base,
&scc_info_ReleaseCollectionRequest_milvus_2eproto.base,
&scc_info_ReleasePartitionRequest_milvus_2eproto.base,
&scc_info_SearchRequest_milvus_2eproto.base,
@ -1437,10 +1473,10 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mil
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_milvus_2eproto_once;
static bool descriptor_table_milvus_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_milvus_2eproto = {
&descriptor_table_milvus_2eproto_initialized, descriptor_table_protodef_milvus_2eproto, "milvus.proto", 7051,
&descriptor_table_milvus_2eproto_once, descriptor_table_milvus_2eproto_sccs, descriptor_table_milvus_2eproto_deps, 40, 2,
&descriptor_table_milvus_2eproto_initialized, descriptor_table_protodef_milvus_2eproto, "milvus.proto", 7272,
&descriptor_table_milvus_2eproto_once, descriptor_table_milvus_2eproto_sccs, descriptor_table_milvus_2eproto_deps, 41, 2,
schemas, file_default_instances, TableStruct_milvus_2eproto::offsets,
file_level_metadata_milvus_2eproto, 40, file_level_enum_descriptors_milvus_2eproto, file_level_service_descriptors_milvus_2eproto,
file_level_metadata_milvus_2eproto, 41, file_level_enum_descriptors_milvus_2eproto, file_level_service_descriptors_milvus_2eproto,
};
// Force running AddDescriptors() at dynamic initialization time.
@ -17396,6 +17432,345 @@ void FlushRequest::InternalSwap(FlushRequest* other) {
}
// ===================================================================
void RegisterLinkResponse::InitAsDefaultInstance() {
::milvus::proto::milvus::_RegisterLinkResponse_default_instance_._instance.get_mutable()->address_ = const_cast< ::milvus::proto::common::Address*>(
::milvus::proto::common::Address::internal_default_instance());
::milvus::proto::milvus::_RegisterLinkResponse_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::proto::common::Status*>(
::milvus::proto::common::Status::internal_default_instance());
}
class RegisterLinkResponse::_Internal {
public:
static const ::milvus::proto::common::Address& address(const RegisterLinkResponse* msg);
static const ::milvus::proto::common::Status& status(const RegisterLinkResponse* msg);
};
const ::milvus::proto::common::Address&
RegisterLinkResponse::_Internal::address(const RegisterLinkResponse* msg) {
return *msg->address_;
}
const ::milvus::proto::common::Status&
RegisterLinkResponse::_Internal::status(const RegisterLinkResponse* msg) {
return *msg->status_;
}
void RegisterLinkResponse::clear_address() {
if (GetArenaNoVirtual() == nullptr && address_ != nullptr) {
delete address_;
}
address_ = nullptr;
}
void RegisterLinkResponse::clear_status() {
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
delete status_;
}
status_ = nullptr;
}
RegisterLinkResponse::RegisterLinkResponse()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:milvus.proto.milvus.RegisterLinkResponse)
}
RegisterLinkResponse::RegisterLinkResponse(const RegisterLinkResponse& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_address()) {
address_ = new ::milvus::proto::common::Address(*from.address_);
} else {
address_ = nullptr;
}
if (from.has_status()) {
status_ = new ::milvus::proto::common::Status(*from.status_);
} else {
status_ = nullptr;
}
// @@protoc_insertion_point(copy_constructor:milvus.proto.milvus.RegisterLinkResponse)
}
void RegisterLinkResponse::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RegisterLinkResponse_milvus_2eproto.base);
::memset(&address_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&status_) -
reinterpret_cast<char*>(&address_)) + sizeof(status_));
}
RegisterLinkResponse::~RegisterLinkResponse() {
// @@protoc_insertion_point(destructor:milvus.proto.milvus.RegisterLinkResponse)
SharedDtor();
}
void RegisterLinkResponse::SharedDtor() {
if (this != internal_default_instance()) delete address_;
if (this != internal_default_instance()) delete status_;
}
void RegisterLinkResponse::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const RegisterLinkResponse& RegisterLinkResponse::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RegisterLinkResponse_milvus_2eproto.base);
return *internal_default_instance();
}
void RegisterLinkResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:milvus.proto.milvus.RegisterLinkResponse)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
if (GetArenaNoVirtual() == nullptr && address_ != nullptr) {
delete address_;
}
address_ = nullptr;
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
delete status_;
}
status_ = nullptr;
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* RegisterLinkResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// .milvus.proto.common.Address address = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ctx->ParseMessage(mutable_address(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// .milvus.proto.common.Status status = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ctx->ParseMessage(mutable_status(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool RegisterLinkResponse::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.milvus.RegisterLinkResponse)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// .milvus.proto.common.Address address = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_address()));
} else {
goto handle_unusual;
}
break;
}
// .milvus.proto.common.Status status = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_status()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:milvus.proto.milvus.RegisterLinkResponse)
return true;
failure:
// @@protoc_insertion_point(parse_failure:milvus.proto.milvus.RegisterLinkResponse)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void RegisterLinkResponse::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:milvus.proto.milvus.RegisterLinkResponse)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .milvus.proto.common.Address address = 1;
if (this->has_address()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
1, _Internal::address(this), output);
}
// .milvus.proto.common.Status status = 2;
if (this->has_status()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2, _Internal::status(this), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:milvus.proto.milvus.RegisterLinkResponse)
}
::PROTOBUF_NAMESPACE_ID::uint8* RegisterLinkResponse::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:milvus.proto.milvus.RegisterLinkResponse)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .milvus.proto.common.Address address = 1;
if (this->has_address()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
1, _Internal::address(this), target);
}
// .milvus.proto.common.Status status = 2;
if (this->has_status()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
2, _Internal::status(this), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:milvus.proto.milvus.RegisterLinkResponse)
return target;
}
size_t RegisterLinkResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:milvus.proto.milvus.RegisterLinkResponse)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// .milvus.proto.common.Address address = 1;
if (this->has_address()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*address_);
}
// .milvus.proto.common.Status status = 2;
if (this->has_status()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*status_);
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void RegisterLinkResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.milvus.RegisterLinkResponse)
GOOGLE_DCHECK_NE(&from, this);
const RegisterLinkResponse* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RegisterLinkResponse>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.milvus.RegisterLinkResponse)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.milvus.RegisterLinkResponse)
MergeFrom(*source);
}
}
void RegisterLinkResponse::MergeFrom(const RegisterLinkResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.milvus.RegisterLinkResponse)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.has_address()) {
mutable_address()->::milvus::proto::common::Address::MergeFrom(from.address());
}
if (from.has_status()) {
mutable_status()->::milvus::proto::common::Status::MergeFrom(from.status());
}
}
void RegisterLinkResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.milvus.RegisterLinkResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void RegisterLinkResponse::CopyFrom(const RegisterLinkResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.milvus.RegisterLinkResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool RegisterLinkResponse::IsInitialized() const {
return true;
}
void RegisterLinkResponse::InternalSwap(RegisterLinkResponse* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(address_, other->address_);
swap(status_, other->status_);
}
::PROTOBUF_NAMESPACE_ID::Metadata RegisterLinkResponse::GetMetadata() const {
return GetMetadataStatic();
}
// @@protoc_insertion_point(namespace_scope)
} // namespace milvus
} // namespace proto
@ -17521,6 +17896,9 @@ template<> PROTOBUF_NOINLINE ::milvus::proto::milvus::SearchResults* Arena::Crea
template<> PROTOBUF_NOINLINE ::milvus::proto::milvus::FlushRequest* Arena::CreateMaybeMessage< ::milvus::proto::milvus::FlushRequest >(Arena* arena) {
return Arena::CreateInternal< ::milvus::proto::milvus::FlushRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::milvus::proto::milvus::RegisterLinkResponse* Arena::CreateMaybeMessage< ::milvus::proto::milvus::RegisterLinkResponse >(Arena* arena) {
return Arena::CreateInternal< ::milvus::proto::milvus::RegisterLinkResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)

View File

@ -50,7 +50,7 @@ struct TableStruct_milvus_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[40]
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[41]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
@ -147,6 +147,9 @@ extern PlaceholderGroupDefaultTypeInternal _PlaceholderGroup_default_instance_;
class PlaceholderValue;
class PlaceholderValueDefaultTypeInternal;
extern PlaceholderValueDefaultTypeInternal _PlaceholderValue_default_instance_;
class RegisterLinkResponse;
class RegisterLinkResponseDefaultTypeInternal;
extern RegisterLinkResponseDefaultTypeInternal _RegisterLinkResponse_default_instance_;
class ReleaseCollectionRequest;
class ReleaseCollectionRequestDefaultTypeInternal;
extern ReleaseCollectionRequestDefaultTypeInternal _ReleaseCollectionRequest_default_instance_;
@ -213,6 +216,7 @@ template<> ::milvus::proto::milvus::PartitionStatsRequest* Arena::CreateMaybeMes
template<> ::milvus::proto::milvus::PartitionStatsResponse* Arena::CreateMaybeMessage<::milvus::proto::milvus::PartitionStatsResponse>(Arena*);
template<> ::milvus::proto::milvus::PlaceholderGroup* Arena::CreateMaybeMessage<::milvus::proto::milvus::PlaceholderGroup>(Arena*);
template<> ::milvus::proto::milvus::PlaceholderValue* Arena::CreateMaybeMessage<::milvus::proto::milvus::PlaceholderValue>(Arena*);
template<> ::milvus::proto::milvus::RegisterLinkResponse* Arena::CreateMaybeMessage<::milvus::proto::milvus::RegisterLinkResponse>(Arena*);
template<> ::milvus::proto::milvus::ReleaseCollectionRequest* Arena::CreateMaybeMessage<::milvus::proto::milvus::ReleaseCollectionRequest>(Arena*);
template<> ::milvus::proto::milvus::ReleasePartitionRequest* Arena::CreateMaybeMessage<::milvus::proto::milvus::ReleasePartitionRequest>(Arena*);
template<> ::milvus::proto::milvus::SearchRequest* Arena::CreateMaybeMessage<::milvus::proto::milvus::SearchRequest>(Arena*);
@ -6716,6 +6720,150 @@ class FlushRequest :
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_milvus_2eproto;
};
// -------------------------------------------------------------------
class RegisterLinkResponse :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.milvus.RegisterLinkResponse) */ {
public:
RegisterLinkResponse();
virtual ~RegisterLinkResponse();
RegisterLinkResponse(const RegisterLinkResponse& from);
RegisterLinkResponse(RegisterLinkResponse&& from) noexcept
: RegisterLinkResponse() {
*this = ::std::move(from);
}
inline RegisterLinkResponse& operator=(const RegisterLinkResponse& from) {
CopyFrom(from);
return *this;
}
inline RegisterLinkResponse& operator=(RegisterLinkResponse&& 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 RegisterLinkResponse& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const RegisterLinkResponse* internal_default_instance() {
return reinterpret_cast<const RegisterLinkResponse*>(
&_RegisterLinkResponse_default_instance_);
}
static constexpr int kIndexInFileMessages =
40;
friend void swap(RegisterLinkResponse& a, RegisterLinkResponse& b) {
a.Swap(&b);
}
inline void Swap(RegisterLinkResponse* other) {
if (other == this) return;
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline RegisterLinkResponse* New() const final {
return CreateMaybeMessage<RegisterLinkResponse>(nullptr);
}
RegisterLinkResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<RegisterLinkResponse>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const RegisterLinkResponse& from);
void MergeFrom(const RegisterLinkResponse& 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(RegisterLinkResponse* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "milvus.proto.milvus.RegisterLinkResponse";
}
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_milvus_2eproto);
return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kAddressFieldNumber = 1,
kStatusFieldNumber = 2,
};
// .milvus.proto.common.Address address = 1;
bool has_address() const;
void clear_address();
const ::milvus::proto::common::Address& address() const;
::milvus::proto::common::Address* release_address();
::milvus::proto::common::Address* mutable_address();
void set_allocated_address(::milvus::proto::common::Address* address);
// .milvus.proto.common.Status status = 2;
bool has_status() const;
void clear_status();
const ::milvus::proto::common::Status& status() const;
::milvus::proto::common::Status* release_status();
::milvus::proto::common::Status* mutable_status();
void set_allocated_status(::milvus::proto::common::Status* status);
// @@protoc_insertion_point(class_scope:milvus.proto.milvus.RegisterLinkResponse)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::milvus::proto::common::Address* address_;
::milvus::proto::common::Status* status_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_milvus_2eproto;
};
// ===================================================================
@ -12474,6 +12622,100 @@ inline void FlushRequest::set_allocated_collection_name(std::string* collection_
// @@protoc_insertion_point(field_set_allocated:milvus.proto.milvus.FlushRequest.collection_name)
}
// -------------------------------------------------------------------
// RegisterLinkResponse
// .milvus.proto.common.Address address = 1;
inline bool RegisterLinkResponse::has_address() const {
return this != internal_default_instance() && address_ != nullptr;
}
inline const ::milvus::proto::common::Address& RegisterLinkResponse::address() const {
const ::milvus::proto::common::Address* p = address_;
// @@protoc_insertion_point(field_get:milvus.proto.milvus.RegisterLinkResponse.address)
return p != nullptr ? *p : *reinterpret_cast<const ::milvus::proto::common::Address*>(
&::milvus::proto::common::_Address_default_instance_);
}
inline ::milvus::proto::common::Address* RegisterLinkResponse::release_address() {
// @@protoc_insertion_point(field_release:milvus.proto.milvus.RegisterLinkResponse.address)
::milvus::proto::common::Address* temp = address_;
address_ = nullptr;
return temp;
}
inline ::milvus::proto::common::Address* RegisterLinkResponse::mutable_address() {
if (address_ == nullptr) {
auto* p = CreateMaybeMessage<::milvus::proto::common::Address>(GetArenaNoVirtual());
address_ = p;
}
// @@protoc_insertion_point(field_mutable:milvus.proto.milvus.RegisterLinkResponse.address)
return address_;
}
inline void RegisterLinkResponse::set_allocated_address(::milvus::proto::common::Address* address) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(address_);
}
if (address) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
if (message_arena != submessage_arena) {
address = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, address, submessage_arena);
}
} else {
}
address_ = address;
// @@protoc_insertion_point(field_set_allocated:milvus.proto.milvus.RegisterLinkResponse.address)
}
// .milvus.proto.common.Status status = 2;
inline bool RegisterLinkResponse::has_status() const {
return this != internal_default_instance() && status_ != nullptr;
}
inline const ::milvus::proto::common::Status& RegisterLinkResponse::status() const {
const ::milvus::proto::common::Status* p = status_;
// @@protoc_insertion_point(field_get:milvus.proto.milvus.RegisterLinkResponse.status)
return p != nullptr ? *p : *reinterpret_cast<const ::milvus::proto::common::Status*>(
&::milvus::proto::common::_Status_default_instance_);
}
inline ::milvus::proto::common::Status* RegisterLinkResponse::release_status() {
// @@protoc_insertion_point(field_release:milvus.proto.milvus.RegisterLinkResponse.status)
::milvus::proto::common::Status* temp = status_;
status_ = nullptr;
return temp;
}
inline ::milvus::proto::common::Status* RegisterLinkResponse::mutable_status() {
if (status_ == nullptr) {
auto* p = CreateMaybeMessage<::milvus::proto::common::Status>(GetArenaNoVirtual());
status_ = p;
}
// @@protoc_insertion_point(field_mutable:milvus.proto.milvus.RegisterLinkResponse.status)
return status_;
}
inline void RegisterLinkResponse::set_allocated_status(::milvus::proto::common::Status* status) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
}
if (status) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
if (message_arena != submessage_arena) {
status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, status, submessage_arena);
}
} else {
}
status_ = status;
// @@protoc_insertion_point(field_set_allocated:milvus.proto.milvus.RegisterLinkResponse.status)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
@ -12555,6 +12797,8 @@ inline void FlushRequest::set_allocated_collection_name(std::string* collection_
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)

View File

@ -3,13 +3,18 @@ package grpcproxynode
import (
"context"
"net"
"os"
"strconv"
"sync"
"github.com/go-basic/ipv4"
grpcproxyservice "github.com/zilliztech/milvus-distributed/internal/distributed/proxyservice"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
proxynodeimpl "github.com/zilliztech/milvus-distributed/internal/proxynode"
"github.com/zilliztech/milvus-distributed/internal/proxynode"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
@ -19,12 +24,12 @@ import (
type Server struct {
ctx context.Context
wg sync.WaitGroup
impl proxynodeimpl.ProxyNode
impl proxynode.ProxyNode
grpcServer *grpc.Server
ip string
port int
proxyServiceAddress string
//proxyServiceClient *proxyservice.Client
proxyServiceClient *grpcproxyservice.Client
}
func CreateProxyNodeServer() (*Server, error) {
@ -32,51 +37,56 @@ func CreateProxyNodeServer() (*Server, error) {
}
func (s *Server) connectProxyService() error {
proxynodeimpl.Params.Init()
proxynode.Params.Init()
//s.proxyServiceAddress = proxynodeimpl.Params.ProxyServiceAddress()
//s.proxyServiceClient = proxyservice.NewClient(s.ctx, s.proxyServiceAddress)
//
//getAvailablePort := func() int {
// listener, err := net.Listen("tcp", ":0")
// if err != nil {
// panic(err)
// }
// defer listener.Close()
//
// return listener.Addr().(*net.TCPAddr).Port
//}
//getLocalIp := func() string {
// return ipv4.LocalIP()
//}
//s.ip = getLocalIp()
//s.port = getAvailablePort()
//
//request := &proxypb.RegisterNodeRequest{
// Address: &commonpb.Address{
// Ip: s.ip,
// Port: int64(s.port),
// },
//}
//response, err := s.proxyServiceClient.RegisterNode(request)
//if err != nil {
// panic(err)
//}
//
//proxynodeimpl.Params.Save("_proxyID", strconv.Itoa(int(response.InitParams.NodeID)))
//
//for _, params := range response.InitParams.StartParams {
// proxynodeimpl.Params.Save(params.Key, params.Value)
//}
//
//return err
return nil
s.proxyServiceAddress = proxynode.Params.ProxyServiceAddress()
s.proxyServiceClient = grpcproxyservice.NewClient(s.ctx, s.proxyServiceAddress)
getAvailablePort := func() int {
listener, err := net.Listen("tcp", ":0")
if err != nil {
panic(err)
}
defer listener.Close()
return listener.Addr().(*net.TCPAddr).Port
}
getLocalIP := func() string {
localIP := ipv4.LocalIP()
host := os.Getenv("PROXY_NODE_HOST")
// TODO: shall we write this to ParamTable?
if len(host) <= 0 {
return localIP
}
return host
}
s.ip = getLocalIP()
s.port = getAvailablePort()
request := &proxypb.RegisterNodeRequest{
Address: &commonpb.Address{
Ip: s.ip,
Port: int64(s.port),
},
}
response, err := s.proxyServiceClient.RegisterNode(request)
if err != nil {
panic(err)
}
proxynode.Params.Save("_proxyID", strconv.Itoa(int(response.InitParams.NodeID)))
for _, params := range response.InitParams.StartParams {
proxynode.Params.Save(params.Key, params.Value)
}
return err
}
func (s *Server) Init() error {
s.ctx = context.Background()
var err error
s.impl, err = proxynodeimpl.CreateProxyNodeImpl(s.ctx)
s.impl, err = proxynode.CreateProxyNodeImpl(s.ctx)
if err != nil {
return err
}
@ -93,7 +103,7 @@ func (s *Server) Start() error {
defer s.wg.Done()
// TODO: use config
lis, err := net.Listen("tcp", ":"+strconv.Itoa(proxynodeimpl.Params.NetworkPort()))
lis, err := net.Listen("tcp", ":"+strconv.Itoa(s.port))
if err != nil {
panic(err)
}

View File

@ -0,0 +1,52 @@
package grpcproxyservice
import (
"context"
"google.golang.org/grpc"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
)
type Client struct {
proxyServiceClient proxypb.ProxyServiceClient
address string
ctx context.Context
}
func (c *Client) tryConnect() error {
if c.proxyServiceClient != nil {
return nil
}
conn, err := grpc.DialContext(c.ctx, c.address, grpc.WithInsecure(), grpc.WithBlock())
if err != nil {
return err
}
c.proxyServiceClient = proxypb.NewProxyServiceClient(conn)
return nil
}
func (c *Client) RegisterNode(request *proxypb.RegisterNodeRequest) (*proxypb.RegisterNodeResponse, error) {
err := c.tryConnect()
if err != nil {
return nil, err
}
return c.proxyServiceClient.RegisterNode(c.ctx, request)
}
func (c *Client) InvalidateCollectionMetaCache(request *proxypb.InvalidateCollMetaCacheRequest) error {
var err error
err = c.tryConnect()
if err != nil {
return err
}
_, err = c.proxyServiceClient.InvalidateCollectionMetaCache(c.ctx, request)
return err
}
func NewClient(ctx context.Context, address string) *Client {
return &Client{
address: address,
ctx: ctx,
}
}

View File

@ -0,0 +1,46 @@
package grpcproxyservice
import (
"net"
"strconv"
"github.com/zilliztech/milvus-distributed/internal/util/paramtable"
)
type ParamTable struct {
paramtable.BaseTable
}
var Params ParamTable
func (pt *ParamTable) Init() {
pt.BaseTable.Init()
}
func (pt *ParamTable) NetworkPort() int {
return pt.ParseInt("proxyService.port")
}
func (pt *ParamTable) NetworkAddress() string {
addr, err := pt.Load("proxyService.address")
if err != nil {
panic(err)
}
hostName, _ := net.LookupHost(addr)
if len(hostName) <= 0 {
if ip := net.ParseIP(addr); ip == nil {
panic("invalid ip proxyService.address")
}
}
port, err := pt.Load("proxyService.port")
if err != nil {
panic(err)
}
_, err = strconv.Atoi(port)
if err != nil {
panic(err)
}
return addr + ":" + port
}

View File

@ -0,0 +1,84 @@
package grpcproxyservice
import (
"context"
"fmt"
"net"
"strconv"
"sync"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
"github.com/zilliztech/milvus-distributed/internal/proxyservice"
"google.golang.org/grpc"
)
type Server struct {
ctx context.Context
wg sync.WaitGroup
impl proxyservice.ProxyService
grpcServer *grpc.Server
}
func CreateProxyServiceServer() (*Server, error) {
return &Server{}, nil
}
func (s *Server) Init() error {
s.ctx = context.Background()
Params.Init()
s.impl, _ = proxyservice.CreateProxyService(s.ctx)
s.impl.Init()
return nil
}
func (s *Server) Start() error {
fmt.Println("proxy service start ...")
s.wg.Add(1)
go func() {
defer s.wg.Done()
// TODO: use config
fmt.Println("network port: ", Params.NetworkPort())
lis, err := net.Listen("tcp", ":"+strconv.Itoa(Params.NetworkPort()))
if err != nil {
panic(err)
}
s.grpcServer = grpc.NewServer()
proxypb.RegisterProxyServiceServer(s.grpcServer, s)
milvuspb.RegisterProxyServiceServer(s.grpcServer, s)
if err = s.grpcServer.Serve(lis); err != nil {
panic(err)
}
}()
s.impl.Start()
return nil
}
func (s *Server) Stop() error {
s.impl.Stop()
if s.grpcServer != nil {
s.grpcServer.GracefulStop()
}
s.wg.Wait()
return nil
}
func (s *Server) RegisterLink(ctx context.Context, empty *commonpb.Empty) (*milvuspb.RegisterLinkResponse, error) {
return s.impl.RegisterLink()
}
func (s *Server) RegisterNode(ctx context.Context, request *proxypb.RegisterNodeRequest) (*proxypb.RegisterNodeResponse, error) {
return s.impl.RegisterNode(request)
}
func (s *Server) InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) {
return &commonpb.Status{}, s.impl.InvalidateCollectionMetaCache(request)
}

View File

@ -292,3 +292,12 @@ service MilvusService {
rpc GetDdChannel(common.Empty) returns (StringResponse) {}
}
message RegisterLinkResponse {
common.Address address = 1;
common.Status status = 2;
}
service ProxyService {
rpc RegisterLink(common.Empty) returns (RegisterLinkResponse) {}
}

View File

@ -2297,6 +2297,53 @@ func (m *FlushRequest) GetCollectionName() string {
return ""
}
type RegisterLinkResponse struct {
Address *commonpb.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,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 *RegisterLinkResponse) Reset() { *m = RegisterLinkResponse{} }
func (m *RegisterLinkResponse) String() string { return proto.CompactTextString(m) }
func (*RegisterLinkResponse) ProtoMessage() {}
func (*RegisterLinkResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_02345ba45cc0e303, []int{40}
}
func (m *RegisterLinkResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RegisterLinkResponse.Unmarshal(m, b)
}
func (m *RegisterLinkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RegisterLinkResponse.Marshal(b, m, deterministic)
}
func (m *RegisterLinkResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_RegisterLinkResponse.Merge(m, src)
}
func (m *RegisterLinkResponse) XXX_Size() int {
return xxx_messageInfo_RegisterLinkResponse.Size(m)
}
func (m *RegisterLinkResponse) XXX_DiscardUnknown() {
xxx_messageInfo_RegisterLinkResponse.DiscardUnknown(m)
}
var xxx_messageInfo_RegisterLinkResponse proto.InternalMessageInfo
func (m *RegisterLinkResponse) GetAddress() *commonpb.Address {
if m != nil {
return m.Address
}
return nil
}
func (m *RegisterLinkResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Status
}
return nil
}
func init() {
proto.RegisterEnum("milvus.proto.milvus.PlaceholderType", PlaceholderType_name, PlaceholderType_value)
proto.RegisterType((*CreateCollectionRequest)(nil), "milvus.proto.milvus.CreateCollectionRequest")
@ -2339,112 +2386,117 @@ func init() {
proto.RegisterType((*Hits)(nil), "milvus.proto.milvus.Hits")
proto.RegisterType((*SearchResults)(nil), "milvus.proto.milvus.SearchResults")
proto.RegisterType((*FlushRequest)(nil), "milvus.proto.milvus.FlushRequest")
proto.RegisterType((*RegisterLinkResponse)(nil), "milvus.proto.milvus.RegisterLinkResponse")
}
func init() { proto.RegisterFile("milvus.proto", fileDescriptor_02345ba45cc0e303) }
var fileDescriptor_02345ba45cc0e303 = []byte{
// 1591 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xdd, 0x6e, 0x1b, 0x45,
0x14, 0xce, 0xc6, 0x8e, 0x9b, 0x9c, 0xd8, 0x8e, 0x33, 0xf9, 0x73, 0xdd, 0x96, 0xa6, 0x03, 0x25,
0xe9, 0x5f, 0x82, 0x52, 0x10, 0x70, 0x81, 0xd4, 0x26, 0x4e, 0x53, 0xab, 0x6d, 0x1a, 0xd6, 0xa1,
0x22, 0x54, 0x95, 0x59, 0x7b, 0x87, 0x78, 0x61, 0xbd, 0x6b, 0x76, 0xc6, 0x49, 0xd3, 0x2b, 0x04,
0x12, 0x48, 0x80, 0x80, 0x5b, 0x6e, 0x91, 0xb8, 0x45, 0x50, 0x24, 0xde, 0x00, 0x89, 0x77, 0x41,
0x88, 0x27, 0x40, 0x42, 0x3b, 0xb3, 0x59, 0xef, 0x6e, 0x66, 0x63, 0x53, 0x03, 0x76, 0xee, 0x76,
0x8e, 0xcf, 0x9c, 0xf9, 0xce, 0xcf, 0xcc, 0x9c, 0xf9, 0x0c, 0xe9, 0x86, 0x61, 0xee, 0xb5, 0xe8,
0x52, 0xd3, 0xb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06, 0x9f, 0x81, 0x9d, 0xc2, 0x56, 0x87, 0x4c, 0xe8, 0x11, 0x14, 0x57, 0xad, 0x92,
0x17, 0x66, 0x8c, 0x03, 0xd2, 0x37, 0x15, 0x1e, 0x42, 0x55, 0xc8, 0x6c, 0x10, 0xd6, 0xee, 0xcb,
0xd1, 0x8b, 0xf1, 0xaf, 0xa2, 0xe0, 0x6b, 0xa7, 0xb0, 0xd0, 0x51, 0xcf, 0x5f, 0xa3, 0x0c, 0x29,
0xd1, 0xe2, 0x22, 0x1c, 0x33, 0x29, 0xd0, 0xff, 0x17, 0x9e, 0x3f, 0x56, 0xc7, 0x37, 0xaa, 0x42,
0x4a, 0x34, 0x28, 0x31, 0x46, 0x43, 0x7d, 0x5f, 0xe1, 0x78, 0x1d, 0xde, 0xe1, 0xe0, 0x21, 0x54,
0x82, 0x11, 0xde, 0x99, 0x20, 0xf9, 0xc6, 0x0c, 0x76, 0x2d, 0x9d, 0x32, 0xf8, 0x26, 0xa4, 0x37,
0x08, 0x2b, 0xea, 0x6b, 0x75, 0xcd, 0xb2, 0x88, 0x89, 0x0a, 0x52, 0xf5, 0xf5, 0x46, 0x93, 0x1d,
0xc4, 0x78, 0x1c, 0xfe, 0x47, 0x17, 0x0f, 0xad, 0xae, 0xbe, 0x73, 0x63, 0xd7, 0x60, 0xf5, 0x56,
0xd5, 0x9d, 0xbd, 0xfc, 0xc4, 0x30, 0x4d, 0xe3, 0x09, 0x23, 0xb5, 0xfa, 0xb2, 0x98, 0x70, 0x4d,
0x37, 0x28, 0x73, 0x8c, 0x6a, 0x8b, 0x11, 0x7d, 0xd9, 0xb0, 0x18, 0x71, 0x2c, 0xcd, 0x5c, 0xe6,
0x26, 0x3d, 0x8d, 0x66, 0xb5, 0x9a, 0xe2, 0xe3, 0xeb, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xf7,
0x29, 0xea, 0x7b, 0x8f, 0x20, 0x00, 0x00,
// 1661 bytes of a gzipped FileDescriptorProto
0x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0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -3282,3 +3334,75 @@ var _MilvusService_serviceDesc = grpc.ServiceDesc{
Streams: []grpc.StreamDesc{},
Metadata: "milvus.proto",
}
// ProxyServiceClient is the client API for ProxyService service.
//
// 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 {
RegisterLink(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*RegisterLinkResponse, error)
}
type proxyServiceClient struct {
cc *grpc.ClientConn
}
func NewProxyServiceClient(cc *grpc.ClientConn) ProxyServiceClient {
return &proxyServiceClient{cc}
}
func (c *proxyServiceClient) RegisterLink(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*RegisterLinkResponse, error) {
out := new(RegisterLinkResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.milvus.ProxyService/RegisterLink", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ProxyServiceServer is the server API for ProxyService service.
type ProxyServiceServer interface {
RegisterLink(context.Context, *commonpb.Empty) (*RegisterLinkResponse, error)
}
// UnimplementedProxyServiceServer can be embedded to have forward compatible implementations.
type UnimplementedProxyServiceServer struct {
}
func (*UnimplementedProxyServiceServer) RegisterLink(ctx context.Context, req *commonpb.Empty) (*RegisterLinkResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterLink not implemented")
}
func RegisterProxyServiceServer(s *grpc.Server, srv ProxyServiceServer) {
s.RegisterService(&_ProxyService_serviceDesc, srv)
}
func _ProxyService_RegisterLink_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).RegisterLink(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.milvus.ProxyService/RegisterLink",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProxyServiceServer).RegisterLink(ctx, req.(*commonpb.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _ProxyService_serviceDesc = grpc.ServiceDesc{
ServiceName: "milvus.proto.milvus.ProxyService",
HandlerType: (*ProxyServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "RegisterLink",
Handler: _ProxyService_RegisterLink_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "milvus.proto",
}

View File

@ -14,10 +14,7 @@ message RegisterNodeRequest {
message RegisterNodeResponse {
internal.InitParams init_params = 1;
}
message RegisterLinkResponse {
common.Address address = 1;
common.Status status = 2;
}
message InvalidateCollMetaCacheRequest {
@ -27,7 +24,6 @@ message InvalidateCollMetaCacheRequest {
}
service ProxyService {
rpc RegisterLink(common.Empty) returns (RegisterLinkResponse) {}
rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) {}
rpc InvalidateCollectionMetaCache(InvalidateCollMetaCacheRequest) returns (common.Status) {}
}

View File

@ -75,6 +75,7 @@ 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:"-"`
@ -112,41 +113,9 @@ func (m *RegisterNodeResponse) GetInitParams() *internalpb2.InitParams {
return nil
}
type RegisterLinkResponse struct {
Address *commonpb.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RegisterLinkResponse) Reset() { *m = RegisterLinkResponse{} }
func (m *RegisterLinkResponse) String() string { return proto.CompactTextString(m) }
func (*RegisterLinkResponse) ProtoMessage() {}
func (*RegisterLinkResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_34ca2fbc94d169de, []int{2}
}
func (m *RegisterLinkResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RegisterLinkResponse.Unmarshal(m, b)
}
func (m *RegisterLinkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RegisterLinkResponse.Marshal(b, m, deterministic)
}
func (m *RegisterLinkResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_RegisterLinkResponse.Merge(m, src)
}
func (m *RegisterLinkResponse) XXX_Size() int {
return xxx_messageInfo_RegisterLinkResponse.Size(m)
}
func (m *RegisterLinkResponse) XXX_DiscardUnknown() {
xxx_messageInfo_RegisterLinkResponse.DiscardUnknown(m)
}
var xxx_messageInfo_RegisterLinkResponse proto.InternalMessageInfo
func (m *RegisterLinkResponse) GetAddress() *commonpb.Address {
func (m *RegisterNodeResponse) GetStatus() *commonpb.Status {
if m != nil {
return m.Address
return m.Status
}
return nil
}
@ -164,7 +133,7 @@ func (m *InvalidateCollMetaCacheRequest) Reset() { *m = InvalidateCollMe
func (m *InvalidateCollMetaCacheRequest) String() string { return proto.CompactTextString(m) }
func (*InvalidateCollMetaCacheRequest) ProtoMessage() {}
func (*InvalidateCollMetaCacheRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_34ca2fbc94d169de, []int{3}
return fileDescriptor_34ca2fbc94d169de, []int{2}
}
func (m *InvalidateCollMetaCacheRequest) XXX_Unmarshal(b []byte) error {
@ -209,41 +178,39 @@ func (m *InvalidateCollMetaCacheRequest) GetCollectionName() string {
func init() {
proto.RegisterType((*RegisterNodeRequest)(nil), "milvus.proto.proxy.RegisterNodeRequest")
proto.RegisterType((*RegisterNodeResponse)(nil), "milvus.proto.proxy.RegisterNodeResponse")
proto.RegisterType((*RegisterLinkResponse)(nil), "milvus.proto.proxy.RegisterLinkResponse")
proto.RegisterType((*InvalidateCollMetaCacheRequest)(nil), "milvus.proto.proxy.InvalidateCollMetaCacheRequest")
}
func init() { proto.RegisterFile("proxy_service.proto", fileDescriptor_34ca2fbc94d169de) }
var fileDescriptor_34ca2fbc94d169de = []byte{
// 429 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x52, 0x4d, 0x6b, 0x14, 0x41,
0x10, 0xdd, 0x89, 0x92, 0x60, 0x67, 0x89, 0xd2, 0x11, 0x0c, 0xe3, 0x07, 0x3a, 0x97, 0xe4, 0xe2,
0x8c, 0xac, 0xe0, 0x55, 0xb2, 0xc1, 0x43, 0xc0, 0x2c, 0x61, 0x02, 0x1e, 0x72, 0x59, 0x7a, 0xa6,
0x8b, 0xdd, 0xc2, 0x9e, 0xee, 0xb1, 0xbb, 0x66, 0x31, 0xb9, 0x78, 0xf3, 0x17, 0xf8, 0x7f, 0xfc,
0x6b, 0x32, 0xdd, 0xd9, 0x2f, 0x1c, 0x06, 0xc4, 0x43, 0x6e, 0x53, 0x3d, 0xaf, 0x5e, 0xbd, 0x7a,
0xf5, 0xd8, 0x61, 0x6d, 0xcd, 0xf7, 0x9b, 0xa9, 0x03, 0xbb, 0xc0, 0x12, 0xd2, 0xda, 0x1a, 0x32,
0x9c, 0x57, 0xa8, 0x16, 0x8d, 0x0b, 0x55, 0xea, 0x11, 0xf1, 0xb0, 0x34, 0x55, 0x65, 0x74, 0x78,
0x8b, 0x0f, 0x50, 0x13, 0x58, 0x2d, 0x54, 0xa8, 0x93, 0x1f, 0xec, 0x30, 0x87, 0x19, 0x3a, 0x02,
0x3b, 0x31, 0x12, 0x72, 0xf8, 0xd6, 0x80, 0x23, 0xfe, 0x8e, 0x3d, 0x2c, 0x84, 0x83, 0xa3, 0xe8,
0x75, 0x74, 0xb2, 0x3f, 0x7a, 0x91, 0x6e, 0xf1, 0xde, 0x11, 0x5e, 0xb8, 0xd9, 0x58, 0x38, 0xc8,
0x3d, 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, 0x8f, 0xba, 0xc8, 0xfa, 0xcf, 0x12, 0x3f,
0xef, 0x74, 0xe0, 0x8a, 0x04, 0x35, 0x2e, 0x19, 0x8c, 0x7e, 0x46, 0xec, 0x89, 0x77, 0xb0, 0xd5,
0xb2, 0x74, 0xf1, 0x1e, 0x84, 0x8c, 0x4f, 0xaf, 0x3f, 0xce, 0x90, 0xe6, 0x4d, 0xd1, 0xfe, 0xc9,
0x6e, 0x51, 0x29, 0xbc, 0x25, 0x28, 0xe7, 0x59, 0xe8, 0x7a, 0x2b, 0xd1, 0x91, 0xc5, 0xa2, 0x21,
0x90, 0xd9, 0x32, 0xfd, 0x99, 0xa7, 0xca, 0xfc, 0xf8, 0xba, 0x28, 0x76, 0x7d, 0xf9, 0xfe, 0x4f,
0x00, 0x00, 0x00, 0xff, 0xff, 0x25, 0x02, 0x4c, 0xbc, 0x21, 0x04, 0x00, 0x00,
// 403 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x92, 0x3f, 0xaf, 0xda, 0x30,
0x14, 0xc5, 0x49, 0x5b, 0x81, 0x6a, 0x10, 0xad, 0x4c, 0xa5, 0xa2, 0xf4, 0x8f, 0xda, 0x2c, 0xb0,
0x34, 0xa9, 0x82, 0xd4, 0xb5, 0x02, 0x26, 0x06, 0x10, 0x0a, 0x5b, 0x17, 0xe4, 0xc4, 0x57, 0x60,
0xc9, 0xb1, 0x53, 0xdb, 0x41, 0x2d, 0x4b, 0xb7, 0xae, 0x5d, 0xfa, 0x1d, 0xfb, 0x35, 0xaa, 0xd8,
0x84, 0xf7, 0xa2, 0x87, 0x78, 0xc3, 0x1b, 0xde, 0x96, 0xeb, 0xfc, 0x7c, 0x72, 0xee, 0x39, 0x41,
0x83, 0x42, 0xc9, 0x1f, 0x3f, 0xb7, 0x1a, 0xd4, 0x81, 0x65, 0x10, 0x16, 0x4a, 0x1a, 0x89, 0x71,
0xce, 0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x9b, 0xe3, 0x0a, 0x8c, 0xff, 0x79, 0xa8,
0xb7, 0xae, 0x1a, 0xdd, 0xb8, 0xca, 0x71, 0x86, 0x7a, 0xb7, 0x83, 0xc3, 0xa3, 0xf0, 0x6e, 0xfb,
0xe1, 0x85, 0x72, 0xfd, 0xf1, 0xfd, 0xa0, 0xeb, 0x20, 0x68, 0x61, 0x85, 0xde, 0x35, 0xb3, 0x70,
0x8e, 0xce, 0x89, 0xe0, 0xf8, 0x92, 0xd8, 0xf5, 0xf8, 0xfc, 0x6b, 0x35, 0x04, 0xad, 0xf8, 0xb7,
0x87, 0x5e, 0xda, 0x4d, 0x2b, 0x2f, 0xf5, 0xb6, 0x8f, 0x60, 0x64, 0x36, 0xfd, 0xf6, 0x75, 0xc7,
0xcc, 0xbe, 0x4c, 0xab, 0x37, 0xd1, 0x91, 0x71, 0xce, 0x8e, 0x06, 0xb2, 0x7d, 0xe4, 0x6e, 0x7d,
0xa2, 0x4c, 0x1b, 0xc5, 0xd2, 0xd2, 0x00, 0x8d, 0xea, 0x5f, 0x31, 0xb2, 0x52, 0x91, 0xfd, 0x7c,
0x91, 0xa6, 0x6d, 0x3b, 0x4e, 0xfe, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x2b, 0x26, 0x14, 0xaf,
0x03, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -258,7 +225,6 @@ 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 {
RegisterLink(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*RegisterLinkResponse, error)
RegisterNode(ctx context.Context, in *RegisterNodeRequest, opts ...grpc.CallOption) (*RegisterNodeResponse, error)
InvalidateCollectionMetaCache(ctx context.Context, in *InvalidateCollMetaCacheRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
}
@ -271,15 +237,6 @@ func NewProxyServiceClient(cc *grpc.ClientConn) ProxyServiceClient {
return &proxyServiceClient{cc}
}
func (c *proxyServiceClient) RegisterLink(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*RegisterLinkResponse, error) {
out := new(RegisterLinkResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.proxy.ProxyService/RegisterLink", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *proxyServiceClient) RegisterNode(ctx context.Context, in *RegisterNodeRequest, opts ...grpc.CallOption) (*RegisterNodeResponse, error) {
out := new(RegisterNodeResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.proxy.ProxyService/RegisterNode", in, out, opts...)
@ -300,7 +257,6 @@ func (c *proxyServiceClient) InvalidateCollectionMetaCache(ctx context.Context,
// ProxyServiceServer is the server API for ProxyService service.
type ProxyServiceServer interface {
RegisterLink(context.Context, *commonpb.Empty) (*RegisterLinkResponse, error)
RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error)
InvalidateCollectionMetaCache(context.Context, *InvalidateCollMetaCacheRequest) (*commonpb.Status, error)
}
@ -309,9 +265,6 @@ type ProxyServiceServer interface {
type UnimplementedProxyServiceServer struct {
}
func (*UnimplementedProxyServiceServer) RegisterLink(ctx context.Context, req *commonpb.Empty) (*RegisterLinkResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterLink not implemented")
}
func (*UnimplementedProxyServiceServer) RegisterNode(ctx context.Context, req *RegisterNodeRequest) (*RegisterNodeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterNode not implemented")
}
@ -323,24 +276,6 @@ func RegisterProxyServiceServer(s *grpc.Server, srv ProxyServiceServer) {
s.RegisterService(&_ProxyService_serviceDesc, srv)
}
func _ProxyService_RegisterLink_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).RegisterLink(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.proxy.ProxyService/RegisterLink",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProxyServiceServer).RegisterLink(ctx, req.(*commonpb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _ProxyService_RegisterNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegisterNodeRequest)
if err := dec(in); err != nil {
@ -381,10 +316,6 @@ var _ProxyService_serviceDesc = grpc.ServiceDesc{
ServiceName: "milvus.proto.proxy.ProxyService",
HandlerType: (*ProxyServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "RegisterLink",
Handler: _ProxyService_RegisterLink_Handler,
},
{
MethodName: "RegisterNode",
Handler: _ProxyService_RegisterNode_Handler,

View File

@ -66,6 +66,12 @@ func (pt *ParamTable) NetworkAddress() string {
}
func (pt *ParamTable) ProxyServiceAddress() string {
addressFromEnv := os.Getenv("PROXY_SERVICE_ADDRESS")
if len(addressFromEnv) > 0 {
// TODO: or write to param table?
return addressFromEnv
}
addr, err := pt.Load("proxyService.address")
if err != nil {
panic(err)

View File

@ -11,6 +11,8 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream/pulsarms"
grpcproxyservice "github.com/zilliztech/milvus-distributed/internal/distributed/proxyservice"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/opentracing/opentracing-go"
@ -32,6 +34,7 @@ type NodeImpl struct {
cancel func()
wg sync.WaitGroup
proxyServiceClient *grpcproxyservice.Client
initParams *internalpb2.InitParams
ip string
port int

View File

@ -0,0 +1,145 @@
package proxyservice
import (
"context"
"fmt"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
)
const (
timeoutInterval = time.Second * 10
)
func (s ServiceImpl) Init() error {
return nil
}
func (s *ServiceImpl) Start() error {
s.sched.Start()
return nil
}
func (s *ServiceImpl) Stop() error {
s.sched.Close()
return nil
}
func (s *ServiceImpl) GetComponentStates() (*internalpb2.ComponentStates, error) {
panic("implement me")
}
func (s *ServiceImpl) GetTimeTickChannel() (string, error) {
panic("implement me")
}
func (s *ServiceImpl) GetStatisticsChannel() (string, error) {
panic("implement me")
}
func (s *ServiceImpl) RegisterLink() (*milvuspb.RegisterLinkResponse, error) {
fmt.Println("register link")
ctx, cancel := context.WithTimeout(s.ctx, timeoutInterval)
defer cancel()
t := &RegisterLinkTask{
Condition: NewTaskCondition(ctx),
nodeInfos: s.nodeInfos,
}
var err error
err = s.sched.RegisterLinkTaskQueue.Enqueue(t)
if err != nil {
return &milvuspb.RegisterLinkResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: err.Error(),
},
Address: nil,
}, nil
}
err = t.WaitToFinish()
if err != nil {
return &milvuspb.RegisterLinkResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: err.Error(),
},
Address: nil,
}, nil
}
return t.response, nil
}
func (s *ServiceImpl) RegisterNode(request *proxypb.RegisterNodeRequest) (*proxypb.RegisterNodeResponse, error) {
fmt.Println("RegisterNode: ", request)
ctx, cancel := context.WithTimeout(s.ctx, timeoutInterval)
defer cancel()
t := &RegisterNodeTask{
request: request,
Condition: NewTaskCondition(ctx),
allocator: s.allocator,
nodeInfos: s.nodeInfos,
}
var err error
err = s.sched.RegisterNodeTaskQueue.Enqueue(t)
if err != nil {
return &proxypb.RegisterNodeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: err.Error(),
},
InitParams: nil,
}, nil
}
err = t.WaitToFinish()
if err != nil {
return &proxypb.RegisterNodeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: err.Error(),
},
InitParams: nil,
}, nil
}
return t.response, nil
}
func (s *ServiceImpl) InvalidateCollectionMetaCache(request *proxypb.InvalidateCollMetaCacheRequest) error {
fmt.Println("InvalidateCollectionMetaCache")
ctx, cancel := context.WithTimeout(s.ctx, timeoutInterval)
defer cancel()
t := &InvalidateCollectionMetaCacheTask{
request: request,
Condition: NewTaskCondition(ctx),
}
var err error
err = s.sched.RegisterNodeTaskQueue.Enqueue(t)
if err != nil {
return err
}
err = t.WaitToFinish()
if err != nil {
return err
}
return nil
}

View File

@ -0,0 +1,19 @@
package proxyservice
import (
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
type Component = typeutil.Component
type Service = typeutil.Service
type ProxyService interface {
Component
Service
RegisterLink() (*milvuspb.RegisterLinkResponse, error)
RegisterNode(request *proxypb.RegisterNodeRequest) (*proxypb.RegisterNodeResponse, error)
// TODO: i'm sure it's not a best way to keep consistency, fix me
InvalidateCollectionMetaCache(request *proxypb.InvalidateCollMetaCacheRequest) error
}

View File

@ -0,0 +1,116 @@
package proxyservice
import (
"fmt"
"math/rand"
"sync"
"time"
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
)
type NodeInfo struct {
ip string
port int64
}
// TODO: replace as real node client impl
type NodeClient interface {
InvalidateCollectionMetaCache(request *proxypb.InvalidateCollMetaCacheRequest) error
}
type FakeNodeClient struct {
}
func (c *FakeNodeClient) InvalidateCollectionMetaCache(request *proxypb.InvalidateCollMetaCacheRequest) error {
panic("implement me")
}
type GlobalNodeInfoTable struct {
mtx sync.RWMutex
nodeIDs []UniqueID
infos map[UniqueID]*NodeInfo
createClientMtx sync.RWMutex
// lazy creating, so len(clients) <= len(infos)
clients map[UniqueID]NodeClient
}
func (table *GlobalNodeInfoTable) randomPick() UniqueID {
rand.Seed(time.Now().UnixNano())
l := len(table.nodeIDs)
choice := rand.Intn(l)
return table.nodeIDs[choice]
}
func (table *GlobalNodeInfoTable) Pick() (*NodeInfo, error) {
table.mtx.RLock()
defer table.mtx.RUnlock()
if len(table.nodeIDs) <= 0 || len(table.infos) <= 0 {
return nil, errors.New("no available server node")
}
id := table.randomPick()
info, ok := table.infos[id]
if !ok {
// though impossible
return nil, errors.New("fix me, something wrong in pick algorithm")
}
return info, nil
}
func (table *GlobalNodeInfoTable) Register(id UniqueID, info *NodeInfo) error {
table.mtx.Lock()
defer table.mtx.Unlock()
_, ok := table.infos[id]
if !ok {
table.infos[id] = info
}
if !SliceContain(table.nodeIDs, id) {
table.nodeIDs = append(table.nodeIDs, id)
}
return nil
}
func (table *GlobalNodeInfoTable) createClients() error {
if len(table.clients) == len(table.infos) {
return nil
}
for nodeID, info := range table.infos {
_, ok := table.clients[nodeID]
if !ok {
// TODO: use info to create client
fmt.Println(info)
table.clients[nodeID] = &FakeNodeClient{}
}
}
return nil
}
func (table *GlobalNodeInfoTable) ObtainAllClients() (map[UniqueID]NodeClient, error) {
table.mtx.RLock()
defer table.mtx.RUnlock()
table.createClientMtx.Lock()
defer table.createClientMtx.Unlock()
err := table.createClients()
return table.clients, err
}
func NewGlobalNodeInfoTable() *GlobalNodeInfoTable {
return &GlobalNodeInfoTable{
nodeIDs: make([]UniqueID, 0),
infos: make(map[UniqueID]*NodeInfo),
clients: make(map[UniqueID]NodeClient),
}
}

View File

@ -0,0 +1,33 @@
package proxyservice
import (
"sync"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
type UniqueID = typeutil.UniqueID
type NodeIDAllocator interface {
AllocOne() UniqueID
}
type NaiveNodeIDAllocatorImpl struct {
mtx sync.Mutex
now UniqueID
}
func (allocator *NaiveNodeIDAllocatorImpl) AllocOne() UniqueID {
allocator.mtx.Lock()
defer func() {
allocator.now++
allocator.mtx.Unlock()
}()
return allocator.now
}
func NewNodeIDAllocator() NodeIDAllocator {
return &NaiveNodeIDAllocatorImpl{
now: 0,
}
}

View File

@ -1,54 +1,31 @@
package proxyservice
import (
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
"context"
"math/rand"
"time"
)
type ProxyService struct {
// implement Service
//nodeClients [] .Interface
// factory method
type ServiceImpl struct {
allocator NodeIDAllocator
sched *TaskScheduler
nodeInfos *GlobalNodeInfoTable
ctx context.Context
cancel context.CancelFunc
}
func (s ProxyService) Init() error {
panic("implement me")
}
func CreateProxyService(ctx context.Context) (ProxyService, error) {
rand.Seed(time.Now().UnixNano())
ctx1, cancel := context.WithCancel(ctx)
s := &ServiceImpl{
ctx: ctx1,
cancel: cancel,
}
func (s ProxyService) Start() error {
panic("implement me")
}
s.allocator = NewNodeIDAllocator()
s.sched = NewTaskScheduler(ctx1)
s.nodeInfos = NewGlobalNodeInfoTable()
func (s ProxyService) Stop() error {
panic("implement me")
}
func (s ProxyService) GetComponentStates() (*internalpb2.ComponentStates, error) {
panic("implement me")
}
func (s ProxyService) GetTimeTickChannel() (string, error) {
panic("implement me")
}
func (s ProxyService) GetStatisticsChannel() (string, error) {
panic("implement me")
}
func (s ProxyService) RegisterLink() (proxypb.RegisterLinkResponse, error) {
panic("implement me")
}
func (s ProxyService) RegisterNode(request proxypb.RegisterNodeRequest) (proxypb.RegisterNodeResponse, error) {
panic("implement me")
}
func (s ProxyService) InvalidateCollectionMetaCache(request proxypb.InvalidateCollMetaCacheRequest) error {
panic("implement me")
}
func NewProxyServiceImpl() interface{} {
return &ProxyService{}
return s, nil
}

View File

@ -0,0 +1,157 @@
package proxyservice
import (
"context"
"fmt"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
"github.com/zilliztech/milvus-distributed/internal/errors"
)
type TaskEnum = int
const (
FromSDK TaskEnum = 0
FromMaster TaskEnum = 1
FromNode TaskEnum = 2
)
type task interface {
PreExecute() error
Execute() error
PostExecute() error
WaitToFinish() error
Notify(err error)
}
type Condition interface {
WaitToFinish() error
Notify(err error)
}
type TaskCondition struct {
done chan error
ctx context.Context
}
func (c *TaskCondition) WaitToFinish() error {
select {
case <-c.ctx.Done():
return errors.New("timeout")
case err := <-c.done:
return err
}
}
func (c *TaskCondition) Notify(err error) {
c.done <- err
}
func NewTaskCondition(ctx context.Context) Condition {
return &TaskCondition{
done: make(chan error),
ctx: ctx,
}
}
type RegisterLinkTask struct {
Condition
response *milvuspb.RegisterLinkResponse
nodeInfos *GlobalNodeInfoTable
}
func (t *RegisterLinkTask) PreExecute() error {
return nil
}
func (t *RegisterLinkTask) Execute() error {
info, err := t.nodeInfos.Pick()
fmt.Println("info: ", info)
if err != nil {
return err
}
t.response = &milvuspb.RegisterLinkResponse{
Address: &commonpb.Address{
Ip: info.ip,
Port: info.port,
},
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
Reason: "",
},
}
return nil
}
func (t *RegisterLinkTask) PostExecute() error {
return nil
}
type RegisterNodeTask struct {
Condition
request *proxypb.RegisterNodeRequest
response *proxypb.RegisterNodeResponse
allocator NodeIDAllocator
nodeInfos *GlobalNodeInfoTable
}
func (t *RegisterNodeTask) PreExecute() error {
return nil
}
func (t *RegisterNodeTask) Execute() error {
nodeID := t.allocator.AllocOne()
info := NodeInfo{
ip: t.request.Address.Ip,
port: t.request.Address.Port,
}
err := t.nodeInfos.Register(nodeID, &info)
// TODO: fill init params
t.response = &proxypb.RegisterNodeResponse{
InitParams: &internalpb2.InitParams{
NodeID: nodeID,
StartParams: nil,
},
}
return err
}
func (t *RegisterNodeTask) PostExecute() error {
return nil
}
type InvalidateCollectionMetaCacheTask struct {
Condition
request *proxypb.InvalidateCollMetaCacheRequest
nodeInfos *GlobalNodeInfoTable
}
func (t *InvalidateCollectionMetaCacheTask) PreExecute() error {
return nil
}
func (t *InvalidateCollectionMetaCacheTask) Execute() error {
var err error
clients, err := t.nodeInfos.ObtainAllClients()
if err != nil {
return err
}
for _, c := range clients {
err = c.InvalidateCollectionMetaCache(t.request)
if err != nil {
return err
}
}
return nil
}
func (t *InvalidateCollectionMetaCacheTask) PostExecute() error {
return nil
}

View File

@ -0,0 +1,92 @@
package proxyservice
import (
"container/list"
"log"
"sync"
"github.com/zilliztech/milvus-distributed/internal/errors"
)
type TaskQueue interface {
Chan() <-chan int
Empty() bool
Full() bool
addTask(t task) error
FrontTask() task
PopTask() task
Enqueue(t task) error
}
type BaseTaskQueue struct {
tasks *list.List
mtx sync.Mutex
// maxTaskNum should keep still
maxTaskNum int64
bufChan chan int // to block scheduler
}
func (queue *BaseTaskQueue) Chan() <-chan int {
return queue.bufChan
}
func (queue *BaseTaskQueue) Empty() bool {
return queue.tasks.Len() <= 0
}
func (queue *BaseTaskQueue) Full() bool {
return int64(queue.tasks.Len()) >= queue.maxTaskNum
}
func (queue *BaseTaskQueue) addTask(t task) error {
queue.mtx.Lock()
defer queue.mtx.Unlock()
if queue.Full() {
return errors.New("task queue is full")
}
queue.tasks.PushBack(t)
queue.bufChan <- 1
return nil
}
func (queue *BaseTaskQueue) FrontTask() task {
queue.mtx.Lock()
defer queue.mtx.Unlock()
if queue.tasks.Len() <= 0 {
log.Panic("sorry, but the task list is empty!")
return nil
}
return queue.tasks.Front().Value.(task)
}
func (queue *BaseTaskQueue) PopTask() task {
queue.mtx.Lock()
defer queue.mtx.Unlock()
if queue.tasks.Len() <= 0 {
log.Panic("sorry, but the task list is empty!")
return nil
}
ft := queue.tasks.Front()
queue.tasks.Remove(ft)
return ft.Value.(task)
}
func (queue *BaseTaskQueue) Enqueue(t task) error {
return queue.addTask(t)
}
func NewBaseTaskQueue() TaskQueue {
return &BaseTaskQueue{
tasks: list.New(),
maxTaskNum: 1024,
bufChan: make(chan int, 1024),
}
}

View File

@ -0,0 +1,119 @@
package proxyservice
import (
"context"
"sync"
)
type TaskScheduler struct {
RegisterLinkTaskQueue TaskQueue
RegisterNodeTaskQueue TaskQueue
InvalidateCollectionMetaCacheTaskQueue TaskQueue
wg sync.WaitGroup
ctx context.Context
cancel context.CancelFunc
}
func NewTaskScheduler(ctx context.Context) *TaskScheduler {
ctx1, cancel := context.WithCancel(ctx)
return &TaskScheduler{
RegisterLinkTaskQueue: NewBaseTaskQueue(),
RegisterNodeTaskQueue: NewBaseTaskQueue(),
InvalidateCollectionMetaCacheTaskQueue: NewBaseTaskQueue(),
ctx: ctx1,
cancel: cancel,
}
}
func (sched *TaskScheduler) scheduleRegisterLinkTask() task {
return sched.RegisterLinkTaskQueue.PopTask()
}
func (sched *TaskScheduler) scheduleRegisterNodeTask() task {
return sched.RegisterNodeTaskQueue.PopTask()
}
func (sched *TaskScheduler) scheduleInvalidateCollectionMetaCacheTask() task {
return sched.InvalidateCollectionMetaCacheTaskQueue.PopTask()
}
func (sched *TaskScheduler) processTask(t task, q TaskQueue) {
var err error
err = t.PreExecute()
defer func() {
t.Notify(err)
}()
if err != nil {
return
}
err = t.Execute()
if err != nil {
return
}
err = t.PostExecute()
}
func (sched *TaskScheduler) registerLinkLoop() {
defer sched.wg.Done()
for {
select {
case <-sched.ctx.Done():
return
case <-sched.RegisterLinkTaskQueue.Chan():
if !sched.RegisterLinkTaskQueue.Empty() {
t := sched.scheduleRegisterLinkTask()
go sched.processTask(t, sched.RegisterLinkTaskQueue)
}
}
}
}
func (sched *TaskScheduler) registerNodeLoop() {
defer sched.wg.Done()
for {
select {
case <-sched.ctx.Done():
return
case <-sched.RegisterNodeTaskQueue.Chan():
if !sched.RegisterNodeTaskQueue.Empty() {
t := sched.scheduleRegisterNodeTask()
go sched.processTask(t, sched.RegisterNodeTaskQueue)
}
}
}
}
func (sched *TaskScheduler) invalidateCollectionMetaCacheLoop() {
defer sched.wg.Done()
for {
select {
case <-sched.ctx.Done():
return
case <-sched.InvalidateCollectionMetaCacheTaskQueue.Chan():
if !sched.InvalidateCollectionMetaCacheTaskQueue.Empty() {
t := sched.scheduleInvalidateCollectionMetaCacheTask()
go sched.processTask(t, sched.InvalidateCollectionMetaCacheTaskQueue)
}
}
}
}
func (sched *TaskScheduler) Start() {
sched.wg.Add(1)
go sched.registerLinkLoop()
sched.wg.Add(1)
go sched.registerNodeLoop()
sched.wg.Add(1)
go sched.invalidateCollectionMetaCacheLoop()
}
func (sched *TaskScheduler) Close() {
sched.cancel()
sched.wg.Wait()
}

View File

@ -0,0 +1,21 @@
package proxyservice
import (
"reflect"
)
// what if golang support generic programming
func SliceContain(s interface{}, item interface{}) bool {
ss := reflect.ValueOf(s)
if ss.Kind() != reflect.Slice {
panic("SliceContain expect a slice")
}
for i := 0; i < ss.Len(); i++ {
if ss.Index(i).Interface() == item {
return true
}
}
return false
}

View File

@ -4,5 +4,5 @@ numpy==1.18.1
pytest==5.3.4
pytest-cov==2.8.1
pytest-timeout==1.3.4
pymilvus-distributed==0.0.16
pymilvus-distributed==0.0.17
sklearn==0.0