Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
f25def79
M
milvus
项目概览
milvus
/
milvus
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
未验证
提交
f25def79
编写于
11月 03, 2021
作者:
C
Cai Yudong
提交者:
GitHub
11月 03, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add debug logs for search results handling (#11186)
Signed-off-by:
N
yudong.cai
<
yudong.cai@zilliz.com
>
上级
1e17ddfb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
2 deletion
+8
-2
internal/core/src/segcore/reduce_c.cpp
internal/core/src/segcore/reduce_c.cpp
+5
-0
internal/core/src/segcore/segment_c.cpp
internal/core/src/segcore/segment_c.cpp
+3
-2
未找到文件。
internal/core/src/segcore/reduce_c.cpp
浏览文件 @
f25def79
...
...
@@ -152,6 +152,8 @@ ReduceSearchResultsAndFillData(CSearchPlan c_plan, CSearchResult* c_search_resul
std
::
vector
<
SearchResult
*>
search_results
;
for
(
int
i
=
0
;
i
<
num_segments
;
++
i
)
{
search_results
.
push_back
((
SearchResult
*
)
c_search_results
[
i
]);
LOG_SEGCORE_DEBUG_
<<
"No."
<<
i
<<
": search result addr "
<<
c_search_results
[
i
]
<<
", segment addr "
<<
search_results
[
i
]
->
segment_
;
}
auto
topk
=
search_results
[
0
]
->
topk_
;
auto
num_queries
=
search_results
[
0
]
->
num_queries_
;
...
...
@@ -162,15 +164,18 @@ ReduceSearchResultsAndFillData(CSearchPlan c_plan, CSearchResult* c_search_resul
auto
segment
=
(
milvus
::
segcore
::
SegmentInterface
*
)(
search_result
->
segment_
);
segment
->
FillPrimaryKeys
(
plan
,
*
search_result
);
}
LOG_SEGCORE_DEBUG_
<<
"Fill primary key done"
;
GetResultData
(
search_records
,
search_results
,
num_queries
,
topk
);
ResetSearchResult
(
search_records
,
search_results
);
LOG_SEGCORE_DEBUG_
<<
"Search result reduce done"
;
// fill in other entities
for
(
auto
&
search_result
:
search_results
)
{
auto
segment
=
(
milvus
::
segcore
::
SegmentInterface
*
)(
search_result
->
segment_
);
segment
->
FillTargetEntry
(
plan
,
*
search_result
);
}
LOG_SEGCORE_DEBUG_
<<
"Fill target entry done"
;
auto
status
=
CStatus
();
status
.
error_code
=
Success
;
...
...
internal/core/src/segcore/segment_c.cpp
浏览文件 @
f25def79
...
...
@@ -12,6 +12,7 @@
#include <cstring>
#include <cstdint>
#include "log/Log.h"
#include "segcore/SegmentGrowing.h"
#include "segcore/SegmentSealed.h"
#include "segcore/Collection.h"
...
...
@@ -52,14 +53,14 @@ NewSegment(CCollection collection, uint64_t segment_id, SegmentType seg_type) {
void
DeleteSegment
(
CSegmentInterface
c_segment
)
{
// TODO: use dynamic cast, and return c status
LOG_SEGCORE_DEBUG_
<<
"delete segment "
<<
c_segment
;
auto
s
=
(
milvus
::
segcore
::
SegmentInterface
*
)
c_segment
;
// std::cout << "delete segment " << std::endl;
delete
s
;
}
void
DeleteSearchResult
(
CSearchResult
search_result
)
{
LOG_SEGCORE_DEBUG_
<<
"delete search result "
<<
search_result
;
auto
res
=
(
milvus
::
SearchResult
*
)
search_result
;
delete
res
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录