From 44c75bdd2a7951439ef3424f27b201e2604ea81e Mon Sep 17 00:00:00 2001 From: yukun Date: Fri, 15 Jan 2021 20:12:26 +0800 Subject: [PATCH] Add consume function in rocksmq Signed-off-by: yukun --- internal/core/src/query/CMakeLists.txt | 3 +- internal/core/src/query/Expr.h | 2 + internal/core/src/query/Plan.cpp | 1 + .../query/{SearchOnGrowing.cpp => Search.cpp} | 40 +- .../src/query/{SearchOnGrowing.h => Search.h} | 28 +- internal/core/src/query/SearchOnSealed.h | 2 +- internal/core/src/query/SubQueryResult.h | 2 +- .../src/query/generated/ExecPlanNodeVisitor.h | 5 - .../query/visitors/ExecPlanNodeVisitor.cpp | 45 +- internal/core/src/segcore/ConcurrentVector.h | 1 + internal/core/src/segcore/IndexingEntry.cpp | 3 + internal/core/src/segcore/IndexingEntry.h | 7 +- .../core/src/segcore/SegmentGrowingImpl.h | 18 +- internal/core/src/segcore/SegmentInterface.h | 22 - internal/core/src/segcore/collection_c.cpp | 3 +- internal/core/src/segcore/segment_c.cpp | 9 + internal/proto/milvus.proto | 75 +- internal/proto/milvuspb/milvus.pb.go | 1367 +++++++++++++++-- internal/proxyservice/interface.go | 16 + internal/proxyservice/proxyservice.go | 54 + internal/util/rocksmq/rocksmq.go | 83 +- 21 files changed, 1549 insertions(+), 237 deletions(-) rename internal/core/src/query/{SearchOnGrowing.cpp => Search.cpp} (81%) rename internal/core/src/query/{SearchOnGrowing.h => Search.h} (57%) create mode 100644 internal/proxyservice/interface.go create mode 100644 internal/proxyservice/proxyservice.go diff --git a/internal/core/src/query/CMakeLists.txt b/internal/core/src/query/CMakeLists.txt index 06b15ababe..d26b2a3a9d 100644 --- a/internal/core/src/query/CMakeLists.txt +++ b/internal/core/src/query/CMakeLists.txt @@ -1,3 +1,4 @@ +# TODO set(MILVUS_QUERY_SRCS deprecated/BinaryQuery.cpp generated/PlanNode.cpp @@ -9,7 +10,7 @@ set(MILVUS_QUERY_SRCS visitors/VerifyPlanNodeVisitor.cpp visitors/VerifyExprVisitor.cpp Plan.cpp - SearchOnGrowing.cpp + Search.cpp SearchOnSealed.cpp SearchOnIndex.cpp SearchBruteForce.cpp diff --git a/internal/core/src/query/Expr.h b/internal/core/src/query/Expr.h index 30816bfa82..255e31fcdd 100644 --- a/internal/core/src/query/Expr.h +++ b/internal/core/src/query/Expr.h @@ -40,6 +40,7 @@ struct UnaryExpr : Expr { ExprPtr child_; }; +// TODO: not enabled in sprint 1 struct BoolUnaryExpr : UnaryExpr { enum class OpType { LogicalNot }; OpType op_type_; @@ -49,6 +50,7 @@ struct BoolUnaryExpr : UnaryExpr { accept(ExprVisitor&) override; }; +// TODO: not enabled in sprint 1 struct BoolBinaryExpr : BinaryExpr { // Note: bitA - bitB == bitA & ~bitB, alias to LogicalMinus enum class OpType { LogicalAnd, LogicalOr, LogicalXor, LogicalMinus }; diff --git a/internal/core/src/query/Plan.cpp b/internal/core/src/query/Plan.cpp index 8fc1cc804d..5dc83a4b3a 100644 --- a/internal/core/src/query/Plan.cpp +++ b/internal/core/src/query/Plan.cpp @@ -187,6 +187,7 @@ Parser::ParseTermNode(const Json& out_body) { std::unique_ptr Parser::ParseVecNode(const Json& out_body) { Assert(out_body.is_object()); + // TODO add binary info Assert(out_body.size() == 1); auto iter = out_body.begin(); auto field_name = FieldName(iter.key()); diff --git a/internal/core/src/query/SearchOnGrowing.cpp b/internal/core/src/query/Search.cpp similarity index 81% rename from internal/core/src/query/SearchOnGrowing.cpp rename to internal/core/src/query/Search.cpp index 46aecb3431..3ba611637b 100644 --- a/internal/core/src/query/SearchOnGrowing.cpp +++ b/internal/core/src/query/Search.cpp @@ -9,7 +9,7 @@ // 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 -#include "SearchOnGrowing.h" +#include "Search.h" #include #include #include "segcore/Reduce.h" @@ -65,6 +65,7 @@ FloatSearch(const segcore::SegmentGrowingImpl& segment, auto topK = info.topK_; auto total_count = topK * num_queries; auto metric_type = GetMetricType(info.metric_type_); + // TODO: optimize // step 3: small indexing search // std::vector final_uids(total_count, -1); @@ -76,9 +77,10 @@ FloatSearch(const segcore::SegmentGrowingImpl& segment, const auto& indexing_entry = indexing_record.get_vec_entry(vecfield_offset); auto search_conf = indexing_entry.get_search_conf(topK); + // TODO: use sub_qr for (int chunk_id = 0; chunk_id < max_indexed_id; ++chunk_id) { auto chunk_size = indexing_entry.get_chunk_size(); - auto indexing = indexing_entry.get_indexing(chunk_id); + auto indexing = indexing_entry.get_vec_indexing(chunk_id); auto sub_view = BitsetSubView(bitset, chunk_id * chunk_size, chunk_size); auto sub_qr = SearchOnIndex(query_dataset, *indexing, search_conf, sub_view); @@ -195,38 +197,4 @@ BinarySearch(const segcore::SegmentGrowingImpl& segment, return Status::OK(); } -// TODO: refactor and merge this into one -template -void -SearchOnGrowing(const segcore::SegmentGrowingImpl& segment, - const query::QueryInfo& info, - const EmbeddedType* query_data, - int64_t num_queries, - Timestamp timestamp, - const faiss::BitsetView& bitset, - QueryResult& results) { - static_assert(IsVector); - if constexpr (std::is_same_v) { - FloatSearch(segment, info, query_data, num_queries, timestamp, bitset, results); - } else { - BinarySearch(segment, info, query_data, num_queries, timestamp, bitset, results); - } -} -template void -SearchOnGrowing(const segcore::SegmentGrowingImpl& segment, - const query::QueryInfo& info, - const EmbeddedType* query_data, - int64_t num_queries, - Timestamp timestamp, - const faiss::BitsetView& bitset, - QueryResult& results); -template void -SearchOnGrowing(const segcore::SegmentGrowingImpl& segment, - const query::QueryInfo& info, - const EmbeddedType* query_data, - int64_t num_queries, - Timestamp timestamp, - const faiss::BitsetView& bitset, - QueryResult& results); - } // namespace milvus::query diff --git a/internal/core/src/query/SearchOnGrowing.h b/internal/core/src/query/Search.h similarity index 57% rename from internal/core/src/query/SearchOnGrowing.h rename to internal/core/src/query/Search.h index 003bdcf35b..3aa8d1ec9b 100644 --- a/internal/core/src/query/SearchOnGrowing.h +++ b/internal/core/src/query/Search.h @@ -20,13 +20,23 @@ namespace milvus::query { using BitmapChunk = boost::dynamic_bitset<>; using BitmapSimple = std::deque; -template -void -SearchOnGrowing(const segcore::SegmentGrowingImpl& segment, - const query::QueryInfo& info, - const EmbeddedType* query_data, - int64_t num_queries, - Timestamp timestamp, - const faiss::BitsetView& bitset, - QueryResult& results); +// TODO: merge these two search into one +// note: c++17 don't support optional ref +Status +FloatSearch(const segcore::SegmentGrowingImpl& segment, + const QueryInfo& info, + const float* query_data, + int64_t num_queries, + Timestamp timestamp, + const faiss::BitsetView& bitset, + QueryResult& results); + +Status +BinarySearch(const segcore::SegmentGrowingImpl& segment, + const query::QueryInfo& info, + const uint8_t* query_data, + int64_t num_queries, + Timestamp timestamp, + const faiss::BitsetView& bitset, + QueryResult& results); } // namespace milvus::query diff --git a/internal/core/src/query/SearchOnSealed.h b/internal/core/src/query/SearchOnSealed.h index 227f1a15ce..01f3864e0d 100644 --- a/internal/core/src/query/SearchOnSealed.h +++ b/internal/core/src/query/SearchOnSealed.h @@ -13,7 +13,7 @@ #include "segcore/SealedIndexingRecord.h" #include "query/PlanNode.h" -#include "query/SearchOnGrowing.h" +#include "query/Search.h" namespace milvus::query { diff --git a/internal/core/src/query/SubQueryResult.h b/internal/core/src/query/SubQueryResult.h index 7bb498039b..6cf7aace58 100644 --- a/internal/core/src/query/SubQueryResult.h +++ b/internal/core/src/query/SubQueryResult.h @@ -33,7 +33,7 @@ class SubQueryResult { static constexpr bool is_descending(MetricType metric_type) { - // TODO(dog): more types + // TODO if (metric_type == MetricType::METRIC_INNER_PRODUCT) { return true; } else { diff --git a/internal/core/src/query/generated/ExecPlanNodeVisitor.h b/internal/core/src/query/generated/ExecPlanNodeVisitor.h index 08ac2f694e..2cd629edf5 100644 --- a/internal/core/src/query/generated/ExecPlanNodeVisitor.h +++ b/internal/core/src/query/generated/ExecPlanNodeVisitor.h @@ -46,11 +46,6 @@ class ExecPlanNodeVisitor : public PlanNodeVisitor { return ret; } - private: - template - void - VectorVisitorImpl(VectorPlanNode& node); - private: // std::optional ret_; const segcore::SegmentGrowing& segment_; diff --git a/internal/core/src/query/visitors/ExecPlanNodeVisitor.cpp b/internal/core/src/query/visitors/ExecPlanNodeVisitor.cpp index e43837a060..fbe99079c4 100644 --- a/internal/core/src/query/visitors/ExecPlanNodeVisitor.cpp +++ b/internal/core/src/query/visitors/ExecPlanNodeVisitor.cpp @@ -16,7 +16,7 @@ #include "query/generated/ExecPlanNodeVisitor.h" #include "segcore/SegmentGrowingImpl.h" #include "query/generated/ExecExprVisitor.h" -#include "query/SearchOnGrowing.h" +#include "query/Search.h" #include "query/SearchOnSealed.h" namespace milvus::query { @@ -45,11 +45,6 @@ class ExecPlanNodeVisitor : PlanNodeVisitor { return ret; } - private: - template - void - VectorVisitorImpl(VectorPlanNode& node); - private: // std::optional ret_; const segcore::SegmentGrowing& segment_; @@ -61,16 +56,15 @@ class ExecPlanNodeVisitor : PlanNodeVisitor { } // namespace impl #endif -template void -ExecPlanNodeVisitor::VectorVisitorImpl(VectorPlanNode& node) { +ExecPlanNodeVisitor::visit(FloatVectorANNS& node) { // TODO: optimize here, remove the dynamic cast assert(!ret_.has_value()); auto segment = dynamic_cast(&segment_); AssertInfo(segment, "support SegmentSmallIndex Only"); RetType ret; auto& ph = placeholder_group_.at(0); - auto src_data = ph.get_blob>(); + auto src_data = ph.get_blob(); auto num_queries = ph.num_of_queries_; aligned_vector bitset_holder; @@ -86,20 +80,39 @@ ExecPlanNodeVisitor::VectorVisitorImpl(VectorPlanNode& node) { SearchOnSealed(segment->get_schema(), sealed_indexing, node.query_info_, src_data, num_queries, timestamp_, view, ret); } else { - SearchOnGrowing(*segment, node.query_info_, src_data, num_queries, timestamp_, view, ret); + FloatSearch(*segment, node.query_info_, src_data, num_queries, timestamp_, view, ret); } ret_ = ret; } -void -ExecPlanNodeVisitor::visit(FloatVectorANNS& node) { - VectorVisitorImpl(node); -} - void ExecPlanNodeVisitor::visit(BinaryVectorANNS& node) { - VectorVisitorImpl(node); + // TODO: optimize here, remove the dynamic cast + assert(!ret_.has_value()); + auto segment = dynamic_cast(&segment_); + AssertInfo(segment, "support SegmentSmallIndex Only"); + RetType ret; + auto& ph = placeholder_group_.at(0); + auto src_data = ph.get_blob(); + auto num_queries = ph.num_of_queries_; + + aligned_vector bitset_holder; + BitsetView view; + if (node.predicate_.has_value()) { + ExecExprVisitor::RetType expr_ret = ExecExprVisitor(*segment).call_child(*node.predicate_.value()); + bitset_holder = AssembleNegBitmap(expr_ret); + view = BitsetView(bitset_holder.data(), bitset_holder.size() * 8); + } + + auto& sealed_indexing = segment->get_sealed_indexing_record(); + if (sealed_indexing.is_ready(node.query_info_.field_offset_)) { + SearchOnSealed(segment->get_schema(), sealed_indexing, node.query_info_, src_data, num_queries, timestamp_, + view, ret); + } else { + BinarySearch(*segment, node.query_info_, src_data, num_queries, timestamp_, view, ret); + } + ret_ = ret; } } // namespace milvus::query diff --git a/internal/core/src/segcore/ConcurrentVector.h b/internal/core/src/segcore/ConcurrentVector.h index 87cfd76ac8..f883d0bc39 100644 --- a/internal/core/src/segcore/ConcurrentVector.h +++ b/internal/core/src/segcore/ConcurrentVector.h @@ -39,6 +39,7 @@ class ThreadSafeVector { if (size <= size_) { return; } + // TODO: use multithread to speedup std::lock_guard lck(mutex_); while (vec_.size() < size) { vec_.emplace_back(std::forward(args...)); diff --git a/internal/core/src/segcore/IndexingEntry.cpp b/internal/core/src/segcore/IndexingEntry.cpp index 1cd6405955..16545544cd 100644 --- a/internal/core/src/segcore/IndexingEntry.cpp +++ b/internal/core/src/segcore/IndexingEntry.cpp @@ -17,6 +17,8 @@ namespace milvus::segcore { void VecIndexingEntry::BuildIndexRange(int64_t ack_beg, int64_t ack_end, const VectorBase* vec_base) { + // TODO + assert(field_meta_.get_data_type() == DataType::VECTOR_FLOAT); auto dim = field_meta_.get_dim(); @@ -29,6 +31,7 @@ VecIndexingEntry::BuildIndexRange(int64_t ack_beg, int64_t ack_end, const Vector for (int chunk_id = ack_beg; chunk_id < ack_end; chunk_id++) { const auto& chunk = source->get_chunk(chunk_id); // build index for chunk + // TODO auto indexing = std::make_unique(); auto dataset = knowhere::GenDataset(source->get_chunk_size(), dim, chunk.data()); indexing->Train(dataset, conf); diff --git a/internal/core/src/segcore/IndexingEntry.h b/internal/core/src/segcore/IndexingEntry.h index f790f5e1a1..a4cde732a5 100644 --- a/internal/core/src/segcore/IndexingEntry.h +++ b/internal/core/src/segcore/IndexingEntry.h @@ -47,9 +47,6 @@ class IndexingEntry { return chunk_size_; } - virtual knowhere::Index* - get_indexing(int64_t chunk_id) const = 0; - protected: // additional info const FieldMeta& field_meta_; @@ -65,7 +62,7 @@ class ScalarIndexingEntry : public IndexingEntry { // concurrent knowhere::scalar::StructuredIndex* - get_indexing(int64_t chunk_id) const override { + get_indexing(int64_t chunk_id) const { Assert(!field_meta_.is_vector()); return data_.at(chunk_id).get(); } @@ -83,7 +80,7 @@ class VecIndexingEntry : public IndexingEntry { // concurrent knowhere::VecIndex* - get_indexing(int64_t chunk_id) const override { + get_vec_indexing(int64_t chunk_id) const { Assert(field_meta_.is_vector()); return data_.at(chunk_id).get(); } diff --git a/internal/core/src/segcore/SegmentGrowingImpl.h b/internal/core/src/segcore/SegmentGrowingImpl.h index 15d129c355..d3f05972ba 100644 --- a/internal/core/src/segcore/SegmentGrowingImpl.h +++ b/internal/core/src/segcore/SegmentGrowingImpl.h @@ -39,6 +39,8 @@ class SegmentGrowingImpl : public SegmentGrowing { int64_t PreInsert(int64_t size) override; + // TODO: originally, id should be put into data_chunk + // TODO: Is it ok to put them the other side? Status Insert(int64_t reserved_offset, int64_t size, @@ -93,22 +95,6 @@ class SegmentGrowingImpl : public SegmentGrowing { return *schema_; } - // return count of index that has index, i.e., [0, num_chunk_index) have built index - int64_t - num_chunk_index_safe(FieldOffset field_offset) const final { - return indexing_record_.get_finished_ack(); - } - - const knowhere::Index* - chunk_index_impl(FieldOffset field_offset, int64_t chunk_id) const final { - return indexing_record_.get_entry(field_offset).get_indexing(chunk_id); - } - - int64_t - chunk_size() const final { - return chunk_size_; - } - public: ssize_t get_row_count() const override { diff --git a/internal/core/src/segcore/SegmentInterface.h b/internal/core/src/segcore/SegmentInterface.h index 34c18b53ee..4ad2177e34 100644 --- a/internal/core/src/segcore/SegmentInterface.h +++ b/internal/core/src/segcore/SegmentInterface.h @@ -14,8 +14,6 @@ #include "common/Schema.h" #include "query/Plan.h" #include "common/Span.h" -#include "IndexingEntry.h" -#include namespace milvus::segcore { @@ -54,30 +52,10 @@ class SegmentInternalInterface : public SegmentInterface { return static_cast>(chunk_data_impl(field_offset, chunk_id)); } - virtual int64_t - num_chunk_index_safe(FieldOffset field_offset) const = 0; - - template - const knowhere::scalar::StructuredIndex& - chunk_scalar_index(FieldOffset field_offset, int64_t chunk_id) const { - static_assert(IsScalar); - using IndexType = knowhere::scalar::StructuredIndex; - auto base_ptr = chunk_index_impl(field_offset, chunk_id); - auto ptr = dynamic_cast(base_ptr); - AssertInfo(ptr, "entry mismatch"); - return *ptr; - } - - virtual int64_t - chunk_size() const = 0; - protected: // blob and row_count virtual SpanBase chunk_data_impl(FieldOffset field_offset, int64_t chunk_id) const = 0; - - virtual const knowhere::Index* - chunk_index_impl(FieldOffset field_offset, int64_t chunk_id) const = 0; }; } // namespace milvus::segcore diff --git a/internal/core/src/segcore/collection_c.cpp b/internal/core/src/segcore/collection_c.cpp index 34476504cf..feb5fc7bf1 100644 --- a/internal/core/src/segcore/collection_c.cpp +++ b/internal/core/src/segcore/collection_c.cpp @@ -19,6 +19,7 @@ NewCollection(const char* schema_proto_blob) { auto collection = std::make_unique(proto); + // TODO: delete print std::cout << "create collection " << collection->get_collection_name() << std::endl; return (void*)collection.release(); @@ -28,8 +29,8 @@ void DeleteCollection(CCollection collection) { auto col = (milvus::segcore::Collection*)collection; + // TODO: delete print std::cout << "delete collection " << col->get_collection_name() << std::endl; - delete col; } diff --git a/internal/core/src/segcore/segment_c.cpp b/internal/core/src/segcore/segment_c.cpp index 523af18427..d7e6d36638 100644 --- a/internal/core/src/segcore/segment_c.cpp +++ b/internal/core/src/segcore/segment_c.cpp @@ -27,6 +27,7 @@ NewSegment(CCollection collection, uint64_t segment_id) { auto segment = milvus::segcore::CreateGrowingSegment(col->get_schema()); + // TODO: delete print std::cout << "create segment " << segment_id << std::endl; return (void*)segment.release(); } @@ -35,6 +36,7 @@ void DeleteSegment(CSegmentBase segment) { auto s = (milvus::segcore::SegmentGrowing*)segment; + // TODO: delete print std::cout << "delete segment " << std::endl; delete s; } @@ -76,12 +78,17 @@ Insert(CSegmentBase c_segment, status.error_msg = strdup(e.what()); return status; } + + // TODO: delete print + // std::cout << "do segment insert, sizeof_per_row = " << sizeof_per_row << std::endl; } int64_t PreInsert(CSegmentBase c_segment, int64_t size) { auto segment = (milvus::segcore::SegmentGrowing*)c_segment; + // TODO: delete print + // std::cout << "PreInsert segment " << std::endl; return segment->PreInsert(size); } @@ -109,6 +116,8 @@ int64_t PreDelete(CSegmentBase c_segment, int64_t size) { auto segment = (milvus::segcore::SegmentGrowing*)c_segment; + // TODO: delete print + // std::cout << "PreDelete segment " << std::endl; return segment->PreDelete(size); } diff --git a/internal/proto/milvus.proto b/internal/proto/milvus.proto index be31d5e042..6be24a6383 100644 --- a/internal/proto/milvus.proto +++ b/internal/proto/milvus.proto @@ -5,11 +5,13 @@ option go_package = "github.com/zilliztech/milvus-distributed/internal/proto/mil import "common.proto"; import "internal.proto"; +import "schema.proto"; message CreateCollectionRequest { internal.MsgBase base = 1; string db_name = 2; string collectionName = 3; + // `schema` is the serialized `schema.CollectionSchema` bytes schema = 4; } @@ -26,6 +28,11 @@ message HasCollectionRequest { string collection_name = 3; } +message BoolResponse { + common.Status status = 1; + bool value = 2; +} + message DescribeCollectionRequest { internal.MsgBase base = 1; string db_name = 2; @@ -33,7 +40,8 @@ message DescribeCollectionRequest { } message DescribeCollectionResponse { - repeated bytes schema = 1; + common.Status status = 1; + schema.CollectionSchema schema = 2; } message LoadCollectionRequest { @@ -56,6 +64,7 @@ message CollectionStatsRequest { message CollectionStatsResponse { repeated common.KeyValuePair stats = 1; + common.Status status = 2; } @@ -66,6 +75,7 @@ message ShowCollectionRequest { message ShowCollectionResponse { repeated string collection_names = 1; + common.Status status = 2; } @@ -114,6 +124,7 @@ message PartitionStatsRequest { message PartitionStatsResponse { repeated common.KeyValuePair stats = 1; + common.Status status = 2; } message ShowPartitionRequest { @@ -124,6 +135,7 @@ message ShowPartitionRequest { message ShowPartitionResponse { repeated string partition_names = 1; + common.Status status = 2; } @@ -149,6 +161,7 @@ message IndexDescription { message DescribeIndexResponse { repeated IndexDescription index_descriptions = 1; + common.Status status = 2; } message InsertRequest { @@ -163,6 +176,24 @@ message InsertRequest { message InsertResponse { int64 rowID_begin = 1; int64 rowID_end = 2; + common.Status status = 3; +} + +enum PlaceholderType { + NONE = 0; + VECTOR_BINARY = 100; + VECTOR_FLOAT = 101; +} + +message PlaceholderValue { + string tag = 1; + PlaceholderType type = 2; + // values is a 2d-array, every array contains a vector + repeated bytes values = 3; +} + +message PlaceholderGroup { + repeated PlaceholderValue placeholders = 1; } message SearchRequest { @@ -171,11 +202,49 @@ message SearchRequest { string collection_name = 3; repeated string partition_names = 4; string dsl = 5; - repeated bytes placeholder_group = 6; + // serialized `PlaceholderGroup` + bytes placeholder_group = 6; +} + +message Hits { + repeated int64 IDs = 1; + repeated bytes row_data = 2; + repeated float scores = 3; +} + +message QueryResult { + common.Status status = 1; + repeated bytes hits = 2; } message FlushRequest { internal.MsgBase base = 1; string db_name = 2; string collection_name = 3; -} \ No newline at end of file +} + +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 Insert(InsertRequest) returns (InsertResponse) {} + rpc Search(SearchRequest) returns (QueryResult) {} + rpc Flush(FlushRequest) returns (common.Status) {} +} diff --git a/internal/proto/milvuspb/milvus.pb.go b/internal/proto/milvuspb/milvus.pb.go index dc330e557e..0ff875d43c 100644 --- a/internal/proto/milvuspb/milvus.pb.go +++ b/internal/proto/milvuspb/milvus.pb.go @@ -4,10 +4,15 @@ package milvuspb import ( + context "context" 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" + schemapb "github.com/zilliztech/milvus-distributed/internal/proto/schemapb" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" math "math" ) @@ -22,14 +27,43 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +type PlaceholderType int32 + +const ( + PlaceholderType_NONE PlaceholderType = 0 + PlaceholderType_VECTOR_BINARY PlaceholderType = 100 + PlaceholderType_VECTOR_FLOAT PlaceholderType = 101 +) + +var PlaceholderType_name = map[int32]string{ + 0: "NONE", + 100: "VECTOR_BINARY", + 101: "VECTOR_FLOAT", +} + +var PlaceholderType_value = map[string]int32{ + "NONE": 0, + "VECTOR_BINARY": 100, + "VECTOR_FLOAT": 101, +} + +func (x PlaceholderType) String() string { + return proto.EnumName(PlaceholderType_name, int32(x)) +} + +func (PlaceholderType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_02345ba45cc0e303, []int{0} +} + type CreateCollectionRequest struct { - Base *internalpb2.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` - CollectionName string `protobuf:"bytes,3,opt,name=collectionName,proto3" json:"collectionName,omitempty"` - Schema []byte `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Base *internalpb2.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` + CollectionName string `protobuf:"bytes,3,opt,name=collectionName,proto3" json:"collectionName,omitempty"` + // `schema` is the serialized `schema.CollectionSchema` + Schema []byte `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CreateCollectionRequest) Reset() { *m = CreateCollectionRequest{} } @@ -195,6 +229,53 @@ func (m *HasCollectionRequest) GetCollectionName() string { return "" } +type BoolResponse struct { + Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Value bool `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoolResponse) Reset() { *m = BoolResponse{} } +func (m *BoolResponse) String() string { return proto.CompactTextString(m) } +func (*BoolResponse) ProtoMessage() {} +func (*BoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_02345ba45cc0e303, []int{3} +} + +func (m *BoolResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BoolResponse.Unmarshal(m, b) +} +func (m *BoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BoolResponse.Marshal(b, m, deterministic) +} +func (m *BoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoolResponse.Merge(m, src) +} +func (m *BoolResponse) XXX_Size() int { + return xxx_messageInfo_BoolResponse.Size(m) +} +func (m *BoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BoolResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_BoolResponse proto.InternalMessageInfo + +func (m *BoolResponse) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *BoolResponse) GetValue() bool { + if m != nil { + return m.Value + } + return false +} + type DescribeCollectionRequest struct { Base *internalpb2.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` @@ -208,7 +289,7 @@ func (m *DescribeCollectionRequest) Reset() { *m = DescribeCollectionReq func (m *DescribeCollectionRequest) String() string { return proto.CompactTextString(m) } func (*DescribeCollectionRequest) ProtoMessage() {} func (*DescribeCollectionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{3} + return fileDescriptor_02345ba45cc0e303, []int{4} } func (m *DescribeCollectionRequest) XXX_Unmarshal(b []byte) error { @@ -251,17 +332,18 @@ func (m *DescribeCollectionRequest) GetCollectionName() string { } type DescribeCollectionResponse struct { - Schema [][]byte `protobuf:"bytes,1,rep,name=schema,proto3" json:"schema,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Schema *schemapb.CollectionSchema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DescribeCollectionResponse) Reset() { *m = DescribeCollectionResponse{} } func (m *DescribeCollectionResponse) String() string { return proto.CompactTextString(m) } func (*DescribeCollectionResponse) ProtoMessage() {} func (*DescribeCollectionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{4} + return fileDescriptor_02345ba45cc0e303, []int{5} } func (m *DescribeCollectionResponse) XXX_Unmarshal(b []byte) error { @@ -282,7 +364,14 @@ func (m *DescribeCollectionResponse) XXX_DiscardUnknown() { var xxx_messageInfo_DescribeCollectionResponse proto.InternalMessageInfo -func (m *DescribeCollectionResponse) GetSchema() [][]byte { +func (m *DescribeCollectionResponse) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *DescribeCollectionResponse) GetSchema() *schemapb.CollectionSchema { if m != nil { return m.Schema } @@ -302,7 +391,7 @@ func (m *LoadCollectionRequest) Reset() { *m = LoadCollectionRequest{} } func (m *LoadCollectionRequest) String() string { return proto.CompactTextString(m) } func (*LoadCollectionRequest) ProtoMessage() {} func (*LoadCollectionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{5} + return fileDescriptor_02345ba45cc0e303, []int{6} } func (m *LoadCollectionRequest) XXX_Unmarshal(b []byte) error { @@ -357,7 +446,7 @@ func (m *ReleaseCollectionRequest) Reset() { *m = ReleaseCollectionReque func (m *ReleaseCollectionRequest) String() string { return proto.CompactTextString(m) } func (*ReleaseCollectionRequest) ProtoMessage() {} func (*ReleaseCollectionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{6} + return fileDescriptor_02345ba45cc0e303, []int{7} } func (m *ReleaseCollectionRequest) XXX_Unmarshal(b []byte) error { @@ -412,7 +501,7 @@ func (m *CollectionStatsRequest) Reset() { *m = CollectionStatsRequest{} func (m *CollectionStatsRequest) String() string { return proto.CompactTextString(m) } func (*CollectionStatsRequest) ProtoMessage() {} func (*CollectionStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{7} + return fileDescriptor_02345ba45cc0e303, []int{8} } func (m *CollectionStatsRequest) XXX_Unmarshal(b []byte) error { @@ -456,6 +545,7 @@ func (m *CollectionStatsRequest) GetCollectionName() string { type CollectionStatsResponse struct { Stats []*commonpb.KeyValuePair `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats,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:"-"` @@ -465,7 +555,7 @@ func (m *CollectionStatsResponse) Reset() { *m = CollectionStatsResponse func (m *CollectionStatsResponse) String() string { return proto.CompactTextString(m) } func (*CollectionStatsResponse) ProtoMessage() {} func (*CollectionStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{8} + return fileDescriptor_02345ba45cc0e303, []int{9} } func (m *CollectionStatsResponse) XXX_Unmarshal(b []byte) error { @@ -493,6 +583,13 @@ func (m *CollectionStatsResponse) GetStats() []*commonpb.KeyValuePair { return nil } +func (m *CollectionStatsResponse) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + type ShowCollectionRequest struct { Base *internalpb2.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` @@ -505,7 +602,7 @@ func (m *ShowCollectionRequest) Reset() { *m = ShowCollectionRequest{} } func (m *ShowCollectionRequest) String() string { return proto.CompactTextString(m) } func (*ShowCollectionRequest) ProtoMessage() {} func (*ShowCollectionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{9} + return fileDescriptor_02345ba45cc0e303, []int{10} } func (m *ShowCollectionRequest) XXX_Unmarshal(b []byte) error { @@ -541,17 +638,18 @@ func (m *ShowCollectionRequest) GetDbName() string { } type ShowCollectionResponse struct { - CollectionNames []string `protobuf:"bytes,1,rep,name=collection_names,json=collectionNames,proto3" json:"collection_names,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CollectionNames []string `protobuf:"bytes,1,rep,name=collection_names,json=collectionNames,proto3" json:"collection_names,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 *ShowCollectionResponse) Reset() { *m = ShowCollectionResponse{} } func (m *ShowCollectionResponse) String() string { return proto.CompactTextString(m) } func (*ShowCollectionResponse) ProtoMessage() {} func (*ShowCollectionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{10} + return fileDescriptor_02345ba45cc0e303, []int{11} } func (m *ShowCollectionResponse) XXX_Unmarshal(b []byte) error { @@ -579,6 +677,13 @@ func (m *ShowCollectionResponse) GetCollectionNames() []string { return nil } +func (m *ShowCollectionResponse) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + type CreatePartitionRequest struct { Base *internalpb2.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` @@ -593,7 +698,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_02345ba45cc0e303, []int{11} + return fileDescriptor_02345ba45cc0e303, []int{12} } func (m *CreatePartitionRequest) XXX_Unmarshal(b []byte) error { @@ -656,7 +761,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_02345ba45cc0e303, []int{12} + return fileDescriptor_02345ba45cc0e303, []int{13} } func (m *DropPartitionRequest) XXX_Unmarshal(b []byte) error { @@ -719,7 +824,7 @@ func (m *HasPartitionRequest) Reset() { *m = HasPartitionRequest{} } func (m *HasPartitionRequest) String() string { return proto.CompactTextString(m) } func (*HasPartitionRequest) ProtoMessage() {} func (*HasPartitionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{13} + return fileDescriptor_02345ba45cc0e303, []int{14} } func (m *HasPartitionRequest) XXX_Unmarshal(b []byte) error { @@ -782,7 +887,7 @@ func (m *LoadPartitonRequest) Reset() { *m = LoadPartitonRequest{} } func (m *LoadPartitonRequest) String() string { return proto.CompactTextString(m) } func (*LoadPartitonRequest) ProtoMessage() {} func (*LoadPartitonRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{14} + return fileDescriptor_02345ba45cc0e303, []int{15} } func (m *LoadPartitonRequest) XXX_Unmarshal(b []byte) error { @@ -845,7 +950,7 @@ func (m *ReleasePartitionRequest) Reset() { *m = ReleasePartitionRequest func (m *ReleasePartitionRequest) String() string { return proto.CompactTextString(m) } func (*ReleasePartitionRequest) ProtoMessage() {} func (*ReleasePartitionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{15} + return fileDescriptor_02345ba45cc0e303, []int{16} } func (m *ReleasePartitionRequest) XXX_Unmarshal(b []byte) error { @@ -908,7 +1013,7 @@ func (m *PartitionStatsRequest) Reset() { *m = PartitionStatsRequest{} } func (m *PartitionStatsRequest) String() string { return proto.CompactTextString(m) } func (*PartitionStatsRequest) ProtoMessage() {} func (*PartitionStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{16} + return fileDescriptor_02345ba45cc0e303, []int{17} } func (m *PartitionStatsRequest) XXX_Unmarshal(b []byte) error { @@ -959,6 +1064,7 @@ func (m *PartitionStatsRequest) GetPartitionName() string { type PartitionStatsResponse struct { Stats []*commonpb.KeyValuePair `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats,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:"-"` @@ -968,7 +1074,7 @@ func (m *PartitionStatsResponse) Reset() { *m = PartitionStatsResponse{} func (m *PartitionStatsResponse) String() string { return proto.CompactTextString(m) } func (*PartitionStatsResponse) ProtoMessage() {} func (*PartitionStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{17} + return fileDescriptor_02345ba45cc0e303, []int{18} } func (m *PartitionStatsResponse) XXX_Unmarshal(b []byte) error { @@ -996,6 +1102,13 @@ func (m *PartitionStatsResponse) GetStats() []*commonpb.KeyValuePair { return nil } +func (m *PartitionStatsResponse) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + type ShowPartitionRequest struct { Base *internalpb2.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` @@ -1009,7 +1122,7 @@ func (m *ShowPartitionRequest) Reset() { *m = ShowPartitionRequest{} } func (m *ShowPartitionRequest) String() string { return proto.CompactTextString(m) } func (*ShowPartitionRequest) ProtoMessage() {} func (*ShowPartitionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{18} + return fileDescriptor_02345ba45cc0e303, []int{19} } func (m *ShowPartitionRequest) XXX_Unmarshal(b []byte) error { @@ -1052,17 +1165,18 @@ func (m *ShowPartitionRequest) GetCollectionName() string { } type ShowPartitionResponse struct { - PartitionNames []string `protobuf:"bytes,1,rep,name=partition_names,json=partitionNames,proto3" json:"partition_names,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + PartitionNames []string `protobuf:"bytes,1,rep,name=partition_names,json=partitionNames,proto3" json:"partition_names,omitempty"` + Status *commonpb.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ShowPartitionResponse) Reset() { *m = ShowPartitionResponse{} } func (m *ShowPartitionResponse) String() string { return proto.CompactTextString(m) } func (*ShowPartitionResponse) ProtoMessage() {} func (*ShowPartitionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{19} + return fileDescriptor_02345ba45cc0e303, []int{20} } func (m *ShowPartitionResponse) XXX_Unmarshal(b []byte) error { @@ -1090,6 +1204,13 @@ func (m *ShowPartitionResponse) GetPartitionNames() []string { return nil } +func (m *ShowPartitionResponse) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + type CreateIndexRequest struct { Base *internalpb2.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` @@ -1105,7 +1226,7 @@ func (m *CreateIndexRequest) Reset() { *m = CreateIndexRequest{} } func (m *CreateIndexRequest) String() string { return proto.CompactTextString(m) } func (*CreateIndexRequest) ProtoMessage() {} func (*CreateIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{20} + return fileDescriptor_02345ba45cc0e303, []int{21} } func (m *CreateIndexRequest) XXX_Unmarshal(b []byte) error { @@ -1175,7 +1296,7 @@ func (m *DescribeIndexRequest) Reset() { *m = DescribeIndexRequest{} } func (m *DescribeIndexRequest) String() string { return proto.CompactTextString(m) } func (*DescribeIndexRequest) ProtoMessage() {} func (*DescribeIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{21} + return fileDescriptor_02345ba45cc0e303, []int{22} } func (m *DescribeIndexRequest) XXX_Unmarshal(b []byte) error { @@ -1236,7 +1357,7 @@ func (m *IndexDescription) Reset() { *m = IndexDescription{} } func (m *IndexDescription) String() string { return proto.CompactTextString(m) } func (*IndexDescription) ProtoMessage() {} func (*IndexDescription) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{22} + return fileDescriptor_02345ba45cc0e303, []int{23} } func (m *IndexDescription) XXX_Unmarshal(b []byte) error { @@ -1273,6 +1394,7 @@ func (m *IndexDescription) GetParams() []*commonpb.KeyValuePair { type DescribeIndexResponse struct { IndexDescriptions []*IndexDescription `protobuf:"bytes,1,rep,name=index_descriptions,json=indexDescriptions,proto3" json:"index_descriptions,omitempty"` + Status *commonpb.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1282,7 +1404,7 @@ func (m *DescribeIndexResponse) Reset() { *m = DescribeIndexResponse{} } func (m *DescribeIndexResponse) String() string { return proto.CompactTextString(m) } func (*DescribeIndexResponse) ProtoMessage() {} func (*DescribeIndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{23} + return fileDescriptor_02345ba45cc0e303, []int{24} } func (m *DescribeIndexResponse) XXX_Unmarshal(b []byte) error { @@ -1310,6 +1432,13 @@ func (m *DescribeIndexResponse) GetIndexDescriptions() []*IndexDescription { return nil } +func (m *DescribeIndexResponse) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + type InsertRequest struct { Base *internalpb2.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` @@ -1326,7 +1455,7 @@ func (m *InsertRequest) Reset() { *m = InsertRequest{} } func (m *InsertRequest) String() string { return proto.CompactTextString(m) } func (*InsertRequest) ProtoMessage() {} func (*InsertRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{24} + return fileDescriptor_02345ba45cc0e303, []int{25} } func (m *InsertRequest) XXX_Unmarshal(b []byte) error { @@ -1390,18 +1519,19 @@ func (m *InsertRequest) GetHashKeys() []uint32 { } type InsertResponse struct { - RowIDBegin int64 `protobuf:"varint,1,opt,name=rowID_begin,json=rowIDBegin,proto3" json:"rowID_begin,omitempty"` - RowIDEnd int64 `protobuf:"varint,2,opt,name=rowID_end,json=rowIDEnd,proto3" json:"rowID_end,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + RowIDBegin int64 `protobuf:"varint,1,opt,name=rowID_begin,json=rowIDBegin,proto3" json:"rowID_begin,omitempty"` + RowIDEnd int64 `protobuf:"varint,2,opt,name=rowID_end,json=rowIDEnd,proto3" json:"rowID_end,omitempty"` + Status *commonpb.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *InsertResponse) Reset() { *m = InsertResponse{} } func (m *InsertResponse) String() string { return proto.CompactTextString(m) } func (*InsertResponse) ProtoMessage() {} func (*InsertResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{25} + return fileDescriptor_02345ba45cc0e303, []int{26} } func (m *InsertResponse) XXX_Unmarshal(b []byte) error { @@ -1436,23 +1566,126 @@ func (m *InsertResponse) GetRowIDEnd() int64 { return 0 } +func (m *InsertResponse) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + +type PlaceholderValue struct { + Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` + Type PlaceholderType `protobuf:"varint,2,opt,name=type,proto3,enum=milvus.proto.milvus.PlaceholderType" json:"type,omitempty"` + // values is a 2d-array, every array contains a vector + Values [][]byte `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PlaceholderValue) Reset() { *m = PlaceholderValue{} } +func (m *PlaceholderValue) String() string { return proto.CompactTextString(m) } +func (*PlaceholderValue) ProtoMessage() {} +func (*PlaceholderValue) Descriptor() ([]byte, []int) { + return fileDescriptor_02345ba45cc0e303, []int{27} +} + +func (m *PlaceholderValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PlaceholderValue.Unmarshal(m, b) +} +func (m *PlaceholderValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PlaceholderValue.Marshal(b, m, deterministic) +} +func (m *PlaceholderValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlaceholderValue.Merge(m, src) +} +func (m *PlaceholderValue) XXX_Size() int { + return xxx_messageInfo_PlaceholderValue.Size(m) +} +func (m *PlaceholderValue) XXX_DiscardUnknown() { + xxx_messageInfo_PlaceholderValue.DiscardUnknown(m) +} + +var xxx_messageInfo_PlaceholderValue proto.InternalMessageInfo + +func (m *PlaceholderValue) GetTag() string { + if m != nil { + return m.Tag + } + return "" +} + +func (m *PlaceholderValue) GetType() PlaceholderType { + if m != nil { + return m.Type + } + return PlaceholderType_NONE +} + +func (m *PlaceholderValue) GetValues() [][]byte { + if m != nil { + return m.Values + } + return nil +} + +type PlaceholderGroup struct { + Placeholders []*PlaceholderValue `protobuf:"bytes,1,rep,name=placeholders,proto3" json:"placeholders,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PlaceholderGroup) Reset() { *m = PlaceholderGroup{} } +func (m *PlaceholderGroup) String() string { return proto.CompactTextString(m) } +func (*PlaceholderGroup) ProtoMessage() {} +func (*PlaceholderGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_02345ba45cc0e303, []int{28} +} + +func (m *PlaceholderGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PlaceholderGroup.Unmarshal(m, b) +} +func (m *PlaceholderGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PlaceholderGroup.Marshal(b, m, deterministic) +} +func (m *PlaceholderGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlaceholderGroup.Merge(m, src) +} +func (m *PlaceholderGroup) XXX_Size() int { + return xxx_messageInfo_PlaceholderGroup.Size(m) +} +func (m *PlaceholderGroup) XXX_DiscardUnknown() { + xxx_messageInfo_PlaceholderGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_PlaceholderGroup proto.InternalMessageInfo + +func (m *PlaceholderGroup) GetPlaceholders() []*PlaceholderValue { + if m != nil { + return m.Placeholders + } + return nil +} + type SearchRequest struct { - Base *internalpb2.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` - CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` - PartitionNames []string `protobuf:"bytes,4,rep,name=partition_names,json=partitionNames,proto3" json:"partition_names,omitempty"` - Dsl string `protobuf:"bytes,5,opt,name=dsl,proto3" json:"dsl,omitempty"` - PlaceholderGroup [][]byte `protobuf:"bytes,6,rep,name=placeholder_group,json=placeholderGroup,proto3" json:"placeholder_group,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Base *internalpb2.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` + CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` + PartitionNames []string `protobuf:"bytes,4,rep,name=partition_names,json=partitionNames,proto3" json:"partition_names,omitempty"` + Dsl string `protobuf:"bytes,5,opt,name=dsl,proto3" json:"dsl,omitempty"` + // serialized `PlaceholderGroup` + PlaceholderGroup []byte `protobuf:"bytes,6,opt,name=placeholder_group,json=placeholderGroup,proto3" json:"placeholder_group,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SearchRequest) Reset() { *m = SearchRequest{} } func (m *SearchRequest) String() string { return proto.CompactTextString(m) } func (*SearchRequest) ProtoMessage() {} func (*SearchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{26} + return fileDescriptor_02345ba45cc0e303, []int{29} } func (m *SearchRequest) XXX_Unmarshal(b []byte) error { @@ -1508,13 +1741,115 @@ func (m *SearchRequest) GetDsl() string { return "" } -func (m *SearchRequest) GetPlaceholderGroup() [][]byte { +func (m *SearchRequest) GetPlaceholderGroup() []byte { if m != nil { return m.PlaceholderGroup } return nil } +type Hits struct { + IDs []int64 `protobuf:"varint,1,rep,packed,name=IDs,proto3" json:"IDs,omitempty"` + RowData [][]byte `protobuf:"bytes,2,rep,name=row_data,json=rowData,proto3" json:"row_data,omitempty"` + Scores []float32 `protobuf:"fixed32,3,rep,packed,name=scores,proto3" json:"scores,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Hits) Reset() { *m = Hits{} } +func (m *Hits) String() string { return proto.CompactTextString(m) } +func (*Hits) ProtoMessage() {} +func (*Hits) Descriptor() ([]byte, []int) { + return fileDescriptor_02345ba45cc0e303, []int{30} +} + +func (m *Hits) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Hits.Unmarshal(m, b) +} +func (m *Hits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Hits.Marshal(b, m, deterministic) +} +func (m *Hits) XXX_Merge(src proto.Message) { + xxx_messageInfo_Hits.Merge(m, src) +} +func (m *Hits) XXX_Size() int { + return xxx_messageInfo_Hits.Size(m) +} +func (m *Hits) XXX_DiscardUnknown() { + xxx_messageInfo_Hits.DiscardUnknown(m) +} + +var xxx_messageInfo_Hits proto.InternalMessageInfo + +func (m *Hits) GetIDs() []int64 { + if m != nil { + return m.IDs + } + return nil +} + +func (m *Hits) GetRowData() [][]byte { + if m != nil { + return m.RowData + } + return nil +} + +func (m *Hits) GetScores() []float32 { + if m != nil { + return m.Scores + } + return nil +} + +type QueryResult struct { + Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Hits [][]byte `protobuf:"bytes,2,rep,name=hits,proto3" json:"hits,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *QueryResult) Reset() { *m = QueryResult{} } +func (m *QueryResult) String() string { return proto.CompactTextString(m) } +func (*QueryResult) ProtoMessage() {} +func (*QueryResult) Descriptor() ([]byte, []int) { + return fileDescriptor_02345ba45cc0e303, []int{31} +} + +func (m *QueryResult) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QueryResult.Unmarshal(m, b) +} +func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic) +} +func (m *QueryResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryResult.Merge(m, src) +} +func (m *QueryResult) XXX_Size() int { + return xxx_messageInfo_QueryResult.Size(m) +} +func (m *QueryResult) XXX_DiscardUnknown() { + xxx_messageInfo_QueryResult.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryResult proto.InternalMessageInfo + +func (m *QueryResult) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *QueryResult) GetHits() [][]byte { + if m != nil { + return m.Hits + } + return nil +} + type FlushRequest struct { Base *internalpb2.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` @@ -1528,7 +1863,7 @@ func (m *FlushRequest) Reset() { *m = FlushRequest{} } func (m *FlushRequest) String() string { return proto.CompactTextString(m) } func (*FlushRequest) ProtoMessage() {} func (*FlushRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_02345ba45cc0e303, []int{27} + return fileDescriptor_02345ba45cc0e303, []int{32} } func (m *FlushRequest) XXX_Unmarshal(b []byte) error { @@ -1571,9 +1906,11 @@ func (m *FlushRequest) GetCollectionName() string { } func init() { + proto.RegisterEnum("milvus.proto.milvus.PlaceholderType", PlaceholderType_name, PlaceholderType_value) proto.RegisterType((*CreateCollectionRequest)(nil), "milvus.proto.milvus.CreateCollectionRequest") proto.RegisterType((*DropCollectionRequest)(nil), "milvus.proto.milvus.DropCollectionRequest") proto.RegisterType((*HasCollectionRequest)(nil), "milvus.proto.milvus.HasCollectionRequest") + proto.RegisterType((*BoolResponse)(nil), "milvus.proto.milvus.BoolResponse") proto.RegisterType((*DescribeCollectionRequest)(nil), "milvus.proto.milvus.DescribeCollectionRequest") proto.RegisterType((*DescribeCollectionResponse)(nil), "milvus.proto.milvus.DescribeCollectionResponse") proto.RegisterType((*LoadCollectionRequest)(nil), "milvus.proto.milvus.LoadCollectionRequest") @@ -1597,63 +1934,869 @@ func init() { proto.RegisterType((*DescribeIndexResponse)(nil), "milvus.proto.milvus.DescribeIndexResponse") proto.RegisterType((*InsertRequest)(nil), "milvus.proto.milvus.InsertRequest") proto.RegisterType((*InsertResponse)(nil), "milvus.proto.milvus.InsertResponse") + proto.RegisterType((*PlaceholderValue)(nil), "milvus.proto.milvus.PlaceholderValue") + proto.RegisterType((*PlaceholderGroup)(nil), "milvus.proto.milvus.PlaceholderGroup") proto.RegisterType((*SearchRequest)(nil), "milvus.proto.milvus.SearchRequest") + proto.RegisterType((*Hits)(nil), "milvus.proto.milvus.Hits") + proto.RegisterType((*QueryResult)(nil), "milvus.proto.milvus.QueryResult") proto.RegisterType((*FlushRequest)(nil), "milvus.proto.milvus.FlushRequest") } func init() { proto.RegisterFile("milvus.proto", fileDescriptor_02345ba45cc0e303) } var fileDescriptor_02345ba45cc0e303 = []byte{ - // 809 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x97, 0xdf, 0x6f, 0x2a, 0x45, - 0x14, 0xc7, 0x33, 0x85, 0xd2, 0x72, 0xf8, 0x51, 0xba, 0x2d, 0xb0, 0xad, 0x51, 0x71, 0x93, 0x5a, - 0x8c, 0x11, 0x92, 0xda, 0xc4, 0xf8, 0xd6, 0x50, 0xd4, 0x36, 0xd5, 0xa6, 0x6e, 0x8d, 0x0f, 0xbe, - 0x90, 0xd9, 0xdd, 0x91, 0xdd, 0xb8, 0xbb, 0xb3, 0xce, 0x0c, 0xd2, 0xf6, 0xd9, 0x47, 0x35, 0xfa, - 0x4f, 0xf8, 0xe2, 0x9b, 0xd6, 0xc4, 0x7f, 0xca, 0xdc, 0x3f, 0xe1, 0xde, 0xcc, 0xcc, 0x42, 0x81, - 0xcb, 0x03, 0xc9, 0x4d, 0x03, 0xbc, 0x31, 0xdf, 0x3d, 0x67, 0xe6, 0x73, 0xce, 0x19, 0xbe, 0x2c, - 0x50, 0x8c, 0x82, 0xf0, 0xa7, 0x01, 0x6f, 0x25, 0x8c, 0x0a, 0x6a, 0xec, 0x4d, 0xae, 0x5a, 0x7a, - 0x71, 0x58, 0x74, 0x69, 0x14, 0xd1, 0x58, 0x8b, 0x87, 0xe5, 0x20, 0x16, 0x84, 0xc5, 0x38, 0xd4, - 0x6b, 0xeb, 0x4f, 0x04, 0xf5, 0x73, 0x46, 0xb0, 0x20, 0xe7, 0x34, 0x0c, 0x89, 0x2b, 0x02, 0x1a, - 0xdb, 0xe4, 0xc7, 0x01, 0xe1, 0xc2, 0x38, 0x81, 0xac, 0x83, 0x39, 0x31, 0x51, 0x03, 0x35, 0x0b, - 0x27, 0xef, 0xb4, 0xa6, 0x76, 0x1f, 0xef, 0xf3, 0x15, 0xef, 0x77, 0x30, 0x27, 0xb6, 0x8a, 0x35, - 0xea, 0xb0, 0xe5, 0x39, 0xbd, 0x18, 0x47, 0xc4, 0xdc, 0x68, 0xa0, 0x66, 0xde, 0xce, 0x79, 0xce, - 0x35, 0x8e, 0x88, 0xf1, 0x3e, 0x94, 0xdd, 0xf1, 0x09, 0x52, 0x31, 0x33, 0xea, 0xf9, 0x8c, 0x6a, - 0xd4, 0x20, 0xc7, 0x5d, 0x9f, 0x44, 0xd8, 0xcc, 0x36, 0x50, 0xb3, 0x68, 0xa7, 0x2b, 0xeb, 0x17, - 0x04, 0xd5, 0x2e, 0xa3, 0xc9, 0x6a, 0x60, 0x4a, 0x9c, 0xfd, 0x0b, 0xcc, 0x9f, 0x99, 0xe6, 0x18, - 0x76, 0x9e, 0xce, 0xd5, 0x01, 0xf3, 0x71, 0xfe, 0x40, 0x70, 0xd0, 0x25, 0xdc, 0x65, 0x81, 0x43, - 0x56, 0x85, 0xe9, 0x14, 0x0e, 0xe7, 0x21, 0xf1, 0x84, 0xc6, 0x7c, 0x72, 0xce, 0xa8, 0x91, 0x99, - 0x98, 0xf3, 0xaf, 0x08, 0xaa, 0x5f, 0x52, 0xec, 0xad, 0x4a, 0x15, 0xbf, 0x23, 0x30, 0x6d, 0x12, - 0x12, 0xcc, 0x57, 0xa6, 0xb1, 0xbf, 0x21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e, 0xbf, 0x0b, 0x05, 0x46, 0x87, 0x97, 0xdd, 0x9e, 0x43, 0xfa, 0x41, 0xac, - 0x1a, 0x91, 0xb1, 0x41, 0x49, 0x1d, 0xa9, 0xc8, 0xfd, 0x74, 0x00, 0x89, 0x3d, 0x55, 0x70, 0xc6, - 0xde, 0x56, 0xc2, 0x67, 0xb1, 0x67, 0xfd, 0x8f, 0xa0, 0x74, 0x4b, 0x30, 0x73, 0xfd, 0xf5, 0xf8, - 0x69, 0x31, 0x2a, 0x90, 0xf1, 0x78, 0x68, 0x6e, 0xaa, 0x5d, 0xe4, 0x47, 0xe3, 0x43, 0xd8, 0x4d, - 0x42, 0xec, 0x12, 0x9f, 0x86, 0x1e, 0x61, 0xbd, 0x3e, 0xa3, 0x83, 0x44, 0xf5, 0xad, 0x68, 0x57, - 0x26, 0x1e, 0x7c, 0x21, 0x75, 0xeb, 0x67, 0x04, 0xc5, 0xcf, 0xc3, 0x01, 0x5f, 0x6e, 0xb9, 0x9d, - 0xce, 0x77, 0x67, 0xfd, 0x40, 0xf8, 0x03, 0x47, 0x5e, 0x81, 0xf6, 0x43, 0x10, 0x86, 0xc1, 0x83, - 0x20, 0xae, 0xdf, 0xd6, 0xc7, 0x7f, 0xe4, 0x05, 0x5c, 0xb0, 0xc0, 0x19, 0x08, 0xe2, 0xb5, 0x47, - 0x10, 0x6d, 0xc5, 0x94, 0x46, 0x24, 0x8e, 0x93, 0x53, 0xeb, 0x8f, 0x5f, 0x05, 0x00, 0x00, 0xff, - 0xff, 0x3b, 0xfd, 0x8e, 0x53, 0x87, 0x10, 0x00, 0x00, + // 1409 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xdd, 0x6f, 0x1b, 0x45, + 0x10, 0xcf, 0xc5, 0x8e, 0x9b, 0x4c, 0xfc, 0x95, 0x6d, 0x93, 0xb8, 0xae, 0x80, 0xf4, 0xa0,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 0x43, 0xb2, 0xff, 0x94, 0x5f, 0x92, 0x0d, + 0xec, 0x04, 0x96, 0xd4, 0x8f, 0x90, 0x6f, 0x72, 0x68, 0xf2, 0x99, 0x36, 0xcc, 0x6f, 0x76, 0xbc, + 0xbd, 0x57, 0x9b, 0x29, 0xf3, 0x39, 0x2c, 0x24, 0xbd, 0xa8, 0xd3, 0x5e, 0x81, 0x72, 0x22, 0x64, + 0xf2, 0xe0, 0x33, 0x56, 0x29, 0x1e, 0xb3, 0x13, 0x9e, 0xef, 0x77, 0x9e, 0x7a, 0xf1, 0x99, 0xd9, + 0xc0, 0x01, 0x73, 0x46, 0xce, 0x45, 0x74, 0x09, 0x8a, 0xfe, 0x01, 0x12, 0xa9, 0x97, 0x15, 0x7a, + 0x85, 0x50, 0x2a, 0x22, 0xf6, 0x9b, 0x01, 0xe7, 0xf8, 0x57, 0xe7, 0x74, 0xa1, 0xfe, 0xd5, 0x80, + 0xb3, 0x0f, 0x30, 0x3d, 0x5d, 0xa0, 0x5f, 0x1a, 0x70, 0x96, 0x3f, 0xa0, 0x12, 0xf5, 0xa8, 0x41, + 0x5f, 0x86, 0x52, 0x1c, 0x34, 0xad, 0x64, 0xc5, 0x7d, 0x28, 0xc6, 0x50, 0x53, 0xf3, 0x4f, 0x03, + 0x16, 0xd5, 0x3b, 0x3b, 0x26, 0xf1, 0x1e, 0x1a, 0xfa, 0x4b, 0x03, 0xe6, 0x43, 0xcc, 0xa3, 0x7f, + 0x8e, 0x87, 0x25, 0xca, 0xd7, 0x06, 0x2c, 0x24, 0x61, 0x8f, 0xe4, 0xd1, 0xe6, 0x35, 0x20, 0x7f, + 0x4f, 0xc7, 0x23, 0xef, 0x66, 0x5f, 0x7e, 0x43, 0x22, 0x68, 0x54, 0x54, 0x34, 0x84, 0x30, 0x74, + 0x84, 0x38, 0x59, 0x14, 0xfe, 0x36, 0x00, 0xc9, 0xa7, 0xbd, 0xd1, 0xb3, 0xc9, 0xf3, 0xd1, 0x52, + 0xe8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, 0x45, 0x76, 0x9c, 0x9e, 0x88, 0x44, 0xc6, 0x02, 0x21, 0xaa, + 0x73, 0x09, 0x37, 0x28, 0x15, 0x48, 0xcf, 0x16, 0x27, 0xce, 0x58, 0xd3, 0x42, 0x70, 0xb7, 0x67, + 0x47, 0xf2, 0x90, 0x19, 0x3e, 0x0f, 0xbb, 0x50, 0xde, 0x70, 0x71, 0x9b, 0x74, 0x3c, 0xd7, 0x26, + 0x81, 0x20, 0x13, 0x2a, 0x43, 0x86, 0xe1, 0x1d, 0xc5, 0x49, 0xfe, 0x13, 0xbd, 0x07, 0x59, 0xb6, + 0xef, 0xcb, 0x20, 0x17, 0x57, 0xdf, 0xd2, 0x52, 0x25, 0x62, 0x66, 0x6b, 0xdf, 0x27, 0x96, 0xd8, + 0x81, 0x16, 0x20, 0x27, 0x7a, 0x58, 0x0e, 0x2a, 0x53, 0xcb, 0x5b, 0x6a, 0x65, 0x3e, 0x8b, 0xf9, + 0xbd, 0x1f, 0x78, 0x7d, 0x1f, 0x35, 0x20, 0xef, 0x1f, 0xca, 0x8e, 0x27, 0x66, 0x12, 0xb4, 0x15, + 0xdb, 0x6a, 0xfe, 0x65, 0x40, 0x61, 0x93, 0xe0, 0xa0, 0xdd, 0x39, 0x1d, 0x85, 0x00, 0x8f, 0xb9, + 0x4d, 0xdd, 0xca, 0x94, 0x8c, 0xb9, 0x4d, 0x5d, 0x74, 0x0d, 0xe6, 0x22, 0x47, 0x6a, 0xee, 0xf0, + 0x10, 0x55, 0x72, 0x62, 0x20, 0x53, 0xf6, 0x13, 0xa1, 0x33, 0x1f, 0x42, 0xf6, 0x81, 0xc3, 0x84, + 0x99, 0xc6, 0x9a, 0x8c, 0x5c, 0xc6, 0xe2, 0x3f, 0xd1, 0xf9, 0x08, 0x73, 0x27, 0x45, 0x0a, 0x42, + 0x7a, 0x8a, 0x39, 0x8f, 0x17, 0xa8, 0xdc, 0x4c, 0x5a, 0x6a, 0x65, 0x3e, 0x85, 0xd9, 0x0f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0xff, 0x91, 0xfa, 0xbc, + 0xfa, 0xe6, 0xb1, 0x3a, 0xa1, 0xd1, 0x0d, 0xc8, 0xc9, 0xc2, 0x2b, 0xc5, 0x68, 0xac, 0x2a, 0xab, + 0x2e, 0x69, 0x75, 0x22, 0xd5, 0x87, 0x39, 0x81, 0x1a, 0x30, 0x25, 0xaa, 0x06, 0xa4, 0xbf, 0x32, + 0xd1, 0x8a, 0x62, 0x40, 0x6c, 0xeb, 0xf5, 0x8f, 0x6f, 0xed, 0x38, 0xac, 0xd3, 0x6f, 0xf1, 0x7f, + 0x56, 0x5e, 0x38, 0xae, 0xeb, 0xbc, 0x60, 0xa4, 0xdd, 0x59, 0x91, 0xbb, 0x6e, 0xd8, 0x0e, 0x65, + 0x81, 0xd3, 0xea, 0x33, 0x62, 0xaf, 0x1c, 0xd4, 0x1f, 0x2b, 0xc2, 0x94, 0xd2, 0xf0, 0x5b, 0xad, + 0x9c, 0x58, 0xdf, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0x10, 0x02, 0x02, 0xfd, 0x06, 0x1c, 0x00, + 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MilvusServiceClient is the client API for MilvusService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MilvusServiceClient interface { + CreateCollection(ctx context.Context, in *CreateCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) + DropCollection(ctx context.Context, in *DropCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) + HasCollection(ctx context.Context, in *HasCollectionRequest, opts ...grpc.CallOption) (*BoolResponse, error) + LoadCollection(ctx context.Context, in *LoadCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) + ReleaseCollection(ctx context.Context, in *ReleaseCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) + DescribeCollection(ctx context.Context, in *DescribeCollectionRequest, opts ...grpc.CallOption) (*DescribeCollectionResponse, error) + GetCollectionStatistics(ctx context.Context, in *CollectionStatsRequest, opts ...grpc.CallOption) (*CollectionStatsResponse, error) + ShowCollections(ctx context.Context, in *ShowCollectionRequest, opts ...grpc.CallOption) (*ShowCollectionResponse, error) + CreatePartition(ctx context.Context, in *CreatePartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) + DropPartition(ctx context.Context, in *DropPartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) + HasPartition(ctx context.Context, in *HasPartitionRequest, opts ...grpc.CallOption) (*BoolResponse, error) + LoadPartitions(ctx context.Context, in *LoadPartitonRequest, opts ...grpc.CallOption) (*commonpb.Status, error) + ReleasePartitions(ctx context.Context, in *ReleasePartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) + GetPartitionStatistics(ctx context.Context, in *PartitionStatsRequest, opts ...grpc.CallOption) (*PartitionStatsResponse, error) + ShowPartitions(ctx context.Context, in *ShowPartitionRequest, opts ...grpc.CallOption) (*ShowPartitionResponse, error) + CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*commonpb.Status, error) + DescribeIndex(ctx context.Context, in *DescribeIndexRequest, opts ...grpc.CallOption) (*DescribeIndexResponse, error) + Insert(ctx context.Context, in *InsertRequest, opts ...grpc.CallOption) (*InsertResponse, error) + Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*QueryResult, error) + Flush(ctx context.Context, in *FlushRequest, opts ...grpc.CallOption) (*commonpb.Status, error) +} + +type milvusServiceClient struct { + cc *grpc.ClientConn +} + +func NewMilvusServiceClient(cc *grpc.ClientConn) MilvusServiceClient { + return &milvusServiceClient{cc} +} + +func (c *milvusServiceClient) CreateCollection(ctx context.Context, in *CreateCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) { + out := new(commonpb.Status) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/CreateCollection", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) DropCollection(ctx context.Context, in *DropCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) { + out := new(commonpb.Status) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/DropCollection", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) HasCollection(ctx context.Context, in *HasCollectionRequest, opts ...grpc.CallOption) (*BoolResponse, error) { + out := new(BoolResponse) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/HasCollection", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) LoadCollection(ctx context.Context, in *LoadCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) { + out := new(commonpb.Status) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/LoadCollection", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) ReleaseCollection(ctx context.Context, in *ReleaseCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) { + out := new(commonpb.Status) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/ReleaseCollection", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) DescribeCollection(ctx context.Context, in *DescribeCollectionRequest, opts ...grpc.CallOption) (*DescribeCollectionResponse, error) { + out := new(DescribeCollectionResponse) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/DescribeCollection", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) GetCollectionStatistics(ctx context.Context, in *CollectionStatsRequest, opts ...grpc.CallOption) (*CollectionStatsResponse, error) { + out := new(CollectionStatsResponse) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/GetCollectionStatistics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) ShowCollections(ctx context.Context, in *ShowCollectionRequest, opts ...grpc.CallOption) (*ShowCollectionResponse, error) { + out := new(ShowCollectionResponse) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/ShowCollections", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) CreatePartition(ctx context.Context, in *CreatePartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) { + out := new(commonpb.Status) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/CreatePartition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) DropPartition(ctx context.Context, in *DropPartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) { + out := new(commonpb.Status) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/DropPartition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) HasPartition(ctx context.Context, in *HasPartitionRequest, opts ...grpc.CallOption) (*BoolResponse, error) { + out := new(BoolResponse) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/HasPartition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) LoadPartitions(ctx context.Context, in *LoadPartitonRequest, opts ...grpc.CallOption) (*commonpb.Status, error) { + out := new(commonpb.Status) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/LoadPartitions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) ReleasePartitions(ctx context.Context, in *ReleasePartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) { + out := new(commonpb.Status) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/ReleasePartitions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) GetPartitionStatistics(ctx context.Context, in *PartitionStatsRequest, opts ...grpc.CallOption) (*PartitionStatsResponse, error) { + out := new(PartitionStatsResponse) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/GetPartitionStatistics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) ShowPartitions(ctx context.Context, in *ShowPartitionRequest, opts ...grpc.CallOption) (*ShowPartitionResponse, error) { + out := new(ShowPartitionResponse) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/ShowPartitions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*commonpb.Status, error) { + out := new(commonpb.Status) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/CreateIndex", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) DescribeIndex(ctx context.Context, in *DescribeIndexRequest, opts ...grpc.CallOption) (*DescribeIndexResponse, error) { + out := new(DescribeIndexResponse) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/DescribeIndex", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) Insert(ctx context.Context, in *InsertRequest, opts ...grpc.CallOption) (*InsertResponse, error) { + out := new(InsertResponse) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/Insert", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*QueryResult, error) { + out := new(QueryResult) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/Search", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *milvusServiceClient) Flush(ctx context.Context, in *FlushRequest, opts ...grpc.CallOption) (*commonpb.Status, error) { + out := new(commonpb.Status) + err := c.cc.Invoke(ctx, "/milvus.proto.milvus.MilvusService/Flush", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MilvusServiceServer is the server API for MilvusService service. +type MilvusServiceServer interface { + CreateCollection(context.Context, *CreateCollectionRequest) (*commonpb.Status, error) + DropCollection(context.Context, *DropCollectionRequest) (*commonpb.Status, error) + HasCollection(context.Context, *HasCollectionRequest) (*BoolResponse, error) + LoadCollection(context.Context, *LoadCollectionRequest) (*commonpb.Status, error) + ReleaseCollection(context.Context, *ReleaseCollectionRequest) (*commonpb.Status, error) + DescribeCollection(context.Context, *DescribeCollectionRequest) (*DescribeCollectionResponse, error) + GetCollectionStatistics(context.Context, *CollectionStatsRequest) (*CollectionStatsResponse, error) + ShowCollections(context.Context, *ShowCollectionRequest) (*ShowCollectionResponse, error) + CreatePartition(context.Context, *CreatePartitionRequest) (*commonpb.Status, error) + DropPartition(context.Context, *DropPartitionRequest) (*commonpb.Status, error) + HasPartition(context.Context, *HasPartitionRequest) (*BoolResponse, error) + LoadPartitions(context.Context, *LoadPartitonRequest) (*commonpb.Status, error) + ReleasePartitions(context.Context, *ReleasePartitionRequest) (*commonpb.Status, error) + GetPartitionStatistics(context.Context, *PartitionStatsRequest) (*PartitionStatsResponse, error) + ShowPartitions(context.Context, *ShowPartitionRequest) (*ShowPartitionResponse, error) + CreateIndex(context.Context, *CreateIndexRequest) (*commonpb.Status, error) + DescribeIndex(context.Context, *DescribeIndexRequest) (*DescribeIndexResponse, error) + Insert(context.Context, *InsertRequest) (*InsertResponse, error) + Search(context.Context, *SearchRequest) (*QueryResult, error) + Flush(context.Context, *FlushRequest) (*commonpb.Status, error) +} + +// UnimplementedMilvusServiceServer can be embedded to have forward compatible implementations. +type UnimplementedMilvusServiceServer struct { +} + +func (*UnimplementedMilvusServiceServer) CreateCollection(ctx context.Context, req *CreateCollectionRequest) (*commonpb.Status, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateCollection not implemented") +} +func (*UnimplementedMilvusServiceServer) DropCollection(ctx context.Context, req *DropCollectionRequest) (*commonpb.Status, error) { + return nil, status.Errorf(codes.Unimplemented, "method DropCollection not implemented") +} +func (*UnimplementedMilvusServiceServer) HasCollection(ctx context.Context, req *HasCollectionRequest) (*BoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HasCollection not implemented") +} +func (*UnimplementedMilvusServiceServer) LoadCollection(ctx context.Context, req *LoadCollectionRequest) (*commonpb.Status, error) { + return nil, status.Errorf(codes.Unimplemented, "method LoadCollection not implemented") +} +func (*UnimplementedMilvusServiceServer) ReleaseCollection(ctx context.Context, req *ReleaseCollectionRequest) (*commonpb.Status, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReleaseCollection not implemented") +} +func (*UnimplementedMilvusServiceServer) DescribeCollection(ctx context.Context, req *DescribeCollectionRequest) (*DescribeCollectionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeCollection not implemented") +} +func (*UnimplementedMilvusServiceServer) GetCollectionStatistics(ctx context.Context, req *CollectionStatsRequest) (*CollectionStatsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCollectionStatistics not implemented") +} +func (*UnimplementedMilvusServiceServer) ShowCollections(ctx context.Context, req *ShowCollectionRequest) (*ShowCollectionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ShowCollections not implemented") +} +func (*UnimplementedMilvusServiceServer) CreatePartition(ctx context.Context, req *CreatePartitionRequest) (*commonpb.Status, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreatePartition not implemented") +} +func (*UnimplementedMilvusServiceServer) DropPartition(ctx context.Context, req *DropPartitionRequest) (*commonpb.Status, error) { + return nil, status.Errorf(codes.Unimplemented, "method DropPartition not implemented") +} +func (*UnimplementedMilvusServiceServer) HasPartition(ctx context.Context, req *HasPartitionRequest) (*BoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HasPartition not implemented") +} +func (*UnimplementedMilvusServiceServer) LoadPartitions(ctx context.Context, req *LoadPartitonRequest) (*commonpb.Status, error) { + return nil, status.Errorf(codes.Unimplemented, "method LoadPartitions not implemented") +} +func (*UnimplementedMilvusServiceServer) ReleasePartitions(ctx context.Context, req *ReleasePartitionRequest) (*commonpb.Status, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReleasePartitions not implemented") +} +func (*UnimplementedMilvusServiceServer) GetPartitionStatistics(ctx context.Context, req *PartitionStatsRequest) (*PartitionStatsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPartitionStatistics not implemented") +} +func (*UnimplementedMilvusServiceServer) ShowPartitions(ctx context.Context, req *ShowPartitionRequest) (*ShowPartitionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ShowPartitions not implemented") +} +func (*UnimplementedMilvusServiceServer) CreateIndex(ctx context.Context, req *CreateIndexRequest) (*commonpb.Status, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateIndex not implemented") +} +func (*UnimplementedMilvusServiceServer) DescribeIndex(ctx context.Context, req *DescribeIndexRequest) (*DescribeIndexResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeIndex not implemented") +} +func (*UnimplementedMilvusServiceServer) Insert(ctx context.Context, req *InsertRequest) (*InsertResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Insert not implemented") +} +func (*UnimplementedMilvusServiceServer) Search(ctx context.Context, req *SearchRequest) (*QueryResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method Search not implemented") +} +func (*UnimplementedMilvusServiceServer) Flush(ctx context.Context, req *FlushRequest) (*commonpb.Status, error) { + return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented") +} + +func RegisterMilvusServiceServer(s *grpc.Server, srv MilvusServiceServer) { + s.RegisterService(&_MilvusService_serviceDesc, srv) +} + +func _MilvusService_CreateCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).CreateCollection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/CreateCollection", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).CreateCollection(ctx, req.(*CreateCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_DropCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DropCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).DropCollection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/DropCollection", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).DropCollection(ctx, req.(*DropCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_HasCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HasCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).HasCollection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/HasCollection", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).HasCollection(ctx, req.(*HasCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_LoadCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoadCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).LoadCollection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/LoadCollection", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).LoadCollection(ctx, req.(*LoadCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_ReleaseCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReleaseCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).ReleaseCollection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/ReleaseCollection", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).ReleaseCollection(ctx, req.(*ReleaseCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_DescribeCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).DescribeCollection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/DescribeCollection", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).DescribeCollection(ctx, req.(*DescribeCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_GetCollectionStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CollectionStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).GetCollectionStatistics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/GetCollectionStatistics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).GetCollectionStatistics(ctx, req.(*CollectionStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_ShowCollections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ShowCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).ShowCollections(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/ShowCollections", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).ShowCollections(ctx, req.(*ShowCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_CreatePartition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePartitionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).CreatePartition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/CreatePartition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).CreatePartition(ctx, req.(*CreatePartitionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_DropPartition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DropPartitionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).DropPartition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/DropPartition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).DropPartition(ctx, req.(*DropPartitionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_HasPartition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HasPartitionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).HasPartition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/HasPartition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).HasPartition(ctx, req.(*HasPartitionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_LoadPartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoadPartitonRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).LoadPartitions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/LoadPartitions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).LoadPartitions(ctx, req.(*LoadPartitonRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_ReleasePartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReleasePartitionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).ReleasePartitions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/ReleasePartitions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).ReleasePartitions(ctx, req.(*ReleasePartitionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_GetPartitionStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PartitionStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).GetPartitionStatistics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/GetPartitionStatistics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).GetPartitionStatistics(ctx, req.(*PartitionStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_ShowPartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ShowPartitionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).ShowPartitions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/ShowPartitions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).ShowPartitions(ctx, req.(*ShowPartitionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_CreateIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateIndexRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).CreateIndex(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/CreateIndex", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).CreateIndex(ctx, req.(*CreateIndexRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_DescribeIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeIndexRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).DescribeIndex(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/DescribeIndex", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).DescribeIndex(ctx, req.(*DescribeIndexRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_Insert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InsertRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).Insert(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/Insert", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).Insert(ctx, req.(*InsertRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).Search(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/Search", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).Search(ctx, req.(*SearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MilvusService_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FlushRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MilvusServiceServer).Flush(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.milvus.MilvusService/Flush", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MilvusServiceServer).Flush(ctx, req.(*FlushRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _MilvusService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "milvus.proto.milvus.MilvusService", + HandlerType: (*MilvusServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateCollection", + Handler: _MilvusService_CreateCollection_Handler, + }, + { + MethodName: "DropCollection", + Handler: _MilvusService_DropCollection_Handler, + }, + { + MethodName: "HasCollection", + Handler: _MilvusService_HasCollection_Handler, + }, + { + MethodName: "LoadCollection", + Handler: _MilvusService_LoadCollection_Handler, + }, + { + MethodName: "ReleaseCollection", + Handler: _MilvusService_ReleaseCollection_Handler, + }, + { + MethodName: "DescribeCollection", + Handler: _MilvusService_DescribeCollection_Handler, + }, + { + MethodName: "GetCollectionStatistics", + Handler: _MilvusService_GetCollectionStatistics_Handler, + }, + { + MethodName: "ShowCollections", + Handler: _MilvusService_ShowCollections_Handler, + }, + { + MethodName: "CreatePartition", + Handler: _MilvusService_CreatePartition_Handler, + }, + { + MethodName: "DropPartition", + Handler: _MilvusService_DropPartition_Handler, + }, + { + MethodName: "HasPartition", + Handler: _MilvusService_HasPartition_Handler, + }, + { + MethodName: "LoadPartitions", + Handler: _MilvusService_LoadPartitions_Handler, + }, + { + MethodName: "ReleasePartitions", + Handler: _MilvusService_ReleasePartitions_Handler, + }, + { + MethodName: "GetPartitionStatistics", + Handler: _MilvusService_GetPartitionStatistics_Handler, + }, + { + MethodName: "ShowPartitions", + Handler: _MilvusService_ShowPartitions_Handler, + }, + { + MethodName: "CreateIndex", + Handler: _MilvusService_CreateIndex_Handler, + }, + { + MethodName: "DescribeIndex", + Handler: _MilvusService_DescribeIndex_Handler, + }, + { + MethodName: "Insert", + Handler: _MilvusService_Insert_Handler, + }, + { + MethodName: "Search", + Handler: _MilvusService_Search_Handler, + }, + { + MethodName: "Flush", + Handler: _MilvusService_Flush_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "milvus.proto", } diff --git a/internal/proxyservice/interface.go b/internal/proxyservice/interface.go new file mode 100644 index 0000000000..b57290924f --- /dev/null +++ b/internal/proxyservice/interface.go @@ -0,0 +1,16 @@ +package proxyservice + +import ( + "github.com/zilliztech/milvus-distributed/internal/proto/proxypb" + "github.com/zilliztech/milvus-distributed/internal/util/typeutil" +) + +type ServiceBase = typeutil.Service + +type Interface interface { + ServiceBase + RegisterLink() (proxypb.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 +} diff --git a/internal/proxyservice/proxyservice.go b/internal/proxyservice/proxyservice.go new file mode 100644 index 0000000000..99b3be15ac --- /dev/null +++ b/internal/proxyservice/proxyservice.go @@ -0,0 +1,54 @@ +package proxyservice + +import ( + "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2" + "github.com/zilliztech/milvus-distributed/internal/proto/proxypb" +) + +type ProxyService struct { + // implement Service + + //nodeClients [] .Interface + // factory method + +} + +func (s ProxyService) Init() { + panic("implement me") +} + +func (s ProxyService) Start() { + panic("implement me") +} + +func (s ProxyService) Stop() { + panic("implement me") +} + +func (s ProxyService) GetServiceStates() (internalpb2.ServiceStates, 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{} +} diff --git a/internal/util/rocksmq/rocksmq.go b/internal/util/rocksmq/rocksmq.go index 369cf2cceb..dfa63946ab 100644 --- a/internal/util/rocksmq/rocksmq.go +++ b/internal/util/rocksmq/rocksmq.go @@ -83,14 +83,26 @@ type RocksMQ struct { //tsoTicker *time.Ticker } -func NewRocksMQ() *RocksMQ { - mkv := memkv.NewMemoryKV() - // mstore, _ := - rmq := &RocksMQ{ - // store: mstore, - kv: mkv, +func NewRocksMQ(name string) (*RocksMQ, error) { + bbto := gorocksdb.NewDefaultBlockBasedTableOptions() + bbto.SetBlockCache(gorocksdb.NewLRUCache(3 << 30)) + opts := gorocksdb.NewDefaultOptions() + opts.SetBlockBasedTableFactory(bbto) + opts.SetCreateIfMissing(true) + opts.SetPrefixExtractor(gorocksdb.NewFixedPrefixTransform(FixedChannelNameLen + 1)) + + db, err := gorocksdb.OpenDb(opts, name) + if err != nil { + return nil, err } - return rmq + + mkv := memkv.NewMemoryKV() + + rmq := &RocksMQ{ + store: db, + kv: mkv, + } + return rmq, nil } //func (rmq *RocksMQ) startServerLoop(ctx context.Context) error { @@ -217,7 +229,7 @@ func (rmq *RocksMQ) CreateConsumerGroup(groupName string, channelName string) er if rmq.checkKeyExist(key) { return errors.New("ConsumerGroup " + groupName + " already exists.") } - err := rmq.kv.Save(key, "0") + err := rmq.kv.Save(key, "-1") if err != nil { return err } @@ -285,7 +297,60 @@ func (rmq *RocksMQ) Produce(channelName string, messages []ProducerMessage) erro } func (rmq *RocksMQ) Consume(groupName string, channelName string, n int) ([]ConsumerMessage, error) { - return nil, nil + metaKey := groupName + "/" + channelName + "/current_id" + currentID, err := rmq.kv.Load(metaKey) + if err != nil { + return nil, err + } + + readOpts := gorocksdb.NewDefaultReadOptions() + readOpts.SetPrefixSameAsStart(true) + iter := rmq.store.NewIterator(readOpts) + defer iter.Close() + + consumerMessage := make([]ConsumerMessage, 0, n) + + fixChanName, err := fixChannelName(channelName) + if err != nil { + return nil, err + } + dataKey := fixChanName + "/" + currentID + + // msgID is "-1" means this is the first consume operation + if currentID == "-1" { + iter.SeekToFirst() + } else { + iter.Seek([]byte(dataKey)) + } + + offset := 0 + for ; iter.Valid() && offset < n; iter.Next() { + key := iter.Key() + val := iter.Value() + offset++ + msgID, err := strconv.ParseInt(string(key.Data())[FixedChannelNameLen+1:], 10, 64) + if err != nil { + return nil, err + } + msg := ConsumerMessage{ + msgID: msgID, + payload: val.Data(), + } + consumerMessage = append(consumerMessage, msg) + key.Free() + val.Free() + } + if err := iter.Err(); err != nil { + return nil, err + } + + newID := consumerMessage[len(consumerMessage)-1].msgID + err = rmq.Seek(groupName, channelName, newID) + if err != nil { + return nil, err + } + + return consumerMessage, nil } func (rmq *RocksMQ) Seek(groupName string, channelName string, msgID UniqueID) error {