Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
464927ca
M
milvus
项目概览
milvus
/
milvus
8 个月 前同步成功
通知
260
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,体验更适合开发者的 AI 搜索 >>
提交
464927ca
编写于
9月 04, 2020
作者:
B
BossZou
提交者:
Wang Xiangyu
9月 04, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
solve conflicts
Signed-off-by:
N
Wang Xiangyu
<
xy.wang@zilliz.com
>
上级
c3f140ed
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
13 deletion
+29
-13
CHANGELOG.md
CHANGELOG.md
+3
-0
core/src/db/insert/MemCollection.cpp
core/src/db/insert/MemCollection.cpp
+25
-13
core/src/server/Server.cpp
core/src/server/Server.cpp
+1
-0
未找到文件。
CHANGELOG.md
浏览文件 @
464927ca
...
...
@@ -32,7 +32,10 @@ Please mark all changes in change log and use the issue from GitHub
-
\#
3406 No debug and info log generated after server started
-
\#
3407 Server get stuck if create index after entities inserted with no manual flush
-
\#
3446 ListIDInSegment get wrong result when delete more than one ids
-
\#
3448 RHNSWFlatTest failed
-
\#
3453 Fix server crashed during stability test
-
\#
3482 Server crashed during adding entities
-
\#
3490 Fix ut DBTest.DeleteEntitiesTest assert fail
## Feature
-
\#
2319 Redo metadata to support MVCC
...
...
core/src/db/insert/MemCollection.cpp
浏览文件 @
464927ca
...
...
@@ -117,11 +117,20 @@ Status
MemCollection
::
Serialize
()
{
TimeRecorder
recorder
(
"MemCollection::Serialize collection "
+
std
::
to_string
(
collection_id_
));
// apply deleted ids to exist setment files
auto
status
=
ApplyDeleteToFile
();
if
(
!
status
.
ok
())
{
LOG_ENGINE_DEBUG_
<<
"Failed to apply deleted ids to segment files"
<<
status
.
message
();
// Note: don't return here, continue serialize mem segments
// Operation ApplyDelete need retry if ss stale error found
while
(
true
)
{
auto
status
=
ApplyDeleteToFile
();
if
(
status
.
ok
())
{
ids_to_delete_
.
clear
();
break
;
}
else
if
(
status
.
code
()
==
SS_STALE_ERROR
)
{
LOG_ENGINE_ERROR_
<<
"Failed to apply deleted ids to segment files: file stale. Try again"
;
continue
;
}
else
{
LOG_ENGINE_ERROR_
<<
"Failed to apply deleted ids to segment files: "
<<
status
.
ToString
();
// Note: don't return here, continue serialize mem segments
break
;
}
}
// serialize mem to new segment files
...
...
@@ -146,6 +155,10 @@ MemCollection::Serialize() {
Status
MemCollection
::
ApplyDeleteToFile
()
{
if
(
ids_to_delete_
.
empty
())
{
return
Status
::
OK
();
}
// iterate each segment to delete entities
snapshot
::
ScopedSnapshotT
ss
;
STATUS_CHECK
(
snapshot
::
Snapshots
::
GetInstance
().
GetSnapshot
(
ss
,
collection_id_
));
...
...
@@ -153,9 +166,6 @@ MemCollection::ApplyDeleteToFile() {
snapshot
::
OperationContext
context
;
auto
segments_op
=
std
::
make_shared
<
snapshot
::
CompoundSegmentsOperation
>
(
context
,
ss
);
std
::
unordered_set
<
idx_t
>
ids_to_delete
;
ids_to_delete
.
swap
(
ids_to_delete_
);
int64_t
segment_iterated
=
0
;
auto
segment_executor
=
[
&
](
const
snapshot
::
SegmentPtr
&
segment
,
snapshot
::
SegmentIterator
*
iterator
)
->
Status
{
segment_iterated
++
;
...
...
@@ -165,11 +175,13 @@ MemCollection::ApplyDeleteToFile() {
// Step 1: Check delete_id in mem
std
::
set
<
idx_t
>
ids_to_check
;
segment
::
IdBloomFilterPtr
pre_bloom_filter
;
STATUS_CHECK
(
segment_reader
->
LoadBloomFilter
(
pre_bloom_filter
));
for
(
auto
&
id
:
ids_to_delete
)
{
if
(
pre_bloom_filter
->
Check
(
id
))
{
ids_to_check
.
insert
(
id
);
{
segment
::
IdBloomFilterPtr
pre_bloom_filter
;
STATUS_CHECK
(
segment_reader
->
LoadBloomFilter
(
pre_bloom_filter
));
for
(
auto
&
id
:
ids_to_delete_
)
{
if
(
pre_bloom_filter
->
Check
(
id
))
{
ids_to_check
.
insert
(
id
);
}
}
}
...
...
core/src/server/Server.cpp
浏览文件 @
464927ca
...
...
@@ -187,6 +187,7 @@ Server::Start() {
#else
LOG_SERVER_INFO_
<<
"CPU edition"
;
#endif
LOG_ENGINE_INFO_
<<
"Last commit id: "
<<
LAST_COMMIT_ID
;
STATUS_CHECK
(
CpuChecker
::
CheckCpuInstructionSet
());
#ifdef MILVUS_GPU_VERSION
STATUS_CHECK
(
GpuChecker
::
CheckGpuEnvironment
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录