Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
f9fb3e36
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,发现更多精彩内容 >>
提交
f9fb3e36
编写于
7月 21, 2019
作者:
S
starlord
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MS-256 - MS-256 - Add more cache config
Former-commit-id: 9c2aad6170f3d2801e7d1a94b35ff04cdfbd2118
上级
e7888afb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
7 deletion
+7
-7
cpp/src/db/scheduler/TaskDispatchStrategy.cpp
cpp/src/db/scheduler/TaskDispatchStrategy.cpp
+2
-2
cpp/src/db/scheduler/context/SearchContext.cpp
cpp/src/db/scheduler/context/SearchContext.cpp
+2
-2
cpp/src/db/scheduler/task/IndexLoadTask.cpp
cpp/src/db/scheduler/task/IndexLoadTask.cpp
+2
-2
cpp/src/db/scheduler/task/SearchTask.cpp
cpp/src/db/scheduler/task/SearchTask.cpp
+1
-1
未找到文件。
cpp/src/db/scheduler/TaskDispatchStrategy.cpp
浏览文件 @
f9fb3e36
...
@@ -32,7 +32,7 @@ public:
...
@@ -32,7 +32,7 @@ public:
IndexLoadTaskPtr
loader
=
std
::
static_pointer_cast
<
IndexLoadTask
>
(
task
);
IndexLoadTaskPtr
loader
=
std
::
static_pointer_cast
<
IndexLoadTask
>
(
task
);
if
(
index_files
.
find
(
loader
->
file_
->
id_
)
!=
index_files
.
end
()){
if
(
index_files
.
find
(
loader
->
file_
->
id_
)
!=
index_files
.
end
()){
ENGINE_LOG_
INFO
<<
"Append SearchContext to exist IndexLoaderContext"
;
ENGINE_LOG_
DEBUG
<<
"Append SearchContext to exist IndexLoaderContext"
;
index_files
.
erase
(
loader
->
file_
->
id_
);
index_files
.
erase
(
loader
->
file_
->
id_
);
loader
->
search_contexts_
.
push_back
(
context
);
loader
->
search_contexts_
.
push_back
(
context
);
}
}
...
@@ -40,7 +40,7 @@ public:
...
@@ -40,7 +40,7 @@ public:
//index_files still contains some index files, create new loader
//index_files still contains some index files, create new loader
for
(
auto
&
pair
:
index_files
)
{
for
(
auto
&
pair
:
index_files
)
{
ENGINE_LOG_
INFO
<<
"Create new IndexLoaderContext for: "
<<
pair
.
second
->
location_
;
ENGINE_LOG_
DEBUG
<<
"Create new IndexLoaderContext for: "
<<
pair
.
second
->
location_
;
IndexLoadTaskPtr
new_loader
=
std
::
make_shared
<
IndexLoadTask
>
();
IndexLoadTaskPtr
new_loader
=
std
::
make_shared
<
IndexLoadTask
>
();
new_loader
->
search_contexts_
.
push_back
(
context
);
new_loader
->
search_contexts_
.
push_back
(
context
);
new_loader
->
file_
=
pair
.
second
;
new_loader
->
file_
=
pair
.
second
;
...
...
cpp/src/db/scheduler/context/SearchContext.cpp
浏览文件 @
f9fb3e36
...
@@ -31,7 +31,7 @@ SearchContext::AddIndexFile(TableFileSchemaPtr& index_file) {
...
@@ -31,7 +31,7 @@ SearchContext::AddIndexFile(TableFileSchemaPtr& index_file) {
return
false
;
return
false
;
}
}
SERVER_LOG_
INFO
<<
"SearchContext "
<<
identity_
<<
" add index file: "
<<
index_file
->
id_
;
SERVER_LOG_
DEBUG
<<
"SearchContext "
<<
identity_
<<
" add index file: "
<<
index_file
->
id_
;
map_index_files_
[
index_file
->
id_
]
=
index_file
;
map_index_files_
[
index_file
->
id_
]
=
index_file
;
return
true
;
return
true
;
...
@@ -42,7 +42,7 @@ SearchContext::IndexSearchDone(size_t index_id) {
...
@@ -42,7 +42,7 @@ SearchContext::IndexSearchDone(size_t index_id) {
std
::
unique_lock
<
std
::
mutex
>
lock
(
mtx_
);
std
::
unique_lock
<
std
::
mutex
>
lock
(
mtx_
);
map_index_files_
.
erase
(
index_id
);
map_index_files_
.
erase
(
index_id
);
done_cond_
.
notify_all
();
done_cond_
.
notify_all
();
SERVER_LOG_
INFO
<<
"SearchContext "
<<
identity_
<<
" finish index file: "
<<
index_id
;
SERVER_LOG_
DEBUG
<<
"SearchContext "
<<
identity_
<<
" finish index file: "
<<
index_id
;
}
}
void
void
...
...
cpp/src/db/scheduler/task/IndexLoadTask.cpp
浏览文件 @
f9fb3e36
...
@@ -41,7 +41,7 @@ IndexLoadTask::IndexLoadTask()
...
@@ -41,7 +41,7 @@ IndexLoadTask::IndexLoadTask()
}
}
std
::
shared_ptr
<
IScheduleTask
>
IndexLoadTask
::
Execute
()
{
std
::
shared_ptr
<
IScheduleTask
>
IndexLoadTask
::
Execute
()
{
ENGINE_LOG_
INFO
<<
"Loading index("
<<
file_
->
id_
<<
") from location: "
<<
file_
->
location_
;
ENGINE_LOG_
DEBUG
<<
"Loading index("
<<
file_
->
id_
<<
") from location: "
<<
file_
->
location_
;
server
::
TimeRecorder
rc
(
"Load index"
);
server
::
TimeRecorder
rc
(
"Load index"
);
//step 1: load index
//step 1: load index
...
@@ -53,7 +53,7 @@ std::shared_ptr<IScheduleTask> IndexLoadTask::Execute() {
...
@@ -53,7 +53,7 @@ std::shared_ptr<IScheduleTask> IndexLoadTask::Execute() {
rc
.
Record
(
"load index file to memory"
);
rc
.
Record
(
"load index file to memory"
);
size_t
file_size
=
index_ptr
->
PhysicalSize
();
size_t
file_size
=
index_ptr
->
PhysicalSize
();
LOG
(
DEBUG
)
<<
"Index file type "
<<
file_
->
file_type_
<<
" Of Size: "
ENGINE_LOG_DEBUG
<<
"Index file type "
<<
file_
->
file_type_
<<
" Of Size: "
<<
file_size
/
(
1024
*
1024
)
<<
" M"
;
<<
file_size
/
(
1024
*
1024
)
<<
" M"
;
CollectFileMetrics
(
file_
->
file_type_
,
file_size
);
CollectFileMetrics
(
file_
->
file_type_
,
file_size
);
...
...
cpp/src/db/scheduler/task/SearchTask.cpp
浏览文件 @
f9fb3e36
...
@@ -51,7 +51,7 @@ std::shared_ptr<IScheduleTask> SearchTask::Execute() {
...
@@ -51,7 +51,7 @@ std::shared_ptr<IScheduleTask> SearchTask::Execute() {
return
nullptr
;
return
nullptr
;
}
}
SERVER_LOG_
INFO
<<
"Searching in index("
<<
index_id_
<<
") with "
SERVER_LOG_
DEBUG
<<
"Searching in index("
<<
index_id_
<<
") with "
<<
search_contexts_
.
size
()
<<
" tasks"
;
<<
search_contexts_
.
size
()
<<
" tasks"
;
server
::
TimeRecorder
rc
(
"DoSearch index("
+
std
::
to_string
(
index_id_
)
+
")"
);
server
::
TimeRecorder
rc
(
"DoSearch index("
+
std
::
to_string
(
index_id_
)
+
")"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录