Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
0b9cffaf
M
milvus
项目概览
milvus
/
milvus
11 个月 前同步成功
通知
261
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0b9cffaf
编写于
12月 23, 2020
作者:
S
sunby
提交者:
yefu.chen
12月 23, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove index_name in IndexRequest and remove indexType in FieldIndexMeta
Signed-off-by:
N
sunby
<
bingyi.sun@zilliz.com
>
上级
11316525
变更
15
展开全部
隐藏空白更改
内联
并排
Showing
15 changed file
with
728 addition
and
878 deletion
+728
-878
internal/core/src/pb/etcd_meta.pb.cc
internal/core/src/pb/etcd_meta.pb.cc
+52
-117
internal/core/src/pb/etcd_meta.pb.h
internal/core/src/pb/etcd_meta.pb.h
+12
-76
internal/core/src/pb/service_msg.pb.cc
internal/core/src/pb/service_msg.pb.cc
+48
-113
internal/core/src/pb/service_msg.pb.h
internal/core/src/pb/service_msg.pb.h
+9
-73
internal/master/meta_table.go
internal/master/meta_table.go
+5
-5
internal/master/meta_table_test.go
internal/master/meta_table_test.go
+4
-8
internal/proto/etcd_meta.proto
internal/proto/etcd_meta.proto
+4
-5
internal/proto/etcdpb/etcd_meta.pb.go
internal/proto/etcdpb/etcd_meta.pb.go
+50
-59
internal/proto/internal_msg.proto
internal/proto/internal_msg.proto
+3
-6
internal/proto/internalpb/internal_msg.pb.go
internal/proto/internalpb/internal_msg.pb.go
+118
-142
internal/proto/service_msg.proto
internal/proto/service_msg.proto
+3
-4
internal/proto/servicepb/service_msg.pb.go
internal/proto/servicepb/service_msg.pb.go
+58
-65
internal/proxy/grpc_service.go
internal/proxy/grpc_service.go
+0
-2
internal/storage/data_codec.go
internal/storage/data_codec.go
+238
-182
internal/storage/data_codec_test.go
internal/storage/data_codec_test.go
+124
-21
未找到文件。
internal/core/src/pb/etcd_meta.pb.cc
浏览文件 @
0b9cffaf
...
@@ -198,7 +198,6 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_etcd_5fmeta_2eproto::offsets[]
...
@@ -198,7 +198,6 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_etcd_5fmeta_2eproto::offsets[]
~
0u
,
// no _weak_field_map_
~
0u
,
// no _weak_field_map_
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
etcd
::
FieldIndexMeta
,
segmentid_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
etcd
::
FieldIndexMeta
,
segmentid_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
etcd
::
FieldIndexMeta
,
fieldid_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
etcd
::
FieldIndexMeta
,
fieldid_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
etcd
::
FieldIndexMeta
,
index_type_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
etcd
::
FieldIndexMeta
,
indexid_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
etcd
::
FieldIndexMeta
,
indexid_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
etcd
::
FieldIndexMeta
,
index_params_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
etcd
::
FieldIndexMeta
,
index_params_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
etcd
::
FieldIndexMeta
,
status_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
etcd
::
FieldIndexMeta
,
status_
),
...
@@ -242,14 +241,13 @@ const char descriptor_table_protodef_etcd_5fmeta_2eproto[] PROTOBUF_SECTION_VARI
...
@@ -242,14 +241,13 @@ const char descriptor_table_protodef_etcd_5fmeta_2eproto[] PROTOBUF_SECTION_VARI
"
\022\022\n\n
close_time
\030\007
\001
(
\004\022\020\n\010
num_rows
\030\010
\001
(
\003\022\020
"
"
\022\022\n\n
close_time
\030\007
\001
(
\004\022\020\n\010
num_rows
\030\010
\001
(
\003\022\020
"
"
\n\010
mem_size
\030\t
\001
(
\003\022
>
\n\021
binlog_file_paths
\030\n
"
"
\n\010
mem_size
\030\t
\001
(
\003\022
>
\n\021
binlog_file_paths
\030\n
"
"
\003
(
\013
2#.milvus.proto.etcd.FieldBinlogFiles"
"
\003
(
\013
2#.milvus.proto.etcd.FieldBinlogFiles"
"
\"\337\001\n\016
FieldIndexMeta
\022\021\n\t
segmentID
\030\001
\001
(
\003\022\017
"
"
\"\313\001\n\016
FieldIndexMeta
\022\021\n\t
segmentID
\030\001
\001
(
\003\022\017
"
"
\n\007
fieldID
\030\002
\001
(
\003\022\022\n\n
index_type
\030\003
\001
(
\t\022\017\n\007
i"
"
\n\007
fieldID
\030\002
\001
(
\003\022\017\n\007
indexID
\030\003
\001
(
\003\022
7
\n\014
inde"
"ndexID
\030\004
\001
(
\003\022
7
\n\014
index_params
\030\005
\003
(
\013
2!.mil"
"x_params
\030\004
\003
(
\013
2!.milvus.proto.common.Key"
"vus.proto.common.KeyValuePair
\022
1
\n\006
status
\030
"
"ValuePair
\022
1
\n\006
status
\030\005
\001
(
\016
2!.milvus.proto"
"
\006
\001
(
\016
2!.milvus.proto.service.IndexStatus"
".service.IndexStatus
\022\030\n\020
index_file_paths"
"
\022\030\n\020
index_file_paths
\030\007
\003
(
\t
B@Z>github.com"
"
\030\006
\003
(
\t
B@Z>github.com/zilliztech/milvus-d"
"/zilliztech/milvus-distributed/internal/"
"istributed/internal/proto/etcdpbb
\006
proto3"
"proto/etcdpbb
\006
proto3"
;
;
static
const
::
PROTOBUF_NAMESPACE_ID
::
internal
::
DescriptorTable
*
const
descriptor_table_etcd_5fmeta_2eproto_deps
[
3
]
=
{
static
const
::
PROTOBUF_NAMESPACE_ID
::
internal
::
DescriptorTable
*
const
descriptor_table_etcd_5fmeta_2eproto_deps
[
3
]
=
{
&::
descriptor_table_common_2eproto
,
&::
descriptor_table_common_2eproto
,
...
@@ -267,7 +265,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_etc
...
@@ -267,7 +265,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_etc
static
::
PROTOBUF_NAMESPACE_ID
::
internal
::
once_flag
descriptor_table_etcd_5fmeta_2eproto_once
;
static
::
PROTOBUF_NAMESPACE_ID
::
internal
::
once_flag
descriptor_table_etcd_5fmeta_2eproto_once
;
static
bool
descriptor_table_etcd_5fmeta_2eproto_initialized
=
false
;
static
bool
descriptor_table_etcd_5fmeta_2eproto_initialized
=
false
;
const
::
PROTOBUF_NAMESPACE_ID
::
internal
::
DescriptorTable
descriptor_table_etcd_5fmeta_2eproto
=
{
const
::
PROTOBUF_NAMESPACE_ID
::
internal
::
DescriptorTable
descriptor_table_etcd_5fmeta_2eproto
=
{
&
descriptor_table_etcd_5fmeta_2eproto_initialized
,
descriptor_table_protodef_etcd_5fmeta_2eproto
,
"etcd_meta.proto"
,
10
6
0
,
&
descriptor_table_etcd_5fmeta_2eproto_initialized
,
descriptor_table_protodef_etcd_5fmeta_2eproto
,
"etcd_meta.proto"
,
10
4
0
,
&
descriptor_table_etcd_5fmeta_2eproto_once
,
descriptor_table_etcd_5fmeta_2eproto_sccs
,
descriptor_table_etcd_5fmeta_2eproto_deps
,
6
,
3
,
&
descriptor_table_etcd_5fmeta_2eproto_once
,
descriptor_table_etcd_5fmeta_2eproto_sccs
,
descriptor_table_etcd_5fmeta_2eproto_deps
,
6
,
3
,
schemas
,
file_default_instances
,
TableStruct_etcd_5fmeta_2eproto
::
offsets
,
schemas
,
file_default_instances
,
TableStruct_etcd_5fmeta_2eproto
::
offsets
,
file_level_metadata_etcd_5fmeta_2eproto
,
6
,
file_level_enum_descriptors_etcd_5fmeta_2eproto
,
file_level_service_descriptors_etcd_5fmeta_2eproto
,
file_level_metadata_etcd_5fmeta_2eproto
,
6
,
file_level_enum_descriptors_etcd_5fmeta_2eproto
,
file_level_service_descriptors_etcd_5fmeta_2eproto
,
...
@@ -2560,10 +2558,6 @@ FieldIndexMeta::FieldIndexMeta(const FieldIndexMeta& from)
...
@@ -2560,10 +2558,6 @@ FieldIndexMeta::FieldIndexMeta(const FieldIndexMeta& from)
index_params_
(
from
.
index_params_
),
index_params_
(
from
.
index_params_
),
index_file_paths_
(
from
.
index_file_paths_
)
{
index_file_paths_
(
from
.
index_file_paths_
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
index_type_
.
UnsafeSetDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
if
(
!
from
.
index_type
().
empty
())
{
index_type_
.
AssignWithDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
from
.
index_type_
);
}
::
memcpy
(
&
segmentid_
,
&
from
.
segmentid_
,
::
memcpy
(
&
segmentid_
,
&
from
.
segmentid_
,
static_cast
<
size_t
>
(
reinterpret_cast
<
char
*>
(
&
status_
)
-
static_cast
<
size_t
>
(
reinterpret_cast
<
char
*>
(
&
status_
)
-
reinterpret_cast
<
char
*>
(
&
segmentid_
))
+
sizeof
(
status_
));
reinterpret_cast
<
char
*>
(
&
segmentid_
))
+
sizeof
(
status_
));
...
@@ -2572,7 +2566,6 @@ FieldIndexMeta::FieldIndexMeta(const FieldIndexMeta& from)
...
@@ -2572,7 +2566,6 @@ FieldIndexMeta::FieldIndexMeta(const FieldIndexMeta& from)
void
FieldIndexMeta
::
SharedCtor
()
{
void
FieldIndexMeta
::
SharedCtor
()
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InitSCC
(
&
scc_info_FieldIndexMeta_etcd_5fmeta_2eproto
.
base
);
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InitSCC
(
&
scc_info_FieldIndexMeta_etcd_5fmeta_2eproto
.
base
);
index_type_
.
UnsafeSetDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
::
memset
(
&
segmentid_
,
0
,
static_cast
<
size_t
>
(
::
memset
(
&
segmentid_
,
0
,
static_cast
<
size_t
>
(
reinterpret_cast
<
char
*>
(
&
status_
)
-
reinterpret_cast
<
char
*>
(
&
status_
)
-
reinterpret_cast
<
char
*>
(
&
segmentid_
))
+
sizeof
(
status_
));
reinterpret_cast
<
char
*>
(
&
segmentid_
))
+
sizeof
(
status_
));
...
@@ -2584,7 +2577,6 @@ FieldIndexMeta::~FieldIndexMeta() {
...
@@ -2584,7 +2577,6 @@ FieldIndexMeta::~FieldIndexMeta() {
}
}
void
FieldIndexMeta
::
SharedDtor
()
{
void
FieldIndexMeta
::
SharedDtor
()
{
index_type_
.
DestroyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
}
}
void
FieldIndexMeta
::
SetCachedSize
(
int
size
)
const
{
void
FieldIndexMeta
::
SetCachedSize
(
int
size
)
const
{
...
@@ -2604,7 +2596,6 @@ void FieldIndexMeta::Clear() {
...
@@ -2604,7 +2596,6 @@ void FieldIndexMeta::Clear() {
index_params_
.
Clear
();
index_params_
.
Clear
();
index_file_paths_
.
Clear
();
index_file_paths_
.
Clear
();
index_type_
.
ClearToEmptyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
::
memset
(
&
segmentid_
,
0
,
static_cast
<
size_t
>
(
::
memset
(
&
segmentid_
,
0
,
static_cast
<
size_t
>
(
reinterpret_cast
<
char
*>
(
&
status_
)
-
reinterpret_cast
<
char
*>
(
&
status_
)
-
reinterpret_cast
<
char
*>
(
&
segmentid_
))
+
sizeof
(
status_
));
reinterpret_cast
<
char
*>
(
&
segmentid_
))
+
sizeof
(
status_
));
...
@@ -2633,50 +2624,43 @@ const char* FieldIndexMeta::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE
...
@@ -2633,50 +2624,43 @@ const char* FieldIndexMeta::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE
CHK_
(
ptr
);
CHK_
(
ptr
);
}
else
goto
handle_unusual
;
}
else
goto
handle_unusual
;
continue
;
continue
;
//
string index_type
= 3;
//
int64 indexID
= 3;
case
3
:
case
3
:
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
26
))
{
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
24
))
{
ptr
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InlineGreedyStringParserUTF8
(
mutable_index_type
(),
ptr
,
ctx
,
"milvus.proto.etcd.FieldIndexMeta.index_type"
);
CHK_
(
ptr
);
}
else
goto
handle_unusual
;
continue
;
// int64 indexID = 4;
case
4
:
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
32
))
{
indexid_
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ReadVarint
(
&
ptr
);
indexid_
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ReadVarint
(
&
ptr
);
CHK_
(
ptr
);
CHK_
(
ptr
);
}
else
goto
handle_unusual
;
}
else
goto
handle_unusual
;
continue
;
continue
;
// repeated .milvus.proto.common.KeyValuePair index_params =
5
;
// repeated .milvus.proto.common.KeyValuePair index_params =
4
;
case
5
:
case
4
:
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
42
))
{
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
34
))
{
ptr
-=
1
;
ptr
-=
1
;
do
{
do
{
ptr
+=
1
;
ptr
+=
1
;
ptr
=
ctx
->
ParseMessage
(
add_index_params
(),
ptr
);
ptr
=
ctx
->
ParseMessage
(
add_index_params
(),
ptr
);
CHK_
(
ptr
);
CHK_
(
ptr
);
if
(
!
ctx
->
DataAvailable
(
ptr
))
break
;
if
(
!
ctx
->
DataAvailable
(
ptr
))
break
;
}
while
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
UnalignedLoad
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
ptr
)
==
42
);
}
while
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
UnalignedLoad
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
ptr
)
==
34
);
}
else
goto
handle_unusual
;
}
else
goto
handle_unusual
;
continue
;
continue
;
// .milvus.proto.service.IndexStatus status =
6
;
// .milvus.proto.service.IndexStatus status =
5
;
case
6
:
case
5
:
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
4
8
))
{
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
4
0
))
{
::
PROTOBUF_NAMESPACE_ID
::
uint64
val
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ReadVarint
(
&
ptr
);
::
PROTOBUF_NAMESPACE_ID
::
uint64
val
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ReadVarint
(
&
ptr
);
CHK_
(
ptr
);
CHK_
(
ptr
);
set_status
(
static_cast
<::
milvus
::
proto
::
service
::
IndexStatus
>
(
val
));
set_status
(
static_cast
<::
milvus
::
proto
::
service
::
IndexStatus
>
(
val
));
}
else
goto
handle_unusual
;
}
else
goto
handle_unusual
;
continue
;
continue
;
// repeated string index_file_paths =
7
;
// repeated string index_file_paths =
6
;
case
7
:
case
6
:
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
5
8
))
{
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
5
0
))
{
ptr
-=
1
;
ptr
-=
1
;
do
{
do
{
ptr
+=
1
;
ptr
+=
1
;
ptr
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InlineGreedyStringParserUTF8
(
add_index_file_paths
(),
ptr
,
ctx
,
"milvus.proto.etcd.FieldIndexMeta.index_file_paths"
);
ptr
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InlineGreedyStringParserUTF8
(
add_index_file_paths
(),
ptr
,
ctx
,
"milvus.proto.etcd.FieldIndexMeta.index_file_paths"
);
CHK_
(
ptr
);
CHK_
(
ptr
);
if
(
!
ctx
->
DataAvailable
(
ptr
))
break
;
if
(
!
ctx
->
DataAvailable
(
ptr
))
break
;
}
while
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
UnalignedLoad
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
ptr
)
==
5
8
);
}
while
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
UnalignedLoad
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
ptr
)
==
5
0
);
}
else
goto
handle_unusual
;
}
else
goto
handle_unusual
;
continue
;
continue
;
default:
{
default:
{
...
@@ -2735,24 +2719,9 @@ bool FieldIndexMeta::MergePartialFromCodedStream(
...
@@ -2735,24 +2719,9 @@ bool FieldIndexMeta::MergePartialFromCodedStream(
break
;
break
;
}
}
//
string index_type
= 3;
//
int64 indexID
= 3;
case
3
:
{
case
3
:
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
26
&
0xFF
))
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
24
&
0xFF
))
{
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadString
(
input
,
this
->
mutable_index_type
()));
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
this
->
index_type
().
data
(),
static_cast
<
int
>
(
this
->
index_type
().
length
()),
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
PARSE
,
"milvus.proto.etcd.FieldIndexMeta.index_type"
));
}
else
{
goto
handle_unusual
;
}
break
;
}
// int64 indexID = 4;
case
4
:
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
32
&
0xFF
))
{
DO_
((
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadPrimitive
<
DO_
((
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadPrimitive
<
::
PROTOBUF_NAMESPACE_ID
::
int64
,
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
TYPE_INT64
>
(
::
PROTOBUF_NAMESPACE_ID
::
int64
,
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
TYPE_INT64
>
(
...
@@ -2763,9 +2732,9 @@ bool FieldIndexMeta::MergePartialFromCodedStream(
...
@@ -2763,9 +2732,9 @@ bool FieldIndexMeta::MergePartialFromCodedStream(
break
;
break
;
}
}
// repeated .milvus.proto.common.KeyValuePair index_params =
5
;
// repeated .milvus.proto.common.KeyValuePair index_params =
4
;
case
5
:
{
case
4
:
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
42
&
0xFF
))
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
34
&
0xFF
))
{
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadMessage
(
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadMessage
(
input
,
add_index_params
()));
input
,
add_index_params
()));
}
else
{
}
else
{
...
@@ -2774,9 +2743,9 @@ bool FieldIndexMeta::MergePartialFromCodedStream(
...
@@ -2774,9 +2743,9 @@ bool FieldIndexMeta::MergePartialFromCodedStream(
break
;
break
;
}
}
// .milvus.proto.service.IndexStatus status =
6
;
// .milvus.proto.service.IndexStatus status =
5
;
case
6
:
{
case
5
:
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
4
8
&
0xFF
))
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
4
0
&
0xFF
))
{
int
value
=
0
;
int
value
=
0
;
DO_
((
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadPrimitive
<
DO_
((
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadPrimitive
<
int
,
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
TYPE_ENUM
>
(
int
,
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
TYPE_ENUM
>
(
...
@@ -2788,9 +2757,9 @@ bool FieldIndexMeta::MergePartialFromCodedStream(
...
@@ -2788,9 +2757,9 @@ bool FieldIndexMeta::MergePartialFromCodedStream(
break
;
break
;
}
}
// repeated string index_file_paths =
7
;
// repeated string index_file_paths =
6
;
case
7
:
{
case
6
:
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
5
8
&
0xFF
))
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
5
0
&
0xFF
))
{
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadString
(
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadString
(
input
,
this
->
add_index_file_paths
()));
input
,
this
->
add_index_file_paths
()));
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
...
@@ -2841,44 +2810,34 @@ void FieldIndexMeta::SerializeWithCachedSizes(
...
@@ -2841,44 +2810,34 @@ void FieldIndexMeta::SerializeWithCachedSizes(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteInt64
(
2
,
this
->
fieldid
(),
output
);
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteInt64
(
2
,
this
->
fieldid
(),
output
);
}
}
// string index_type = 3;
// int64 indexID = 3;
if
(
this
->
index_type
().
size
()
>
0
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
this
->
index_type
().
data
(),
static_cast
<
int
>
(
this
->
index_type
().
length
()),
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
SERIALIZE
,
"milvus.proto.etcd.FieldIndexMeta.index_type"
);
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringMaybeAliased
(
3
,
this
->
index_type
(),
output
);
}
// int64 indexID = 4;
if
(
this
->
indexid
()
!=
0
)
{
if
(
this
->
indexid
()
!=
0
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteInt64
(
4
,
this
->
indexid
(),
output
);
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteInt64
(
3
,
this
->
indexid
(),
output
);
}
}
// repeated .milvus.proto.common.KeyValuePair index_params =
5
;
// repeated .milvus.proto.common.KeyValuePair index_params =
4
;
for
(
unsigned
int
i
=
0
,
for
(
unsigned
int
i
=
0
,
n
=
static_cast
<
unsigned
int
>
(
this
->
index_params_size
());
i
<
n
;
i
++
)
{
n
=
static_cast
<
unsigned
int
>
(
this
->
index_params_size
());
i
<
n
;
i
++
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteMessageMaybeToArray
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteMessageMaybeToArray
(
5
,
4
,
this
->
index_params
(
static_cast
<
int
>
(
i
)),
this
->
index_params
(
static_cast
<
int
>
(
i
)),
output
);
output
);
}
}
// .milvus.proto.service.IndexStatus status =
6
;
// .milvus.proto.service.IndexStatus status =
5
;
if
(
this
->
status
()
!=
0
)
{
if
(
this
->
status
()
!=
0
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteEnum
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteEnum
(
6
,
this
->
status
(),
output
);
5
,
this
->
status
(),
output
);
}
}
// repeated string index_file_paths =
7
;
// repeated string index_file_paths =
6
;
for
(
int
i
=
0
,
n
=
this
->
index_file_paths_size
();
i
<
n
;
i
++
)
{
for
(
int
i
=
0
,
n
=
this
->
index_file_paths_size
();
i
<
n
;
i
++
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
this
->
index_file_paths
(
i
).
data
(),
static_cast
<
int
>
(
this
->
index_file_paths
(
i
).
length
()),
this
->
index_file_paths
(
i
).
data
(),
static_cast
<
int
>
(
this
->
index_file_paths
(
i
).
length
()),
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
SERIALIZE
,
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
SERIALIZE
,
"milvus.proto.etcd.FieldIndexMeta.index_file_paths"
);
"milvus.proto.etcd.FieldIndexMeta.index_file_paths"
);
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteString
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteString
(
7
,
this
->
index_file_paths
(
i
),
output
);
6
,
this
->
index_file_paths
(
i
),
output
);
}
}
if
(
_internal_metadata_
.
have_unknown_fields
())
{
if
(
_internal_metadata_
.
have_unknown_fields
())
{
...
@@ -2904,44 +2863,33 @@ void FieldIndexMeta::SerializeWithCachedSizes(
...
@@ -2904,44 +2863,33 @@ void FieldIndexMeta::SerializeWithCachedSizes(
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteInt64ToArray
(
2
,
this
->
fieldid
(),
target
);
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteInt64ToArray
(
2
,
this
->
fieldid
(),
target
);
}
}
// string index_type = 3;
// int64 indexID = 3;
if
(
this
->
index_type
().
size
()
>
0
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
this
->
index_type
().
data
(),
static_cast
<
int
>
(
this
->
index_type
().
length
()),
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
SERIALIZE
,
"milvus.proto.etcd.FieldIndexMeta.index_type"
);
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringToArray
(
3
,
this
->
index_type
(),
target
);
}
// int64 indexID = 4;
if
(
this
->
indexid
()
!=
0
)
{
if
(
this
->
indexid
()
!=
0
)
{
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteInt64ToArray
(
4
,
this
->
indexid
(),
target
);
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteInt64ToArray
(
3
,
this
->
indexid
(),
target
);
}
}
// repeated .milvus.proto.common.KeyValuePair index_params =
5
;
// repeated .milvus.proto.common.KeyValuePair index_params =
4
;
for
(
unsigned
int
i
=
0
,
for
(
unsigned
int
i
=
0
,
n
=
static_cast
<
unsigned
int
>
(
this
->
index_params_size
());
i
<
n
;
i
++
)
{
n
=
static_cast
<
unsigned
int
>
(
this
->
index_params_size
());
i
<
n
;
i
++
)
{
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
InternalWriteMessageToArray
(
InternalWriteMessageToArray
(
5
,
this
->
index_params
(
static_cast
<
int
>
(
i
)),
target
);
4
,
this
->
index_params
(
static_cast
<
int
>
(
i
)),
target
);
}
}
// .milvus.proto.service.IndexStatus status =
6
;
// .milvus.proto.service.IndexStatus status =
5
;
if
(
this
->
status
()
!=
0
)
{
if
(
this
->
status
()
!=
0
)
{
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteEnumToArray
(
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteEnumToArray
(
6
,
this
->
status
(),
target
);
5
,
this
->
status
(),
target
);
}
}
// repeated string index_file_paths =
7
;
// repeated string index_file_paths =
6
;
for
(
int
i
=
0
,
n
=
this
->
index_file_paths_size
();
i
<
n
;
i
++
)
{
for
(
int
i
=
0
,
n
=
this
->
index_file_paths_size
();
i
<
n
;
i
++
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
this
->
index_file_paths
(
i
).
data
(),
static_cast
<
int
>
(
this
->
index_file_paths
(
i
).
length
()),
this
->
index_file_paths
(
i
).
data
(),
static_cast
<
int
>
(
this
->
index_file_paths
(
i
).
length
()),
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
SERIALIZE
,
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
SERIALIZE
,
"milvus.proto.etcd.FieldIndexMeta.index_file_paths"
);
"milvus.proto.etcd.FieldIndexMeta.index_file_paths"
);
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringToArray
(
7
,
this
->
index_file_paths
(
i
),
target
);
WriteStringToArray
(
6
,
this
->
index_file_paths
(
i
),
target
);
}
}
if
(
_internal_metadata_
.
have_unknown_fields
())
{
if
(
_internal_metadata_
.
have_unknown_fields
())
{
...
@@ -2965,7 +2913,7 @@ size_t FieldIndexMeta::ByteSizeLong() const {
...
@@ -2965,7 +2913,7 @@ size_t FieldIndexMeta::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
// Prevent compiler warnings about cached_has_bits being unused
(
void
)
cached_has_bits
;
(
void
)
cached_has_bits
;
// repeated .milvus.proto.common.KeyValuePair index_params =
5
;
// repeated .milvus.proto.common.KeyValuePair index_params =
4
;
{
{
unsigned
int
count
=
static_cast
<
unsigned
int
>
(
this
->
index_params_size
());
unsigned
int
count
=
static_cast
<
unsigned
int
>
(
this
->
index_params_size
());
total_size
+=
1UL
*
count
;
total_size
+=
1UL
*
count
;
...
@@ -2976,7 +2924,7 @@ size_t FieldIndexMeta::ByteSizeLong() const {
...
@@ -2976,7 +2924,7 @@ size_t FieldIndexMeta::ByteSizeLong() const {
}
}
}
}
// repeated string index_file_paths =
7
;
// repeated string index_file_paths =
6
;
total_size
+=
1
*
total_size
+=
1
*
::
PROTOBUF_NAMESPACE_ID
::
internal
::
FromIntSize
(
this
->
index_file_paths_size
());
::
PROTOBUF_NAMESPACE_ID
::
internal
::
FromIntSize
(
this
->
index_file_paths_size
());
for
(
int
i
=
0
,
n
=
this
->
index_file_paths_size
();
i
<
n
;
i
++
)
{
for
(
int
i
=
0
,
n
=
this
->
index_file_paths_size
();
i
<
n
;
i
++
)
{
...
@@ -2984,13 +2932,6 @@ size_t FieldIndexMeta::ByteSizeLong() const {
...
@@ -2984,13 +2932,6 @@ size_t FieldIndexMeta::ByteSizeLong() const {
this
->
index_file_paths
(
i
));
this
->
index_file_paths
(
i
));
}
}
// string index_type = 3;
if
(
this
->
index_type
().
size
()
>
0
)
{
total_size
+=
1
+
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
StringSize
(
this
->
index_type
());
}
// int64 segmentID = 1;
// int64 segmentID = 1;
if
(
this
->
segmentid
()
!=
0
)
{
if
(
this
->
segmentid
()
!=
0
)
{
total_size
+=
1
+
total_size
+=
1
+
...
@@ -3005,14 +2946,14 @@ size_t FieldIndexMeta::ByteSizeLong() const {
...
@@ -3005,14 +2946,14 @@ size_t FieldIndexMeta::ByteSizeLong() const {
this
->
fieldid
());
this
->
fieldid
());
}
}
// int64 indexID =
4
;
// int64 indexID =
3
;
if
(
this
->
indexid
()
!=
0
)
{
if
(
this
->
indexid
()
!=
0
)
{
total_size
+=
1
+
total_size
+=
1
+
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
Int64Size
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
Int64Size
(
this
->
indexid
());
this
->
indexid
());
}
}
// .milvus.proto.service.IndexStatus status =
6
;
// .milvus.proto.service.IndexStatus status =
5
;
if
(
this
->
status
()
!=
0
)
{
if
(
this
->
status
()
!=
0
)
{
total_size
+=
1
+
total_size
+=
1
+
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
EnumSize
(
this
->
status
());
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
EnumSize
(
this
->
status
());
...
@@ -3047,10 +2988,6 @@ void FieldIndexMeta::MergeFrom(const FieldIndexMeta& from) {
...
@@ -3047,10 +2988,6 @@ void FieldIndexMeta::MergeFrom(const FieldIndexMeta& from) {
index_params_
.
MergeFrom
(
from
.
index_params_
);
index_params_
.
MergeFrom
(
from
.
index_params_
);
index_file_paths_
.
MergeFrom
(
from
.
index_file_paths_
);
index_file_paths_
.
MergeFrom
(
from
.
index_file_paths_
);
if
(
from
.
index_type
().
size
()
>
0
)
{
index_type_
.
AssignWithDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
from
.
index_type_
);
}
if
(
from
.
segmentid
()
!=
0
)
{
if
(
from
.
segmentid
()
!=
0
)
{
set_segmentid
(
from
.
segmentid
());
set_segmentid
(
from
.
segmentid
());
}
}
...
@@ -3088,8 +3025,6 @@ void FieldIndexMeta::InternalSwap(FieldIndexMeta* other) {
...
@@ -3088,8 +3025,6 @@ void FieldIndexMeta::InternalSwap(FieldIndexMeta* other) {
_internal_metadata_
.
Swap
(
&
other
->
_internal_metadata_
);
_internal_metadata_
.
Swap
(
&
other
->
_internal_metadata_
);
CastToBase
(
&
index_params_
)
->
InternalSwap
(
CastToBase
(
&
other
->
index_params_
));
CastToBase
(
&
index_params_
)
->
InternalSwap
(
CastToBase
(
&
other
->
index_params_
));
index_file_paths_
.
InternalSwap
(
CastToBase
(
&
other
->
index_file_paths_
));
index_file_paths_
.
InternalSwap
(
CastToBase
(
&
other
->
index_file_paths_
));
index_type_
.
Swap
(
&
other
->
index_type_
,
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
GetArenaNoVirtual
());
swap
(
segmentid_
,
other
->
segmentid_
);
swap
(
segmentid_
,
other
->
segmentid_
);
swap
(
fieldid_
,
other
->
fieldid_
);
swap
(
fieldid_
,
other
->
fieldid_
);
swap
(
indexid_
,
other
->
indexid_
);
swap
(
indexid_
,
other
->
indexid_
);
...
...
internal/core/src/pb/etcd_meta.pb.h
浏览文件 @
0b9cffaf
...
@@ -1075,15 +1075,14 @@ class FieldIndexMeta :
...
@@ -1075,15 +1075,14 @@ class FieldIndexMeta :
// accessors -------------------------------------------------------
// accessors -------------------------------------------------------
enum
:
int
{
enum
:
int
{
kIndexParamsFieldNumber
=
5
,
kIndexParamsFieldNumber
=
4
,
kIndexFilePathsFieldNumber
=
7
,
kIndexFilePathsFieldNumber
=
6
,
kIndexTypeFieldNumber
=
3
,
kSegmentIDFieldNumber
=
1
,
kSegmentIDFieldNumber
=
1
,
kFieldIDFieldNumber
=
2
,
kFieldIDFieldNumber
=
2
,
kIndexIDFieldNumber
=
4
,
kIndexIDFieldNumber
=
3
,
kStatusFieldNumber
=
6
,
kStatusFieldNumber
=
5
,
};
};
// repeated .milvus.proto.common.KeyValuePair index_params =
5
;
// repeated .milvus.proto.common.KeyValuePair index_params =
4
;
int
index_params_size
()
const
;
int
index_params_size
()
const
;
void
clear_index_params
();
void
clear_index_params
();
::
milvus
::
proto
::
common
::
KeyValuePair
*
mutable_index_params
(
int
index
);
::
milvus
::
proto
::
common
::
KeyValuePair
*
mutable_index_params
(
int
index
);
...
@@ -1094,7 +1093,7 @@ class FieldIndexMeta :
...
@@ -1094,7 +1093,7 @@ class FieldIndexMeta :
const
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
::
milvus
::
proto
::
common
::
KeyValuePair
>&
const
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
::
milvus
::
proto
::
common
::
KeyValuePair
>&
index_params
()
const
;
index_params
()
const
;
// repeated string index_file_paths =
7
;
// repeated string index_file_paths =
6
;
int
index_file_paths_size
()
const
;
int
index_file_paths_size
()
const
;
void
clear_index_file_paths
();
void
clear_index_file_paths
();
const
std
::
string
&
index_file_paths
(
int
index
)
const
;
const
std
::
string
&
index_file_paths
(
int
index
)
const
;
...
@@ -1111,17 +1110,6 @@ class FieldIndexMeta :
...
@@ -1111,17 +1110,6 @@ class FieldIndexMeta :
const
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
std
::
string
>&
index_file_paths
()
const
;
const
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
std
::
string
>&
index_file_paths
()
const
;
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
std
::
string
>*
mutable_index_file_paths
();
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
std
::
string
>*
mutable_index_file_paths
();
// string index_type = 3;
void
clear_index_type
();
const
std
::
string
&
index_type
()
const
;
void
set_index_type
(
const
std
::
string
&
value
);
void
set_index_type
(
std
::
string
&&
value
);
void
set_index_type
(
const
char
*
value
);
void
set_index_type
(
const
char
*
value
,
size_t
size
);
std
::
string
*
mutable_index_type
();
std
::
string
*
release_index_type
();
void
set_allocated_index_type
(
std
::
string
*
index_type
);
// int64 segmentID = 1;
// int64 segmentID = 1;
void
clear_segmentid
();
void
clear_segmentid
();
::
PROTOBUF_NAMESPACE_ID
::
int64
segmentid
()
const
;
::
PROTOBUF_NAMESPACE_ID
::
int64
segmentid
()
const
;
...
@@ -1132,12 +1120,12 @@ class FieldIndexMeta :
...
@@ -1132,12 +1120,12 @@ class FieldIndexMeta :
::
PROTOBUF_NAMESPACE_ID
::
int64
fieldid
()
const
;
::
PROTOBUF_NAMESPACE_ID
::
int64
fieldid
()
const
;
void
set_fieldid
(
::
PROTOBUF_NAMESPACE_ID
::
int64
value
);
void
set_fieldid
(
::
PROTOBUF_NAMESPACE_ID
::
int64
value
);
// int64 indexID =
4
;
// int64 indexID =
3
;
void
clear_indexid
();
void
clear_indexid
();
::
PROTOBUF_NAMESPACE_ID
::
int64
indexid
()
const
;
::
PROTOBUF_NAMESPACE_ID
::
int64
indexid
()
const
;
void
set_indexid
(
::
PROTOBUF_NAMESPACE_ID
::
int64
value
);
void
set_indexid
(
::
PROTOBUF_NAMESPACE_ID
::
int64
value
);
// .milvus.proto.service.IndexStatus status =
6
;
// .milvus.proto.service.IndexStatus status =
5
;
void
clear_status
();
void
clear_status
();
::
milvus
::
proto
::
service
::
IndexStatus
status
()
const
;
::
milvus
::
proto
::
service
::
IndexStatus
status
()
const
;
void
set_status
(
::
milvus
::
proto
::
service
::
IndexStatus
value
);
void
set_status
(
::
milvus
::
proto
::
service
::
IndexStatus
value
);
...
@@ -1149,7 +1137,6 @@ class FieldIndexMeta :
...
@@ -1149,7 +1137,6 @@ class FieldIndexMeta :
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InternalMetadataWithArena
_internal_metadata_
;
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InternalMetadataWithArena
_internal_metadata_
;
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
::
milvus
::
proto
::
common
::
KeyValuePair
>
index_params_
;
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
::
milvus
::
proto
::
common
::
KeyValuePair
>
index_params_
;
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
std
::
string
>
index_file_paths_
;
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
std
::
string
>
index_file_paths_
;
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ArenaStringPtr
index_type_
;
::
PROTOBUF_NAMESPACE_ID
::
int64
segmentid_
;
::
PROTOBUF_NAMESPACE_ID
::
int64
segmentid_
;
::
PROTOBUF_NAMESPACE_ID
::
int64
fieldid_
;
::
PROTOBUF_NAMESPACE_ID
::
int64
fieldid_
;
::
PROTOBUF_NAMESPACE_ID
::
int64
indexid_
;
::
PROTOBUF_NAMESPACE_ID
::
int64
indexid_
;
...
@@ -1924,58 +1911,7 @@ inline void FieldIndexMeta::set_fieldid(::PROTOBUF_NAMESPACE_ID::int64 value) {
...
@@ -1924,58 +1911,7 @@ inline void FieldIndexMeta::set_fieldid(::PROTOBUF_NAMESPACE_ID::int64 value) {
// @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.fieldID)
// @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.fieldID)
}
}
// string index_type = 3;
// int64 indexID = 3;
inline
void
FieldIndexMeta
::
clear_index_type
()
{
index_type_
.
ClearToEmptyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
}
inline
const
std
::
string
&
FieldIndexMeta
::
index_type
()
const
{
// @@protoc_insertion_point(field_get:milvus.proto.etcd.FieldIndexMeta.index_type)
return
index_type_
.
GetNoArena
();
}
inline
void
FieldIndexMeta
::
set_index_type
(
const
std
::
string
&
value
)
{
index_type_
.
SetNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.index_type)
}
inline
void
FieldIndexMeta
::
set_index_type
(
std
::
string
&&
value
)
{
index_type_
.
SetNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:milvus.proto.etcd.FieldIndexMeta.index_type)
}
inline
void
FieldIndexMeta
::
set_index_type
(
const
char
*
value
)
{
GOOGLE_DCHECK
(
value
!=
nullptr
);
index_type_
.
SetNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
// @@protoc_insertion_point(field_set_char:milvus.proto.etcd.FieldIndexMeta.index_type)
}
inline
void
FieldIndexMeta
::
set_index_type
(
const
char
*
value
,
size_t
size
)
{
index_type_
.
SetNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
reinterpret_cast
<
const
char
*>
(
value
),
size
));
// @@protoc_insertion_point(field_set_pointer:milvus.proto.etcd.FieldIndexMeta.index_type)
}
inline
std
::
string
*
FieldIndexMeta
::
mutable_index_type
()
{
// @@protoc_insertion_point(field_mutable:milvus.proto.etcd.FieldIndexMeta.index_type)
return
index_type_
.
MutableNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
}
inline
std
::
string
*
FieldIndexMeta
::
release_index_type
()
{
// @@protoc_insertion_point(field_release:milvus.proto.etcd.FieldIndexMeta.index_type)
return
index_type_
.
ReleaseNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
}
inline
void
FieldIndexMeta
::
set_allocated_index_type
(
std
::
string
*
index_type
)
{
if
(
index_type
!=
nullptr
)
{
}
else
{
}
index_type_
.
SetAllocatedNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
index_type
);
// @@protoc_insertion_point(field_set_allocated:milvus.proto.etcd.FieldIndexMeta.index_type)
}
// int64 indexID = 4;
inline
void
FieldIndexMeta
::
clear_indexid
()
{
inline
void
FieldIndexMeta
::
clear_indexid
()
{
indexid_
=
PROTOBUF_LONGLONG
(
0
);
indexid_
=
PROTOBUF_LONGLONG
(
0
);
}
}
...
@@ -1989,7 +1925,7 @@ inline void FieldIndexMeta::set_indexid(::PROTOBUF_NAMESPACE_ID::int64 value) {
...
@@ -1989,7 +1925,7 @@ inline void FieldIndexMeta::set_indexid(::PROTOBUF_NAMESPACE_ID::int64 value) {
// @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.indexID)
// @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.indexID)
}
}
// repeated .milvus.proto.common.KeyValuePair index_params =
5
;
// repeated .milvus.proto.common.KeyValuePair index_params =
4
;
inline
int
FieldIndexMeta
::
index_params_size
()
const
{
inline
int
FieldIndexMeta
::
index_params_size
()
const
{
return
index_params_
.
size
();
return
index_params_
.
size
();
}
}
...
@@ -2016,7 +1952,7 @@ FieldIndexMeta::index_params() const {
...
@@ -2016,7 +1952,7 @@ FieldIndexMeta::index_params() const {
return
index_params_
;
return
index_params_
;
}
}
// .milvus.proto.service.IndexStatus status =
6
;
// .milvus.proto.service.IndexStatus status =
5
;
inline
void
FieldIndexMeta
::
clear_status
()
{
inline
void
FieldIndexMeta
::
clear_status
()
{
status_
=
0
;
status_
=
0
;
}
}
...
@@ -2030,7 +1966,7 @@ inline void FieldIndexMeta::set_status(::milvus::proto::service::IndexStatus val
...
@@ -2030,7 +1966,7 @@ inline void FieldIndexMeta::set_status(::milvus::proto::service::IndexStatus val
// @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.status)
// @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.status)
}
}
// repeated string index_file_paths =
7
;
// repeated string index_file_paths =
6
;
inline
int
FieldIndexMeta
::
index_file_paths_size
()
const
{
inline
int
FieldIndexMeta
::
index_file_paths_size
()
const
{
return
index_file_paths_
.
size
();
return
index_file_paths_
.
size
();
}
}
...
...
internal/core/src/pb/service_msg.pb.cc
浏览文件 @
0b9cffaf
...
@@ -501,7 +501,6 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_service_5fmsg_2eproto::offsets
...
@@ -501,7 +501,6 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_service_5fmsg_2eproto::offsets
~
0u
,
// no _weak_field_map_
~
0u
,
// no _weak_field_map_
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
service
::
IndexParam
,
collection_name_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
service
::
IndexParam
,
collection_name_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
service
::
IndexParam
,
field_name_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
service
::
IndexParam
,
field_name_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
service
::
IndexParam
,
index_name_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
service
::
IndexParam
,
extra_params_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
service
::
IndexParam
,
extra_params_
),
~
0u
,
// no _has_bits_
~
0u
,
// no _has_bits_
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
service
::
DescribeIndexResponse
,
_internal_metadata_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
service
::
DescribeIndexResponse
,
_internal_metadata_
),
...
@@ -532,7 +531,7 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB
...
@@ -532,7 +531,7 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB
{
105
,
-
1
,
sizeof
(
::
milvus
::
proto
::
service
::
Hits
)},
{
105
,
-
1
,
sizeof
(
::
milvus
::
proto
::
service
::
Hits
)},
{
113
,
-
1
,
sizeof
(
::
milvus
::
proto
::
service
::
QueryResult
)},
{
113
,
-
1
,
sizeof
(
::
milvus
::
proto
::
service
::
QueryResult
)},
{
120
,
-
1
,
sizeof
(
::
milvus
::
proto
::
service
::
IndexParam
)},
{
120
,
-
1
,
sizeof
(
::
milvus
::
proto
::
service
::
IndexParam
)},
{
12
9
,
-
1
,
sizeof
(
::
milvus
::
proto
::
service
::
DescribeIndexResponse
)},
{
12
8
,
-
1
,
sizeof
(
::
milvus
::
proto
::
service
::
DescribeIndexResponse
)},
};
};
static
::
PROTOBUF_NAMESPACE_ID
::
Message
const
*
const
file_default_instances
[]
=
{
static
::
PROTOBUF_NAMESPACE_ID
::
Message
const
*
const
file_default_instances
[]
=
{
...
@@ -596,19 +595,18 @@ const char descriptor_table_protodef_service_5fmsg_2eproto[] PROTOBUF_SECTION_VA
...
@@ -596,19 +595,18 @@ const char descriptor_table_protodef_service_5fmsg_2eproto[] PROTOBUF_SECTION_VA
"
\003
(
\t\"
5
\n\004
Hits
\022\013\n\003
IDs
\030\001
\003
(
\003\022\020\n\010
row_data
\030\002
"
"
\003
(
\t\"
5
\n\004
Hits
\022\013\n\003
IDs
\030\001
\003
(
\003\022\020\n\010
row_data
\030\002
"
"
\003
(
\014\022\016\n\006
scores
\030\003
\003
(
\002\"
H
\n\013
QueryResult
\022
+
\n\006
st"
"
\003
(
\014\022\016\n\006
scores
\030\003
\003
(
\002\"
H
\n\013
QueryResult
\022
+
\n\006
st"
"atus
\030\001
\001
(
\013
2
\033
.milvus.proto.common.Status
\022
"
"atus
\030\001
\001
(
\013
2
\033
.milvus.proto.common.Status
\022
"
"
\014\n\004
hits
\030\002
\003
(
\014\"\206\001\n\n
IndexParam
\022\027\n\017
collecti"
"
\014\n\004
hits
\030\002
\003
(
\014\"
r
\n\n
IndexParam
\022\027\n\017
collectio"
"on_name
\030\002
\001
(
\t\022\022\n\n
field_name
\030\003
\001
(
\t\022\022\n\n
ind"
"n_name
\030\001
\001
(
\t\022\022\n\n
field_name
\030\002
\001
(
\t\022
7
\n\014
extr"
"ex_name
\030\004
\001
(
\t\022
7
\n\014
extra_params
\030\005
\003
(
\013
2!.mi"
"a_params
\030\003
\003
(
\013
2!.milvus.proto.common.Key"
"lvus.proto.common.KeyValuePair
\"\276\001\n\025
Descr"
"ValuePair
\"\276\001\n\025
DescribeIndexResponse
\022
+
\n\006
s"
"ibeIndexResponse
\022
+
\n\006
status
\030\001
\001
(
\013
2
\033
.milvu"
"tatus
\030\001
\001
(
\013
2
\033
.milvus.proto.common.Status"
"s.proto.common.Status
\022\027\n\017
collection_name"
"
\022\027\n\017
collection_name
\030\002
\001
(
\t\022\022\n\n
field_name
\030
"
"
\030\002
\001
(
\t\022\022\n\n
field_name
\030\003
\001
(
\t\022\022\n\n
index_name"
"
\003
\001
(
\t\022\022\n\n
index_name
\030\004
\001
(
\t\022
7
\n\014
extra_param"
"
\030\004
\001
(
\t\022
7
\n\014
extra_params
\030\005
\003
(
\013
2!.milvus.pr"
"s
\030\005
\003
(
\013
2!.milvus.proto.common.KeyValuePa"
"oto.common.KeyValuePair*@
\n\017
PlaceholderTy"
"ir*@
\n\017
PlaceholderType
\022\010\n\004
NONE
\020\000\022\021\n\r
VECTO"
"pe
\022\010\n\004
NONE
\020\000\022\021\n\r
VECTOR_BINARY
\020
d
\022\020\n\014
VECTO"
"R_BINARY
\020
d
\022\020\n\014
VECTOR_FLOAT
\020
eBCZAgithub.c"
"R_FLOAT
\020
eBCZAgithub.com/zilliztech/milvu"
"om/zilliztech/milvus-distributed/interna"
"s-distributed/internal/proto/servicepbb
\006
"
"l/proto/servicepbb
\006
proto3"
"proto3"
;
;
static
const
::
PROTOBUF_NAMESPACE_ID
::
internal
::
DescriptorTable
*
const
descriptor_table_service_5fmsg_2eproto_deps
[
2
]
=
{
static
const
::
PROTOBUF_NAMESPACE_ID
::
internal
::
DescriptorTable
*
const
descriptor_table_service_5fmsg_2eproto_deps
[
2
]
=
{
&::
descriptor_table_common_2eproto
,
&::
descriptor_table_common_2eproto
,
...
@@ -637,7 +635,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_ser
...
@@ -637,7 +635,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_ser
static
::
PROTOBUF_NAMESPACE_ID
::
internal
::
once_flag
descriptor_table_service_5fmsg_2eproto_once
;
static
::
PROTOBUF_NAMESPACE_ID
::
internal
::
once_flag
descriptor_table_service_5fmsg_2eproto_once
;
static
bool
descriptor_table_service_5fmsg_2eproto_initialized
=
false
;
static
bool
descriptor_table_service_5fmsg_2eproto_initialized
=
false
;
const
::
PROTOBUF_NAMESPACE_ID
::
internal
::
DescriptorTable
descriptor_table_service_5fmsg_2eproto
=
{
const
::
PROTOBUF_NAMESPACE_ID
::
internal
::
DescriptorTable
descriptor_table_service_5fmsg_2eproto
=
{
&
descriptor_table_service_5fmsg_2eproto_initialized
,
descriptor_table_protodef_service_5fmsg_2eproto
,
"service_msg.proto"
,
20
46
,
&
descriptor_table_service_5fmsg_2eproto_initialized
,
descriptor_table_protodef_service_5fmsg_2eproto
,
"service_msg.proto"
,
20
25
,
&
descriptor_table_service_5fmsg_2eproto_once
,
descriptor_table_service_5fmsg_2eproto_sccs
,
descriptor_table_service_5fmsg_2eproto_deps
,
18
,
2
,
&
descriptor_table_service_5fmsg_2eproto_once
,
descriptor_table_service_5fmsg_2eproto_sccs
,
descriptor_table_service_5fmsg_2eproto_deps
,
18
,
2
,
schemas
,
file_default_instances
,
TableStruct_service_5fmsg_2eproto
::
offsets
,
schemas
,
file_default_instances
,
TableStruct_service_5fmsg_2eproto
::
offsets
,
file_level_metadata_service_5fmsg_2eproto
,
18
,
file_level_enum_descriptors_service_5fmsg_2eproto
,
file_level_service_descriptors_service_5fmsg_2eproto
,
file_level_metadata_service_5fmsg_2eproto
,
18
,
file_level_enum_descriptors_service_5fmsg_2eproto
,
file_level_service_descriptors_service_5fmsg_2eproto
,
...
@@ -6393,10 +6391,6 @@ IndexParam::IndexParam(const IndexParam& from)
...
@@ -6393,10 +6391,6 @@ IndexParam::IndexParam(const IndexParam& from)
if
(
!
from
.
field_name
().
empty
())
{
if
(
!
from
.
field_name
().
empty
())
{
field_name_
.
AssignWithDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
from
.
field_name_
);
field_name_
.
AssignWithDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
from
.
field_name_
);
}
}
index_name_
.
UnsafeSetDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
if
(
!
from
.
index_name
().
empty
())
{
index_name_
.
AssignWithDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
from
.
index_name_
);
}
// @@protoc_insertion_point(copy_constructor:milvus.proto.service.IndexParam)
// @@protoc_insertion_point(copy_constructor:milvus.proto.service.IndexParam)
}
}
...
@@ -6404,7 +6398,6 @@ void IndexParam::SharedCtor() {
...
@@ -6404,7 +6398,6 @@ void IndexParam::SharedCtor() {
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InitSCC
(
&
scc_info_IndexParam_service_5fmsg_2eproto
.
base
);
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InitSCC
(
&
scc_info_IndexParam_service_5fmsg_2eproto
.
base
);
collection_name_
.
UnsafeSetDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
collection_name_
.
UnsafeSetDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
field_name_
.
UnsafeSetDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
field_name_
.
UnsafeSetDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
index_name_
.
UnsafeSetDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
}
}
IndexParam
::~
IndexParam
()
{
IndexParam
::~
IndexParam
()
{
...
@@ -6415,7 +6408,6 @@ IndexParam::~IndexParam() {
...
@@ -6415,7 +6408,6 @@ IndexParam::~IndexParam() {
void
IndexParam
::
SharedDtor
()
{
void
IndexParam
::
SharedDtor
()
{
collection_name_
.
DestroyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
collection_name_
.
DestroyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
field_name_
.
DestroyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
field_name_
.
DestroyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
index_name_
.
DestroyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
}
}
void
IndexParam
::
SetCachedSize
(
int
size
)
const
{
void
IndexParam
::
SetCachedSize
(
int
size
)
const
{
...
@@ -6436,7 +6428,6 @@ void IndexParam::Clear() {
...
@@ -6436,7 +6428,6 @@ void IndexParam::Clear() {
extra_params_
.
Clear
();
extra_params_
.
Clear
();
collection_name_
.
ClearToEmptyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
collection_name_
.
ClearToEmptyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
field_name_
.
ClearToEmptyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
field_name_
.
ClearToEmptyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
index_name_
.
ClearToEmptyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
_internal_metadata_
.
Clear
();
_internal_metadata_
.
Clear
();
}
}
...
@@ -6448,37 +6439,30 @@ const char* IndexParam::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:
...
@@ -6448,37 +6439,30 @@ const char* IndexParam::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:
ptr
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ReadTag
(
ptr
,
&
tag
);
ptr
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ReadTag
(
ptr
,
&
tag
);
CHK_
(
ptr
);
CHK_
(
ptr
);
switch
(
tag
>>
3
)
{
switch
(
tag
>>
3
)
{
// string collection_name =
2
;
// string collection_name =
1
;
case
2
:
case
1
:
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
1
8
))
{
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
1
0
))
{
ptr
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InlineGreedyStringParserUTF8
(
mutable_collection_name
(),
ptr
,
ctx
,
"milvus.proto.service.IndexParam.collection_name"
);
ptr
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InlineGreedyStringParserUTF8
(
mutable_collection_name
(),
ptr
,
ctx
,
"milvus.proto.service.IndexParam.collection_name"
);
CHK_
(
ptr
);
CHK_
(
ptr
);
}
else
goto
handle_unusual
;
}
else
goto
handle_unusual
;
continue
;
continue
;
// string field_name =
3
;
// string field_name =
2
;
case
3
:
case
2
:
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
26
))
{
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
18
))
{
ptr
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InlineGreedyStringParserUTF8
(
mutable_field_name
(),
ptr
,
ctx
,
"milvus.proto.service.IndexParam.field_name"
);
ptr
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InlineGreedyStringParserUTF8
(
mutable_field_name
(),
ptr
,
ctx
,
"milvus.proto.service.IndexParam.field_name"
);
CHK_
(
ptr
);
CHK_
(
ptr
);
}
else
goto
handle_unusual
;
}
else
goto
handle_unusual
;
continue
;
continue
;
// string index_name = 4;
// repeated .milvus.proto.common.KeyValuePair extra_params = 3;
case
4
:
case
3
:
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
34
))
{
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
26
))
{
ptr
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InlineGreedyStringParserUTF8
(
mutable_index_name
(),
ptr
,
ctx
,
"milvus.proto.service.IndexParam.index_name"
);
CHK_
(
ptr
);
}
else
goto
handle_unusual
;
continue
;
// repeated .milvus.proto.common.KeyValuePair extra_params = 5;
case
5
:
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
42
))
{
ptr
-=
1
;
ptr
-=
1
;
do
{
do
{
ptr
+=
1
;
ptr
+=
1
;
ptr
=
ctx
->
ParseMessage
(
add_extra_params
(),
ptr
);
ptr
=
ctx
->
ParseMessage
(
add_extra_params
(),
ptr
);
CHK_
(
ptr
);
CHK_
(
ptr
);
if
(
!
ctx
->
DataAvailable
(
ptr
))
break
;
if
(
!
ctx
->
DataAvailable
(
ptr
))
break
;
}
while
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
UnalignedLoad
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
ptr
)
==
42
);
}
while
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
UnalignedLoad
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
ptr
)
==
26
);
}
else
goto
handle_unusual
;
}
else
goto
handle_unusual
;
continue
;
continue
;
default:
{
default:
{
...
@@ -6511,9 +6495,9 @@ bool IndexParam::MergePartialFromCodedStream(
...
@@ -6511,9 +6495,9 @@ bool IndexParam::MergePartialFromCodedStream(
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
goto
handle_unusual
;
if
(
!
p
.
second
)
goto
handle_unusual
;
switch
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
switch
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// string collection_name =
2
;
// string collection_name =
1
;
case
2
:
{
case
1
:
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
1
8
&
0xFF
))
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
1
0
&
0xFF
))
{
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadString
(
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadString
(
input
,
this
->
mutable_collection_name
()));
input
,
this
->
mutable_collection_name
()));
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
...
@@ -6526,9 +6510,9 @@ bool IndexParam::MergePartialFromCodedStream(
...
@@ -6526,9 +6510,9 @@ bool IndexParam::MergePartialFromCodedStream(
break
;
break
;
}
}
// string field_name =
3
;
// string field_name =
2
;
case
3
:
{
case
2
:
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
26
&
0xFF
))
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
18
&
0xFF
))
{
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadString
(
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadString
(
input
,
this
->
mutable_field_name
()));
input
,
this
->
mutable_field_name
()));
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
...
@@ -6541,24 +6525,9 @@ bool IndexParam::MergePartialFromCodedStream(
...
@@ -6541,24 +6525,9 @@ bool IndexParam::MergePartialFromCodedStream(
break
;
break
;
}
}
// string index_name = 4;
// repeated .milvus.proto.common.KeyValuePair extra_params = 3;
case
4
:
{
case
3
:
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
34
&
0xFF
))
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
26
&
0xFF
))
{
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadString
(
input
,
this
->
mutable_index_name
()));
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
this
->
index_name
().
data
(),
static_cast
<
int
>
(
this
->
index_name
().
length
()),
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
PARSE
,
"milvus.proto.service.IndexParam.index_name"
));
}
else
{
goto
handle_unusual
;
}
break
;
}
// repeated .milvus.proto.common.KeyValuePair extra_params = 5;
case
5
:
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
42
&
0xFF
))
{
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadMessage
(
DO_
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadMessage
(
input
,
add_extra_params
()));
input
,
add_extra_params
()));
}
else
{
}
else
{
...
@@ -6594,41 +6563,31 @@ void IndexParam::SerializeWithCachedSizes(
...
@@ -6594,41 +6563,31 @@ void IndexParam::SerializeWithCachedSizes(
::
PROTOBUF_NAMESPACE_ID
::
uint32
cached_has_bits
=
0
;
::
PROTOBUF_NAMESPACE_ID
::
uint32
cached_has_bits
=
0
;
(
void
)
cached_has_bits
;
(
void
)
cached_has_bits
;
// string collection_name =
2
;
// string collection_name =
1
;
if
(
this
->
collection_name
().
size
()
>
0
)
{
if
(
this
->
collection_name
().
size
()
>
0
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
this
->
collection_name
().
data
(),
static_cast
<
int
>
(
this
->
collection_name
().
length
()),
this
->
collection_name
().
data
(),
static_cast
<
int
>
(
this
->
collection_name
().
length
()),
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
SERIALIZE
,
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
SERIALIZE
,
"milvus.proto.service.IndexParam.collection_name"
);
"milvus.proto.service.IndexParam.collection_name"
);
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringMaybeAliased
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringMaybeAliased
(
2
,
this
->
collection_name
(),
output
);
1
,
this
->
collection_name
(),
output
);
}
}
// string field_name =
3
;
// string field_name =
2
;
if
(
this
->
field_name
().
size
()
>
0
)
{
if
(
this
->
field_name
().
size
()
>
0
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
this
->
field_name
().
data
(),
static_cast
<
int
>
(
this
->
field_name
().
length
()),
this
->
field_name
().
data
(),
static_cast
<
int
>
(
this
->
field_name
().
length
()),
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
SERIALIZE
,
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
SERIALIZE
,
"milvus.proto.service.IndexParam.field_name"
);
"milvus.proto.service.IndexParam.field_name"
);
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringMaybeAliased
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringMaybeAliased
(
3
,
this
->
field_name
(),
output
);
2
,
this
->
field_name
(),
output
);
}
}
// string index_name = 4;
// repeated .milvus.proto.common.KeyValuePair extra_params = 3;
if
(
this
->
index_name
().
size
()
>
0
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
this
->
index_name
().
data
(),
static_cast
<
int
>
(
this
->
index_name
().
length
()),
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
SERIALIZE
,
"milvus.proto.service.IndexParam.index_name"
);
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringMaybeAliased
(
4
,
this
->
index_name
(),
output
);
}
// repeated .milvus.proto.common.KeyValuePair extra_params = 5;
for
(
unsigned
int
i
=
0
,
for
(
unsigned
int
i
=
0
,
n
=
static_cast
<
unsigned
int
>
(
this
->
extra_params_size
());
i
<
n
;
i
++
)
{
n
=
static_cast
<
unsigned
int
>
(
this
->
extra_params_size
());
i
<
n
;
i
++
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteMessageMaybeToArray
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteMessageMaybeToArray
(
5
,
3
,
this
->
extra_params
(
static_cast
<
int
>
(
i
)),
this
->
extra_params
(
static_cast
<
int
>
(
i
)),
output
);
output
);
}
}
...
@@ -6646,7 +6605,7 @@ void IndexParam::SerializeWithCachedSizes(
...
@@ -6646,7 +6605,7 @@ void IndexParam::SerializeWithCachedSizes(
::
PROTOBUF_NAMESPACE_ID
::
uint32
cached_has_bits
=
0
;
::
PROTOBUF_NAMESPACE_ID
::
uint32
cached_has_bits
=
0
;
(
void
)
cached_has_bits
;
(
void
)
cached_has_bits
;
// string collection_name =
2
;
// string collection_name =
1
;
if
(
this
->
collection_name
().
size
()
>
0
)
{
if
(
this
->
collection_name
().
size
()
>
0
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
this
->
collection_name
().
data
(),
static_cast
<
int
>
(
this
->
collection_name
().
length
()),
this
->
collection_name
().
data
(),
static_cast
<
int
>
(
this
->
collection_name
().
length
()),
...
@@ -6654,10 +6613,10 @@ void IndexParam::SerializeWithCachedSizes(
...
@@ -6654,10 +6613,10 @@ void IndexParam::SerializeWithCachedSizes(
"milvus.proto.service.IndexParam.collection_name"
);
"milvus.proto.service.IndexParam.collection_name"
);
target
=
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringToArray
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringToArray
(
2
,
this
->
collection_name
(),
target
);
1
,
this
->
collection_name
(),
target
);
}
}
// string field_name =
3
;
// string field_name =
2
;
if
(
this
->
field_name
().
size
()
>
0
)
{
if
(
this
->
field_name
().
size
()
>
0
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
this
->
field_name
().
data
(),
static_cast
<
int
>
(
this
->
field_name
().
length
()),
this
->
field_name
().
data
(),
static_cast
<
int
>
(
this
->
field_name
().
length
()),
...
@@ -6665,26 +6624,15 @@ void IndexParam::SerializeWithCachedSizes(
...
@@ -6665,26 +6624,15 @@ void IndexParam::SerializeWithCachedSizes(
"milvus.proto.service.IndexParam.field_name"
);
"milvus.proto.service.IndexParam.field_name"
);
target
=
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringToArray
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringToArray
(
3
,
this
->
field_name
(),
target
);
2
,
this
->
field_name
(),
target
);
}
}
// string index_name = 4;
// repeated .milvus.proto.common.KeyValuePair extra_params = 3;
if
(
this
->
index_name
().
size
()
>
0
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
VerifyUtf8String
(
this
->
index_name
().
data
(),
static_cast
<
int
>
(
this
->
index_name
().
length
()),
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
SERIALIZE
,
"milvus.proto.service.IndexParam.index_name"
);
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteStringToArray
(
4
,
this
->
index_name
(),
target
);
}
// repeated .milvus.proto.common.KeyValuePair extra_params = 5;
for
(
unsigned
int
i
=
0
,
for
(
unsigned
int
i
=
0
,
n
=
static_cast
<
unsigned
int
>
(
this
->
extra_params_size
());
i
<
n
;
i
++
)
{
n
=
static_cast
<
unsigned
int
>
(
this
->
extra_params_size
());
i
<
n
;
i
++
)
{
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
InternalWriteMessageToArray
(
InternalWriteMessageToArray
(
5
,
this
->
extra_params
(
static_cast
<
int
>
(
i
)),
target
);
3
,
this
->
extra_params
(
static_cast
<
int
>
(
i
)),
target
);
}
}
if
(
_internal_metadata_
.
have_unknown_fields
())
{
if
(
_internal_metadata_
.
have_unknown_fields
())
{
...
@@ -6708,7 +6656,7 @@ size_t IndexParam::ByteSizeLong() const {
...
@@ -6708,7 +6656,7 @@ size_t IndexParam::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
// Prevent compiler warnings about cached_has_bits being unused
(
void
)
cached_has_bits
;
(
void
)
cached_has_bits
;
// repeated .milvus.proto.common.KeyValuePair extra_params =
5
;
// repeated .milvus.proto.common.KeyValuePair extra_params =
3
;
{
{
unsigned
int
count
=
static_cast
<
unsigned
int
>
(
this
->
extra_params_size
());
unsigned
int
count
=
static_cast
<
unsigned
int
>
(
this
->
extra_params_size
());
total_size
+=
1UL
*
count
;
total_size
+=
1UL
*
count
;
...
@@ -6719,27 +6667,20 @@ size_t IndexParam::ByteSizeLong() const {
...
@@ -6719,27 +6667,20 @@ size_t IndexParam::ByteSizeLong() const {
}
}
}
}
// string collection_name =
2
;
// string collection_name =
1
;
if
(
this
->
collection_name
().
size
()
>
0
)
{
if
(
this
->
collection_name
().
size
()
>
0
)
{
total_size
+=
1
+
total_size
+=
1
+
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
StringSize
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
StringSize
(
this
->
collection_name
());
this
->
collection_name
());
}
}
// string field_name =
3
;
// string field_name =
2
;
if
(
this
->
field_name
().
size
()
>
0
)
{
if
(
this
->
field_name
().
size
()
>
0
)
{
total_size
+=
1
+
total_size
+=
1
+
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
StringSize
(
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
StringSize
(
this
->
field_name
());
this
->
field_name
());
}
}
// string index_name = 4;
if
(
this
->
index_name
().
size
()
>
0
)
{
total_size
+=
1
+
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
StringSize
(
this
->
index_name
());
}
int
cached_size
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ToCachedSize
(
total_size
);
int
cached_size
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ToCachedSize
(
total_size
);
SetCachedSize
(
cached_size
);
SetCachedSize
(
cached_size
);
return
total_size
;
return
total_size
;
...
@@ -6776,10 +6717,6 @@ void IndexParam::MergeFrom(const IndexParam& from) {
...
@@ -6776,10 +6717,6 @@ void IndexParam::MergeFrom(const IndexParam& from) {
field_name_
.
AssignWithDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
from
.
field_name_
);
field_name_
.
AssignWithDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
from
.
field_name_
);
}
}
if
(
from
.
index_name
().
size
()
>
0
)
{
index_name_
.
AssignWithDefault
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
from
.
index_name_
);
}
}
}
void
IndexParam
::
CopyFrom
(
const
::
PROTOBUF_NAMESPACE_ID
::
Message
&
from
)
{
void
IndexParam
::
CopyFrom
(
const
::
PROTOBUF_NAMESPACE_ID
::
Message
&
from
)
{
...
@@ -6808,8 +6745,6 @@ void IndexParam::InternalSwap(IndexParam* other) {
...
@@ -6808,8 +6745,6 @@ void IndexParam::InternalSwap(IndexParam* other) {
GetArenaNoVirtual
());
GetArenaNoVirtual
());
field_name_
.
Swap
(
&
other
->
field_name_
,
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
field_name_
.
Swap
(
&
other
->
field_name_
,
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
GetArenaNoVirtual
());
GetArenaNoVirtual
());
index_name_
.
Swap
(
&
other
->
index_name_
,
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
GetArenaNoVirtual
());
}
}
::
PROTOBUF_NAMESPACE_ID
::
Metadata
IndexParam
::
GetMetadata
()
const
{
::
PROTOBUF_NAMESPACE_ID
::
Metadata
IndexParam
::
GetMetadata
()
const
{
...
...
internal/core/src/pb/service_msg.pb.h
浏览文件 @
0b9cffaf
...
@@ -2775,12 +2775,11 @@ class IndexParam :
...
@@ -2775,12 +2775,11 @@ class IndexParam :
// accessors -------------------------------------------------------
// accessors -------------------------------------------------------
enum
:
int
{
enum
:
int
{
kExtraParamsFieldNumber
=
5
,
kExtraParamsFieldNumber
=
3
,
kCollectionNameFieldNumber
=
2
,
kCollectionNameFieldNumber
=
1
,
kFieldNameFieldNumber
=
3
,
kFieldNameFieldNumber
=
2
,
kIndexNameFieldNumber
=
4
,
};
};
// repeated .milvus.proto.common.KeyValuePair extra_params =
5
;
// repeated .milvus.proto.common.KeyValuePair extra_params =
3
;
int
extra_params_size
()
const
;
int
extra_params_size
()
const
;
void
clear_extra_params
();
void
clear_extra_params
();
::
milvus
::
proto
::
common
::
KeyValuePair
*
mutable_extra_params
(
int
index
);
::
milvus
::
proto
::
common
::
KeyValuePair
*
mutable_extra_params
(
int
index
);
...
@@ -2791,7 +2790,7 @@ class IndexParam :
...
@@ -2791,7 +2790,7 @@ class IndexParam :
const
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
::
milvus
::
proto
::
common
::
KeyValuePair
>&
const
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
::
milvus
::
proto
::
common
::
KeyValuePair
>&
extra_params
()
const
;
extra_params
()
const
;
// string collection_name =
2
;
// string collection_name =
1
;
void
clear_collection_name
();
void
clear_collection_name
();
const
std
::
string
&
collection_name
()
const
;
const
std
::
string
&
collection_name
()
const
;
void
set_collection_name
(
const
std
::
string
&
value
);
void
set_collection_name
(
const
std
::
string
&
value
);
...
@@ -2802,7 +2801,7 @@ class IndexParam :
...
@@ -2802,7 +2801,7 @@ class IndexParam :
std
::
string
*
release_collection_name
();
std
::
string
*
release_collection_name
();
void
set_allocated_collection_name
(
std
::
string
*
collection_name
);
void
set_allocated_collection_name
(
std
::
string
*
collection_name
);
// string field_name =
3
;
// string field_name =
2
;
void
clear_field_name
();
void
clear_field_name
();
const
std
::
string
&
field_name
()
const
;
const
std
::
string
&
field_name
()
const
;
void
set_field_name
(
const
std
::
string
&
value
);
void
set_field_name
(
const
std
::
string
&
value
);
...
@@ -2813,17 +2812,6 @@ class IndexParam :
...
@@ -2813,17 +2812,6 @@ class IndexParam :
std
::
string
*
release_field_name
();
std
::
string
*
release_field_name
();
void
set_allocated_field_name
(
std
::
string
*
field_name
);
void
set_allocated_field_name
(
std
::
string
*
field_name
);
// string index_name = 4;
void
clear_index_name
();
const
std
::
string
&
index_name
()
const
;
void
set_index_name
(
const
std
::
string
&
value
);
void
set_index_name
(
std
::
string
&&
value
);
void
set_index_name
(
const
char
*
value
);
void
set_index_name
(
const
char
*
value
,
size_t
size
);
std
::
string
*
mutable_index_name
();
std
::
string
*
release_index_name
();
void
set_allocated_index_name
(
std
::
string
*
index_name
);
// @@protoc_insertion_point(class_scope:milvus.proto.service.IndexParam)
// @@protoc_insertion_point(class_scope:milvus.proto.service.IndexParam)
private:
private:
class
_Internal
;
class
_Internal
;
...
@@ -2832,7 +2820,6 @@ class IndexParam :
...
@@ -2832,7 +2820,6 @@ class IndexParam :
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
::
milvus
::
proto
::
common
::
KeyValuePair
>
extra_params_
;
::
PROTOBUF_NAMESPACE_ID
::
RepeatedPtrField
<
::
milvus
::
proto
::
common
::
KeyValuePair
>
extra_params_
;
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ArenaStringPtr
collection_name_
;
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ArenaStringPtr
collection_name_
;
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ArenaStringPtr
field_name_
;
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ArenaStringPtr
field_name_
;
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ArenaStringPtr
index_name_
;
mutable
::
PROTOBUF_NAMESPACE_ID
::
internal
::
CachedSize
_cached_size_
;
mutable
::
PROTOBUF_NAMESPACE_ID
::
internal
::
CachedSize
_cached_size_
;
friend
struct
::
TableStruct_service_5fmsg_2eproto
;
friend
struct
::
TableStruct_service_5fmsg_2eproto
;
};
};
...
@@ -4850,7 +4837,7 @@ QueryResult::mutable_hits() {
...
@@ -4850,7 +4837,7 @@ QueryResult::mutable_hits() {
// IndexParam
// IndexParam
// string collection_name =
2
;
// string collection_name =
1
;
inline
void
IndexParam
::
clear_collection_name
()
{
inline
void
IndexParam
::
clear_collection_name
()
{
collection_name_
.
ClearToEmptyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
collection_name_
.
ClearToEmptyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
}
}
...
@@ -4901,7 +4888,7 @@ inline void IndexParam::set_allocated_collection_name(std::string* collection_na
...
@@ -4901,7 +4888,7 @@ inline void IndexParam::set_allocated_collection_name(std::string* collection_na
// @@protoc_insertion_point(field_set_allocated:milvus.proto.service.IndexParam.collection_name)
// @@protoc_insertion_point(field_set_allocated:milvus.proto.service.IndexParam.collection_name)
}
}
// string field_name =
3
;
// string field_name =
2
;
inline
void
IndexParam
::
clear_field_name
()
{
inline
void
IndexParam
::
clear_field_name
()
{
field_name_
.
ClearToEmptyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
field_name_
.
ClearToEmptyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
}
}
...
@@ -4952,58 +4939,7 @@ inline void IndexParam::set_allocated_field_name(std::string* field_name) {
...
@@ -4952,58 +4939,7 @@ inline void IndexParam::set_allocated_field_name(std::string* field_name) {
// @@protoc_insertion_point(field_set_allocated:milvus.proto.service.IndexParam.field_name)
// @@protoc_insertion_point(field_set_allocated:milvus.proto.service.IndexParam.field_name)
}
}
// string index_name = 4;
// repeated .milvus.proto.common.KeyValuePair extra_params = 3;
inline
void
IndexParam
::
clear_index_name
()
{
index_name_
.
ClearToEmptyNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
}
inline
const
std
::
string
&
IndexParam
::
index_name
()
const
{
// @@protoc_insertion_point(field_get:milvus.proto.service.IndexParam.index_name)
return
index_name_
.
GetNoArena
();
}
inline
void
IndexParam
::
set_index_name
(
const
std
::
string
&
value
)
{
index_name_
.
SetNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:milvus.proto.service.IndexParam.index_name)
}
inline
void
IndexParam
::
set_index_name
(
std
::
string
&&
value
)
{
index_name_
.
SetNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:milvus.proto.service.IndexParam.index_name)
}
inline
void
IndexParam
::
set_index_name
(
const
char
*
value
)
{
GOOGLE_DCHECK
(
value
!=
nullptr
);
index_name_
.
SetNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
// @@protoc_insertion_point(field_set_char:milvus.proto.service.IndexParam.index_name)
}
inline
void
IndexParam
::
set_index_name
(
const
char
*
value
,
size_t
size
)
{
index_name_
.
SetNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
reinterpret_cast
<
const
char
*>
(
value
),
size
));
// @@protoc_insertion_point(field_set_pointer:milvus.proto.service.IndexParam.index_name)
}
inline
std
::
string
*
IndexParam
::
mutable_index_name
()
{
// @@protoc_insertion_point(field_mutable:milvus.proto.service.IndexParam.index_name)
return
index_name_
.
MutableNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
}
inline
std
::
string
*
IndexParam
::
release_index_name
()
{
// @@protoc_insertion_point(field_release:milvus.proto.service.IndexParam.index_name)
return
index_name_
.
ReleaseNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
());
}
inline
void
IndexParam
::
set_allocated_index_name
(
std
::
string
*
index_name
)
{
if
(
index_name
!=
nullptr
)
{
}
else
{
}
index_name_
.
SetAllocatedNoArena
(
&::
PROTOBUF_NAMESPACE_ID
::
internal
::
GetEmptyStringAlreadyInited
(),
index_name
);
// @@protoc_insertion_point(field_set_allocated:milvus.proto.service.IndexParam.index_name)
}
// repeated .milvus.proto.common.KeyValuePair extra_params = 5;
inline
int
IndexParam
::
extra_params_size
()
const
{
inline
int
IndexParam
::
extra_params_size
()
const
{
return
extra_params_
.
size
();
return
extra_params_
.
size
();
}
}
...
...
internal/master/meta_table.go
浏览文件 @
0b9cffaf
...
@@ -505,7 +505,7 @@ func (mt *metaTable) AddFieldIndexMeta(meta *pb.FieldIndexMeta) error {
...
@@ -505,7 +505,7 @@ func (mt *metaTable) AddFieldIndexMeta(meta *pb.FieldIndexMeta) error {
mt
.
segID2IndexMetas
[
segID
]
=
make
([]
pb
.
FieldIndexMeta
,
0
)
mt
.
segID2IndexMetas
[
segID
]
=
make
([]
pb
.
FieldIndexMeta
,
0
)
}
}
for
_
,
v
:=
range
mt
.
segID2IndexMetas
[
segID
]
{
for
_
,
v
:=
range
mt
.
segID2IndexMetas
[
segID
]
{
if
v
.
FieldID
==
meta
.
FieldID
&&
v
.
IndexType
==
meta
.
IndexType
&&
typeutil
.
CompareIndexParams
(
v
.
IndexParams
,
meta
.
IndexParams
)
{
if
v
.
FieldID
==
meta
.
FieldID
&&
typeutil
.
CompareIndexParams
(
v
.
IndexParams
,
meta
.
IndexParams
)
{
return
fmt
.
Errorf
(
"segment %d field id %d's index meta already exist"
,
segID
,
meta
.
FieldID
)
return
fmt
.
Errorf
(
"segment %d field id %d's index meta already exist"
,
segID
,
meta
.
FieldID
)
}
}
}
}
...
@@ -533,7 +533,7 @@ func (mt *metaTable) DeleteFieldIndexMeta(segID UniqueID, fieldID UniqueID, inde
...
@@ -533,7 +533,7 @@ func (mt *metaTable) DeleteFieldIndexMeta(segID UniqueID, fieldID UniqueID, inde
}
}
for
i
,
v
:=
range
mt
.
segID2IndexMetas
[
segID
]
{
for
i
,
v
:=
range
mt
.
segID2IndexMetas
[
segID
]
{
if
v
.
FieldID
==
fieldID
&&
v
.
IndexType
==
indexType
&&
typeutil
.
CompareIndexParams
(
v
.
IndexParams
,
indexParams
)
{
if
v
.
FieldID
==
fieldID
&&
typeutil
.
CompareIndexParams
(
v
.
IndexParams
,
indexParams
)
{
mt
.
segID2IndexMetas
[
segID
]
=
append
(
mt
.
segID2IndexMetas
[
segID
][
:
i
],
mt
.
segID2IndexMetas
[
segID
][
i
+
1
:
]
...
)
mt
.
segID2IndexMetas
[
segID
]
=
append
(
mt
.
segID2IndexMetas
[
segID
][
:
i
],
mt
.
segID2IndexMetas
[
segID
][
i
+
1
:
]
...
)
err
:=
mt
.
deleteFieldIndexMetaToEtcd
(
segID
,
fieldID
,
v
.
IndexID
)
err
:=
mt
.
deleteFieldIndexMetaToEtcd
(
segID
,
fieldID
,
v
.
IndexID
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -552,7 +552,7 @@ func (mt *metaTable) deleteFieldIndexMetaToEtcd(segID UniqueID, fieldID UniqueID
...
@@ -552,7 +552,7 @@ func (mt *metaTable) deleteFieldIndexMetaToEtcd(segID UniqueID, fieldID UniqueID
return
mt
.
client
.
Remove
(
key
)
return
mt
.
client
.
Remove
(
key
)
}
}
func
(
mt
*
metaTable
)
HasFieldIndexMeta
(
segID
UniqueID
,
fieldID
UniqueID
,
index
Type
string
,
index
Params
[]
*
commonpb
.
KeyValuePair
)
(
bool
,
error
)
{
func
(
mt
*
metaTable
)
HasFieldIndexMeta
(
segID
UniqueID
,
fieldID
UniqueID
,
indexParams
[]
*
commonpb
.
KeyValuePair
)
(
bool
,
error
)
{
mt
.
indexLock
.
RLock
()
mt
.
indexLock
.
RLock
()
defer
mt
.
indexLock
.
RUnlock
()
defer
mt
.
indexLock
.
RUnlock
()
...
@@ -561,7 +561,7 @@ func (mt *metaTable) HasFieldIndexMeta(segID UniqueID, fieldID UniqueID, indexTy
...
@@ -561,7 +561,7 @@ func (mt *metaTable) HasFieldIndexMeta(segID UniqueID, fieldID UniqueID, indexTy
}
}
for
_
,
v
:=
range
mt
.
segID2IndexMetas
[
segID
]
{
for
_
,
v
:=
range
mt
.
segID2IndexMetas
[
segID
]
{
if
v
.
FieldID
==
fieldID
&&
v
.
IndexType
==
indexType
&&
typeutil
.
CompareIndexParams
(
v
.
IndexParams
,
indexParams
)
{
if
v
.
FieldID
==
fieldID
&&
typeutil
.
CompareIndexParams
(
v
.
IndexParams
,
indexParams
)
{
return
true
,
nil
return
true
,
nil
}
}
}
}
...
@@ -577,7 +577,7 @@ func (mt *metaTable) UpdateFieldIndexMeta(meta *pb.FieldIndexMeta) error {
...
@@ -577,7 +577,7 @@ func (mt *metaTable) UpdateFieldIndexMeta(meta *pb.FieldIndexMeta) error {
mt
.
segID2IndexMetas
[
segID
]
=
make
([]
pb
.
FieldIndexMeta
,
0
)
mt
.
segID2IndexMetas
[
segID
]
=
make
([]
pb
.
FieldIndexMeta
,
0
)
}
}
for
i
,
v
:=
range
mt
.
segID2IndexMetas
[
segID
]
{
for
i
,
v
:=
range
mt
.
segID2IndexMetas
[
segID
]
{
if
v
.
FieldID
==
meta
.
FieldID
&&
v
.
IndexType
==
meta
.
IndexType
&&
typeutil
.
CompareIndexParams
(
v
.
IndexParams
,
meta
.
IndexParams
)
{
if
v
.
FieldID
==
meta
.
FieldID
&&
typeutil
.
CompareIndexParams
(
v
.
IndexParams
,
meta
.
IndexParams
)
{
mt
.
segID2IndexMetas
[
segID
][
i
]
=
*
meta
mt
.
segID2IndexMetas
[
segID
][
i
]
=
*
meta
err
:=
mt
.
deleteFieldIndexMetaToEtcd
(
segID
,
v
.
FieldID
,
v
.
IndexID
)
err
:=
mt
.
deleteFieldIndexMetaToEtcd
(
segID
,
v
.
FieldID
,
v
.
IndexID
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
internal/master/meta_table_test.go
浏览文件 @
0b9cffaf
...
@@ -431,7 +431,6 @@ func TestMetaTable_LoadIndexMetaFromKv(t *testing.T) {
...
@@ -431,7 +431,6 @@ func TestMetaTable_LoadIndexMetaFromKv(t *testing.T) {
meta
:=
pb
.
FieldIndexMeta
{
meta
:=
pb
.
FieldIndexMeta
{
SegmentID
:
1
,
SegmentID
:
1
,
FieldID
:
100
,
FieldID
:
100
,
IndexType
:
"type1"
,
IndexID
:
1000
,
IndexID
:
1000
,
IndexParams
:
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}},
IndexParams
:
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}},
Status
:
indexbuilderpb
.
IndexStatus_FINISHED
,
Status
:
indexbuilderpb
.
IndexStatus_FINISHED
,
...
@@ -443,7 +442,7 @@ func TestMetaTable_LoadIndexMetaFromKv(t *testing.T) {
...
@@ -443,7 +442,7 @@ func TestMetaTable_LoadIndexMetaFromKv(t *testing.T) {
metaTable
,
err
:=
NewMetaTable
(
kv
)
metaTable
,
err
:=
NewMetaTable
(
kv
)
assert
.
Nil
(
t
,
err
)
assert
.
Nil
(
t
,
err
)
res
,
err
:=
metaTable
.
HasFieldIndexMeta
(
1
,
100
,
"type1"
,
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}})
res
,
err
:=
metaTable
.
HasFieldIndexMeta
(
1
,
100
,
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}})
assert
.
Nil
(
t
,
err
)
assert
.
Nil
(
t
,
err
)
assert
.
True
(
t
,
res
)
assert
.
True
(
t
,
res
)
}
}
...
@@ -465,7 +464,6 @@ func TestMetaTable_IndexMeta(t *testing.T) {
...
@@ -465,7 +464,6 @@ func TestMetaTable_IndexMeta(t *testing.T) {
err
=
meta
.
AddFieldIndexMeta
(
&
pb
.
FieldIndexMeta
{
err
=
meta
.
AddFieldIndexMeta
(
&
pb
.
FieldIndexMeta
{
SegmentID
:
1
,
SegmentID
:
1
,
FieldID
:
100
,
FieldID
:
100
,
IndexType
:
"type1"
,
IndexID
:
1000
,
IndexID
:
1000
,
IndexParams
:
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}},
IndexParams
:
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}},
Status
:
indexbuilderpb
.
IndexStatus_INPROGRESS
,
Status
:
indexbuilderpb
.
IndexStatus_INPROGRESS
,
...
@@ -475,7 +473,6 @@ func TestMetaTable_IndexMeta(t *testing.T) {
...
@@ -475,7 +473,6 @@ func TestMetaTable_IndexMeta(t *testing.T) {
err
=
meta
.
AddFieldIndexMeta
(
&
pb
.
FieldIndexMeta
{
err
=
meta
.
AddFieldIndexMeta
(
&
pb
.
FieldIndexMeta
{
SegmentID
:
1
,
SegmentID
:
1
,
FieldID
:
100
,
FieldID
:
100
,
IndexType
:
"type1"
,
IndexID
:
1000
,
IndexID
:
1000
,
IndexParams
:
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}},
IndexParams
:
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}},
Status
:
indexbuilderpb
.
IndexStatus_INPROGRESS
,
Status
:
indexbuilderpb
.
IndexStatus_INPROGRESS
,
...
@@ -483,17 +480,16 @@ func TestMetaTable_IndexMeta(t *testing.T) {
...
@@ -483,17 +480,16 @@ func TestMetaTable_IndexMeta(t *testing.T) {
})
})
assert
.
NotNil
(
t
,
err
)
assert
.
NotNil
(
t
,
err
)
res
,
err
:=
meta
.
HasFieldIndexMeta
(
1
,
100
,
"type1"
,
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}})
res
,
err
:=
meta
.
HasFieldIndexMeta
(
1
,
100
,
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}})
assert
.
Nil
(
t
,
err
)
assert
.
Nil
(
t
,
err
)
assert
.
True
(
t
,
res
)
assert
.
True
(
t
,
res
)
res
,
err
=
meta
.
HasFieldIndexMeta
(
1
,
100
,
"type2"
,
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1
"
}})
res
,
err
=
meta
.
HasFieldIndexMeta
(
1
,
100
,
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v2
"
}})
assert
.
Nil
(
t
,
err
)
assert
.
Nil
(
t
,
err
)
assert
.
False
(
t
,
res
)
assert
.
False
(
t
,
res
)
err
=
meta
.
UpdateFieldIndexMeta
(
&
pb
.
FieldIndexMeta
{
err
=
meta
.
UpdateFieldIndexMeta
(
&
pb
.
FieldIndexMeta
{
SegmentID
:
1
,
SegmentID
:
1
,
FieldID
:
100
,
FieldID
:
100
,
IndexType
:
"type1"
,
IndexID
:
1000
,
IndexID
:
1000
,
IndexParams
:
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}},
IndexParams
:
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}},
Status
:
indexbuilderpb
.
IndexStatus_FINISHED
,
Status
:
indexbuilderpb
.
IndexStatus_FINISHED
,
...
@@ -503,7 +499,7 @@ func TestMetaTable_IndexMeta(t *testing.T) {
...
@@ -503,7 +499,7 @@ func TestMetaTable_IndexMeta(t *testing.T) {
assert
.
EqualValues
(
t
,
indexbuilderpb
.
IndexStatus_FINISHED
,
meta
.
segID2IndexMetas
[
1
][
0
]
.
Status
)
assert
.
EqualValues
(
t
,
indexbuilderpb
.
IndexStatus_FINISHED
,
meta
.
segID2IndexMetas
[
1
][
0
]
.
Status
)
err
=
meta
.
DeleteFieldIndexMeta
(
1
,
100
,
"type1"
,
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}})
err
=
meta
.
DeleteFieldIndexMeta
(
1
,
100
,
"type1"
,
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}})
assert
.
Nil
(
t
,
err
)
assert
.
Nil
(
t
,
err
)
res
,
err
=
meta
.
HasFieldIndexMeta
(
1
,
100
,
"type1"
,
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}})
res
,
err
=
meta
.
HasFieldIndexMeta
(
1
,
100
,
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k1"
,
Value
:
"v1"
}})
assert
.
Nil
(
t
,
err
)
assert
.
Nil
(
t
,
err
)
assert
.
False
(
t
,
res
)
assert
.
False
(
t
,
res
)
}
}
internal/proto/etcd_meta.proto
浏览文件 @
0b9cffaf
...
@@ -50,9 +50,8 @@ message SegmentMeta {
...
@@ -50,9 +50,8 @@ message SegmentMeta {
message
FieldIndexMeta
{
message
FieldIndexMeta
{
int64
segmentID
=
1
;
int64
segmentID
=
1
;
int64
fieldID
=
2
;
int64
fieldID
=
2
;
string
index_type
=
3
;
int64
indexID
=
3
;
int64
indexID
=
4
;
repeated
common.KeyValuePair
index_params
=
4
;
repeated
common.KeyValuePair
index_params
=
5
;
service.IndexStatus
status
=
5
;
service.IndexStatus
status
=
6
;
repeated
string
index_file_paths
=
6
;
repeated
string
index_file_paths
=
7
;
}
}
\ No newline at end of file
internal/proto/etcdpb/etcd_meta.pb.go
浏览文件 @
0b9cffaf
...
@@ -373,11 +373,10 @@ func (m *SegmentMeta) GetBinlogFilePaths() []*FieldBinlogFiles {
...
@@ -373,11 +373,10 @@ func (m *SegmentMeta) GetBinlogFilePaths() []*FieldBinlogFiles {
type
FieldIndexMeta
struct
{
type
FieldIndexMeta
struct
{
SegmentID
int64
`protobuf:"varint,1,opt,name=segmentID,proto3" json:"segmentID,omitempty"`
SegmentID
int64
`protobuf:"varint,1,opt,name=segmentID,proto3" json:"segmentID,omitempty"`
FieldID
int64
`protobuf:"varint,2,opt,name=fieldID,proto3" json:"fieldID,omitempty"`
FieldID
int64
`protobuf:"varint,2,opt,name=fieldID,proto3" json:"fieldID,omitempty"`
IndexType
string
`protobuf:"bytes,3,opt,name=index_type,json=indexType,proto3" json:"index_type,omitempty"`
IndexID
int64
`protobuf:"varint,3,opt,name=indexID,proto3" json:"indexID,omitempty"`
IndexID
int64
`protobuf:"varint,4,opt,name=indexID,proto3" json:"indexID,omitempty"`
IndexParams
[]
*
commonpb
.
KeyValuePair
`protobuf:"bytes,4,rep,name=index_params,json=indexParams,proto3" json:"index_params,omitempty"`
IndexParams
[]
*
commonpb
.
KeyValuePair
`protobuf:"bytes,5,rep,name=index_params,json=indexParams,proto3" json:"index_params,omitempty"`
Status
indexbuilderpb
.
IndexStatus
`protobuf:"varint,5,opt,name=status,proto3,enum=milvus.proto.service.IndexStatus" json:"status,omitempty"`
Status
indexbuilderpb
.
IndexStatus
`protobuf:"varint,6,opt,name=status,proto3,enum=milvus.proto.service.IndexStatus" json:"status,omitempty"`
IndexFilePaths
[]
string
`protobuf:"bytes,6,rep,name=index_file_paths,json=indexFilePaths,proto3" json:"index_file_paths,omitempty"`
IndexFilePaths
[]
string
`protobuf:"bytes,7,rep,name=index_file_paths,json=indexFilePaths,proto3" json:"index_file_paths,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
@@ -422,13 +421,6 @@ func (m *FieldIndexMeta) GetFieldID() int64 {
...
@@ -422,13 +421,6 @@ func (m *FieldIndexMeta) GetFieldID() int64 {
return
0
return
0
}
}
func
(
m
*
FieldIndexMeta
)
GetIndexType
()
string
{
if
m
!=
nil
{
return
m
.
IndexType
}
return
""
}
func
(
m
*
FieldIndexMeta
)
GetIndexID
()
int64
{
func
(
m
*
FieldIndexMeta
)
GetIndexID
()
int64
{
if
m
!=
nil
{
if
m
!=
nil
{
return
m
.
IndexID
return
m
.
IndexID
...
@@ -469,51 +461,50 @@ func init() {
...
@@ -469,51 +461,50 @@ func init() {
func
init
()
{
proto
.
RegisterFile
(
"etcd_meta.proto"
,
fileDescriptor_975d306d62b73e88
)
}
func
init
()
{
proto
.
RegisterFile
(
"etcd_meta.proto"
,
fileDescriptor_975d306d62b73e88
)
}
var
fileDescriptor_975d306d62b73e88
=
[]
byte
{
var
fileDescriptor_975d306d62b73e88
=
[]
byte
{
// 725 bytes of a gzipped FileDescriptorProto
// 716 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0x8c
,
0x54
,
0xd1
,
0x6e
,
0xeb
,
0x44
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0x8c
,
0x54
,
0x5d
,
0x6f
,
0xe2
,
0x46
,
0x10
,
0x55
,
0xe2
,
0x36
,
0xa9
,
0x27
,
0x69
,
0xd2
,
0x2e
,
0x2f
,
0xe6
,
0x72
,
0x2f
,
0xe4
,
0xa6
,
0x2a
,
0x14
,
0x15
,
0x38
,
0x81
,
0xf8
,
0x42
,
0x20
,
0x99
,
0xbe
,
0xb8
,
0x69
,
0xda
,
0x12
,
0xa2
,
0xb4
,
0x48
,
0x44
,
0x42
,
0x24
,
0x52
,
0x91
,
0x90
,
0x78
,
0x00
,
0x41
,
0x1b
,
0x2a
,
0x45
,
0x08
,
0x1a
,
0x9c
,
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
,
0xeb
,
0x3f
,
0x66
,
0x4c
,
0xcf
,
0xf3
,
0xa9
,
0xf1
,
0x33
,
0x58
,
0xb2
,
0x34
,
0x65
,
0x4b
,
0x8d
,
0xf1
,
0xd1
,
0x33
,
0xda
,
0xb0
,
0x34
,
0x65
,
0x1b
,
0x8d
,
0xf1
,
0x6a
,
0xe4
,
0xbe
,
0xf5
,
0x45
,
0xc2
,
0x94
,
0x7c
,
0xe0
,
0xbe
,
0xf5
,
0x73
,
0xc2
,
0x94
,
0x96
,
0x6c
,
0x9a
,
0x6b
,
0x4c
,
0x06
,
0x4c
,
0x68
,
0x94
,
0x96
,
0x6c
,
0x51
,
0x68
,
0x4c
,
0x46
,
0x4c
,
0x68
,
0x94
,
0x82
,
0xa6
,
0x23
,
0x2b
,
0x60
,
0x64
,
0x16
,
0x82
,
0xa6
,
0x03
,
0x6b
,
0x60
,
0x60
,
0x12
,
0x5f
,
0x4c
,
0xa7
,
0x35
,
0x7b
,
0xfa
,
0xe5
,
0x53
,
0x00
,
0x92
,
0x2f
,
0x16
,
0x0d
,
0x1b
,
0x7d
,
0xf9
,
0x6f
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0x1c
,
0xb6
,
0x88
,
0x00
,
0x00
,
0xff
,
0xff
,
0x0a
,
0x10
,
0xb5
,
0x6d
,
0x6a
,
0x05
,
0x00
,
0x00
,
0xc7
,
0x89
,
0x05
,
0x00
,
0x00
,
}
}
internal/proto/internal_msg.proto
浏览文件 @
0b9cffaf
...
@@ -327,8 +327,7 @@ message CreateIndexRequest {
...
@@ -327,8 +327,7 @@ message CreateIndexRequest {
int64
proxyID
=
4
;
int64
proxyID
=
4
;
string
collection_name
=
5
;
string
collection_name
=
5
;
string
field_name
=
6
;
string
field_name
=
6
;
string
index_name
=
7
;
repeated
common.KeyValuePair
extra_params
=
7
;
repeated
common.KeyValuePair
extra_params
=
8
;
}
}
message
DescribeIndexRequest
{
message
DescribeIndexRequest
{
...
@@ -338,8 +337,7 @@ message DescribeIndexRequest {
...
@@ -338,8 +337,7 @@ message DescribeIndexRequest {
int64
proxyID
=
4
;
int64
proxyID
=
4
;
string
collection_name
=
5
;
string
collection_name
=
5
;
string
field_name
=
6
;
string
field_name
=
6
;
string
index_name
=
7
;
repeated
common.KeyValuePair
extra_params
=
7
;
repeated
common.KeyValuePair
extra_params
=
8
;
}
}
message
DescribeIndexProgressRequest
{
message
DescribeIndexProgressRequest
{
...
@@ -349,6 +347,5 @@ message DescribeIndexProgressRequest {
...
@@ -349,6 +347,5 @@ message DescribeIndexProgressRequest {
int64
proxyID
=
4
;
int64
proxyID
=
4
;
string
collection_name
=
5
;
string
collection_name
=
5
;
string
field_name
=
6
;
string
field_name
=
6
;
string
index_name
=
7
;
repeated
common.KeyValuePair
extra_params
=
7
;
repeated
common.KeyValuePair
extra_params
=
8
;
}
}
internal/proto/internalpb/internal_msg.pb.go
浏览文件 @
0b9cffaf
此差异已折叠。
点击以展开。
internal/proto/service_msg.proto
浏览文件 @
0b9cffaf
...
@@ -179,10 +179,9 @@ message QueryResult {
...
@@ -179,10 +179,9 @@ message QueryResult {
* extra_params["index_type"] = one of the values: SORTED
* extra_params["index_type"] = one of the values: SORTED
*/
*/
message
IndexParam
{
message
IndexParam
{
string
collection_name
=
2
;
string
collection_name
=
1
;
string
field_name
=
3
;
string
field_name
=
2
;
string
index_name
=
4
;
repeated
common.KeyValuePair
extra_params
=
3
;
repeated
common.KeyValuePair
extra_params
=
5
;
}
}
message
DescribeIndexResponse
{
message
DescribeIndexResponse
{
...
...
internal/proto/servicepb/service_msg.pb.go
浏览文件 @
0b9cffaf
...
@@ -915,10 +915,9 @@ func (m *QueryResult) GetHits() [][]byte {
...
@@ -915,10 +915,9 @@ func (m *QueryResult) GetHits() [][]byte {
// for structured field:
// for structured field:
// extra_params["index_type"] = one of the values: SORTED
// extra_params["index_type"] = one of the values: SORTED
type
IndexParam
struct
{
type
IndexParam
struct
{
CollectionName
string
`protobuf:"bytes,2,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"`
CollectionName
string
`protobuf:"bytes,1,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"`
FieldName
string
`protobuf:"bytes,3,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"`
FieldName
string
`protobuf:"bytes,2,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"`
IndexName
string
`protobuf:"bytes,4,opt,name=index_name,json=indexName,proto3" json:"index_name,omitempty"`
ExtraParams
[]
*
commonpb
.
KeyValuePair
`protobuf:"bytes,3,rep,name=extra_params,json=extraParams,proto3" json:"extra_params,omitempty"`
ExtraParams
[]
*
commonpb
.
KeyValuePair
`protobuf:"bytes,5,rep,name=extra_params,json=extraParams,proto3" json:"extra_params,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
@@ -963,13 +962,6 @@ func (m *IndexParam) GetFieldName() string {
...
@@ -963,13 +962,6 @@ func (m *IndexParam) GetFieldName() string {
return
""
return
""
}
}
func
(
m
*
IndexParam
)
GetIndexName
()
string
{
if
m
!=
nil
{
return
m
.
IndexName
}
return
""
}
func
(
m
*
IndexParam
)
GetExtraParams
()
[]
*
commonpb
.
KeyValuePair
{
func
(
m
*
IndexParam
)
GetExtraParams
()
[]
*
commonpb
.
KeyValuePair
{
if
m
!=
nil
{
if
m
!=
nil
{
return
m
.
ExtraParams
return
m
.
ExtraParams
...
@@ -1073,58 +1065,59 @@ func init() {
...
@@ -1073,58 +1065,59 @@ func init() {
func
init
()
{
proto
.
RegisterFile
(
"service_msg.proto"
,
fileDescriptor_b4b40b84dd2f74cb
)
}
func
init
()
{
proto
.
RegisterFile
(
"service_msg.proto"
,
fileDescriptor_b4b40b84dd2f74cb
)
}
var
fileDescriptor_b4b40b84dd2f74cb
=
[]
byte
{
var
fileDescriptor_b4b40b84dd2f74cb
=
[]
byte
{
// 847 bytes of a gzipped FileDescriptorProto
// 854 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xd4
,
0x55
,
0xdd
,
0x6e
,
0xdc
,
0x44
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xac
,
0x55
,
0xdd
,
0x6e
,
0xdb
,
0x36
,
0x14
,
0xc6
,
0xeb
,
0x4d
,
0xd8
,
0x9c
,
0xf5
,
0x6e
,
0x37
,
0x43
,
0x5a
,
0xb9
,
0xad
,
0x90
,
0x16
,
0x57
,
0x14
,
0x9e
,
0x2c
,
0x27
,
0xb3
,
0x8f
,
0x65
,
0xd7
,
0xe1
,
0xd2
,
0xc2
,
0x6d
,
0x51
,
0xc0
,
0x53
,
0xd1
,
0x85
,
0x15
,
0x88
,
0x5d
,
0x29
,
0x45
,
0x42
,
0xbd
,
0x40
,
0x22
,
0x9b
,
0x14
,
0x48
,
0x53
,
0x25
,
0x61
,
0xcd
,
0xd8
,
0x30
,
0x1b
,
0x48
,
0x07
,
0x0c
,
0xbd
,
0x18
,
0xb0
,
0x38
,
0xe9
,
0xb6
,
0x34
,
0x45
,
0x92
,
0x12
,
0x45
,
0x2a
,
0x48
,
0x58
,
0x63
,
0x7b
,
0x6a
,
0x8f
,
0xb0
,
0x3d
,
0xd6
,
0xcc
,
0x38
,
0xe9
,
0xf6
,
0x31
,
0x41
,
0x80
,
0x6e
,
0xc0
,
0x04
,
0x5a
,
0x62
,
0x25
,
0x62
,
0x92
,
0x28
,
0x90
,
0x54
,
0x52
,
0xf7
,
0x41
,
0x78
,
0x09
,
0x9e
,
0x80
,
0x27
,
0xe0
,
0x8e
,
0xf7
,
0xe1
,
0x0e
,
0x79
,
0xc6
,
0xfb
,
0x17
,
0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,
0x09
,
0x00
,
0x00
,
}
}
internal/proxy/grpc_service.go
浏览文件 @
0b9cffaf
...
@@ -595,14 +595,12 @@ func (p *Proxy) ShowPartitions(ctx context.Context, req *servicepb.CollectionNam
...
@@ -595,14 +595,12 @@ func (p *Proxy) ShowPartitions(ctx context.Context, req *servicepb.CollectionNam
}
}
func
(
p
*
Proxy
)
CreateIndex
(
ctx
context
.
Context
,
indexParam
*
servicepb
.
IndexParam
)
(
*
commonpb
.
Status
,
error
)
{
func
(
p
*
Proxy
)
CreateIndex
(
ctx
context
.
Context
,
indexParam
*
servicepb
.
IndexParam
)
(
*
commonpb
.
Status
,
error
)
{
log
.
Println
(
"create index: "
,
indexParam
.
IndexName
)
cit
:=
&
CreateIndexTask
{
cit
:=
&
CreateIndexTask
{
Condition
:
NewTaskCondition
(
ctx
),
Condition
:
NewTaskCondition
(
ctx
),
CreateIndexRequest
:
internalpb
.
CreateIndexRequest
{
CreateIndexRequest
:
internalpb
.
CreateIndexRequest
{
MsgType
:
internalpb
.
MsgType_kCreateIndex
,
MsgType
:
internalpb
.
MsgType_kCreateIndex
,
CollectionName
:
indexParam
.
CollectionName
,
CollectionName
:
indexParam
.
CollectionName
,
FieldName
:
indexParam
.
FieldName
,
FieldName
:
indexParam
.
FieldName
,
IndexName
:
indexParam
.
IndexName
,
ExtraParams
:
indexParam
.
ExtraParams
,
ExtraParams
:
indexParam
.
ExtraParams
,
},
},
masterClient
:
p
.
masterClient
,
masterClient
:
p
.
masterClient
,
...
...
internal/storage/data_codec.go
浏览文件 @
0b9cffaf
...
@@ -2,6 +2,9 @@ package storage
...
@@ -2,6 +2,9 @@ package storage
import
(
import
(
"fmt"
"fmt"
"sort"
"strconv"
"strings"
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/errors"
ms
"github.com/zilliztech/milvus-distributed/internal/master"
ms
"github.com/zilliztech/milvus-distributed/internal/master"
...
@@ -17,8 +20,26 @@ type (
...
@@ -17,8 +20,26 @@ type (
)
)
type
Blob
struct
{
type
Blob
struct
{
key
string
Key
string
value
[]
byte
Value
[]
byte
}
type
BlobList
[]
*
Blob
func
(
s
BlobList
)
Len
()
int
{
return
len
(
s
)
}
func
(
s
BlobList
)
Less
(
i
,
j
int
)
bool
{
leftValues
:=
strings
.
Split
(
s
[
i
]
.
Key
,
"/"
)
rightValues
:=
strings
.
Split
(
s
[
j
]
.
Key
,
"/"
)
left
,
_
:=
strconv
.
ParseInt
(
leftValues
[
len
(
leftValues
)
-
1
],
0
,
10
)
right
,
_
:=
strconv
.
ParseInt
(
rightValues
[
len
(
rightValues
)
-
1
],
0
,
10
)
return
left
<
right
}
func
(
s
BlobList
)
Swap
(
i
,
j
int
)
{
s
[
i
],
s
[
j
]
=
s
[
j
],
s
[
i
]
}
}
func
NewBlob
(
key
string
,
value
[]
byte
)
*
Blob
{
func
NewBlob
(
key
string
,
value
[]
byte
)
*
Blob
{
...
@@ -26,11 +47,11 @@ func NewBlob(key string, value []byte) *Blob {
...
@@ -26,11 +47,11 @@ func NewBlob(key string, value []byte) *Blob {
}
}
func
(
b
Blob
)
GetKey
()
string
{
func
(
b
Blob
)
GetKey
()
string
{
return
b
.
k
ey
return
b
.
K
ey
}
}
func
(
b
Blob
)
GetValue
()
[]
byte
{
func
(
b
Blob
)
GetValue
()
[]
byte
{
return
b
.
v
alue
return
b
.
V
alue
}
}
type
Base
struct
{
type
Base
struct
{
...
@@ -113,7 +134,7 @@ func (insertCodec *InsertCodec) Serialize(partitionID UniqueID, segmentID Unique
...
@@ -113,7 +134,7 @@ func (insertCodec *InsertCodec) Serialize(partitionID UniqueID, segmentID Unique
if
!
ok
{
if
!
ok
{
return
nil
,
errors
.
New
(
"data doesn't contains timestamp field"
)
return
nil
,
errors
.
New
(
"data doesn't contains timestamp field"
)
}
}
ts
:=
timeFieldData
.
(
Int64FieldData
)
.
Data
ts
:=
timeFieldData
.
(
*
Int64FieldData
)
.
Data
for
_
,
field
:=
range
insertCodec
.
Schema
.
Schema
.
Fields
{
for
_
,
field
:=
range
insertCodec
.
Schema
.
Schema
.
Fields
{
singleData
:=
data
.
Data
[
field
.
FieldID
]
singleData
:=
data
.
Data
[
field
.
FieldID
]
...
@@ -129,30 +150,30 @@ func (insertCodec *InsertCodec) Serialize(partitionID UniqueID, segmentID Unique
...
@@ -129,30 +150,30 @@ func (insertCodec *InsertCodec) Serialize(partitionID UniqueID, segmentID Unique
eventWriter
.
SetEndTimestamp
(
typeutil
.
Timestamp
(
ts
[
len
(
ts
)
-
1
]))
eventWriter
.
SetEndTimestamp
(
typeutil
.
Timestamp
(
ts
[
len
(
ts
)
-
1
]))
switch
field
.
DataType
{
switch
field
.
DataType
{
case
schemapb
.
DataType_BOOL
:
case
schemapb
.
DataType_BOOL
:
err
=
eventWriter
.
AddBoolToPayload
(
singleData
.
(
BoolFieldData
)
.
Data
)
err
=
eventWriter
.
AddBoolToPayload
(
singleData
.
(
*
BoolFieldData
)
.
Data
)
case
schemapb
.
DataType_INT8
:
case
schemapb
.
DataType_INT8
:
err
=
eventWriter
.
AddInt8ToPayload
(
singleData
.
(
Int8FieldData
)
.
Data
)
err
=
eventWriter
.
AddInt8ToPayload
(
singleData
.
(
*
Int8FieldData
)
.
Data
)
case
schemapb
.
DataType_INT16
:
case
schemapb
.
DataType_INT16
:
err
=
eventWriter
.
AddInt16ToPayload
(
singleData
.
(
Int16FieldData
)
.
Data
)
err
=
eventWriter
.
AddInt16ToPayload
(
singleData
.
(
*
Int16FieldData
)
.
Data
)
case
schemapb
.
DataType_INT32
:
case
schemapb
.
DataType_INT32
:
err
=
eventWriter
.
AddInt32ToPayload
(
singleData
.
(
Int32FieldData
)
.
Data
)
err
=
eventWriter
.
AddInt32ToPayload
(
singleData
.
(
*
Int32FieldData
)
.
Data
)
case
schemapb
.
DataType_INT64
:
case
schemapb
.
DataType_INT64
:
err
=
eventWriter
.
AddInt64ToPayload
(
singleData
.
(
Int64FieldData
)
.
Data
)
err
=
eventWriter
.
AddInt64ToPayload
(
singleData
.
(
*
Int64FieldData
)
.
Data
)
case
schemapb
.
DataType_FLOAT
:
case
schemapb
.
DataType_FLOAT
:
err
=
eventWriter
.
AddFloatToPayload
(
singleData
.
(
FloatFieldData
)
.
Data
)
err
=
eventWriter
.
AddFloatToPayload
(
singleData
.
(
*
FloatFieldData
)
.
Data
)
case
schemapb
.
DataType_DOUBLE
:
case
schemapb
.
DataType_DOUBLE
:
err
=
eventWriter
.
AddDoubleToPayload
(
singleData
.
(
DoubleFieldData
)
.
Data
)
err
=
eventWriter
.
AddDoubleToPayload
(
singleData
.
(
*
DoubleFieldData
)
.
Data
)
case
schemapb
.
DataType_STRING
:
case
schemapb
.
DataType_STRING
:
for
_
,
singleString
:=
range
singleData
.
(
StringFieldData
)
.
Data
{
for
_
,
singleString
:=
range
singleData
.
(
*
StringFieldData
)
.
Data
{
err
=
eventWriter
.
AddOneStringToPayload
(
singleString
)
err
=
eventWriter
.
AddOneStringToPayload
(
singleString
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
}
}
case
schemapb
.
DataType_VECTOR_BINARY
:
case
schemapb
.
DataType_VECTOR_BINARY
:
err
=
eventWriter
.
AddBinaryVectorToPayload
(
singleData
.
(
BinaryVectorFieldData
)
.
Data
,
singleData
.
(
BinaryVectorFieldData
)
.
Dim
)
err
=
eventWriter
.
AddBinaryVectorToPayload
(
singleData
.
(
*
BinaryVectorFieldData
)
.
Data
,
singleData
.
(
*
BinaryVectorFieldData
)
.
Dim
)
case
schemapb
.
DataType_VECTOR_FLOAT
:
case
schemapb
.
DataType_VECTOR_FLOAT
:
err
=
eventWriter
.
AddFloatVectorToPayload
(
singleData
.
(
FloatVectorFieldData
)
.
Data
,
singleData
.
(
FloatVectorFieldData
)
.
Dim
)
err
=
eventWriter
.
AddFloatVectorToPayload
(
singleData
.
(
*
FloatVectorFieldData
)
.
Data
,
singleData
.
(
*
FloatVectorFieldData
)
.
Dim
)
default
:
default
:
return
nil
,
errors
.
Errorf
(
"undefined data type %d"
,
field
.
DataType
)
return
nil
,
errors
.
Errorf
(
"undefined data type %d"
,
field
.
DataType
)
}
}
...
@@ -176,8 +197,8 @@ func (insertCodec *InsertCodec) Serialize(partitionID UniqueID, segmentID Unique
...
@@ -176,8 +197,8 @@ func (insertCodec *InsertCodec) Serialize(partitionID UniqueID, segmentID Unique
}
}
blobKey
:=
fmt
.
Sprintf
(
"%d"
,
field
.
FieldID
)
blobKey
:=
fmt
.
Sprintf
(
"%d"
,
field
.
FieldID
)
blobs
=
append
(
blobs
,
&
Blob
{
blobs
=
append
(
blobs
,
&
Blob
{
k
ey
:
blobKey
,
K
ey
:
blobKey
,
v
alue
:
buffer
,
V
alue
:
buffer
,
})
})
}
}
...
@@ -191,12 +212,16 @@ func (insertCodec *InsertCodec) Deserialize(blobs []*Blob) (partitionID UniqueID
...
@@ -191,12 +212,16 @@ func (insertCodec *InsertCodec) Deserialize(blobs []*Blob) (partitionID UniqueID
readerClose
:=
func
(
reader
*
BinlogReader
)
func
()
error
{
readerClose
:=
func
(
reader
*
BinlogReader
)
func
()
error
{
return
func
()
error
{
return
reader
.
Close
()
}
return
func
()
error
{
return
reader
.
Close
()
}
}
}
var
resultData
InsertData
var
blobList
BlobList
=
blobs
sort
.
Sort
(
blobList
)
var
pID
UniqueID
var
pID
UniqueID
var
sID
UniqueID
var
sID
UniqueID
resultData
:=
&
InsertData
{}
resultData
.
Data
=
make
(
map
[
FieldID
]
FieldData
)
resultData
.
Data
=
make
(
map
[
FieldID
]
FieldData
)
for
_
,
blob
:=
range
blob
s
{
for
_
,
blob
:=
range
blob
List
{
binlogReader
,
err
:=
NewBinlogReader
(
blob
.
v
alue
)
binlogReader
,
err
:=
NewBinlogReader
(
blob
.
V
alue
)
if
err
!=
nil
{
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
return
-
1
,
-
1
,
nil
,
err
}
}
...
@@ -206,150 +231,187 @@ func (insertCodec *InsertCodec) Deserialize(blobs []*Blob) (partitionID UniqueID
...
@@ -206,150 +231,187 @@ func (insertCodec *InsertCodec) Deserialize(blobs []*Blob) (partitionID UniqueID
dataType
:=
binlogReader
.
PayloadDataType
dataType
:=
binlogReader
.
PayloadDataType
fieldID
:=
binlogReader
.
FieldID
fieldID
:=
binlogReader
.
FieldID
switch
dataType
{
for
{
case
schemapb
.
DataType_BOOL
:
var
boolFieldData
BoolFieldData
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
boolFieldData
.
Data
,
err
=
eventReader
.
GetBoolFromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
boolFieldData
.
NumRows
=
len
(
boolFieldData
.
Data
)
resultData
.
Data
[
fieldID
]
=
boolFieldData
insertCodec
.
readerCloseFunc
=
append
(
insertCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
case
schemapb
.
DataType_INT8
:
var
int8FieldData
Int8FieldData
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
if
err
!=
nil
{
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
return
-
1
,
-
1
,
nil
,
err
}
}
int8FieldData
.
Data
,
err
=
eventReader
.
GetInt8FromPayload
()
if
eventReader
==
nil
{
if
err
!=
nil
{
break
return
-
1
,
-
1
,
nil
,
err
}
}
int8FieldData
.
NumRows
=
len
(
int8FieldData
.
Data
)
switch
dataType
{
resultData
.
Data
[
fieldID
]
=
int8FieldData
case
schemapb
.
DataType_BOOL
:
insertCodec
.
readerCloseFunc
=
append
(
insertCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
if
resultData
.
Data
[
fieldID
]
==
nil
{
case
schemapb
.
DataType_INT16
:
resultData
.
Data
[
fieldID
]
=
&
BoolFieldData
{}
var
int16FieldData
Int16FieldData
}
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
boolFieldData
:=
resultData
.
Data
[
fieldID
]
.
(
*
BoolFieldData
)
if
err
!=
nil
{
singleData
,
err
:=
eventReader
.
GetBoolFromPayload
()
return
-
1
,
-
1
,
nil
,
err
}
int16FieldData
.
Data
,
err
=
eventReader
.
GetInt16FromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
int16FieldData
.
NumRows
=
len
(
int16FieldData
.
Data
)
resultData
.
Data
[
fieldID
]
=
int16FieldData
insertCodec
.
readerCloseFunc
=
append
(
insertCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
case
schemapb
.
DataType_INT32
:
var
int32FieldData
Int32FieldData
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
int32FieldData
.
Data
,
err
=
eventReader
.
GetInt32FromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
int32FieldData
.
NumRows
=
len
(
int32FieldData
.
Data
)
resultData
.
Data
[
fieldID
]
=
int32FieldData
insertCodec
.
readerCloseFunc
=
append
(
insertCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
case
schemapb
.
DataType_INT64
:
var
int64FieldData
Int64FieldData
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
int64FieldData
.
Data
,
err
=
eventReader
.
GetInt64FromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
int64FieldData
.
NumRows
=
len
(
int64FieldData
.
Data
)
resultData
.
Data
[
fieldID
]
=
int64FieldData
insertCodec
.
readerCloseFunc
=
append
(
insertCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
case
schemapb
.
DataType_FLOAT
:
var
floatFieldData
FloatFieldData
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
floatFieldData
.
Data
,
err
=
eventReader
.
GetFloatFromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
floatFieldData
.
NumRows
=
len
(
floatFieldData
.
Data
)
resultData
.
Data
[
fieldID
]
=
floatFieldData
insertCodec
.
readerCloseFunc
=
append
(
insertCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
case
schemapb
.
DataType_DOUBLE
:
var
doubleFieldData
DoubleFieldData
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
doubleFieldData
.
Data
,
err
=
eventReader
.
GetDoubleFromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
doubleFieldData
.
NumRows
=
len
(
doubleFieldData
.
Data
)
resultData
.
Data
[
fieldID
]
=
doubleFieldData
insertCodec
.
readerCloseFunc
=
append
(
insertCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
case
schemapb
.
DataType_STRING
:
var
stringFieldData
StringFieldData
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
stringFieldData
.
NumRows
=
length
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
for
i
:=
0
;
i
<
length
;
i
++
{
singleString
,
err
:=
eventReader
.
GetOneStringFromPayload
(
i
)
if
err
!=
nil
{
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
return
-
1
,
-
1
,
nil
,
err
}
}
stringFieldData
.
Data
=
append
(
stringFieldData
.
Data
,
singleString
)
boolFieldData
.
Data
=
append
(
boolFieldData
.
Data
,
singleData
...
)
}
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
resultData
.
Data
[
fieldID
]
=
stringFieldData
if
err
!=
nil
{
insertCodec
.
readerCloseFunc
=
append
(
insertCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
return
-
1
,
-
1
,
nil
,
err
case
schemapb
.
DataType_VECTOR_BINARY
:
}
var
binaryVectorFieldData
BinaryVectorFieldData
boolFieldData
.
NumRows
+=
length
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
resultData
.
Data
[
fieldID
]
=
boolFieldData
if
err
!=
nil
{
case
schemapb
.
DataType_INT8
:
return
-
1
,
-
1
,
nil
,
err
if
resultData
.
Data
[
fieldID
]
==
nil
{
}
resultData
.
Data
[
fieldID
]
=
&
Int8FieldData
{}
binaryVectorFieldData
.
Data
,
binaryVectorFieldData
.
Dim
,
err
=
eventReader
.
GetBinaryVectorFromPayload
()
}
if
err
!=
nil
{
int8FieldData
:=
resultData
.
Data
[
fieldID
]
.
(
*
Int8FieldData
)
return
-
1
,
-
1
,
nil
,
err
singleData
,
err
:=
eventReader
.
GetInt8FromPayload
()
}
if
err
!=
nil
{
binaryVectorFieldData
.
NumRows
=
len
(
binaryVectorFieldData
.
Data
)
return
-
1
,
-
1
,
nil
,
err
resultData
.
Data
[
fieldID
]
=
binaryVectorFieldData
}
insertCodec
.
readerCloseFunc
=
append
(
insertCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
int8FieldData
.
Data
=
append
(
int8FieldData
.
Data
,
singleData
...
)
case
schemapb
.
DataType_VECTOR_FLOAT
:
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
var
floatVectorFieldData
FloatVectorFieldData
if
err
!=
nil
{
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
return
-
1
,
-
1
,
nil
,
err
if
err
!=
nil
{
}
return
-
1
,
-
1
,
nil
,
err
int8FieldData
.
NumRows
+=
length
}
resultData
.
Data
[
fieldID
]
=
int8FieldData
floatVectorFieldData
.
Data
,
floatVectorFieldData
.
Dim
,
err
=
eventReader
.
GetFloatVectorFromPayload
()
case
schemapb
.
DataType_INT16
:
if
err
!=
nil
{
if
resultData
.
Data
[
fieldID
]
==
nil
{
return
-
1
,
-
1
,
nil
,
err
resultData
.
Data
[
fieldID
]
=
&
Int16FieldData
{}
}
int16FieldData
:=
resultData
.
Data
[
fieldID
]
.
(
*
Int16FieldData
)
singleData
,
err
:=
eventReader
.
GetInt16FromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
int16FieldData
.
Data
=
append
(
int16FieldData
.
Data
,
singleData
...
)
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
int16FieldData
.
NumRows
+=
length
resultData
.
Data
[
fieldID
]
=
int16FieldData
case
schemapb
.
DataType_INT32
:
if
resultData
.
Data
[
fieldID
]
==
nil
{
resultData
.
Data
[
fieldID
]
=
&
Int32FieldData
{}
}
int32FieldData
:=
resultData
.
Data
[
fieldID
]
.
(
*
Int32FieldData
)
singleData
,
err
:=
eventReader
.
GetInt32FromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
int32FieldData
.
Data
=
append
(
int32FieldData
.
Data
,
singleData
...
)
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
int32FieldData
.
NumRows
+=
length
resultData
.
Data
[
fieldID
]
=
int32FieldData
case
schemapb
.
DataType_INT64
:
if
resultData
.
Data
[
fieldID
]
==
nil
{
resultData
.
Data
[
fieldID
]
=
&
Int64FieldData
{}
}
int64FieldData
:=
resultData
.
Data
[
fieldID
]
.
(
*
Int64FieldData
)
singleData
,
err
:=
eventReader
.
GetInt64FromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
int64FieldData
.
Data
=
append
(
int64FieldData
.
Data
,
singleData
...
)
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
int64FieldData
.
NumRows
+=
length
resultData
.
Data
[
fieldID
]
=
int64FieldData
case
schemapb
.
DataType_FLOAT
:
if
resultData
.
Data
[
fieldID
]
==
nil
{
resultData
.
Data
[
fieldID
]
=
&
FloatFieldData
{}
}
floatFieldData
:=
resultData
.
Data
[
fieldID
]
.
(
*
FloatFieldData
)
singleData
,
err
:=
eventReader
.
GetFloatFromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
floatFieldData
.
Data
=
append
(
floatFieldData
.
Data
,
singleData
...
)
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
floatFieldData
.
NumRows
+=
length
resultData
.
Data
[
fieldID
]
=
floatFieldData
case
schemapb
.
DataType_DOUBLE
:
if
resultData
.
Data
[
fieldID
]
==
nil
{
resultData
.
Data
[
fieldID
]
=
&
DoubleFieldData
{}
}
doubleFieldData
:=
resultData
.
Data
[
fieldID
]
.
(
*
DoubleFieldData
)
singleData
,
err
:=
eventReader
.
GetDoubleFromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
doubleFieldData
.
Data
=
append
(
doubleFieldData
.
Data
,
singleData
...
)
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
doubleFieldData
.
NumRows
+=
length
resultData
.
Data
[
fieldID
]
=
doubleFieldData
case
schemapb
.
DataType_STRING
:
if
resultData
.
Data
[
fieldID
]
==
nil
{
resultData
.
Data
[
fieldID
]
=
&
StringFieldData
{}
}
stringFieldData
:=
resultData
.
Data
[
fieldID
]
.
(
*
StringFieldData
)
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
stringFieldData
.
NumRows
+=
length
for
i
:=
0
;
i
<
length
;
i
++
{
singleString
,
err
:=
eventReader
.
GetOneStringFromPayload
(
i
)
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
stringFieldData
.
Data
=
append
(
stringFieldData
.
Data
,
singleString
)
}
resultData
.
Data
[
fieldID
]
=
stringFieldData
case
schemapb
.
DataType_VECTOR_BINARY
:
if
resultData
.
Data
[
fieldID
]
==
nil
{
resultData
.
Data
[
fieldID
]
=
&
BinaryVectorFieldData
{}
}
binaryVectorFieldData
:=
resultData
.
Data
[
fieldID
]
.
(
*
BinaryVectorFieldData
)
var
singleData
[]
byte
singleData
,
binaryVectorFieldData
.
Dim
,
err
=
eventReader
.
GetBinaryVectorFromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
binaryVectorFieldData
.
Data
=
append
(
binaryVectorFieldData
.
Data
,
singleData
...
)
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
binaryVectorFieldData
.
NumRows
+=
length
resultData
.
Data
[
fieldID
]
=
binaryVectorFieldData
case
schemapb
.
DataType_VECTOR_FLOAT
:
if
resultData
.
Data
[
fieldID
]
==
nil
{
resultData
.
Data
[
fieldID
]
=
&
FloatVectorFieldData
{}
}
floatVectorFieldData
:=
resultData
.
Data
[
fieldID
]
.
(
*
FloatVectorFieldData
)
var
singleData
[]
float32
singleData
,
floatVectorFieldData
.
Dim
,
err
=
eventReader
.
GetFloatVectorFromPayload
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
floatVectorFieldData
.
Data
=
append
(
floatVectorFieldData
.
Data
,
singleData
...
)
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
if
err
!=
nil
{
return
-
1
,
-
1
,
nil
,
err
}
floatVectorFieldData
.
NumRows
+=
length
resultData
.
Data
[
fieldID
]
=
floatVectorFieldData
default
:
return
-
1
,
-
1
,
nil
,
errors
.
Errorf
(
"undefined data type %d"
,
dataType
)
}
}
floatVectorFieldData
.
NumRows
=
len
(
floatVectorFieldData
.
Data
)
/
8
resultData
.
Data
[
fieldID
]
=
floatVectorFieldData
insertCodec
.
readerCloseFunc
=
append
(
insertCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
default
:
return
-
1
,
-
1
,
nil
,
errors
.
Errorf
(
"undefined data type %d"
,
dataType
)
}
}
insertCodec
.
readerCloseFunc
=
append
(
insertCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
}
}
return
pID
,
sID
,
&
resultData
,
nil
return
pID
,
sID
,
resultData
,
nil
}
}
func
(
insertCodec
*
InsertCodec
)
Close
()
error
{
func
(
insertCodec
*
InsertCodec
)
Close
()
error
{
...
@@ -436,8 +498,8 @@ func (dataDefinitionCodec *DataDefinitionCodec) Serialize(ts []Timestamp, ddRequ
...
@@ -436,8 +498,8 @@ func (dataDefinitionCodec *DataDefinitionCodec) Serialize(ts []Timestamp, ddRequ
return
nil
,
err
return
nil
,
err
}
}
blobs
=
append
(
blobs
,
&
Blob
{
blobs
=
append
(
blobs
,
&
Blob
{
k
ey
:
""
,
K
ey
:
""
,
v
alue
:
buffer
,
V
alue
:
buffer
,
})
})
writer
,
err
=
NewDDLBinlogWriter
(
schemapb
.
DataType_INT64
,
dataDefinitionCodec
.
Schema
.
ID
)
writer
,
err
=
NewDDLBinlogWriter
(
schemapb
.
DataType_INT64
,
dataDefinitionCodec
.
Schema
.
ID
)
...
@@ -470,8 +532,8 @@ func (dataDefinitionCodec *DataDefinitionCodec) Serialize(ts []Timestamp, ddRequ
...
@@ -470,8 +532,8 @@ func (dataDefinitionCodec *DataDefinitionCodec) Serialize(ts []Timestamp, ddRequ
return
nil
,
err
return
nil
,
err
}
}
blobs
=
append
(
blobs
,
&
Blob
{
blobs
=
append
(
blobs
,
&
Blob
{
k
ey
:
""
,
K
ey
:
""
,
v
alue
:
buffer
,
V
alue
:
buffer
,
})
})
return
blobs
,
nil
return
blobs
,
nil
...
@@ -487,37 +549,35 @@ func (dataDefinitionCodec *DataDefinitionCodec) Deserialize(blobs []*Blob) (ts [
...
@@ -487,37 +549,35 @@ func (dataDefinitionCodec *DataDefinitionCodec) Deserialize(blobs []*Blob) (ts [
}
}
var
requestsStrings
[]
string
var
requestsStrings
[]
string
var
resultTs
[]
Timestamp
var
resultTs
[]
Timestamp
for
_
,
blob
:=
range
blobs
{
binlogReader
,
err
:=
NewBinlogReader
(
blob
.
value
)
var
blobList
BlobList
=
blobs
sort
.
Sort
(
blobList
)
for
_
,
blob
:=
range
blobList
{
binlogReader
,
err
:=
NewBinlogReader
(
blob
.
Value
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
nil
,
err
return
nil
,
nil
,
err
}
}
dataType
:=
binlogReader
.
PayloadDataType
dataType
:=
binlogReader
.
PayloadDataType
switch
dataType
{
for
{
case
schemapb
.
DataType_INT64
:
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
nil
,
err
return
nil
,
nil
,
err
}
}
int64Ts
,
err
:=
eventReader
.
GetInt64FromPayload
()
if
eventReader
==
nil
{
if
err
!=
nil
{
break
return
nil
,
nil
,
err
}
for
_
,
singleTs
:=
range
int64Ts
{
resultTs
=
append
(
resultTs
,
Timestamp
(
singleTs
))
}
dataDefinitionCodec
.
readerCloseFunc
=
append
(
dataDefinitionCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
case
schemapb
.
DataType_STRING
:
binlogReader
,
err
:=
NewBinlogReader
(
blob
.
value
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
}
eventReader
,
err
:=
binlogReader
.
NextEventReader
()
switch
dataType
{
if
err
!=
nil
{
case
schemapb
.
DataType_INT64
:
return
nil
,
nil
,
err
int64Ts
,
err
:=
eventReader
.
GetInt64FromPayload
()
}
if
err
!=
nil
{
for
eventReader
!=
nil
{
return
nil
,
nil
,
err
}
for
_
,
singleTs
:=
range
int64Ts
{
resultTs
=
append
(
resultTs
,
Timestamp
(
singleTs
))
}
case
schemapb
.
DataType_STRING
:
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
length
,
err
:=
eventReader
.
GetPayloadLengthFromReader
()
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
nil
,
err
return
nil
,
nil
,
err
...
@@ -529,14 +589,10 @@ func (dataDefinitionCodec *DataDefinitionCodec) Deserialize(blobs []*Blob) (ts [
...
@@ -529,14 +589,10 @@ func (dataDefinitionCodec *DataDefinitionCodec) Deserialize(blobs []*Blob) (ts [
}
}
requestsStrings
=
append
(
requestsStrings
,
singleString
)
requestsStrings
=
append
(
requestsStrings
,
singleString
)
}
}
eventReader
,
err
=
binlogReader
.
NextEventReader
()
if
err
!=
nil
{
return
nil
,
nil
,
err
}
}
}
dataDefinitionCodec
.
readerCloseFunc
=
append
(
dataDefinitionCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
}
}
dataDefinitionCodec
.
readerCloseFunc
=
append
(
dataDefinitionCodec
.
readerCloseFunc
,
readerClose
(
binlogReader
))
}
}
return
resultTs
,
requestsStrings
,
nil
return
resultTs
,
requestsStrings
,
nil
...
...
internal/storage/data_codec_test.go
浏览文件 @
0b9cffaf
package
storage
package
storage
import
(
import
(
"fmt"
"testing"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/assert"
...
@@ -23,6 +24,13 @@ func TestInsertCodec(t *testing.T) {
...
@@ -23,6 +24,13 @@ func TestInsertCodec(t *testing.T) {
Description
:
"schema"
,
Description
:
"schema"
,
AutoID
:
true
,
AutoID
:
true
,
Fields
:
[]
*
schemapb
.
FieldSchema
{
Fields
:
[]
*
schemapb
.
FieldSchema
{
{
FieldID
:
0
,
Name
:
"row_id"
,
IsPrimaryKey
:
false
,
Description
:
"row_id"
,
DataType
:
schemapb
.
DataType_INT64
,
},
{
{
FieldID
:
1
,
FieldID
:
1
,
Name
:
"Ts"
,
Name
:
"Ts"
,
...
@@ -108,63 +116,155 @@ func TestInsertCodec(t *testing.T) {
...
@@ -108,63 +116,155 @@ func TestInsertCodec(t *testing.T) {
base
,
base
,
make
([]
func
()
error
,
0
),
make
([]
func
()
error
,
0
),
}
}
insertData
:=
&
InsertData
{
insertDataFirst
:=
&
InsertData
{
Data
:
map
[
int64
]
FieldData
{
0
:
&
Int64FieldData
{
NumRows
:
2
,
Data
:
[]
int64
{
3
,
4
},
},
1
:
&
Int64FieldData
{
NumRows
:
2
,
Data
:
[]
int64
{
3
,
4
},
},
100
:
&
BoolFieldData
{
NumRows
:
2
,
Data
:
[]
bool
{
true
,
false
},
},
101
:
&
Int8FieldData
{
NumRows
:
2
,
Data
:
[]
int8
{
3
,
4
},
},
102
:
&
Int16FieldData
{
NumRows
:
2
,
Data
:
[]
int16
{
3
,
4
},
},
103
:
&
Int32FieldData
{
NumRows
:
2
,
Data
:
[]
int32
{
3
,
4
},
},
104
:
&
Int64FieldData
{
NumRows
:
2
,
Data
:
[]
int64
{
3
,
4
},
},
105
:
&
FloatFieldData
{
NumRows
:
2
,
Data
:
[]
float32
{
3
,
4
},
},
106
:
&
DoubleFieldData
{
NumRows
:
2
,
Data
:
[]
float64
{
3
,
4
},
},
107
:
&
StringFieldData
{
NumRows
:
2
,
Data
:
[]
string
{
"3"
,
"4"
},
},
108
:
&
BinaryVectorFieldData
{
NumRows
:
2
,
Data
:
[]
byte
{
0
,
255
},
Dim
:
8
,
},
109
:
&
FloatVectorFieldData
{
NumRows
:
2
,
Data
:
[]
float32
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
},
Dim
:
8
,
},
},
}
insertDataSecond
:=
&
InsertData
{
Data
:
map
[
int64
]
FieldData
{
Data
:
map
[
int64
]
FieldData
{
1
:
Int64FieldData
{
0
:
&
Int64FieldData
{
NumRows
:
2
,
Data
:
[]
int64
{
1
,
2
},
},
1
:
&
Int64FieldData
{
NumRows
:
2
,
NumRows
:
2
,
Data
:
[]
int64
{
1
,
2
},
Data
:
[]
int64
{
1
,
2
},
},
},
100
:
BoolFieldData
{
100
:
&
BoolFieldData
{
NumRows
:
2
,
NumRows
:
2
,
Data
:
[]
bool
{
true
,
false
},
Data
:
[]
bool
{
true
,
false
},
},
},
101
:
Int8FieldData
{
101
:
&
Int8FieldData
{
NumRows
:
2
,
NumRows
:
2
,
Data
:
[]
int8
{
1
,
2
},
Data
:
[]
int8
{
1
,
2
},
},
},
102
:
Int16FieldData
{
102
:
&
Int16FieldData
{
NumRows
:
2
,
NumRows
:
2
,
Data
:
[]
int16
{
1
,
2
},
Data
:
[]
int16
{
1
,
2
},
},
},
103
:
Int32FieldData
{
103
:
&
Int32FieldData
{
NumRows
:
2
,
NumRows
:
2
,
Data
:
[]
int32
{
1
,
2
},
Data
:
[]
int32
{
1
,
2
},
},
},
104
:
Int64FieldData
{
104
:
&
Int64FieldData
{
NumRows
:
2
,
NumRows
:
2
,
Data
:
[]
int64
{
1
,
2
},
Data
:
[]
int64
{
1
,
2
},
},
},
105
:
FloatFieldData
{
105
:
&
FloatFieldData
{
NumRows
:
2
,
NumRows
:
2
,
Data
:
[]
float32
{
1
,
2
},
Data
:
[]
float32
{
1
,
2
},
},
},
106
:
DoubleFieldData
{
106
:
&
DoubleFieldData
{
NumRows
:
2
,
NumRows
:
2
,
Data
:
[]
float64
{
1
,
2
},
Data
:
[]
float64
{
1
,
2
},
},
},
107
:
StringFieldData
{
107
:
&
StringFieldData
{
NumRows
:
2
,
NumRows
:
2
,
Data
:
[]
string
{
"1"
,
"2"
},
Data
:
[]
string
{
"1"
,
"2"
},
},
},
108
:
BinaryVectorFieldData
{
108
:
&
BinaryVectorFieldData
{
NumRows
:
8
,
NumRows
:
2
,
Data
:
[]
byte
{
0
,
255
,
0
,
1
,
0
,
1
,
0
,
1
},
Data
:
[]
byte
{
0
,
255
},
Dim
:
8
,
Dim
:
8
,
},
},
109
:
FloatVectorFieldData
{
109
:
&
FloatVectorFieldData
{
NumRows
:
1
,
NumRows
:
2
,
Data
:
[]
float32
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
},
Data
:
[]
float32
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
},
Dim
:
8
,
Dim
:
8
,
},
},
},
},
}
}
blobs
,
err
:=
insertCodec
.
Serialize
(
1
,
1
,
insertData
)
firstBlobs
,
err
:=
insertCodec
.
Serialize
(
1
,
1
,
insertDataFirst
)
assert
.
Nil
(
t
,
err
)
assert
.
Nil
(
t
,
err
)
partitionID
,
segmentID
,
resultData
,
err
:=
insertCodec
.
Deserialize
(
blobs
)
for
_
,
blob
:=
range
firstBlobs
{
blob
.
Key
=
fmt
.
Sprintf
(
"1/insert_log/2/3/4/5/%d"
,
100
)
}
secondBlobs
,
err
:=
insertCodec
.
Serialize
(
1
,
1
,
insertDataSecond
)
assert
.
Nil
(
t
,
err
)
assert
.
Nil
(
t
,
err
)
assert
.
Equal
(
t
,
partitionID
,
int64
(
1
))
for
_
,
blob
:=
range
secondBlobs
{
assert
.
Equal
(
t
,
segmentID
,
int64
(
1
))
blob
.
Key
=
fmt
.
Sprintf
(
"1/insert_log/2/3/4/5/%d"
,
99
)
assert
.
Equal
(
t
,
resultData
,
insertData
)
}
resultBlobs
:=
append
(
firstBlobs
,
secondBlobs
...
)
partitionID
,
segmentID
,
resultData
,
err
:=
insertCodec
.
Deserialize
(
resultBlobs
)
assert
.
Nil
(
t
,
err
)
assert
.
Equal
(
t
,
int64
(
1
),
partitionID
)
assert
.
Equal
(
t
,
int64
(
1
),
segmentID
)
assert
.
Equal
(
t
,
4
,
resultData
.
Data
[
0
]
.
(
*
Int64FieldData
)
.
NumRows
)
assert
.
Equal
(
t
,
4
,
resultData
.
Data
[
1
]
.
(
*
Int64FieldData
)
.
NumRows
)
assert
.
Equal
(
t
,
4
,
resultData
.
Data
[
100
]
.
(
*
BoolFieldData
)
.
NumRows
)
assert
.
Equal
(
t
,
4
,
resultData
.
Data
[
101
]
.
(
*
Int8FieldData
)
.
NumRows
)
assert
.
Equal
(
t
,
4
,
resultData
.
Data
[
102
]
.
(
*
Int16FieldData
)
.
NumRows
)
assert
.
Equal
(
t
,
4
,
resultData
.
Data
[
103
]
.
(
*
Int32FieldData
)
.
NumRows
)
assert
.
Equal
(
t
,
4
,
resultData
.
Data
[
104
]
.
(
*
Int64FieldData
)
.
NumRows
)
assert
.
Equal
(
t
,
4
,
resultData
.
Data
[
105
]
.
(
*
FloatFieldData
)
.
NumRows
)
assert
.
Equal
(
t
,
4
,
resultData
.
Data
[
106
]
.
(
*
DoubleFieldData
)
.
NumRows
)
assert
.
Equal
(
t
,
4
,
resultData
.
Data
[
107
]
.
(
*
StringFieldData
)
.
NumRows
)
assert
.
Equal
(
t
,
4
,
resultData
.
Data
[
108
]
.
(
*
BinaryVectorFieldData
)
.
NumRows
)
assert
.
Equal
(
t
,
4
,
resultData
.
Data
[
109
]
.
(
*
FloatVectorFieldData
)
.
NumRows
)
assert
.
Equal
(
t
,
[]
int64
{
1
,
2
,
3
,
4
},
resultData
.
Data
[
0
]
.
(
*
Int64FieldData
)
.
Data
)
assert
.
Equal
(
t
,
[]
int64
{
1
,
2
,
3
,
4
},
resultData
.
Data
[
1
]
.
(
*
Int64FieldData
)
.
Data
)
assert
.
Equal
(
t
,
[]
bool
{
true
,
false
,
true
,
false
},
resultData
.
Data
[
100
]
.
(
*
BoolFieldData
)
.
Data
)
assert
.
Equal
(
t
,
[]
int8
{
1
,
2
,
3
,
4
},
resultData
.
Data
[
101
]
.
(
*
Int8FieldData
)
.
Data
)
assert
.
Equal
(
t
,
[]
int16
{
1
,
2
,
3
,
4
},
resultData
.
Data
[
102
]
.
(
*
Int16FieldData
)
.
Data
)
assert
.
Equal
(
t
,
[]
int32
{
1
,
2
,
3
,
4
},
resultData
.
Data
[
103
]
.
(
*
Int32FieldData
)
.
Data
)
assert
.
Equal
(
t
,
[]
int64
{
1
,
2
,
3
,
4
},
resultData
.
Data
[
104
]
.
(
*
Int64FieldData
)
.
Data
)
assert
.
Equal
(
t
,
[]
float32
{
1
,
2
,
3
,
4
},
resultData
.
Data
[
105
]
.
(
*
FloatFieldData
)
.
Data
)
assert
.
Equal
(
t
,
[]
float64
{
1
,
2
,
3
,
4
},
resultData
.
Data
[
106
]
.
(
*
DoubleFieldData
)
.
Data
)
assert
.
Equal
(
t
,
[]
string
{
"1"
,
"2"
,
"3"
,
"4"
},
resultData
.
Data
[
107
]
.
(
*
StringFieldData
)
.
Data
)
assert
.
Equal
(
t
,
[]
byte
{
0
,
255
,
0
,
255
},
resultData
.
Data
[
108
]
.
(
*
BinaryVectorFieldData
)
.
Data
)
assert
.
Equal
(
t
,
[]
float32
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
},
resultData
.
Data
[
109
]
.
(
*
FloatVectorFieldData
)
.
Data
)
assert
.
Nil
(
t
,
insertCodec
.
Close
())
assert
.
Nil
(
t
,
insertCodec
.
Close
())
}
}
func
TestDDCodec
(
t
*
testing
.
T
)
{
func
TestDDCodec
(
t
*
testing
.
T
)
{
...
@@ -240,6 +340,9 @@ func TestDDCodec(t *testing.T) {
...
@@ -240,6 +340,9 @@ func TestDDCodec(t *testing.T) {
}
}
blobs
,
err
:=
dataDefinitionCodec
.
Serialize
(
ts
,
ddRequests
,
eventTypeCodes
)
blobs
,
err
:=
dataDefinitionCodec
.
Serialize
(
ts
,
ddRequests
,
eventTypeCodes
)
assert
.
Nil
(
t
,
err
)
assert
.
Nil
(
t
,
err
)
for
_
,
blob
:=
range
blobs
{
blob
.
Key
=
fmt
.
Sprintf
(
"1/data_definition/3/4/5/%d"
,
99
)
}
resultTs
,
resultRequests
,
err
:=
dataDefinitionCodec
.
Deserialize
(
blobs
)
resultTs
,
resultRequests
,
err
:=
dataDefinitionCodec
.
Deserialize
(
blobs
)
assert
.
Nil
(
t
,
err
)
assert
.
Nil
(
t
,
err
)
assert
.
Equal
(
t
,
resultTs
,
ts
)
assert
.
Equal
(
t
,
resultTs
,
ts
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录