Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
813afe79
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
813afe79
编写于
7月 15, 2019
作者:
P
peng.xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add log before bg_error
Former-commit-id: ab002bc46b2758d4061d5a25ff5f301d0f1516d0
上级
43ad4f05
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
3 addition
and
7 deletion
+3
-7
cpp/src/db/DBImpl.cpp
cpp/src/db/DBImpl.cpp
+3
-7
未找到文件。
cpp/src/db/DBImpl.cpp
浏览文件 @
813afe79
...
@@ -89,6 +89,7 @@ DBImpl::DBImpl(const Options& options)
...
@@ -89,6 +89,7 @@ DBImpl::DBImpl(const Options& options)
meta_ptr_
=
DBMetaImplFactory
::
Build
(
options
.
meta
,
options
.
mode
);
meta_ptr_
=
DBMetaImplFactory
::
Build
(
options
.
meta
,
options
.
mode
);
mem_mgr_
=
MemManagerFactory
::
Build
(
meta_ptr_
,
options_
);
mem_mgr_
=
MemManagerFactory
::
Build
(
meta_ptr_
,
options_
);
if
(
options
.
mode
!=
Options
::
MODE
::
READ_ONLY
)
{
if
(
options
.
mode
!=
Options
::
MODE
::
READ_ONLY
)
{
ENGINE_LOG_INFO
<<
"StartTimerTasks"
;
StartTimerTasks
();
StartTimerTasks
();
}
}
}
}
...
@@ -390,14 +391,11 @@ Status DBImpl::BackgroundMergeFiles(const std::string& table_id) {
...
@@ -390,14 +391,11 @@ Status DBImpl::BackgroundMergeFiles(const std::string& table_id) {
}
}
void
DBImpl
::
BackgroundCompaction
(
std
::
set
<
std
::
string
>
table_ids
)
{
void
DBImpl
::
BackgroundCompaction
(
std
::
set
<
std
::
string
>
table_ids
)
{
// static int b_count = 0;
// b_count++;
// std::cout << "BackgroundCompaction: " << b_count << std::endl;
Status
status
;
Status
status
;
for
(
auto
&
table_id
:
table_ids
)
{
for
(
auto
&
table_id
:
table_ids
)
{
status
=
BackgroundMergeFiles
(
table_id
);
status
=
BackgroundMergeFiles
(
table_id
);
if
(
!
status
.
ok
())
{
if
(
!
status
.
ok
())
{
ENGINE_LOG_ERROR
<<
"BGERROR found during merge files!"
;
bg_error_
=
status
;
bg_error_
=
status
;
return
;
return
;
}
}
...
@@ -408,7 +406,6 @@ void DBImpl::BackgroundCompaction(std::set<std::string> table_ids) {
...
@@ -408,7 +406,6 @@ void DBImpl::BackgroundCompaction(std::set<std::string> table_ids) {
int
ttl
=
1
;
int
ttl
=
1
;
if
(
options_
.
mode
==
Options
::
MODE
::
CLUSTER
)
{
if
(
options_
.
mode
==
Options
::
MODE
::
CLUSTER
)
{
ttl
=
meta
::
D_SEC
;
ttl
=
meta
::
D_SEC
;
// ENGINE_LOG_DEBUG << "Server mode is cluster. Clean up files with ttl = " << std::to_string(ttl) << "seconds.";
}
}
meta_ptr_
->
CleanUpFilesWithTTL
(
ttl
);
meta_ptr_
->
CleanUpFilesWithTTL
(
ttl
);
}
}
...
@@ -541,9 +538,9 @@ void DBImpl::BackgroundBuildIndex() {
...
@@ -541,9 +538,9 @@ void DBImpl::BackgroundBuildIndex() {
meta_ptr_
->
FilesToIndex
(
to_index_files
);
meta_ptr_
->
FilesToIndex
(
to_index_files
);
Status
status
;
Status
status
;
for
(
auto
&
file
:
to_index_files
)
{
for
(
auto
&
file
:
to_index_files
)
{
/* ENGINE_LOG_DEBUG << "Buiding index for " << file.location; */
status
=
BuildIndex
(
file
);
status
=
BuildIndex
(
file
);
if
(
!
status
.
ok
())
{
if
(
!
status
.
ok
())
{
ENGINE_LOG_ERROR
<<
"BGERROR found during build index!"
;
bg_error_
=
status
;
bg_error_
=
status
;
return
;
return
;
}
}
...
@@ -552,7 +549,6 @@ void DBImpl::BackgroundBuildIndex() {
...
@@ -552,7 +549,6 @@ void DBImpl::BackgroundBuildIndex() {
break
;
break
;
}
}
}
}
/* ENGINE_LOG_DEBUG << "All Buiding index Done"; */
}
}
Status
DBImpl
::
DropAll
()
{
Status
DBImpl
::
DropAll
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录