Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
29b21b4b
M
milvus
项目概览
milvus
/
milvus
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
29b21b4b
编写于
12月 31, 2020
作者:
X
xige-16
提交者:
yefu.chen
12月 31, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refactor reduce strategy in query node
Signed-off-by:
N
xige-16
<
xi.ge@zilliz.com
>
上级
4808b462
变更
6
展开全部
显示空白变更内容
内联
并排
Showing
6 changed file
with
461 addition
and
59 deletion
+461
-59
internal/core/src/segcore/segment_c.cpp
internal/core/src/segcore/segment_c.cpp
+2
-2
internal/core/unittest/test_c_api.cpp
internal/core/unittest/test_c_api.cpp
+458
-3
internal/master/flush_scheduler.go
internal/master/flush_scheduler.go
+0
-12
internal/master/meta_table.go
internal/master/meta_table.go
+0
-22
internal/master/persistence_scheduler_test.go
internal/master/persistence_scheduler_test.go
+1
-3
internal/querynode/load_index_service_test.go
internal/querynode/load_index_service_test.go
+0
-17
未找到文件。
internal/core/src/segcore/segment_c.cpp
浏览文件 @
29b21b4b
...
...
@@ -181,15 +181,15 @@ FillTargetEntry(CSegmentBase c_segment, CPlan c_plan, CQueryResult c_result) {
CStatus
UpdateSegmentIndex
(
CSegmentBase
c_segment
,
CLoadIndexInfo
c_load_index_info
)
{
auto
status
=
CStatus
();
try
{
auto
segment
=
(
milvus
::
segcore
::
SegmentBase
*
)
c_segment
;
auto
load_index_info
=
(
LoadIndexInfo
*
)
c_load_index_info
;
auto
status
=
CStatus
(
);
auto
res
=
segment
->
LoadIndexing
(
*
load_index_info
);
status
.
error_code
=
Success
;
status
.
error_msg
=
""
;
return
status
;
}
catch
(
std
::
exception
&
e
)
{
auto
status
=
CStatus
();
status
.
error_code
=
UnexpectedException
;
status
.
error_msg
=
strdup
(
e
.
what
());
return
status
;
...
...
internal/core/unittest/test_c_api.cpp
浏览文件 @
29b21b4b
此差异已折叠。
点击以展开。
internal/master/flush_scheduler.go
浏览文件 @
29b21b4b
...
...
@@ -68,18 +68,6 @@ func (scheduler *FlushScheduler) describe() error {
return
err
}
for
fieldID
,
data
:=
range
mapData
{
// check field indexable
segMeta
,
err
:=
scheduler
.
metaTable
.
GetSegmentByID
(
singleSegmentID
)
if
err
!=
nil
{
return
err
}
indexable
,
err
:=
scheduler
.
metaTable
.
IsIndexable
(
segMeta
.
CollectionID
,
fieldID
)
if
err
!=
nil
{
return
err
}
if
!
indexable
{
continue
}
info
:=
&
IndexBuildInfo
{
segmentID
:
singleSegmentID
,
fieldID
:
fieldID
,
...
...
internal/master/meta_table.go
浏览文件 @
29b21b4b
...
...
@@ -5,8 +5,6 @@ import (
"strconv"
"sync"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
...
...
@@ -680,23 +678,3 @@ func (mt *metaTable) UpdateFieldIndexParams(collName string, fieldName string, i
return
fmt
.
Errorf
(
"can not find field with id %s"
,
fieldName
)
}
func
(
mt
*
metaTable
)
IsIndexable
(
collID
UniqueID
,
fieldID
UniqueID
)
(
bool
,
error
)
{
mt
.
ddLock
.
RLock
()
defer
mt
.
ddLock
.
RUnlock
()
if
_
,
ok
:=
mt
.
collID2Meta
[
collID
];
!
ok
{
return
false
,
fmt
.
Errorf
(
"can not find collection with id %d"
,
collID
)
}
for
_
,
v
:=
range
mt
.
collID2Meta
[
collID
]
.
Schema
.
Fields
{
// field is vector type and index params is not empty
if
v
.
FieldID
==
fieldID
&&
(
v
.
DataType
==
schemapb
.
DataType_VECTOR_BINARY
||
v
.
DataType
==
schemapb
.
DataType_VECTOR_FLOAT
)
&&
len
(
v
.
IndexParams
)
!=
0
{
return
true
,
nil
}
}
// fieldID is not in schema(eg: timestamp) or not indexable
return
false
,
nil
}
internal/master/persistence_scheduler_test.go
浏览文件 @
29b21b4b
...
...
@@ -5,8 +5,6 @@ import (
"testing"
"time"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
...
...
@@ -45,7 +43,7 @@ func TestPersistenceScheduler(t *testing.T) {
Name
:
"testcoll"
,
Fields
:
[]
*
schemapb
.
FieldSchema
{
{
FieldID
:
1
},
{
FieldID
:
100
,
DataType
:
schemapb
.
DataType_VECTOR_FLOAT
,
IndexParams
:
[]
*
commonpb
.
KeyValuePair
{{
Key
:
"k"
,
Value
:
"v"
}}
},
{
FieldID
:
100
},
},
},
})
...
...
internal/querynode/load_index_service_test.go
浏览文件 @
29b21b4b
...
...
@@ -16,23 +16,6 @@ import (
"github.com/zilliztech/milvus-distributed/internal/querynode/client"
)
//func TestLoadIndexClient_LoadIndex(t *testing.T) {
// pulsarURL := Params.PulsarAddress
// loadIndexChannels := Params.LoadIndexChannelNames
// loadIndexClient := client.NewLoadIndexClient(context.Background(), pulsarURL, loadIndexChannels)
//
// loadIndexPath := "collection0-segment0-field0"
// loadIndexPaths := make([]string, 0)
// loadIndexPaths = append(loadIndexPaths, loadIndexPath)
//
// indexParams := make(map[string]string)
// indexParams["index_type"] = "IVF_PQ"
// indexParams["index_mode"] = "cpu"
//
// loadIndexClient.LoadIndex(loadIndexPaths, 0, 0, "field0", indexParams)
// loadIndexClient.Close()
//}
func
TestLoadIndexService
(
t
*
testing
.
T
)
{
node
:=
newQueryNode
()
collectionID
:=
rand
.
Int63n
(
1000000
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录