mirror of https://github.com/milvus-io/milvus.git
Change status proto to remove enum ErrorCode and replace it as int type & Remove ErrorMap in Server (#4399)
Signed-off-by: fishpenguin <kun.yu@zilliz.com>pull/4441/head
parent
8375e659cb
commit
8053ac44b5
|
@ -12,6 +12,7 @@ Please mark all changes in change log and use the issue from GitHub
|
|||
- \#3920 Allow an optional parameter `nbits` when creating IVF_PQ index
|
||||
- \#4363 Put starting process of prometheus and grafana into docker-compose
|
||||
- \#4376 Add an optional parameter naming `client_tag` on client constructor in c++ sdk
|
||||
- \#4398 Change status proto to remove enum ErrorCode and replace it as int type & Remove ErrorMap in Server
|
||||
|
||||
## Improvement
|
||||
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
../../cmake-build-debug/thirdparty/grpc/grpc-build/third_party/protobuf/protoc -I . --grpc_out=./gen-status --plugin=protoc-gen-grpc="../../cmake-build-debug/thirdparty/grpc/grpc-build/grpc_cpp_plugin" status.proto
|
||||
|
||||
../../cmake-build-debug/thirdparty/grpc/grpc-build/third_party/protobuf/protoc -I . --cpp_out=./gen-status status.proto
|
||||
|
||||
../../cmake-build-debug/thirdparty/grpc/grpc-build/third_party/protobuf/protoc -I . --grpc_out=./gen-milvus --plugin=protoc-gen-grpc="../../cmake-build-debug/thirdparty/grpc/grpc-build/grpc_cpp_plugin" milvus.proto
|
||||
|
||||
../../cmake-build-debug/thirdparty/grpc/grpc-build/third_party/protobuf/protoc -I . --cpp_out=./gen-milvus milvus.proto
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -33,7 +33,6 @@
|
|||
#include <google/protobuf/extension_set.h> // IWYU pragma: export
|
||||
#include <google/protobuf/generated_enum_reflection.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
#include "status.pb.h"
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#define PROTOBUF_INTERNAL_EXPORT_milvus_2eproto
|
||||
|
@ -49,7 +48,7 @@ struct TableStruct_milvus_2eproto {
|
|||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[41]
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[42]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
|
||||
|
@ -157,6 +156,9 @@ extern SearchParamDefaultTypeInternal _SearchParam_default_instance_;
|
|||
class SearchParamPB;
|
||||
class SearchParamPBDefaultTypeInternal;
|
||||
extern SearchParamPBDefaultTypeInternal _SearchParamPB_default_instance_;
|
||||
class Status;
|
||||
class StatusDefaultTypeInternal;
|
||||
extern StatusDefaultTypeInternal _Status_default_instance_;
|
||||
class StringReply;
|
||||
class StringReplyDefaultTypeInternal;
|
||||
extern StringReplyDefaultTypeInternal _StringReply_default_instance_;
|
||||
|
@ -217,6 +219,7 @@ template<> ::milvus::grpc::RangeQuery* Arena::CreateMaybeMessage<::milvus::grpc:
|
|||
template<> ::milvus::grpc::SearchInSegmentParam* Arena::CreateMaybeMessage<::milvus::grpc::SearchInSegmentParam>(Arena*);
|
||||
template<> ::milvus::grpc::SearchParam* Arena::CreateMaybeMessage<::milvus::grpc::SearchParam>(Arena*);
|
||||
template<> ::milvus::grpc::SearchParamPB* Arena::CreateMaybeMessage<::milvus::grpc::SearchParamPB>(Arena*);
|
||||
template<> ::milvus::grpc::Status* Arena::CreateMaybeMessage<::milvus::grpc::Status>(Arena*);
|
||||
template<> ::milvus::grpc::StringReply* Arena::CreateMaybeMessage<::milvus::grpc::StringReply>(Arena*);
|
||||
template<> ::milvus::grpc::TermQuery* Arena::CreateMaybeMessage<::milvus::grpc::TermQuery>(Arena*);
|
||||
template<> ::milvus::grpc::VectorFieldParam* Arena::CreateMaybeMessage<::milvus::grpc::VectorFieldParam>(Arena*);
|
||||
|
@ -321,6 +324,150 @@ inline bool Occur_Parse(
|
|||
}
|
||||
// ===================================================================
|
||||
|
||||
class Status :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Status) */ {
|
||||
public:
|
||||
Status();
|
||||
virtual ~Status();
|
||||
|
||||
Status(const Status& from);
|
||||
Status(Status&& from) noexcept
|
||||
: Status() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline Status& operator=(const Status& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline Status& operator=(Status&& from) noexcept {
|
||||
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
|
||||
if (this != &from) InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||
return GetMetadataStatic().descriptor;
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||
return GetMetadataStatic().reflection;
|
||||
}
|
||||
static const Status& default_instance();
|
||||
|
||||
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
|
||||
static inline const Status* internal_default_instance() {
|
||||
return reinterpret_cast<const Status*>(
|
||||
&_Status_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
0;
|
||||
|
||||
friend void swap(Status& a, Status& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(Status* other) {
|
||||
if (other == this) return;
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
inline Status* New() const final {
|
||||
return CreateMaybeMessage<Status>(nullptr);
|
||||
}
|
||||
|
||||
Status* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
|
||||
return CreateMaybeMessage<Status>(arena);
|
||||
}
|
||||
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void CopyFrom(const Status& from);
|
||||
void MergeFrom(const Status& from);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
void SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
inline void SharedCtor();
|
||||
inline void SharedDtor();
|
||||
void SetCachedSize(int size) const final;
|
||||
void InternalSwap(Status* other);
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "milvus.grpc.Status";
|
||||
}
|
||||
private:
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
|
||||
return nullptr;
|
||||
}
|
||||
inline void* MaybeArenaPtr() const {
|
||||
return nullptr;
|
||||
}
|
||||
public:
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
private:
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto);
|
||||
return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages];
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kReasonFieldNumber = 2,
|
||||
kErrorCodeFieldNumber = 1,
|
||||
};
|
||||
// string reason = 2;
|
||||
void clear_reason();
|
||||
const std::string& reason() const;
|
||||
void set_reason(const std::string& value);
|
||||
void set_reason(std::string&& value);
|
||||
void set_reason(const char* value);
|
||||
void set_reason(const char* value, size_t size);
|
||||
std::string* mutable_reason();
|
||||
std::string* release_reason();
|
||||
void set_allocated_reason(std::string* reason);
|
||||
|
||||
// int64 error_code = 1;
|
||||
void clear_error_code();
|
||||
::PROTOBUF_NAMESPACE_ID::int64 error_code() const;
|
||||
void set_error_code(::PROTOBUF_NAMESPACE_ID::int64 value);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:milvus.grpc.Status)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr reason_;
|
||||
::PROTOBUF_NAMESPACE_ID::int64 error_code_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_milvus_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class KeyValuePair :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.KeyValuePair) */ {
|
||||
public:
|
||||
|
@ -363,7 +510,7 @@ class KeyValuePair :
|
|||
&_KeyValuePair_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
0;
|
||||
1;
|
||||
|
||||
friend void swap(KeyValuePair& a, KeyValuePair& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -513,7 +660,7 @@ class CollectionName :
|
|||
&_CollectionName_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
1;
|
||||
2;
|
||||
|
||||
friend void swap(CollectionName& a, CollectionName& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -650,7 +797,7 @@ class CollectionNameList :
|
|||
&_CollectionNameList_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
2;
|
||||
3;
|
||||
|
||||
friend void swap(CollectionNameList& a, CollectionNameList& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -803,7 +950,7 @@ class FieldName :
|
|||
&_FieldName_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
3;
|
||||
4;
|
||||
|
||||
friend void swap(FieldName& a, FieldName& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -953,7 +1100,7 @@ class Mapping :
|
|||
&_Mapping_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
4;
|
||||
5;
|
||||
|
||||
friend void swap(Mapping& a, Mapping& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -1126,7 +1273,7 @@ class MappingList :
|
|||
&_MappingList_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
5;
|
||||
6;
|
||||
|
||||
friend void swap(MappingList& a, MappingList& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -1273,7 +1420,7 @@ class PartitionParam :
|
|||
&_PartitionParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
6;
|
||||
7;
|
||||
|
||||
friend void swap(PartitionParam& a, PartitionParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -1423,7 +1570,7 @@ class PartitionList :
|
|||
&_PartitionList_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
7;
|
||||
8;
|
||||
|
||||
friend void swap(PartitionList& a, PartitionList& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -1576,7 +1723,7 @@ class VectorRowRecord :
|
|||
&_VectorRowRecord_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
8;
|
||||
9;
|
||||
|
||||
friend void swap(VectorRowRecord& a, VectorRowRecord& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -1727,7 +1874,7 @@ class AttrRecord :
|
|||
&_AttrRecord_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
9;
|
||||
10;
|
||||
|
||||
friend void swap(AttrRecord& a, AttrRecord& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -1907,7 +2054,7 @@ class VectorRecord :
|
|||
&_VectorRecord_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
10;
|
||||
11;
|
||||
|
||||
friend void swap(VectorRecord& a, VectorRecord& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -2044,7 +2191,7 @@ class FieldValue :
|
|||
&_FieldValue_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
11;
|
||||
12;
|
||||
|
||||
friend void swap(FieldValue& a, FieldValue& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -2208,7 +2355,7 @@ class InsertParam :
|
|||
&_InsertParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
12;
|
||||
13;
|
||||
|
||||
friend void swap(InsertParam& a, InsertParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -2398,7 +2545,7 @@ class EntityIds :
|
|||
&_EntityIds_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
13;
|
||||
14;
|
||||
|
||||
friend void swap(EntityIds& a, EntityIds& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -2546,7 +2693,7 @@ class VectorParam :
|
|||
&_VectorParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
14;
|
||||
15;
|
||||
|
||||
friend void swap(VectorParam& a, VectorParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -2693,7 +2840,7 @@ class SearchParam :
|
|||
&_SearchParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
15;
|
||||
16;
|
||||
|
||||
friend void swap(SearchParam& a, SearchParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -2888,7 +3035,7 @@ class SearchInSegmentParam :
|
|||
&_SearchInSegmentParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
16;
|
||||
17;
|
||||
|
||||
friend void swap(SearchInSegmentParam& a, SearchInSegmentParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3041,7 +3188,7 @@ class Entities :
|
|||
&_Entities_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
17;
|
||||
18;
|
||||
|
||||
friend void swap(Entities& a, Entities& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3216,7 +3363,7 @@ class QueryResult :
|
|||
&_QueryResult_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
18;
|
||||
19;
|
||||
|
||||
friend void swap(QueryResult& a, QueryResult& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3408,7 +3555,7 @@ class StringReply :
|
|||
&_StringReply_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
19;
|
||||
20;
|
||||
|
||||
friend void swap(StringReply& a, StringReply& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3555,7 +3702,7 @@ class BoolReply :
|
|||
&_BoolReply_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
20;
|
||||
21;
|
||||
|
||||
friend void swap(BoolReply& a, BoolReply& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3696,7 +3843,7 @@ class CollectionRowCount :
|
|||
&_CollectionRowCount_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
21;
|
||||
22;
|
||||
|
||||
friend void swap(CollectionRowCount& a, CollectionRowCount& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3837,7 +3984,7 @@ class Command :
|
|||
&_Command_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
22;
|
||||
23;
|
||||
|
||||
friend void swap(Command& a, Command& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3974,7 +4121,7 @@ class IndexParam :
|
|||
&_IndexParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
23;
|
||||
24;
|
||||
|
||||
friend void swap(IndexParam& a, IndexParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -4160,7 +4307,7 @@ class FlushParam :
|
|||
&_FlushParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
24;
|
||||
25;
|
||||
|
||||
friend void swap(FlushParam& a, FlushParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -4303,7 +4450,7 @@ class CompactParam :
|
|||
&_CompactParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
25;
|
||||
26;
|
||||
|
||||
friend void swap(CompactParam& a, CompactParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -4447,7 +4594,7 @@ class DeleteByIDParam :
|
|||
&_DeleteByIDParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
26;
|
||||
27;
|
||||
|
||||
friend void swap(DeleteByIDParam& a, DeleteByIDParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -4598,7 +4745,7 @@ class CollectionInfo :
|
|||
&_CollectionInfo_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
27;
|
||||
28;
|
||||
|
||||
friend void swap(CollectionInfo& a, CollectionInfo& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -4745,7 +4892,7 @@ class GetEntityIDsParam :
|
|||
&_GetEntityIDsParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
28;
|
||||
29;
|
||||
|
||||
friend void swap(GetEntityIDsParam& a, GetEntityIDsParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -4889,7 +5036,7 @@ class EntityIdentity :
|
|||
&_EntityIdentity_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
29;
|
||||
30;
|
||||
|
||||
friend void swap(EntityIdentity& a, EntityIdentity& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -5059,7 +5206,7 @@ class VectorFieldParam :
|
|||
&_VectorFieldParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
30;
|
||||
31;
|
||||
|
||||
friend void swap(VectorFieldParam& a, VectorFieldParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -5196,7 +5343,7 @@ class FieldType :
|
|||
&_FieldType_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
31;
|
||||
32;
|
||||
|
||||
friend void swap(FieldType& a, FieldType& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -5352,7 +5499,7 @@ class FieldParam :
|
|||
&_FieldParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
32;
|
||||
33;
|
||||
|
||||
friend void swap(FieldParam& a, FieldParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -5529,7 +5676,7 @@ class VectorFieldRecord :
|
|||
&_VectorFieldRecord_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
33;
|
||||
34;
|
||||
|
||||
friend void swap(VectorFieldRecord& a, VectorFieldRecord& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -5666,7 +5813,7 @@ class TermQuery :
|
|||
&_TermQuery_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
34;
|
||||
35;
|
||||
|
||||
friend void swap(TermQuery& a, TermQuery& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -5858,7 +6005,7 @@ class CompareExpr :
|
|||
&_CompareExpr_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
35;
|
||||
36;
|
||||
|
||||
friend void swap(CompareExpr& a, CompareExpr& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -6002,7 +6149,7 @@ class RangeQuery :
|
|||
&_RangeQuery_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
36;
|
||||
37;
|
||||
|
||||
friend void swap(RangeQuery& a, RangeQuery& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -6172,7 +6319,7 @@ class VectorQuery :
|
|||
&_VectorQuery_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
37;
|
||||
38;
|
||||
|
||||
friend void swap(VectorQuery& a, VectorQuery& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -6349,7 +6496,7 @@ class BooleanQuery :
|
|||
&_BooleanQuery_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
38;
|
||||
39;
|
||||
|
||||
friend void swap(BooleanQuery& a, BooleanQuery& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -6501,7 +6648,7 @@ class GeneralQuery :
|
|||
&_GeneralQuery_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
39;
|
||||
40;
|
||||
|
||||
friend void swap(GeneralQuery& a, GeneralQuery& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -6679,7 +6826,7 @@ class SearchParamPB :
|
|||
&_SearchParamPB_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
40;
|
||||
41;
|
||||
|
||||
friend void swap(SearchParamPB& a, SearchParamPB& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -6823,6 +6970,75 @@ class SearchParamPB :
|
|||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif // __GNUC__
|
||||
// Status
|
||||
|
||||
// int64 error_code = 1;
|
||||
inline void Status::clear_error_code() {
|
||||
error_code_ = PROTOBUF_LONGLONG(0);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::int64 Status::error_code() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Status.error_code)
|
||||
return error_code_;
|
||||
}
|
||||
inline void Status::set_error_code(::PROTOBUF_NAMESPACE_ID::int64 value) {
|
||||
|
||||
error_code_ = value;
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.Status.error_code)
|
||||
}
|
||||
|
||||
// string reason = 2;
|
||||
inline void Status::clear_reason() {
|
||||
reason_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline const std::string& Status::reason() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Status.reason)
|
||||
return reason_.GetNoArena();
|
||||
}
|
||||
inline void Status::set_reason(const std::string& value) {
|
||||
|
||||
reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline void Status::set_reason(std::string&& value) {
|
||||
|
||||
reason_.SetNoArena(
|
||||
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
||||
// @@protoc_insertion_point(field_set_rvalue:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline void Status::set_reason(const char* value) {
|
||||
GOOGLE_DCHECK(value != nullptr);
|
||||
|
||||
reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
||||
// @@protoc_insertion_point(field_set_char:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline void Status::set_reason(const char* value, size_t size) {
|
||||
|
||||
reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
::std::string(reinterpret_cast<const char*>(value), size));
|
||||
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline std::string* Status::mutable_reason() {
|
||||
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.Status.reason)
|
||||
return reason_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline std::string* Status::release_reason() {
|
||||
// @@protoc_insertion_point(field_release:milvus.grpc.Status.reason)
|
||||
|
||||
return reason_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline void Status::set_allocated_reason(std::string* reason) {
|
||||
if (reason != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
reason_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), reason);
|
||||
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.Status.reason)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// KeyValuePair
|
||||
|
||||
// string key = 1;
|
||||
|
@ -6990,6 +7206,12 @@ inline void CollectionName::set_allocated_collection_name(std::string* collectio
|
|||
inline bool CollectionNameList::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void CollectionNameList::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& CollectionNameList::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.CollectionNameList.status)
|
||||
|
@ -7015,7 +7237,7 @@ inline ::milvus::grpc::Status* CollectionNameList::mutable_status() {
|
|||
inline void CollectionNameList::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -7210,6 +7432,12 @@ inline void FieldName::set_allocated_field_name(std::string* field_name) {
|
|||
inline bool Mapping::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void Mapping::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& Mapping::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Mapping.status)
|
||||
|
@ -7235,7 +7463,7 @@ inline ::milvus::grpc::Status* Mapping::mutable_status() {
|
|||
inline void Mapping::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -7370,6 +7598,12 @@ Mapping::extra_params() const {
|
|||
inline bool MappingList::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void MappingList::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& MappingList::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.MappingList.status)
|
||||
|
@ -7395,7 +7629,7 @@ inline ::milvus::grpc::Status* MappingList::mutable_status() {
|
|||
inline void MappingList::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -7555,6 +7789,12 @@ inline void PartitionParam::set_allocated_tag(std::string* tag) {
|
|||
inline bool PartitionList::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void PartitionList::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& PartitionList::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.PartitionList.status)
|
||||
|
@ -7580,7 +7820,7 @@ inline ::milvus::grpc::Status* PartitionList::mutable_status() {
|
|||
inline void PartitionList::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -8279,6 +8519,12 @@ InsertParam::extra_params() const {
|
|||
inline bool EntityIds::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void EntityIds::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& EntityIds::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.EntityIds.status)
|
||||
|
@ -8304,7 +8550,7 @@ inline ::milvus::grpc::Status* EntityIds::mutable_status() {
|
|||
inline void EntityIds::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -8815,6 +9061,12 @@ inline void SearchInSegmentParam::set_allocated_search_param(::milvus::grpc::Sea
|
|||
inline bool Entities::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void Entities::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& Entities::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Entities.status)
|
||||
|
@ -8840,7 +9092,7 @@ inline ::milvus::grpc::Status* Entities::mutable_status() {
|
|||
inline void Entities::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -8954,6 +9206,12 @@ Entities::fields() const {
|
|||
inline bool QueryResult::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void QueryResult::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& QueryResult::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.QueryResult.status)
|
||||
|
@ -8979,7 +9237,7 @@ inline ::milvus::grpc::Status* QueryResult::mutable_status() {
|
|||
inline void QueryResult::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -9158,6 +9416,12 @@ QueryResult::extra_params() const {
|
|||
inline bool StringReply::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void StringReply::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& StringReply::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.StringReply.status)
|
||||
|
@ -9183,7 +9447,7 @@ inline ::milvus::grpc::Status* StringReply::mutable_status() {
|
|||
inline void StringReply::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -9258,6 +9522,12 @@ inline void StringReply::set_allocated_string_reply(std::string* string_reply) {
|
|||
inline bool BoolReply::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void BoolReply::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& BoolReply::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.BoolReply.status)
|
||||
|
@ -9283,7 +9553,7 @@ inline ::milvus::grpc::Status* BoolReply::mutable_status() {
|
|||
inline void BoolReply::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -9321,6 +9591,12 @@ inline void BoolReply::set_bool_reply(bool value) {
|
|||
inline bool CollectionRowCount::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void CollectionRowCount::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& CollectionRowCount::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.CollectionRowCount.status)
|
||||
|
@ -9346,7 +9622,7 @@ inline ::milvus::grpc::Status* CollectionRowCount::mutable_status() {
|
|||
inline void CollectionRowCount::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -9439,6 +9715,12 @@ inline void Command::set_allocated_cmd(std::string* cmd) {
|
|||
inline bool IndexParam::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void IndexParam::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& IndexParam::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.IndexParam.status)
|
||||
|
@ -9464,7 +9746,7 @@ inline ::milvus::grpc::Status* IndexParam::mutable_status() {
|
|||
inline void IndexParam::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -9894,6 +10176,12 @@ DeleteByIDParam::mutable_id_array() {
|
|||
inline bool CollectionInfo::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void CollectionInfo::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& CollectionInfo::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.CollectionInfo.status)
|
||||
|
@ -9919,7 +10207,7 @@ inline ::milvus::grpc::Status* CollectionInfo::mutable_status() {
|
|||
inline void CollectionInfo::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -11506,6 +11794,8 @@ SearchParamPB::extra_params() const {
|
|||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: status.proto
|
||||
|
||||
#include "status.pb.h"
|
||||
#include "status.grpc.pb.h"
|
||||
|
||||
#include <functional>
|
||||
#include <grpcpp/impl/codegen/async_stream.h>
|
||||
#include <grpcpp/impl/codegen/async_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/channel_interface.h>
|
||||
#include <grpcpp/impl/codegen/client_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/client_callback.h>
|
||||
#include <grpcpp/impl/codegen/method_handler_impl.h>
|
||||
#include <grpcpp/impl/codegen/rpc_service_method.h>
|
||||
#include <grpcpp/impl/codegen/server_callback.h>
|
||||
#include <grpcpp/impl/codegen/service_type.h>
|
||||
#include <grpcpp/impl/codegen/sync_stream.h>
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
|
||||
} // namespace milvus
|
||||
} // namespace grpc
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: status.proto
|
||||
#ifndef GRPC_status_2eproto__INCLUDED
|
||||
#define GRPC_status_2eproto__INCLUDED
|
||||
|
||||
#include "status.pb.h"
|
||||
|
||||
#include <functional>
|
||||
#include <grpcpp/impl/codegen/async_generic_service.h>
|
||||
#include <grpcpp/impl/codegen/async_stream.h>
|
||||
#include <grpcpp/impl/codegen/async_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/client_callback.h>
|
||||
#include <grpcpp/impl/codegen/client_context.h>
|
||||
#include <grpcpp/impl/codegen/completion_queue.h>
|
||||
#include <grpcpp/impl/codegen/method_handler_impl.h>
|
||||
#include <grpcpp/impl/codegen/proto_utils.h>
|
||||
#include <grpcpp/impl/codegen/rpc_method.h>
|
||||
#include <grpcpp/impl/codegen/server_callback.h>
|
||||
#include <grpcpp/impl/codegen/server_context.h>
|
||||
#include <grpcpp/impl/codegen/service_type.h>
|
||||
#include <grpcpp/impl/codegen/status.h>
|
||||
#include <grpcpp/impl/codegen/stub_options.h>
|
||||
#include <grpcpp/impl/codegen/sync_stream.h>
|
||||
|
||||
namespace grpc_impl {
|
||||
class CompletionQueue;
|
||||
class ServerCompletionQueue;
|
||||
class ServerContext;
|
||||
} // namespace grpc_impl
|
||||
|
||||
namespace grpc {
|
||||
namespace experimental {
|
||||
template <typename RequestT, typename ResponseT>
|
||||
class MessageAllocator;
|
||||
} // namespace experimental
|
||||
} // namespace grpc
|
||||
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
|
||||
|
||||
#endif // GRPC_status_2eproto__INCLUDED
|
|
@ -1,461 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: status.proto
|
||||
|
||||
#include "status.pb.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/wire_format_lite.h>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/reflection_ops.h>
|
||||
#include <google/protobuf/wire_format.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
class StatusDefaultTypeInternal {
|
||||
public:
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Status> _instance;
|
||||
} _Status_default_instance_;
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
static void InitDefaultsscc_info_Status_status_2eproto() {
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
|
||||
{
|
||||
void* ptr = &::milvus::grpc::_Status_default_instance_;
|
||||
new (ptr) ::milvus::grpc::Status();
|
||||
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
|
||||
}
|
||||
::milvus::grpc::Status::InitAsDefaultInstance();
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Status_status_2eproto =
|
||||
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Status_status_2eproto}, {}};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_status_2eproto[1];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_status_2eproto[1];
|
||||
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_status_2eproto = nullptr;
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_status_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::Status, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::Status, error_code_),
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::Status, reason_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, sizeof(::milvus::grpc::Status)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::grpc::_Status_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_status_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
"\n\014status.proto\022\013milvus.grpc\"D\n\006Status\022*\n"
|
||||
"\nerror_code\030\001 \001(\0162\026.milvus.grpc.ErrorCod"
|
||||
"e\022\016\n\006reason\030\002 \001(\t*\242\004\n\tErrorCode\022\013\n\007SUCCE"
|
||||
"SS\020\000\022\024\n\020UNEXPECTED_ERROR\020\001\022\022\n\016CONNECT_FA"
|
||||
"ILED\020\002\022\025\n\021PERMISSION_DENIED\020\003\022\031\n\025COLLECT"
|
||||
"ION_NOT_EXISTS\020\004\022\024\n\020ILLEGAL_ARGUMENT\020\005\022\025"
|
||||
"\n\021ILLEGAL_DIMENSION\020\007\022\026\n\022ILLEGAL_INDEX_T"
|
||||
"YPE\020\010\022\033\n\027ILLEGAL_COLLECTION_NAME\020\t\022\020\n\014IL"
|
||||
"LEGAL_TOPK\020\n\022\025\n\021ILLEGAL_ROWRECORD\020\013\022\025\n\021I"
|
||||
"LLEGAL_VECTOR_ID\020\014\022\031\n\025ILLEGAL_SEARCH_RES"
|
||||
"ULT\020\r\022\022\n\016FILE_NOT_FOUND\020\016\022\017\n\013META_FAILED"
|
||||
"\020\017\022\020\n\014CACHE_FAILED\020\020\022\030\n\024CANNOT_CREATE_FO"
|
||||
"LDER\020\021\022\026\n\022CANNOT_CREATE_FILE\020\022\022\030\n\024CANNOT"
|
||||
"_DELETE_FOLDER\020\023\022\026\n\022CANNOT_DELETE_FILE\020\024"
|
||||
"\022\025\n\021BUILD_INDEX_ERROR\020\025\022\021\n\rILLEGAL_NLIST"
|
||||
"\020\026\022\027\n\023ILLEGAL_METRIC_TYPE\020\027\022\021\n\rOUT_OF_ME"
|
||||
"MORY\020\030b\006proto3"
|
||||
;
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_status_2eproto_deps[1] = {
|
||||
};
|
||||
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_status_2eproto_sccs[1] = {
|
||||
&scc_info_Status_status_2eproto.base,
|
||||
};
|
||||
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_status_2eproto_once;
|
||||
static bool descriptor_table_status_2eproto_initialized = false;
|
||||
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_status_2eproto = {
|
||||
&descriptor_table_status_2eproto_initialized, descriptor_table_protodef_status_2eproto, "status.proto", 654,
|
||||
&descriptor_table_status_2eproto_once, descriptor_table_status_2eproto_sccs, descriptor_table_status_2eproto_deps, 1, 0,
|
||||
schemas, file_default_instances, TableStruct_status_2eproto::offsets,
|
||||
file_level_metadata_status_2eproto, 1, file_level_enum_descriptors_status_2eproto, file_level_service_descriptors_status_2eproto,
|
||||
};
|
||||
|
||||
// Force running AddDescriptors() at dynamic initialization time.
|
||||
static bool dynamic_init_dummy_status_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_status_2eproto), true);
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ErrorCode_descriptor() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_status_2eproto);
|
||||
return file_level_enum_descriptors_status_2eproto[0];
|
||||
}
|
||||
bool ErrorCode_IsValid(int value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
case 23:
|
||||
case 24:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
void Status::InitAsDefaultInstance() {
|
||||
}
|
||||
class Status::_Internal {
|
||||
public:
|
||||
};
|
||||
|
||||
Status::Status()
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
|
||||
SharedCtor();
|
||||
// @@protoc_insertion_point(constructor:milvus.grpc.Status)
|
||||
}
|
||||
Status::Status(const Status& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(),
|
||||
_internal_metadata_(nullptr) {
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
reason_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
if (!from.reason().empty()) {
|
||||
reason_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.reason_);
|
||||
}
|
||||
error_code_ = from.error_code_;
|
||||
// @@protoc_insertion_point(copy_constructor:milvus.grpc.Status)
|
||||
}
|
||||
|
||||
void Status::SharedCtor() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Status_status_2eproto.base);
|
||||
reason_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
error_code_ = 0;
|
||||
}
|
||||
|
||||
Status::~Status() {
|
||||
// @@protoc_insertion_point(destructor:milvus.grpc.Status)
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
void Status::SharedDtor() {
|
||||
reason_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
|
||||
void Status::SetCachedSize(int size) const {
|
||||
_cached_size_.Set(size);
|
||||
}
|
||||
const Status& Status::default_instance() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Status_status_2eproto.base);
|
||||
return *internal_default_instance();
|
||||
}
|
||||
|
||||
|
||||
void Status::Clear() {
|
||||
// @@protoc_insertion_point(message_clear_start:milvus.grpc.Status)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
reason_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
error_code_ = 0;
|
||||
_internal_metadata_.Clear();
|
||||
}
|
||||
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* Status::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
||||
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||||
while (!ctx->Done(&ptr)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
||||
CHK_(ptr);
|
||||
switch (tag >> 3) {
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
case 1:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
|
||||
CHK_(ptr);
|
||||
set_error_code(static_cast<::milvus::grpc::ErrorCode>(val));
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
// string reason = 2;
|
||||
case 2:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_reason(), ptr, ctx, "milvus.grpc.Status.reason");
|
||||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
default: {
|
||||
handle_unusual:
|
||||
if ((tag & 7) == 4 || tag == 0) {
|
||||
ctx->SetLastTag(tag);
|
||||
goto success;
|
||||
}
|
||||
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
|
||||
CHK_(ptr != nullptr);
|
||||
continue;
|
||||
}
|
||||
} // switch
|
||||
} // while
|
||||
success:
|
||||
return ptr;
|
||||
failure:
|
||||
ptr = nullptr;
|
||||
goto success;
|
||||
#undef CHK_
|
||||
}
|
||||
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
bool Status::MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
|
||||
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
// @@protoc_insertion_point(parse_start:milvus.grpc.Status)
|
||||
for (;;) {
|
||||
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
||||
tag = p.first;
|
||||
if (!p.second) goto handle_unusual;
|
||||
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
case 1: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
|
||||
int value = 0;
|
||||
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
|
||||
int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
|
||||
input, &value)));
|
||||
set_error_code(static_cast< ::milvus::grpc::ErrorCode >(value));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// string reason = 2;
|
||||
case 2: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
||||
input, this->mutable_reason()));
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->reason().data(), static_cast<int>(this->reason().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
||||
"milvus.grpc.Status.reason"));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
handle_unusual:
|
||||
if (tag == 0) {
|
||||
goto success;
|
||||
}
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
|
||||
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
success:
|
||||
// @@protoc_insertion_point(parse_success:milvus.grpc.Status)
|
||||
return true;
|
||||
failure:
|
||||
// @@protoc_insertion_point(parse_failure:milvus.grpc.Status)
|
||||
return false;
|
||||
#undef DO_
|
||||
}
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
|
||||
void Status::SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
|
||||
// @@protoc_insertion_point(serialize_start:milvus.grpc.Status)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
if (this->error_code() != 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
|
||||
1, this->error_code(), output);
|
||||
}
|
||||
|
||||
// string reason = 2;
|
||||
if (this->reason().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->reason().data(), static_cast<int>(this->reason().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.Status.reason");
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
||||
2, this->reason(), output);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
|
||||
_internal_metadata_.unknown_fields(), output);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_end:milvus.grpc.Status)
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* Status::InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.Status)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
if (this->error_code() != 0) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
|
||||
1, this->error_code(), target);
|
||||
}
|
||||
|
||||
// string reason = 2;
|
||||
if (this->reason().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->reason().data(), static_cast<int>(this->reason().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.Status.reason");
|
||||
target =
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
||||
2, this->reason(), target);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields(), target);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.Status)
|
||||
return target;
|
||||
}
|
||||
|
||||
size_t Status::ByteSizeLong() const {
|
||||
// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.Status)
|
||||
size_t total_size = 0;
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
total_size +=
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
|
||||
_internal_metadata_.unknown_fields());
|
||||
}
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string reason = 2;
|
||||
if (this->reason().size() > 0) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->reason());
|
||||
}
|
||||
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
if (this->error_code() != 0) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->error_code());
|
||||
}
|
||||
|
||||
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
|
||||
SetCachedSize(cached_size);
|
||||
return total_size;
|
||||
}
|
||||
|
||||
void Status::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.Status)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
const Status* source =
|
||||
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Status>(
|
||||
&from);
|
||||
if (source == nullptr) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.Status)
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
|
||||
} else {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.Status)
|
||||
MergeFrom(*source);
|
||||
}
|
||||
}
|
||||
|
||||
void Status::MergeFrom(const Status& from) {
|
||||
// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.Status)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (from.reason().size() > 0) {
|
||||
|
||||
reason_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.reason_);
|
||||
}
|
||||
if (from.error_code() != 0) {
|
||||
set_error_code(from.error_code());
|
||||
}
|
||||
}
|
||||
|
||||
void Status::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.Status)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void Status::CopyFrom(const Status& from) {
|
||||
// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.Status)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool Status::IsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Status::InternalSwap(Status* other) {
|
||||
using std::swap;
|
||||
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||||
reason_.Swap(&other->reason_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
GetArenaNoVirtual());
|
||||
swap(error_code_, other->error_code_);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata Status::GetMetadata() const {
|
||||
return GetMetadataStatic();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE ::milvus::grpc::Status* Arena::CreateMaybeMessage< ::milvus::grpc::Status >(Arena* arena) {
|
||||
return Arena::CreateInternal< ::milvus::grpc::Status >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
#include <google/protobuf/port_undef.inc>
|
|
@ -1,360 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: status.proto
|
||||
|
||||
#ifndef GOOGLE_PROTOBUF_INCLUDED_status_2eproto
|
||||
#define GOOGLE_PROTOBUF_INCLUDED_status_2eproto
|
||||
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#if PROTOBUF_VERSION < 3009000
|
||||
#error This file was generated by a newer version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please update
|
||||
#error your headers.
|
||||
#endif
|
||||
#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
|
||||
#error This file was generated by an older version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please
|
||||
#error regenerate this file with a newer version of protoc.
|
||||
#endif
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/arena.h>
|
||||
#include <google/protobuf/arenastring.h>
|
||||
#include <google/protobuf/generated_message_table_driven.h>
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/inlined_string_field.h>
|
||||
#include <google/protobuf/metadata.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
|
||||
#include <google/protobuf/extension_set.h> // IWYU pragma: export
|
||||
#include <google/protobuf/generated_enum_reflection.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#define PROTOBUF_INTERNAL_EXPORT_status_2eproto
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
namespace internal {
|
||||
class AnyMetadata;
|
||||
} // namespace internal
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// Internal implementation detail -- do not use these members.
|
||||
struct TableStruct_status_2eproto {
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
|
||||
};
|
||||
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_status_2eproto;
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
class Status;
|
||||
class StatusDefaultTypeInternal;
|
||||
extern StatusDefaultTypeInternal _Status_default_instance_;
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> ::milvus::grpc::Status* Arena::CreateMaybeMessage<::milvus::grpc::Status>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
|
||||
enum ErrorCode : int {
|
||||
SUCCESS = 0,
|
||||
UNEXPECTED_ERROR = 1,
|
||||
CONNECT_FAILED = 2,
|
||||
PERMISSION_DENIED = 3,
|
||||
COLLECTION_NOT_EXISTS = 4,
|
||||
ILLEGAL_ARGUMENT = 5,
|
||||
ILLEGAL_DIMENSION = 7,
|
||||
ILLEGAL_INDEX_TYPE = 8,
|
||||
ILLEGAL_COLLECTION_NAME = 9,
|
||||
ILLEGAL_TOPK = 10,
|
||||
ILLEGAL_ROWRECORD = 11,
|
||||
ILLEGAL_VECTOR_ID = 12,
|
||||
ILLEGAL_SEARCH_RESULT = 13,
|
||||
FILE_NOT_FOUND = 14,
|
||||
META_FAILED = 15,
|
||||
CACHE_FAILED = 16,
|
||||
CANNOT_CREATE_FOLDER = 17,
|
||||
CANNOT_CREATE_FILE = 18,
|
||||
CANNOT_DELETE_FOLDER = 19,
|
||||
CANNOT_DELETE_FILE = 20,
|
||||
BUILD_INDEX_ERROR = 21,
|
||||
ILLEGAL_NLIST = 22,
|
||||
ILLEGAL_METRIC_TYPE = 23,
|
||||
OUT_OF_MEMORY = 24,
|
||||
ErrorCode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
|
||||
ErrorCode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
|
||||
};
|
||||
bool ErrorCode_IsValid(int value);
|
||||
constexpr ErrorCode ErrorCode_MIN = SUCCESS;
|
||||
constexpr ErrorCode ErrorCode_MAX = OUT_OF_MEMORY;
|
||||
constexpr int ErrorCode_ARRAYSIZE = ErrorCode_MAX + 1;
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ErrorCode_descriptor();
|
||||
template<typename T>
|
||||
inline const std::string& ErrorCode_Name(T enum_t_value) {
|
||||
static_assert(::std::is_same<T, ErrorCode>::value ||
|
||||
::std::is_integral<T>::value,
|
||||
"Incorrect type passed to function ErrorCode_Name.");
|
||||
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
|
||||
ErrorCode_descriptor(), enum_t_value);
|
||||
}
|
||||
inline bool ErrorCode_Parse(
|
||||
const std::string& name, ErrorCode* value) {
|
||||
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<ErrorCode>(
|
||||
ErrorCode_descriptor(), name, value);
|
||||
}
|
||||
// ===================================================================
|
||||
|
||||
class Status :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Status) */ {
|
||||
public:
|
||||
Status();
|
||||
virtual ~Status();
|
||||
|
||||
Status(const Status& from);
|
||||
Status(Status&& from) noexcept
|
||||
: Status() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline Status& operator=(const Status& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline Status& operator=(Status&& from) noexcept {
|
||||
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
|
||||
if (this != &from) InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||
return GetMetadataStatic().descriptor;
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||
return GetMetadataStatic().reflection;
|
||||
}
|
||||
static const Status& default_instance();
|
||||
|
||||
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
|
||||
static inline const Status* internal_default_instance() {
|
||||
return reinterpret_cast<const Status*>(
|
||||
&_Status_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
0;
|
||||
|
||||
friend void swap(Status& a, Status& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(Status* other) {
|
||||
if (other == this) return;
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
inline Status* New() const final {
|
||||
return CreateMaybeMessage<Status>(nullptr);
|
||||
}
|
||||
|
||||
Status* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
|
||||
return CreateMaybeMessage<Status>(arena);
|
||||
}
|
||||
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void CopyFrom(const Status& from);
|
||||
void MergeFrom(const Status& from);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
void SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
inline void SharedCtor();
|
||||
inline void SharedDtor();
|
||||
void SetCachedSize(int size) const final;
|
||||
void InternalSwap(Status* other);
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "milvus.grpc.Status";
|
||||
}
|
||||
private:
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
|
||||
return nullptr;
|
||||
}
|
||||
inline void* MaybeArenaPtr() const {
|
||||
return nullptr;
|
||||
}
|
||||
public:
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
private:
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_status_2eproto);
|
||||
return ::descriptor_table_status_2eproto.file_level_metadata[kIndexInFileMessages];
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kReasonFieldNumber = 2,
|
||||
kErrorCodeFieldNumber = 1,
|
||||
};
|
||||
// string reason = 2;
|
||||
void clear_reason();
|
||||
const std::string& reason() const;
|
||||
void set_reason(const std::string& value);
|
||||
void set_reason(std::string&& value);
|
||||
void set_reason(const char* value);
|
||||
void set_reason(const char* value, size_t size);
|
||||
std::string* mutable_reason();
|
||||
std::string* release_reason();
|
||||
void set_allocated_reason(std::string* reason);
|
||||
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
void clear_error_code();
|
||||
::milvus::grpc::ErrorCode error_code() const;
|
||||
void set_error_code(::milvus::grpc::ErrorCode value);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:milvus.grpc.Status)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr reason_;
|
||||
int error_code_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_status_2eproto;
|
||||
};
|
||||
// ===================================================================
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif // __GNUC__
|
||||
// Status
|
||||
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
inline void Status::clear_error_code() {
|
||||
error_code_ = 0;
|
||||
}
|
||||
inline ::milvus::grpc::ErrorCode Status::error_code() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Status.error_code)
|
||||
return static_cast< ::milvus::grpc::ErrorCode >(error_code_);
|
||||
}
|
||||
inline void Status::set_error_code(::milvus::grpc::ErrorCode value) {
|
||||
|
||||
error_code_ = value;
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.Status.error_code)
|
||||
}
|
||||
|
||||
// string reason = 2;
|
||||
inline void Status::clear_reason() {
|
||||
reason_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline const std::string& Status::reason() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Status.reason)
|
||||
return reason_.GetNoArena();
|
||||
}
|
||||
inline void Status::set_reason(const std::string& value) {
|
||||
|
||||
reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline void Status::set_reason(std::string&& value) {
|
||||
|
||||
reason_.SetNoArena(
|
||||
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
||||
// @@protoc_insertion_point(field_set_rvalue:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline void Status::set_reason(const char* value) {
|
||||
GOOGLE_DCHECK(value != nullptr);
|
||||
|
||||
reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
||||
// @@protoc_insertion_point(field_set_char:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline void Status::set_reason(const char* value, size_t size) {
|
||||
|
||||
reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
::std::string(reinterpret_cast<const char*>(value), size));
|
||||
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline std::string* Status::mutable_reason() {
|
||||
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.Status.reason)
|
||||
return reason_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline std::string* Status::release_reason() {
|
||||
// @@protoc_insertion_point(field_release:milvus.grpc.Status.reason)
|
||||
|
||||
return reason_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline void Status::set_allocated_reason(std::string* reason) {
|
||||
if (reason != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
reason_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), reason);
|
||||
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.Status.reason)
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // __GNUC__
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
template <> struct is_proto_enum< ::milvus::grpc::ErrorCode> : ::std::true_type {};
|
||||
template <>
|
||||
inline const EnumDescriptor* GetEnumDescriptor< ::milvus::grpc::ErrorCode>() {
|
||||
return ::milvus::grpc::ErrorCode_descriptor();
|
||||
}
|
||||
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_status_2eproto
|
|
@ -1,7 +1,5 @@
|
|||
syntax = "proto3";
|
||||
|
||||
import "status.proto";
|
||||
|
||||
package milvus.grpc;
|
||||
|
||||
/**
|
||||
|
@ -24,6 +22,15 @@ enum DataType {
|
|||
VECTOR_FLOAT = 101;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Status
|
||||
*/
|
||||
message Status {
|
||||
int64 error_code = 1;
|
||||
string reason = 2;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief General usage
|
||||
*/
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package milvus.grpc;
|
||||
|
||||
enum ErrorCode {
|
||||
SUCCESS = 0;
|
||||
UNEXPECTED_ERROR = 1;
|
||||
CONNECT_FAILED = 2;
|
||||
PERMISSION_DENIED = 3;
|
||||
COLLECTION_NOT_EXISTS = 4;
|
||||
ILLEGAL_ARGUMENT = 5;
|
||||
ILLEGAL_DIMENSION = 7;
|
||||
ILLEGAL_INDEX_TYPE = 8;
|
||||
ILLEGAL_COLLECTION_NAME = 9;
|
||||
ILLEGAL_TOPK = 10;
|
||||
ILLEGAL_ROWRECORD = 11;
|
||||
ILLEGAL_VECTOR_ID = 12;
|
||||
ILLEGAL_SEARCH_RESULT = 13;
|
||||
FILE_NOT_FOUND = 14;
|
||||
META_FAILED = 15;
|
||||
CACHE_FAILED = 16;
|
||||
CANNOT_CREATE_FOLDER = 17;
|
||||
CANNOT_CREATE_FILE = 18;
|
||||
CANNOT_DELETE_FOLDER = 19;
|
||||
CANNOT_DELETE_FILE = 20;
|
||||
BUILD_INDEX_ERROR = 21;
|
||||
ILLEGAL_NLIST = 22;
|
||||
ILLEGAL_METRIC_TYPE = 23;
|
||||
OUT_OF_MEMORY = 24;
|
||||
}
|
||||
|
||||
message Status {
|
||||
ErrorCode error_code = 1;
|
||||
string reason = 2;
|
||||
}
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
set( GRPC_SERVICE_FILES ${MILVUS_ENGINE_SRC}/grpc/gen-milvus/milvus.grpc.pb.cc
|
||||
${MILVUS_ENGINE_SRC}/grpc/gen-milvus/milvus.pb.cc
|
||||
${MILVUS_ENGINE_SRC}/grpc/gen-status/status.grpc.pb.cc
|
||||
${MILVUS_ENGINE_SRC}/grpc/gen-status/status.pb.cc
|
||||
)
|
||||
|
||||
set( SERVER_INIT_FILES ${MILVUS_ENGINE_SRC}/server/init/CpuChecker.cpp
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include "db/Types.h"
|
||||
#include "grpc/gen-milvus/milvus.grpc.pb.h"
|
||||
#include "grpc/gen-status/status.grpc.pb.h"
|
||||
#include "grpc/gen-status/status.pb.h"
|
||||
#include "query/GeneralQuery.h"
|
||||
#include "utils/Json.h"
|
||||
#include "utils/Status.h"
|
||||
|
|
|
@ -35,49 +35,6 @@ namespace grpc {
|
|||
const char* EXTRA_PARAM_KEY = "params";
|
||||
const size_t MAXIMUM_FIELD_NUM = 64;
|
||||
|
||||
::milvus::grpc::ErrorCode
|
||||
ErrorMap(ErrorCode code) {
|
||||
static const std::map<ErrorCode, ::milvus::grpc::ErrorCode> code_map = {
|
||||
{SERVER_UNEXPECTED_ERROR, ::milvus::grpc::ErrorCode::UNEXPECTED_ERROR},
|
||||
{SERVER_UNSUPPORTED_ERROR, ::milvus::grpc::ErrorCode::UNEXPECTED_ERROR},
|
||||
{SERVER_NULL_POINTER, ::milvus::grpc::ErrorCode::UNEXPECTED_ERROR},
|
||||
{SERVER_INVALID_ARGUMENT, ::milvus::grpc::ErrorCode::ILLEGAL_ARGUMENT},
|
||||
{SERVER_FILE_NOT_FOUND, ::milvus::grpc::ErrorCode::FILE_NOT_FOUND},
|
||||
{SERVER_NOT_IMPLEMENT, ::milvus::grpc::ErrorCode::UNEXPECTED_ERROR},
|
||||
{SERVER_CANNOT_CREATE_FOLDER, ::milvus::grpc::ErrorCode::CANNOT_CREATE_FOLDER},
|
||||
{SERVER_CANNOT_CREATE_FILE, ::milvus::grpc::ErrorCode::CANNOT_CREATE_FILE},
|
||||
{SERVER_CANNOT_DELETE_FOLDER, ::milvus::grpc::ErrorCode::CANNOT_DELETE_FOLDER},
|
||||
{SERVER_CANNOT_DELETE_FILE, ::milvus::grpc::ErrorCode::CANNOT_DELETE_FILE},
|
||||
{SERVER_COLLECTION_NOT_EXIST, ::milvus::grpc::ErrorCode::COLLECTION_NOT_EXISTS},
|
||||
{SERVER_INVALID_COLLECTION_NAME, ::milvus::grpc::ErrorCode::ILLEGAL_COLLECTION_NAME},
|
||||
{SERVER_INVALID_COLLECTION_DIMENSION, ::milvus::grpc::ErrorCode::ILLEGAL_DIMENSION},
|
||||
{SERVER_INVALID_VECTOR_DIMENSION, ::milvus::grpc::ErrorCode::ILLEGAL_DIMENSION},
|
||||
{SERVER_INVALID_FIELD_NAME, ::milvus::grpc::ErrorCode::ILLEGAL_ARGUMENT},
|
||||
{SERVER_INVALID_FIELD_NUM, ::milvus::grpc::ErrorCode::ILLEGAL_ARGUMENT},
|
||||
|
||||
{SERVER_INVALID_INDEX_TYPE, ::milvus::grpc::ErrorCode::ILLEGAL_INDEX_TYPE},
|
||||
{SERVER_INVALID_ROWRECORD, ::milvus::grpc::ErrorCode::ILLEGAL_ROWRECORD},
|
||||
{SERVER_INVALID_ROWRECORD_ARRAY, ::milvus::grpc::ErrorCode::ILLEGAL_ROWRECORD},
|
||||
{SERVER_INVALID_TOPK, ::milvus::grpc::ErrorCode::ILLEGAL_TOPK},
|
||||
{SERVER_INVALID_NPROBE, ::milvus::grpc::ErrorCode::ILLEGAL_ARGUMENT},
|
||||
{SERVER_INVALID_INDEX_NLIST, ::milvus::grpc::ErrorCode::ILLEGAL_NLIST},
|
||||
{SERVER_INVALID_INDEX_METRIC_TYPE, ::milvus::grpc::ErrorCode::ILLEGAL_METRIC_TYPE},
|
||||
{SERVER_INVALID_SEGMENT_ROW_COUNT, ::milvus::grpc::ErrorCode::ILLEGAL_ARGUMENT},
|
||||
{SERVER_ILLEGAL_VECTOR_ID, ::milvus::grpc::ErrorCode::ILLEGAL_VECTOR_ID},
|
||||
{SERVER_ILLEGAL_SEARCH_RESULT, ::milvus::grpc::ErrorCode::ILLEGAL_SEARCH_RESULT},
|
||||
{SERVER_CACHE_FULL, ::milvus::grpc::ErrorCode::CACHE_FAILED},
|
||||
{DB_META_TRANSACTION_FAILED, ::milvus::grpc::ErrorCode::META_FAILED},
|
||||
{SERVER_BUILD_INDEX_ERROR, ::milvus::grpc::ErrorCode::BUILD_INDEX_ERROR},
|
||||
{SERVER_OUT_OF_MEMORY, ::milvus::grpc::ErrorCode::OUT_OF_MEMORY},
|
||||
};
|
||||
|
||||
if (code_map.find(code) != code_map.end()) {
|
||||
return code_map.at(code);
|
||||
} else {
|
||||
return ::milvus::grpc::ErrorCode::UNEXPECTED_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
std::string
|
||||
RequestMap(ReqType req_type) {
|
||||
static const std::unordered_map<ReqType, std::string> req_map = {
|
||||
|
@ -355,177 +312,6 @@ CopyDataChunkToEntity(const engine::DataChunkPtr& data_chunk,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
ConstructEntityResults(const std::vector<engine::AttrsData>& attrs, const std::vector<engine::VectorsData>& vectors,
|
||||
std::vector<std::string>& field_names, ::milvus::grpc::Entities* response) {
|
||||
if (!response) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto id_size = vectors.size();
|
||||
std::vector<int64_t> id_array(id_size);
|
||||
for (int64_t i = 0; i < id_size; i++) {
|
||||
id_array[i] = vectors[i].id_array_[0];
|
||||
}
|
||||
response->mutable_ids()->Resize(static_cast<int>(id_size), 0);
|
||||
memcpy(response->mutable_ids()->mutable_data(), id_array.data(), id_size * sizeof(int64_t));
|
||||
|
||||
std::string vector_field_name;
|
||||
bool set_valid_row = false;
|
||||
for (const auto& field_name : field_names) {
|
||||
if (!attrs.empty()) {
|
||||
if (attrs[0].attr_type_.find(field_name) != attrs[0].attr_type_.end()) {
|
||||
auto grpc_field = response->add_fields();
|
||||
grpc_field->set_field_name(field_name);
|
||||
grpc_field->set_type(static_cast<::milvus::grpc::DataType>(attrs[0].attr_type_.at(field_name)));
|
||||
auto grpc_attr_data = grpc_field->mutable_attr_record();
|
||||
|
||||
std::vector<int32_t> int32_data;
|
||||
std::vector<int64_t> int64_data;
|
||||
std::vector<float> float_data;
|
||||
std::vector<double> double_data;
|
||||
for (auto& attr : attrs) {
|
||||
if (not set_valid_row) {
|
||||
if (!attr.id_array_.empty()) {
|
||||
response->add_valid_row(true);
|
||||
} else {
|
||||
response->add_valid_row(false);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (attr.attr_data_.find(field_name) == attr.attr_data_.end()) {
|
||||
continue;
|
||||
}
|
||||
auto attr_data = attr.attr_data_.at(field_name);
|
||||
int32_t grpc_int32_data;
|
||||
int64_t grpc_int64_data;
|
||||
float grpc_float_data;
|
||||
double grpc_double_data;
|
||||
switch (attr.attr_type_.at(field_name)) {
|
||||
case engine::DataType::INT8: {
|
||||
if (attr_data.size() == sizeof(int8_t)) {
|
||||
grpc_int32_data = attr_data[0];
|
||||
int32_data.emplace_back(grpc_int32_data);
|
||||
} else {
|
||||
response->mutable_status()->set_error_code(::milvus::grpc::ErrorCode::UNEXPECTED_ERROR);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case engine::DataType::INT16: {
|
||||
if (attr_data.size() == sizeof(int16_t)) {
|
||||
int16_t value;
|
||||
memcpy(&value, attr_data.data(), sizeof(int16_t));
|
||||
grpc_int32_data = value;
|
||||
int32_data.emplace_back(grpc_int32_data);
|
||||
} else {
|
||||
response->mutable_status()->set_error_code(::milvus::grpc::ErrorCode::UNEXPECTED_ERROR);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case engine::DataType::INT32: {
|
||||
if (attr_data.size() == sizeof(int32_t)) {
|
||||
memcpy(&grpc_int32_data, attr_data.data(), sizeof(int32_t));
|
||||
int32_data.emplace_back(grpc_int32_data);
|
||||
} else {
|
||||
response->mutable_status()->set_error_code(::milvus::grpc::ErrorCode::UNEXPECTED_ERROR);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case engine::DataType::INT64: {
|
||||
if (attr_data.size() == sizeof(int64_t)) {
|
||||
memcpy(&grpc_int64_data, attr_data.data(), sizeof(int64_t));
|
||||
int64_data.emplace_back(grpc_int64_data);
|
||||
} else {
|
||||
response->mutable_status()->set_error_code(::milvus::grpc::ErrorCode::UNEXPECTED_ERROR);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case engine::DataType::FLOAT: {
|
||||
if (attr_data.size() == sizeof(float)) {
|
||||
float value;
|
||||
memcpy(&value, attr_data.data(), sizeof(float));
|
||||
grpc_float_data = value;
|
||||
float_data.emplace_back(grpc_float_data);
|
||||
} else {
|
||||
response->mutable_status()->set_error_code(::milvus::grpc::ErrorCode::UNEXPECTED_ERROR);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case engine::DataType::DOUBLE: {
|
||||
if (attr_data.size() == sizeof(double)) {
|
||||
memcpy(&grpc_double_data, attr_data.data(), sizeof(double));
|
||||
double_data.emplace_back(grpc_double_data);
|
||||
} else {
|
||||
response->mutable_status()->set_error_code(::milvus::grpc::ErrorCode::UNEXPECTED_ERROR);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: { break; }
|
||||
}
|
||||
}
|
||||
if (!int32_data.empty()) {
|
||||
grpc_attr_data->mutable_int32_value()->Resize(static_cast<int>(int32_data.size()), 0);
|
||||
memcpy(grpc_attr_data->mutable_int32_value()->mutable_data(), int32_data.data(),
|
||||
int32_data.size() * sizeof(int32_t));
|
||||
} else if (!int64_data.empty()) {
|
||||
grpc_attr_data->mutable_int64_value()->Resize(static_cast<int>(int64_data.size()), 0);
|
||||
memcpy(grpc_attr_data->mutable_int64_value()->mutable_data(), int64_data.data(),
|
||||
int64_data.size() * sizeof(int64_t));
|
||||
} else if (!float_data.empty()) {
|
||||
grpc_attr_data->mutable_float_value()->Resize(static_cast<int>(float_data.size()), 0.0);
|
||||
memcpy(grpc_attr_data->mutable_float_value()->mutable_data(), float_data.data(),
|
||||
float_data.size() * sizeof(float));
|
||||
} else if (!double_data.empty()) {
|
||||
grpc_attr_data->mutable_double_value()->Resize(static_cast<int>(double_data.size()), 0.0);
|
||||
memcpy(grpc_attr_data->mutable_double_value()->mutable_data(), double_data.data(),
|
||||
double_data.size() * sizeof(double));
|
||||
}
|
||||
set_valid_row = true;
|
||||
} else {
|
||||
vector_field_name = field_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(yukun): valid_row not used in vector records serialize
|
||||
if (!vector_field_name.empty()) {
|
||||
auto grpc_field = response->add_fields();
|
||||
grpc_field->set_field_name(vector_field_name);
|
||||
::milvus::grpc::VectorRecord* grpc_vector_data = grpc_field->mutable_vector_record();
|
||||
for (auto& vector : vectors) {
|
||||
auto grpc_data = grpc_vector_data->add_records();
|
||||
if (!vector.float_data_.empty()) {
|
||||
if (not set_valid_row) {
|
||||
response->add_valid_row(true);
|
||||
}
|
||||
grpc_field->set_type(::milvus::grpc::DataType::VECTOR_FLOAT);
|
||||
grpc_data->mutable_float_data()->Resize(vector.float_data_.size(), 0);
|
||||
memcpy(grpc_data->mutable_float_data()->mutable_data(), vector.float_data_.data(),
|
||||
vector.float_data_.size() * sizeof(float));
|
||||
} else if (!vector.binary_data_.empty()) {
|
||||
if (not set_valid_row) {
|
||||
response->add_valid_row(true);
|
||||
}
|
||||
grpc_field->set_type(::milvus::grpc::DataType::VECTOR_BINARY);
|
||||
grpc_data->mutable_binary_data()->resize(vector.binary_data_.size());
|
||||
memcpy(grpc_data->mutable_binary_data()->data(), vector.binary_data_.data(),
|
||||
vector.binary_data_.size() * sizeof(uint8_t));
|
||||
} else {
|
||||
if (not set_valid_row) {
|
||||
response->add_valid_row(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class GrpcConnectionContext : public milvus::server::ConnectionContext {
|
||||
public:
|
||||
explicit GrpcConnectionContext(::grpc::ServerContext* context) : context_(context) {
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <unordered_map>
|
||||
|
||||
#include "grpc/gen-milvus/milvus.grpc.pb.h"
|
||||
#include "grpc/gen-status/status.pb.h"
|
||||
#include "metrics/Prometheus.h"
|
||||
#include "opentracing/tracer.h"
|
||||
#include "server/context/Context.h"
|
||||
|
@ -39,25 +38,18 @@ namespace grpc {
|
|||
}
|
||||
|
||||
#define SET_TRACING_TAG(STATUS, SERVER_CONTEXT) \
|
||||
if ((STATUS).code() != ::milvus::grpc::ErrorCode::SUCCESS) { \
|
||||
if (!(STATUS).ok()) { \
|
||||
GetContext((SERVER_CONTEXT))->GetTraceContext()->GetSpan()->SetTag("error", true); \
|
||||
GetContext((SERVER_CONTEXT))->GetTraceContext()->GetSpan()->SetTag("error_message", (STATUS).message()); \
|
||||
}
|
||||
|
||||
#define SET_RESPONSE(RESPONSE, STATUS, SERVER_CONTEXT) \
|
||||
do { \
|
||||
if ((STATUS).ok()) { \
|
||||
(RESPONSE)->set_error_code(::milvus::grpc::ErrorCode::SUCCESS); \
|
||||
} else { \
|
||||
(RESPONSE)->set_error_code(ErrorMap((STATUS).code())); \
|
||||
} \
|
||||
(RESPONSE)->set_reason((STATUS).message()); \
|
||||
SET_TRACING_TAG(STATUS, SERVER_CONTEXT); \
|
||||
#define SET_RESPONSE(RESPONSE, STATUS, SERVER_CONTEXT) \
|
||||
do { \
|
||||
(RESPONSE)->set_error_code((STATUS).code()); \
|
||||
(RESPONSE)->set_reason((STATUS).message()); \
|
||||
SET_TRACING_TAG(STATUS, SERVER_CONTEXT); \
|
||||
} while (false);
|
||||
|
||||
::milvus::grpc::ErrorCode
|
||||
ErrorMap(ErrorCode code);
|
||||
|
||||
extern const char* EXTRA_PARAM_KEY;
|
||||
|
||||
class GrpcRequestHandler final : public ::milvus::grpc::MilvusService::Service, public GrpcInterceptorHookHandler {
|
||||
|
|
|
@ -72,8 +72,6 @@ aux_source_directory(grpc grpc_client_files)
|
|||
set(grpc_service_files
|
||||
grpc-gen/gen-milvus/milvus.grpc.pb.cc
|
||||
grpc-gen/gen-milvus/milvus.pb.cc
|
||||
grpc-gen/gen-status/status.grpc.pb.cc
|
||||
grpc-gen/gen-status/status.pb.cc
|
||||
)
|
||||
|
||||
set(grpc_interceptor_files
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -33,7 +33,6 @@
|
|||
#include <google/protobuf/extension_set.h> // IWYU pragma: export
|
||||
#include <google/protobuf/generated_enum_reflection.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
#include "status.pb.h"
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#define PROTOBUF_INTERNAL_EXPORT_milvus_2eproto
|
||||
|
@ -49,7 +48,7 @@ struct TableStruct_milvus_2eproto {
|
|||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[41]
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[42]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
|
||||
|
@ -157,6 +156,9 @@ extern SearchParamDefaultTypeInternal _SearchParam_default_instance_;
|
|||
class SearchParamPB;
|
||||
class SearchParamPBDefaultTypeInternal;
|
||||
extern SearchParamPBDefaultTypeInternal _SearchParamPB_default_instance_;
|
||||
class Status;
|
||||
class StatusDefaultTypeInternal;
|
||||
extern StatusDefaultTypeInternal _Status_default_instance_;
|
||||
class StringReply;
|
||||
class StringReplyDefaultTypeInternal;
|
||||
extern StringReplyDefaultTypeInternal _StringReply_default_instance_;
|
||||
|
@ -217,6 +219,7 @@ template<> ::milvus::grpc::RangeQuery* Arena::CreateMaybeMessage<::milvus::grpc:
|
|||
template<> ::milvus::grpc::SearchInSegmentParam* Arena::CreateMaybeMessage<::milvus::grpc::SearchInSegmentParam>(Arena*);
|
||||
template<> ::milvus::grpc::SearchParam* Arena::CreateMaybeMessage<::milvus::grpc::SearchParam>(Arena*);
|
||||
template<> ::milvus::grpc::SearchParamPB* Arena::CreateMaybeMessage<::milvus::grpc::SearchParamPB>(Arena*);
|
||||
template<> ::milvus::grpc::Status* Arena::CreateMaybeMessage<::milvus::grpc::Status>(Arena*);
|
||||
template<> ::milvus::grpc::StringReply* Arena::CreateMaybeMessage<::milvus::grpc::StringReply>(Arena*);
|
||||
template<> ::milvus::grpc::TermQuery* Arena::CreateMaybeMessage<::milvus::grpc::TermQuery>(Arena*);
|
||||
template<> ::milvus::grpc::VectorFieldParam* Arena::CreateMaybeMessage<::milvus::grpc::VectorFieldParam>(Arena*);
|
||||
|
@ -321,6 +324,150 @@ inline bool Occur_Parse(
|
|||
}
|
||||
// ===================================================================
|
||||
|
||||
class Status :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Status) */ {
|
||||
public:
|
||||
Status();
|
||||
virtual ~Status();
|
||||
|
||||
Status(const Status& from);
|
||||
Status(Status&& from) noexcept
|
||||
: Status() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline Status& operator=(const Status& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline Status& operator=(Status&& from) noexcept {
|
||||
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
|
||||
if (this != &from) InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||
return GetMetadataStatic().descriptor;
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||
return GetMetadataStatic().reflection;
|
||||
}
|
||||
static const Status& default_instance();
|
||||
|
||||
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
|
||||
static inline const Status* internal_default_instance() {
|
||||
return reinterpret_cast<const Status*>(
|
||||
&_Status_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
0;
|
||||
|
||||
friend void swap(Status& a, Status& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(Status* other) {
|
||||
if (other == this) return;
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
inline Status* New() const final {
|
||||
return CreateMaybeMessage<Status>(nullptr);
|
||||
}
|
||||
|
||||
Status* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
|
||||
return CreateMaybeMessage<Status>(arena);
|
||||
}
|
||||
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void CopyFrom(const Status& from);
|
||||
void MergeFrom(const Status& from);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
void SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
inline void SharedCtor();
|
||||
inline void SharedDtor();
|
||||
void SetCachedSize(int size) const final;
|
||||
void InternalSwap(Status* other);
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "milvus.grpc.Status";
|
||||
}
|
||||
private:
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
|
||||
return nullptr;
|
||||
}
|
||||
inline void* MaybeArenaPtr() const {
|
||||
return nullptr;
|
||||
}
|
||||
public:
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
private:
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto);
|
||||
return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages];
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kReasonFieldNumber = 2,
|
||||
kErrorCodeFieldNumber = 1,
|
||||
};
|
||||
// string reason = 2;
|
||||
void clear_reason();
|
||||
const std::string& reason() const;
|
||||
void set_reason(const std::string& value);
|
||||
void set_reason(std::string&& value);
|
||||
void set_reason(const char* value);
|
||||
void set_reason(const char* value, size_t size);
|
||||
std::string* mutable_reason();
|
||||
std::string* release_reason();
|
||||
void set_allocated_reason(std::string* reason);
|
||||
|
||||
// int64 error_code = 1;
|
||||
void clear_error_code();
|
||||
::PROTOBUF_NAMESPACE_ID::int64 error_code() const;
|
||||
void set_error_code(::PROTOBUF_NAMESPACE_ID::int64 value);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:milvus.grpc.Status)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr reason_;
|
||||
::PROTOBUF_NAMESPACE_ID::int64 error_code_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_milvus_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class KeyValuePair :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.KeyValuePair) */ {
|
||||
public:
|
||||
|
@ -363,7 +510,7 @@ class KeyValuePair :
|
|||
&_KeyValuePair_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
0;
|
||||
1;
|
||||
|
||||
friend void swap(KeyValuePair& a, KeyValuePair& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -513,7 +660,7 @@ class CollectionName :
|
|||
&_CollectionName_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
1;
|
||||
2;
|
||||
|
||||
friend void swap(CollectionName& a, CollectionName& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -650,7 +797,7 @@ class CollectionNameList :
|
|||
&_CollectionNameList_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
2;
|
||||
3;
|
||||
|
||||
friend void swap(CollectionNameList& a, CollectionNameList& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -803,7 +950,7 @@ class FieldName :
|
|||
&_FieldName_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
3;
|
||||
4;
|
||||
|
||||
friend void swap(FieldName& a, FieldName& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -953,7 +1100,7 @@ class Mapping :
|
|||
&_Mapping_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
4;
|
||||
5;
|
||||
|
||||
friend void swap(Mapping& a, Mapping& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -1126,7 +1273,7 @@ class MappingList :
|
|||
&_MappingList_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
5;
|
||||
6;
|
||||
|
||||
friend void swap(MappingList& a, MappingList& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -1273,7 +1420,7 @@ class PartitionParam :
|
|||
&_PartitionParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
6;
|
||||
7;
|
||||
|
||||
friend void swap(PartitionParam& a, PartitionParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -1423,7 +1570,7 @@ class PartitionList :
|
|||
&_PartitionList_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
7;
|
||||
8;
|
||||
|
||||
friend void swap(PartitionList& a, PartitionList& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -1576,7 +1723,7 @@ class VectorRowRecord :
|
|||
&_VectorRowRecord_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
8;
|
||||
9;
|
||||
|
||||
friend void swap(VectorRowRecord& a, VectorRowRecord& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -1727,7 +1874,7 @@ class AttrRecord :
|
|||
&_AttrRecord_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
9;
|
||||
10;
|
||||
|
||||
friend void swap(AttrRecord& a, AttrRecord& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -1907,7 +2054,7 @@ class VectorRecord :
|
|||
&_VectorRecord_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
10;
|
||||
11;
|
||||
|
||||
friend void swap(VectorRecord& a, VectorRecord& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -2044,7 +2191,7 @@ class FieldValue :
|
|||
&_FieldValue_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
11;
|
||||
12;
|
||||
|
||||
friend void swap(FieldValue& a, FieldValue& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -2208,7 +2355,7 @@ class InsertParam :
|
|||
&_InsertParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
12;
|
||||
13;
|
||||
|
||||
friend void swap(InsertParam& a, InsertParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -2398,7 +2545,7 @@ class EntityIds :
|
|||
&_EntityIds_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
13;
|
||||
14;
|
||||
|
||||
friend void swap(EntityIds& a, EntityIds& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -2546,7 +2693,7 @@ class VectorParam :
|
|||
&_VectorParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
14;
|
||||
15;
|
||||
|
||||
friend void swap(VectorParam& a, VectorParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -2693,7 +2840,7 @@ class SearchParam :
|
|||
&_SearchParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
15;
|
||||
16;
|
||||
|
||||
friend void swap(SearchParam& a, SearchParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -2888,7 +3035,7 @@ class SearchInSegmentParam :
|
|||
&_SearchInSegmentParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
16;
|
||||
17;
|
||||
|
||||
friend void swap(SearchInSegmentParam& a, SearchInSegmentParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3041,7 +3188,7 @@ class Entities :
|
|||
&_Entities_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
17;
|
||||
18;
|
||||
|
||||
friend void swap(Entities& a, Entities& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3216,7 +3363,7 @@ class QueryResult :
|
|||
&_QueryResult_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
18;
|
||||
19;
|
||||
|
||||
friend void swap(QueryResult& a, QueryResult& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3408,7 +3555,7 @@ class StringReply :
|
|||
&_StringReply_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
19;
|
||||
20;
|
||||
|
||||
friend void swap(StringReply& a, StringReply& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3555,7 +3702,7 @@ class BoolReply :
|
|||
&_BoolReply_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
20;
|
||||
21;
|
||||
|
||||
friend void swap(BoolReply& a, BoolReply& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3696,7 +3843,7 @@ class CollectionRowCount :
|
|||
&_CollectionRowCount_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
21;
|
||||
22;
|
||||
|
||||
friend void swap(CollectionRowCount& a, CollectionRowCount& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3837,7 +3984,7 @@ class Command :
|
|||
&_Command_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
22;
|
||||
23;
|
||||
|
||||
friend void swap(Command& a, Command& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -3974,7 +4121,7 @@ class IndexParam :
|
|||
&_IndexParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
23;
|
||||
24;
|
||||
|
||||
friend void swap(IndexParam& a, IndexParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -4160,7 +4307,7 @@ class FlushParam :
|
|||
&_FlushParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
24;
|
||||
25;
|
||||
|
||||
friend void swap(FlushParam& a, FlushParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -4303,7 +4450,7 @@ class CompactParam :
|
|||
&_CompactParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
25;
|
||||
26;
|
||||
|
||||
friend void swap(CompactParam& a, CompactParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -4447,7 +4594,7 @@ class DeleteByIDParam :
|
|||
&_DeleteByIDParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
26;
|
||||
27;
|
||||
|
||||
friend void swap(DeleteByIDParam& a, DeleteByIDParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -4598,7 +4745,7 @@ class CollectionInfo :
|
|||
&_CollectionInfo_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
27;
|
||||
28;
|
||||
|
||||
friend void swap(CollectionInfo& a, CollectionInfo& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -4745,7 +4892,7 @@ class GetEntityIDsParam :
|
|||
&_GetEntityIDsParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
28;
|
||||
29;
|
||||
|
||||
friend void swap(GetEntityIDsParam& a, GetEntityIDsParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -4889,7 +5036,7 @@ class EntityIdentity :
|
|||
&_EntityIdentity_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
29;
|
||||
30;
|
||||
|
||||
friend void swap(EntityIdentity& a, EntityIdentity& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -5059,7 +5206,7 @@ class VectorFieldParam :
|
|||
&_VectorFieldParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
30;
|
||||
31;
|
||||
|
||||
friend void swap(VectorFieldParam& a, VectorFieldParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -5196,7 +5343,7 @@ class FieldType :
|
|||
&_FieldType_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
31;
|
||||
32;
|
||||
|
||||
friend void swap(FieldType& a, FieldType& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -5352,7 +5499,7 @@ class FieldParam :
|
|||
&_FieldParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
32;
|
||||
33;
|
||||
|
||||
friend void swap(FieldParam& a, FieldParam& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -5529,7 +5676,7 @@ class VectorFieldRecord :
|
|||
&_VectorFieldRecord_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
33;
|
||||
34;
|
||||
|
||||
friend void swap(VectorFieldRecord& a, VectorFieldRecord& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -5666,7 +5813,7 @@ class TermQuery :
|
|||
&_TermQuery_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
34;
|
||||
35;
|
||||
|
||||
friend void swap(TermQuery& a, TermQuery& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -5858,7 +6005,7 @@ class CompareExpr :
|
|||
&_CompareExpr_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
35;
|
||||
36;
|
||||
|
||||
friend void swap(CompareExpr& a, CompareExpr& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -6002,7 +6149,7 @@ class RangeQuery :
|
|||
&_RangeQuery_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
36;
|
||||
37;
|
||||
|
||||
friend void swap(RangeQuery& a, RangeQuery& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -6172,7 +6319,7 @@ class VectorQuery :
|
|||
&_VectorQuery_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
37;
|
||||
38;
|
||||
|
||||
friend void swap(VectorQuery& a, VectorQuery& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -6349,7 +6496,7 @@ class BooleanQuery :
|
|||
&_BooleanQuery_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
38;
|
||||
39;
|
||||
|
||||
friend void swap(BooleanQuery& a, BooleanQuery& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -6501,7 +6648,7 @@ class GeneralQuery :
|
|||
&_GeneralQuery_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
39;
|
||||
40;
|
||||
|
||||
friend void swap(GeneralQuery& a, GeneralQuery& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -6679,7 +6826,7 @@ class SearchParamPB :
|
|||
&_SearchParamPB_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
40;
|
||||
41;
|
||||
|
||||
friend void swap(SearchParamPB& a, SearchParamPB& b) {
|
||||
a.Swap(&b);
|
||||
|
@ -6823,6 +6970,75 @@ class SearchParamPB :
|
|||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif // __GNUC__
|
||||
// Status
|
||||
|
||||
// int64 error_code = 1;
|
||||
inline void Status::clear_error_code() {
|
||||
error_code_ = PROTOBUF_LONGLONG(0);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::int64 Status::error_code() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Status.error_code)
|
||||
return error_code_;
|
||||
}
|
||||
inline void Status::set_error_code(::PROTOBUF_NAMESPACE_ID::int64 value) {
|
||||
|
||||
error_code_ = value;
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.Status.error_code)
|
||||
}
|
||||
|
||||
// string reason = 2;
|
||||
inline void Status::clear_reason() {
|
||||
reason_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline const std::string& Status::reason() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Status.reason)
|
||||
return reason_.GetNoArena();
|
||||
}
|
||||
inline void Status::set_reason(const std::string& value) {
|
||||
|
||||
reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline void Status::set_reason(std::string&& value) {
|
||||
|
||||
reason_.SetNoArena(
|
||||
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
||||
// @@protoc_insertion_point(field_set_rvalue:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline void Status::set_reason(const char* value) {
|
||||
GOOGLE_DCHECK(value != nullptr);
|
||||
|
||||
reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
||||
// @@protoc_insertion_point(field_set_char:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline void Status::set_reason(const char* value, size_t size) {
|
||||
|
||||
reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
::std::string(reinterpret_cast<const char*>(value), size));
|
||||
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline std::string* Status::mutable_reason() {
|
||||
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.Status.reason)
|
||||
return reason_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline std::string* Status::release_reason() {
|
||||
// @@protoc_insertion_point(field_release:milvus.grpc.Status.reason)
|
||||
|
||||
return reason_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline void Status::set_allocated_reason(std::string* reason) {
|
||||
if (reason != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
reason_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), reason);
|
||||
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.Status.reason)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// KeyValuePair
|
||||
|
||||
// string key = 1;
|
||||
|
@ -6990,6 +7206,12 @@ inline void CollectionName::set_allocated_collection_name(std::string* collectio
|
|||
inline bool CollectionNameList::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void CollectionNameList::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& CollectionNameList::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.CollectionNameList.status)
|
||||
|
@ -7015,7 +7237,7 @@ inline ::milvus::grpc::Status* CollectionNameList::mutable_status() {
|
|||
inline void CollectionNameList::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -7210,6 +7432,12 @@ inline void FieldName::set_allocated_field_name(std::string* field_name) {
|
|||
inline bool Mapping::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void Mapping::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& Mapping::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Mapping.status)
|
||||
|
@ -7235,7 +7463,7 @@ inline ::milvus::grpc::Status* Mapping::mutable_status() {
|
|||
inline void Mapping::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -7370,6 +7598,12 @@ Mapping::extra_params() const {
|
|||
inline bool MappingList::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void MappingList::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& MappingList::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.MappingList.status)
|
||||
|
@ -7395,7 +7629,7 @@ inline ::milvus::grpc::Status* MappingList::mutable_status() {
|
|||
inline void MappingList::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -7555,6 +7789,12 @@ inline void PartitionParam::set_allocated_tag(std::string* tag) {
|
|||
inline bool PartitionList::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void PartitionList::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& PartitionList::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.PartitionList.status)
|
||||
|
@ -7580,7 +7820,7 @@ inline ::milvus::grpc::Status* PartitionList::mutable_status() {
|
|||
inline void PartitionList::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -8279,6 +8519,12 @@ InsertParam::extra_params() const {
|
|||
inline bool EntityIds::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void EntityIds::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& EntityIds::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.EntityIds.status)
|
||||
|
@ -8304,7 +8550,7 @@ inline ::milvus::grpc::Status* EntityIds::mutable_status() {
|
|||
inline void EntityIds::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -8815,6 +9061,12 @@ inline void SearchInSegmentParam::set_allocated_search_param(::milvus::grpc::Sea
|
|||
inline bool Entities::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void Entities::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& Entities::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Entities.status)
|
||||
|
@ -8840,7 +9092,7 @@ inline ::milvus::grpc::Status* Entities::mutable_status() {
|
|||
inline void Entities::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -8954,6 +9206,12 @@ Entities::fields() const {
|
|||
inline bool QueryResult::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void QueryResult::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& QueryResult::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.QueryResult.status)
|
||||
|
@ -8979,7 +9237,7 @@ inline ::milvus::grpc::Status* QueryResult::mutable_status() {
|
|||
inline void QueryResult::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -9158,6 +9416,12 @@ QueryResult::extra_params() const {
|
|||
inline bool StringReply::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void StringReply::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& StringReply::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.StringReply.status)
|
||||
|
@ -9183,7 +9447,7 @@ inline ::milvus::grpc::Status* StringReply::mutable_status() {
|
|||
inline void StringReply::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -9258,6 +9522,12 @@ inline void StringReply::set_allocated_string_reply(std::string* string_reply) {
|
|||
inline bool BoolReply::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void BoolReply::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& BoolReply::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.BoolReply.status)
|
||||
|
@ -9283,7 +9553,7 @@ inline ::milvus::grpc::Status* BoolReply::mutable_status() {
|
|||
inline void BoolReply::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -9321,6 +9591,12 @@ inline void BoolReply::set_bool_reply(bool value) {
|
|||
inline bool CollectionRowCount::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void CollectionRowCount::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& CollectionRowCount::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.CollectionRowCount.status)
|
||||
|
@ -9346,7 +9622,7 @@ inline ::milvus::grpc::Status* CollectionRowCount::mutable_status() {
|
|||
inline void CollectionRowCount::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -9439,6 +9715,12 @@ inline void Command::set_allocated_cmd(std::string* cmd) {
|
|||
inline bool IndexParam::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void IndexParam::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& IndexParam::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.IndexParam.status)
|
||||
|
@ -9464,7 +9746,7 @@ inline ::milvus::grpc::Status* IndexParam::mutable_status() {
|
|||
inline void IndexParam::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -9894,6 +10176,12 @@ DeleteByIDParam::mutable_id_array() {
|
|||
inline bool CollectionInfo::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline void CollectionInfo::clear_status() {
|
||||
if (GetArenaNoVirtual() == nullptr && status_ != nullptr) {
|
||||
delete status_;
|
||||
}
|
||||
status_ = nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& CollectionInfo::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.CollectionInfo.status)
|
||||
|
@ -9919,7 +10207,7 @@ inline ::milvus::grpc::Status* CollectionInfo::mutable_status() {
|
|||
inline void CollectionInfo::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
delete status_;
|
||||
}
|
||||
if (status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
|
||||
|
@ -11506,6 +11794,8 @@ SearchParamPB::extra_params() const {
|
|||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: status.proto
|
||||
|
||||
#include "status.pb.h"
|
||||
#include "status.grpc.pb.h"
|
||||
|
||||
#include <functional>
|
||||
#include <grpcpp/impl/codegen/async_stream.h>
|
||||
#include <grpcpp/impl/codegen/async_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/channel_interface.h>
|
||||
#include <grpcpp/impl/codegen/client_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/client_callback.h>
|
||||
#include <grpcpp/impl/codegen/method_handler_impl.h>
|
||||
#include <grpcpp/impl/codegen/rpc_service_method.h>
|
||||
#include <grpcpp/impl/codegen/server_callback.h>
|
||||
#include <grpcpp/impl/codegen/service_type.h>
|
||||
#include <grpcpp/impl/codegen/sync_stream.h>
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
|
||||
} // namespace milvus
|
||||
} // namespace grpc
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: status.proto
|
||||
#ifndef GRPC_status_2eproto__INCLUDED
|
||||
#define GRPC_status_2eproto__INCLUDED
|
||||
|
||||
#include "status.pb.h"
|
||||
|
||||
#include <functional>
|
||||
#include <grpcpp/impl/codegen/async_generic_service.h>
|
||||
#include <grpcpp/impl/codegen/async_stream.h>
|
||||
#include <grpcpp/impl/codegen/async_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/client_callback.h>
|
||||
#include <grpcpp/impl/codegen/client_context.h>
|
||||
#include <grpcpp/impl/codegen/completion_queue.h>
|
||||
#include <grpcpp/impl/codegen/method_handler_impl.h>
|
||||
#include <grpcpp/impl/codegen/proto_utils.h>
|
||||
#include <grpcpp/impl/codegen/rpc_method.h>
|
||||
#include <grpcpp/impl/codegen/server_callback.h>
|
||||
#include <grpcpp/impl/codegen/server_context.h>
|
||||
#include <grpcpp/impl/codegen/service_type.h>
|
||||
#include <grpcpp/impl/codegen/status.h>
|
||||
#include <grpcpp/impl/codegen/stub_options.h>
|
||||
#include <grpcpp/impl/codegen/sync_stream.h>
|
||||
|
||||
namespace grpc_impl {
|
||||
class CompletionQueue;
|
||||
class ServerCompletionQueue;
|
||||
class ServerContext;
|
||||
} // namespace grpc_impl
|
||||
|
||||
namespace grpc {
|
||||
namespace experimental {
|
||||
template <typename RequestT, typename ResponseT>
|
||||
class MessageAllocator;
|
||||
} // namespace experimental
|
||||
} // namespace grpc
|
||||
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
|
||||
|
||||
#endif // GRPC_status_2eproto__INCLUDED
|
|
@ -1,461 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: status.proto
|
||||
|
||||
#include "status.pb.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/wire_format_lite.h>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/reflection_ops.h>
|
||||
#include <google/protobuf/wire_format.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
class StatusDefaultTypeInternal {
|
||||
public:
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Status> _instance;
|
||||
} _Status_default_instance_;
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
static void InitDefaultsscc_info_Status_status_2eproto() {
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
|
||||
{
|
||||
void* ptr = &::milvus::grpc::_Status_default_instance_;
|
||||
new (ptr) ::milvus::grpc::Status();
|
||||
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
|
||||
}
|
||||
::milvus::grpc::Status::InitAsDefaultInstance();
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Status_status_2eproto =
|
||||
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Status_status_2eproto}, {}};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_status_2eproto[1];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_status_2eproto[1];
|
||||
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_status_2eproto = nullptr;
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_status_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::Status, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::Status, error_code_),
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::Status, reason_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, sizeof(::milvus::grpc::Status)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::grpc::_Status_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_status_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
"\n\014status.proto\022\013milvus.grpc\"D\n\006Status\022*\n"
|
||||
"\nerror_code\030\001 \001(\0162\026.milvus.grpc.ErrorCod"
|
||||
"e\022\016\n\006reason\030\002 \001(\t*\242\004\n\tErrorCode\022\013\n\007SUCCE"
|
||||
"SS\020\000\022\024\n\020UNEXPECTED_ERROR\020\001\022\022\n\016CONNECT_FA"
|
||||
"ILED\020\002\022\025\n\021PERMISSION_DENIED\020\003\022\031\n\025COLLECT"
|
||||
"ION_NOT_EXISTS\020\004\022\024\n\020ILLEGAL_ARGUMENT\020\005\022\025"
|
||||
"\n\021ILLEGAL_DIMENSION\020\007\022\026\n\022ILLEGAL_INDEX_T"
|
||||
"YPE\020\010\022\033\n\027ILLEGAL_COLLECTION_NAME\020\t\022\020\n\014IL"
|
||||
"LEGAL_TOPK\020\n\022\025\n\021ILLEGAL_ROWRECORD\020\013\022\025\n\021I"
|
||||
"LLEGAL_VECTOR_ID\020\014\022\031\n\025ILLEGAL_SEARCH_RES"
|
||||
"ULT\020\r\022\022\n\016FILE_NOT_FOUND\020\016\022\017\n\013META_FAILED"
|
||||
"\020\017\022\020\n\014CACHE_FAILED\020\020\022\030\n\024CANNOT_CREATE_FO"
|
||||
"LDER\020\021\022\026\n\022CANNOT_CREATE_FILE\020\022\022\030\n\024CANNOT"
|
||||
"_DELETE_FOLDER\020\023\022\026\n\022CANNOT_DELETE_FILE\020\024"
|
||||
"\022\025\n\021BUILD_INDEX_ERROR\020\025\022\021\n\rILLEGAL_NLIST"
|
||||
"\020\026\022\027\n\023ILLEGAL_METRIC_TYPE\020\027\022\021\n\rOUT_OF_ME"
|
||||
"MORY\020\030b\006proto3"
|
||||
;
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_status_2eproto_deps[1] = {
|
||||
};
|
||||
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_status_2eproto_sccs[1] = {
|
||||
&scc_info_Status_status_2eproto.base,
|
||||
};
|
||||
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_status_2eproto_once;
|
||||
static bool descriptor_table_status_2eproto_initialized = false;
|
||||
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_status_2eproto = {
|
||||
&descriptor_table_status_2eproto_initialized, descriptor_table_protodef_status_2eproto, "status.proto", 654,
|
||||
&descriptor_table_status_2eproto_once, descriptor_table_status_2eproto_sccs, descriptor_table_status_2eproto_deps, 1, 0,
|
||||
schemas, file_default_instances, TableStruct_status_2eproto::offsets,
|
||||
file_level_metadata_status_2eproto, 1, file_level_enum_descriptors_status_2eproto, file_level_service_descriptors_status_2eproto,
|
||||
};
|
||||
|
||||
// Force running AddDescriptors() at dynamic initialization time.
|
||||
static bool dynamic_init_dummy_status_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_status_2eproto), true);
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ErrorCode_descriptor() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_status_2eproto);
|
||||
return file_level_enum_descriptors_status_2eproto[0];
|
||||
}
|
||||
bool ErrorCode_IsValid(int value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
case 23:
|
||||
case 24:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
void Status::InitAsDefaultInstance() {
|
||||
}
|
||||
class Status::_Internal {
|
||||
public:
|
||||
};
|
||||
|
||||
Status::Status()
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
|
||||
SharedCtor();
|
||||
// @@protoc_insertion_point(constructor:milvus.grpc.Status)
|
||||
}
|
||||
Status::Status(const Status& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(),
|
||||
_internal_metadata_(nullptr) {
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
reason_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
if (!from.reason().empty()) {
|
||||
reason_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.reason_);
|
||||
}
|
||||
error_code_ = from.error_code_;
|
||||
// @@protoc_insertion_point(copy_constructor:milvus.grpc.Status)
|
||||
}
|
||||
|
||||
void Status::SharedCtor() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Status_status_2eproto.base);
|
||||
reason_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
error_code_ = 0;
|
||||
}
|
||||
|
||||
Status::~Status() {
|
||||
// @@protoc_insertion_point(destructor:milvus.grpc.Status)
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
void Status::SharedDtor() {
|
||||
reason_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
|
||||
void Status::SetCachedSize(int size) const {
|
||||
_cached_size_.Set(size);
|
||||
}
|
||||
const Status& Status::default_instance() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Status_status_2eproto.base);
|
||||
return *internal_default_instance();
|
||||
}
|
||||
|
||||
|
||||
void Status::Clear() {
|
||||
// @@protoc_insertion_point(message_clear_start:milvus.grpc.Status)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
reason_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
error_code_ = 0;
|
||||
_internal_metadata_.Clear();
|
||||
}
|
||||
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* Status::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
||||
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||||
while (!ctx->Done(&ptr)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
||||
CHK_(ptr);
|
||||
switch (tag >> 3) {
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
case 1:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
|
||||
CHK_(ptr);
|
||||
set_error_code(static_cast<::milvus::grpc::ErrorCode>(val));
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
// string reason = 2;
|
||||
case 2:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_reason(), ptr, ctx, "milvus.grpc.Status.reason");
|
||||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
default: {
|
||||
handle_unusual:
|
||||
if ((tag & 7) == 4 || tag == 0) {
|
||||
ctx->SetLastTag(tag);
|
||||
goto success;
|
||||
}
|
||||
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
|
||||
CHK_(ptr != nullptr);
|
||||
continue;
|
||||
}
|
||||
} // switch
|
||||
} // while
|
||||
success:
|
||||
return ptr;
|
||||
failure:
|
||||
ptr = nullptr;
|
||||
goto success;
|
||||
#undef CHK_
|
||||
}
|
||||
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
bool Status::MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
|
||||
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
// @@protoc_insertion_point(parse_start:milvus.grpc.Status)
|
||||
for (;;) {
|
||||
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
||||
tag = p.first;
|
||||
if (!p.second) goto handle_unusual;
|
||||
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
case 1: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
|
||||
int value = 0;
|
||||
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
|
||||
int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
|
||||
input, &value)));
|
||||
set_error_code(static_cast< ::milvus::grpc::ErrorCode >(value));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// string reason = 2;
|
||||
case 2: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
||||
input, this->mutable_reason()));
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->reason().data(), static_cast<int>(this->reason().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
||||
"milvus.grpc.Status.reason"));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
handle_unusual:
|
||||
if (tag == 0) {
|
||||
goto success;
|
||||
}
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
|
||||
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
success:
|
||||
// @@protoc_insertion_point(parse_success:milvus.grpc.Status)
|
||||
return true;
|
||||
failure:
|
||||
// @@protoc_insertion_point(parse_failure:milvus.grpc.Status)
|
||||
return false;
|
||||
#undef DO_
|
||||
}
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
|
||||
void Status::SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
|
||||
// @@protoc_insertion_point(serialize_start:milvus.grpc.Status)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
if (this->error_code() != 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
|
||||
1, this->error_code(), output);
|
||||
}
|
||||
|
||||
// string reason = 2;
|
||||
if (this->reason().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->reason().data(), static_cast<int>(this->reason().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.Status.reason");
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
||||
2, this->reason(), output);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
|
||||
_internal_metadata_.unknown_fields(), output);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_end:milvus.grpc.Status)
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* Status::InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.Status)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
if (this->error_code() != 0) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
|
||||
1, this->error_code(), target);
|
||||
}
|
||||
|
||||
// string reason = 2;
|
||||
if (this->reason().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->reason().data(), static_cast<int>(this->reason().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.Status.reason");
|
||||
target =
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
||||
2, this->reason(), target);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields(), target);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.Status)
|
||||
return target;
|
||||
}
|
||||
|
||||
size_t Status::ByteSizeLong() const {
|
||||
// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.Status)
|
||||
size_t total_size = 0;
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
total_size +=
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
|
||||
_internal_metadata_.unknown_fields());
|
||||
}
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string reason = 2;
|
||||
if (this->reason().size() > 0) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->reason());
|
||||
}
|
||||
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
if (this->error_code() != 0) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->error_code());
|
||||
}
|
||||
|
||||
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
|
||||
SetCachedSize(cached_size);
|
||||
return total_size;
|
||||
}
|
||||
|
||||
void Status::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.Status)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
const Status* source =
|
||||
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Status>(
|
||||
&from);
|
||||
if (source == nullptr) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.Status)
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
|
||||
} else {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.Status)
|
||||
MergeFrom(*source);
|
||||
}
|
||||
}
|
||||
|
||||
void Status::MergeFrom(const Status& from) {
|
||||
// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.Status)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (from.reason().size() > 0) {
|
||||
|
||||
reason_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.reason_);
|
||||
}
|
||||
if (from.error_code() != 0) {
|
||||
set_error_code(from.error_code());
|
||||
}
|
||||
}
|
||||
|
||||
void Status::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.Status)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void Status::CopyFrom(const Status& from) {
|
||||
// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.Status)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool Status::IsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Status::InternalSwap(Status* other) {
|
||||
using std::swap;
|
||||
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||||
reason_.Swap(&other->reason_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
GetArenaNoVirtual());
|
||||
swap(error_code_, other->error_code_);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata Status::GetMetadata() const {
|
||||
return GetMetadataStatic();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE ::milvus::grpc::Status* Arena::CreateMaybeMessage< ::milvus::grpc::Status >(Arena* arena) {
|
||||
return Arena::CreateInternal< ::milvus::grpc::Status >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
#include <google/protobuf/port_undef.inc>
|
|
@ -1,360 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: status.proto
|
||||
|
||||
#ifndef GOOGLE_PROTOBUF_INCLUDED_status_2eproto
|
||||
#define GOOGLE_PROTOBUF_INCLUDED_status_2eproto
|
||||
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#if PROTOBUF_VERSION < 3009000
|
||||
#error This file was generated by a newer version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please update
|
||||
#error your headers.
|
||||
#endif
|
||||
#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
|
||||
#error This file was generated by an older version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please
|
||||
#error regenerate this file with a newer version of protoc.
|
||||
#endif
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/arena.h>
|
||||
#include <google/protobuf/arenastring.h>
|
||||
#include <google/protobuf/generated_message_table_driven.h>
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/inlined_string_field.h>
|
||||
#include <google/protobuf/metadata.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
|
||||
#include <google/protobuf/extension_set.h> // IWYU pragma: export
|
||||
#include <google/protobuf/generated_enum_reflection.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#define PROTOBUF_INTERNAL_EXPORT_status_2eproto
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
namespace internal {
|
||||
class AnyMetadata;
|
||||
} // namespace internal
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// Internal implementation detail -- do not use these members.
|
||||
struct TableStruct_status_2eproto {
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
|
||||
};
|
||||
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_status_2eproto;
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
class Status;
|
||||
class StatusDefaultTypeInternal;
|
||||
extern StatusDefaultTypeInternal _Status_default_instance_;
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> ::milvus::grpc::Status* Arena::CreateMaybeMessage<::milvus::grpc::Status>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
|
||||
enum ErrorCode : int {
|
||||
SUCCESS = 0,
|
||||
UNEXPECTED_ERROR = 1,
|
||||
CONNECT_FAILED = 2,
|
||||
PERMISSION_DENIED = 3,
|
||||
COLLECTION_NOT_EXISTS = 4,
|
||||
ILLEGAL_ARGUMENT = 5,
|
||||
ILLEGAL_DIMENSION = 7,
|
||||
ILLEGAL_INDEX_TYPE = 8,
|
||||
ILLEGAL_COLLECTION_NAME = 9,
|
||||
ILLEGAL_TOPK = 10,
|
||||
ILLEGAL_ROWRECORD = 11,
|
||||
ILLEGAL_VECTOR_ID = 12,
|
||||
ILLEGAL_SEARCH_RESULT = 13,
|
||||
FILE_NOT_FOUND = 14,
|
||||
META_FAILED = 15,
|
||||
CACHE_FAILED = 16,
|
||||
CANNOT_CREATE_FOLDER = 17,
|
||||
CANNOT_CREATE_FILE = 18,
|
||||
CANNOT_DELETE_FOLDER = 19,
|
||||
CANNOT_DELETE_FILE = 20,
|
||||
BUILD_INDEX_ERROR = 21,
|
||||
ILLEGAL_NLIST = 22,
|
||||
ILLEGAL_METRIC_TYPE = 23,
|
||||
OUT_OF_MEMORY = 24,
|
||||
ErrorCode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
|
||||
ErrorCode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
|
||||
};
|
||||
bool ErrorCode_IsValid(int value);
|
||||
constexpr ErrorCode ErrorCode_MIN = SUCCESS;
|
||||
constexpr ErrorCode ErrorCode_MAX = OUT_OF_MEMORY;
|
||||
constexpr int ErrorCode_ARRAYSIZE = ErrorCode_MAX + 1;
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ErrorCode_descriptor();
|
||||
template<typename T>
|
||||
inline const std::string& ErrorCode_Name(T enum_t_value) {
|
||||
static_assert(::std::is_same<T, ErrorCode>::value ||
|
||||
::std::is_integral<T>::value,
|
||||
"Incorrect type passed to function ErrorCode_Name.");
|
||||
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
|
||||
ErrorCode_descriptor(), enum_t_value);
|
||||
}
|
||||
inline bool ErrorCode_Parse(
|
||||
const std::string& name, ErrorCode* value) {
|
||||
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<ErrorCode>(
|
||||
ErrorCode_descriptor(), name, value);
|
||||
}
|
||||
// ===================================================================
|
||||
|
||||
class Status :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Status) */ {
|
||||
public:
|
||||
Status();
|
||||
virtual ~Status();
|
||||
|
||||
Status(const Status& from);
|
||||
Status(Status&& from) noexcept
|
||||
: Status() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline Status& operator=(const Status& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline Status& operator=(Status&& from) noexcept {
|
||||
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
|
||||
if (this != &from) InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||
return GetMetadataStatic().descriptor;
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||
return GetMetadataStatic().reflection;
|
||||
}
|
||||
static const Status& default_instance();
|
||||
|
||||
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
|
||||
static inline const Status* internal_default_instance() {
|
||||
return reinterpret_cast<const Status*>(
|
||||
&_Status_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
0;
|
||||
|
||||
friend void swap(Status& a, Status& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(Status* other) {
|
||||
if (other == this) return;
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
inline Status* New() const final {
|
||||
return CreateMaybeMessage<Status>(nullptr);
|
||||
}
|
||||
|
||||
Status* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
|
||||
return CreateMaybeMessage<Status>(arena);
|
||||
}
|
||||
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void CopyFrom(const Status& from);
|
||||
void MergeFrom(const Status& from);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
void SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
inline void SharedCtor();
|
||||
inline void SharedDtor();
|
||||
void SetCachedSize(int size) const final;
|
||||
void InternalSwap(Status* other);
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "milvus.grpc.Status";
|
||||
}
|
||||
private:
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
|
||||
return nullptr;
|
||||
}
|
||||
inline void* MaybeArenaPtr() const {
|
||||
return nullptr;
|
||||
}
|
||||
public:
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
private:
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_status_2eproto);
|
||||
return ::descriptor_table_status_2eproto.file_level_metadata[kIndexInFileMessages];
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kReasonFieldNumber = 2,
|
||||
kErrorCodeFieldNumber = 1,
|
||||
};
|
||||
// string reason = 2;
|
||||
void clear_reason();
|
||||
const std::string& reason() const;
|
||||
void set_reason(const std::string& value);
|
||||
void set_reason(std::string&& value);
|
||||
void set_reason(const char* value);
|
||||
void set_reason(const char* value, size_t size);
|
||||
std::string* mutable_reason();
|
||||
std::string* release_reason();
|
||||
void set_allocated_reason(std::string* reason);
|
||||
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
void clear_error_code();
|
||||
::milvus::grpc::ErrorCode error_code() const;
|
||||
void set_error_code(::milvus::grpc::ErrorCode value);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:milvus.grpc.Status)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr reason_;
|
||||
int error_code_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_status_2eproto;
|
||||
};
|
||||
// ===================================================================
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif // __GNUC__
|
||||
// Status
|
||||
|
||||
// .milvus.grpc.ErrorCode error_code = 1;
|
||||
inline void Status::clear_error_code() {
|
||||
error_code_ = 0;
|
||||
}
|
||||
inline ::milvus::grpc::ErrorCode Status::error_code() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Status.error_code)
|
||||
return static_cast< ::milvus::grpc::ErrorCode >(error_code_);
|
||||
}
|
||||
inline void Status::set_error_code(::milvus::grpc::ErrorCode value) {
|
||||
|
||||
error_code_ = value;
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.Status.error_code)
|
||||
}
|
||||
|
||||
// string reason = 2;
|
||||
inline void Status::clear_reason() {
|
||||
reason_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline const std::string& Status::reason() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Status.reason)
|
||||
return reason_.GetNoArena();
|
||||
}
|
||||
inline void Status::set_reason(const std::string& value) {
|
||||
|
||||
reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline void Status::set_reason(std::string&& value) {
|
||||
|
||||
reason_.SetNoArena(
|
||||
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
||||
// @@protoc_insertion_point(field_set_rvalue:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline void Status::set_reason(const char* value) {
|
||||
GOOGLE_DCHECK(value != nullptr);
|
||||
|
||||
reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
||||
// @@protoc_insertion_point(field_set_char:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline void Status::set_reason(const char* value, size_t size) {
|
||||
|
||||
reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
::std::string(reinterpret_cast<const char*>(value), size));
|
||||
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.Status.reason)
|
||||
}
|
||||
inline std::string* Status::mutable_reason() {
|
||||
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.Status.reason)
|
||||
return reason_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline std::string* Status::release_reason() {
|
||||
// @@protoc_insertion_point(field_release:milvus.grpc.Status.reason)
|
||||
|
||||
return reason_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline void Status::set_allocated_reason(std::string* reason) {
|
||||
if (reason != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
reason_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), reason);
|
||||
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.Status.reason)
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // __GNUC__
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
template <> struct is_proto_enum< ::milvus::grpc::ErrorCode> : ::std::true_type {};
|
||||
template <>
|
||||
inline const EnumDescriptor* GetEnumDescriptor< ::milvus::grpc::ErrorCode>() {
|
||||
return ::milvus::grpc::ErrorCode_descriptor();
|
||||
}
|
||||
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_status_2eproto
|
|
@ -594,7 +594,9 @@ ClientProxy::CountEntities(const std::string& collection_name, int64_t& row_coun
|
|||
Status status;
|
||||
::milvus::grpc::CollectionName grpc_collection_name;
|
||||
grpc_collection_name.set_collection_name(collection_name);
|
||||
row_count = client_ptr_->CountEntities(grpc_collection_name, status);
|
||||
milvus::grpc::CollectionRowCount grpc_row_count;
|
||||
status = client_ptr_->CountEntities(grpc_collection_name, grpc_row_count);
|
||||
row_count = grpc_row_count.collection_row_count();
|
||||
return status;
|
||||
} catch (std::exception& ex) {
|
||||
return Status(StatusCode::UnknownError, "Failed to count collection: " + std::string(ex.what()));
|
||||
|
|
|
@ -46,7 +46,7 @@ GrpcClient::CreateCollection(const milvus::grpc::Mapping& mapping) {
|
|||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (response.error_code() != grpc::SUCCESS) {
|
||||
if (response.error_code() != 0) {
|
||||
std::cerr << response.reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, response.reason());
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ GrpcClient::HasCollection(const ::milvus::grpc::CollectionName& collection_name,
|
|||
std::cerr << "HasCollection gRPC failed!" << std::endl;
|
||||
status = Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
if (response.status().error_code() != grpc::SUCCESS) {
|
||||
if (response.status().error_code() != 0) {
|
||||
std::cerr << response.status().reason() << std::endl;
|
||||
status = Status(StatusCode::ServerFailed, response.status().reason());
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ GrpcClient::DropCollection(const ::milvus::grpc::CollectionName& collection_name
|
|||
std::cerr << "DropCollection gRPC failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
if (response.error_code() != grpc::SUCCESS) {
|
||||
if (response.error_code() != 0) {
|
||||
std::cerr << response.reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, response.reason());
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ GrpcClient::CreateIndex(const ::milvus::grpc::IndexParam& index_param) {
|
|||
std::cerr << "CreateIndex rpc failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
if (response.error_code() != grpc::SUCCESS) {
|
||||
if (response.error_code() != 0) {
|
||||
std::cerr << response.reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, response.reason());
|
||||
}
|
||||
|
@ -112,14 +112,8 @@ GrpcClient::Insert(const ::milvus::grpc::InsertParam& insert_param, ::milvus::gr
|
|||
ClientContext context;
|
||||
::grpc::Status grpc_status = stub_->Insert(&context, insert_param, &entitiy_ids);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "Insert rpc failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
if (entitiy_ids.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << entitiy_ids.status().reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, entitiy_ids.status().reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "Insert", StatusCode::ServerFailed)
|
||||
CHECK_ERROR_CODE(entitiy_ids.status(), StatusCode::ServerFailed)
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
@ -129,15 +123,8 @@ GrpcClient::GetEntityByID(const grpc::EntityIdentity& entity_identity, ::milvus:
|
|||
ClientContext context;
|
||||
::grpc::Status grpc_status = stub_->GetEntityByID(&context, entity_identity, &entities);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "GetEntityByID rpc failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
if (entities.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << entities.status().reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, entities.status().reason());
|
||||
}
|
||||
|
||||
CHECK_GRPC_STATUS(grpc_status, "GetEntityByID", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(entities.status(), StatusCode::ServerFailed)
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
@ -146,33 +133,19 @@ GrpcClient::ListIDInSegment(const grpc::GetEntityIDsParam& param, grpc::EntityId
|
|||
ClientContext context;
|
||||
::grpc::Status grpc_status = stub_->GetEntityIDs(&context, param, &entity_ids);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "GetIDsInSegment rpc failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
if (entity_ids.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << entity_ids.status().reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, entity_ids.status().reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "ListIDsInSegment", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(entity_ids.status(), StatusCode::ServerFailed)
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Status
|
||||
GrpcClient::Search(const ::milvus::grpc::SearchParam& search_param,
|
||||
::milvus::grpc::QueryResult& topk_query_result) {
|
||||
GrpcClient::Search(const ::milvus::grpc::SearchParam& search_param, ::milvus::grpc::QueryResult& topk_query_result) {
|
||||
ClientContext context;
|
||||
::grpc::Status grpc_status = stub_->Search(&context, search_param, &topk_query_result);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "Search rpc failed!" << std::endl;
|
||||
std::cerr << grpc_status.error_message() << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
if (topk_query_result.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << topk_query_result.status().reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, topk_query_result.status().reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "Search", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(topk_query_result.status(), StatusCode::ServerFailed)
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
@ -184,40 +157,21 @@ GrpcClient::GetCollectionInfo(const std::string& collection_name, ::milvus::grpc
|
|||
grpc_collectionname.set_collection_name(collection_name);
|
||||
::grpc::Status grpc_status = stub_->DescribeCollection(&context, grpc_collectionname, &grpc_schema);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "DescribeCollection rpc failed!" << std::endl;
|
||||
std::cerr << grpc_status.error_message() << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (grpc_schema.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << grpc_schema.status().reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, grpc_schema.status().reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "DescribeCollection", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(grpc_schema.status(), StatusCode::ServerFailed)
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
int64_t
|
||||
GrpcClient::CountEntities(grpc::CollectionName& collection_name, Status& status) {
|
||||
Status
|
||||
GrpcClient::CountEntities(grpc::CollectionName& collection_name, ::milvus::grpc::CollectionRowCount& row_count) {
|
||||
ClientContext context;
|
||||
::milvus::grpc::CollectionRowCount response;
|
||||
::grpc::Status grpc_status = stub_->CountCollection(&context, collection_name, &response);
|
||||
::grpc::Status grpc_status = stub_->CountCollection(&context, collection_name, &row_count);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "CountCollection rpc failed!" << std::endl;
|
||||
status = Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
return -1;
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "CountEntities", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(row_count.status(), StatusCode::ServerFailed)
|
||||
|
||||
if (response.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << response.status().reason() << std::endl;
|
||||
status = Status(StatusCode::ServerFailed, response.status().reason());
|
||||
return -1;
|
||||
}
|
||||
|
||||
status = Status::OK();
|
||||
return response.collection_row_count();
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Status
|
||||
|
@ -226,16 +180,8 @@ GrpcClient::ListCollections(milvus::grpc::CollectionNameList& collection_name_li
|
|||
::milvus::grpc::Command command;
|
||||
::grpc::Status grpc_status = stub_->ShowCollections(&context, command, &collection_name_list);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "ShowCollections gRPC failed!" << std::endl;
|
||||
std::cerr << grpc_status.error_message() << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (collection_name_list.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << collection_name_list.status().reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, collection_name_list.status().reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "ListCollections", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(collection_name_list.status(), StatusCode::ServerFailed)
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
@ -246,16 +192,8 @@ GrpcClient::GetCollectionStats(grpc::CollectionName& collection_name, grpc::Coll
|
|||
::milvus::grpc::Command command;
|
||||
::grpc::Status grpc_status = stub_->ShowCollectionInfo(&context, collection_name, &collection_stats);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "ShowCollectionInfo gRPC failed!" << std::endl;
|
||||
std::cerr << grpc_status.error_message() << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (collection_stats.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << collection_stats.status().reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, collection_stats.status().reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "GetCollectionStats", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(collection_stats.status(), StatusCode::ServerFailed)
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
@ -269,15 +207,8 @@ GrpcClient::Cmd(const std::string& cmd, std::string& result) {
|
|||
::grpc::Status grpc_status = stub_->Cmd(&context, command, &response);
|
||||
|
||||
result = response.string_reply();
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "Cmd gRPC failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (response.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << response.status().reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, response.status().reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "Cmd", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(response.status(), StatusCode::ServerFailed)
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
@ -288,15 +219,8 @@ GrpcClient::LoadCollection(milvus::grpc::CollectionName& collection_name) {
|
|||
::milvus::grpc::Status response;
|
||||
::grpc::Status grpc_status = stub_->PreloadCollection(&context, collection_name, &response);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "PreloadCollection gRPC failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (response.error_code() != grpc::SUCCESS) {
|
||||
std::cerr << response.reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, response.reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "LoadCollection", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(response, StatusCode::ServerFailed)
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
@ -306,15 +230,8 @@ GrpcClient::DeleteEntityByID(grpc::DeleteByIDParam& delete_by_id_param) {
|
|||
::milvus::grpc::Status response;
|
||||
::grpc::Status grpc_status = stub_->DeleteByID(&context, delete_by_id_param, &response);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "DeleteByID gRPC failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (response.error_code() != grpc::SUCCESS) {
|
||||
std::cerr << response.reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, response.reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "DeleteEntityByID", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(response, StatusCode::ServerFailed)
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
@ -324,15 +241,8 @@ GrpcClient::DropIndex(grpc::IndexParam& index_param) {
|
|||
::milvus::grpc::Status response;
|
||||
::grpc::Status grpc_status = stub_->DropIndex(&context, index_param, &response);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "DropIndex gRPC failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (response.error_code() != grpc::SUCCESS) {
|
||||
std::cerr << response.reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, response.reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "DropIndex", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(response, StatusCode::ServerFailed)
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
@ -342,15 +252,8 @@ GrpcClient::CreatePartition(const grpc::PartitionParam& partition_param) {
|
|||
::milvus::grpc::Status response;
|
||||
::grpc::Status grpc_status = stub_->CreatePartition(&context, partition_param, &response);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "CreatePartition gRPC failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (response.error_code() != grpc::SUCCESS) {
|
||||
std::cerr << response.reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, response.reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "CreatePartition", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(response, StatusCode::ServerFailed)
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
@ -364,7 +267,7 @@ GrpcClient::HasPartition(const grpc::PartitionParam& partition_param, Status& st
|
|||
std::cerr << "HasPartition gRPC failed!" << std::endl;
|
||||
status = Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
if (response.status().error_code() != grpc::SUCCESS) {
|
||||
if (response.status().error_code() != 0) {
|
||||
std::cerr << response.status().reason() << std::endl;
|
||||
status = Status(StatusCode::ServerFailed, response.status().reason());
|
||||
}
|
||||
|
@ -377,15 +280,9 @@ GrpcClient::ListPartitions(const grpc::CollectionName& collection_name, grpc::Pa
|
|||
ClientContext context;
|
||||
::grpc::Status grpc_status = stub_->ShowPartitions(&context, collection_name, &partition_array);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "ShowPartitions gRPC failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "ListPartitions", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(partition_array.status(), StatusCode::ServerFailed)
|
||||
|
||||
if (partition_array.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << partition_array.status().reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, partition_array.status().reason());
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
@ -395,15 +292,8 @@ GrpcClient::DropPartition(const ::milvus::grpc::PartitionParam& partition_param)
|
|||
::milvus::grpc::Status response;
|
||||
::grpc::Status grpc_status = stub_->DropPartition(&context, partition_param, &response);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "DropPartition gRPC failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (response.error_code() != grpc::SUCCESS) {
|
||||
std::cerr << response.reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, response.reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "DropPartition", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(response, StatusCode::ServerFailed)
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
@ -419,15 +309,8 @@ GrpcClient::Flush(const std::string& collection_name) {
|
|||
::milvus::grpc::Status response;
|
||||
::grpc::Status grpc_status = stub_->Flush(&context, param, &response);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "Flush gRPC failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (response.error_code() != grpc::SUCCESS) {
|
||||
std::cerr << response.reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, response.reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "Flush", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(response, StatusCode::ServerFailed)
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
@ -437,15 +320,8 @@ GrpcClient::Compact(milvus::grpc::CompactParam& compact_param) {
|
|||
::milvus::grpc::Status response;
|
||||
::grpc::Status grpc_status = stub_->Compact(&context, compact_param, &response);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "Compact gRPC failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (response.error_code() != grpc::SUCCESS) {
|
||||
std::cerr << response.reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, response.reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "Compact", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(response, StatusCode::ServerFailed)
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
@ -460,15 +336,8 @@ GrpcClient::SearchPB(milvus::grpc::SearchParamPB& search_param, milvus::grpc::Qu
|
|||
ClientContext context;
|
||||
::grpc::Status grpc_status = stub_->SearchPB(&context, search_param, &result);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "HybridSearchPB gRPC failed!" << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
|
||||
if (result.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << result.status().reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, result.status().reason());
|
||||
}
|
||||
CHECK_GRPC_STATUS(grpc_status, "SearchPB", StatusCode::RPCFailed)
|
||||
CHECK_ERROR_CODE(result.status(), StatusCode::ServerFailed)
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "include/MilvusApi.h"
|
||||
#include "grpc-gen/gen-milvus/milvus.grpc.pb.h"
|
||||
//#include "grpc/gen-status/status.grpc.pb.h"
|
||||
#include "include/MilvusApi.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
|
@ -29,6 +28,19 @@
|
|||
#include <grpcpp/security/credentials.h>
|
||||
|
||||
namespace milvus {
|
||||
|
||||
#define CHECK_GRPC_STATUS(GRPC_STATUS, METHOD, STATUS_CODE) \
|
||||
if (!(GRPC_STATUS).ok()) { \
|
||||
std::cerr << METHOD " rpc failed!" << std::endl; \
|
||||
return Status(STATUS_CODE, GRPC_STATUS.error_message()); \
|
||||
}
|
||||
|
||||
#define CHECK_ERROR_CODE(STATUS, STATUS_CODE) \
|
||||
if ((STATUS).error_code() != 0) { \
|
||||
std::cerr << (STATUS).reason() << std::endl; \
|
||||
return Status(STATUS_CODE, (STATUS).reason()); \
|
||||
}
|
||||
|
||||
class GrpcClient {
|
||||
public:
|
||||
explicit GrpcClient(std::shared_ptr<::grpc::Channel>& channel);
|
||||
|
@ -62,8 +74,8 @@ class GrpcClient {
|
|||
Status
|
||||
GetCollectionInfo(const std::string& collection_name, grpc::Mapping& grpc_schema);
|
||||
|
||||
int64_t
|
||||
CountEntities(grpc::CollectionName& collection_name, Status& status);
|
||||
Status
|
||||
CountEntities(grpc::CollectionName& collection_name, ::milvus::grpc::CollectionRowCount& count);
|
||||
|
||||
Status
|
||||
ListCollections(milvus::grpc::CollectionNameList& collection_name_list);
|
||||
|
|
Loading…
Reference in New Issue