Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
aaf7f487
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,发现更多精彩内容 >>
未验证
提交
aaf7f487
编写于
3月 09, 2020
作者:
J
Jin Hai
提交者:
GitHub
3月 09, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1566 from BossZou/config-bug
Wal Config setting bug (#1549)
上级
037e4054
da469d1b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
14 addition
and
16 deletion
+14
-16
CHANGELOG.md
CHANGELOG.md
+1
-0
core/src/server/Config.cpp
core/src/server/Config.cpp
+6
-11
core/src/server/web_impl/controller/WebController.hpp
core/src/server/web_impl/controller/WebController.hpp
+4
-4
core/src/server/web_impl/handler/WebRequestHandler.cpp
core/src/server/web_impl/handler/WebRequestHandler.cpp
+2
-0
core/unittest/server/test_web.cpp
core/unittest/server/test_web.cpp
+1
-1
未找到文件。
CHANGELOG.md
浏览文件 @
aaf7f487
...
...
@@ -43,6 +43,7 @@ Please mark all change in change log and use the issue from GitHub
-
\#
1530 Set table file with correct engine type in meta
-
\#
1532 Search with ivf_flat failed with open-dataset: sift-256-hamming
-
\#
1535 Degradation searching performance with metric_type: binary_idmap
-
\#
1549 Fix server/wal config setting bug
-
\#
1556 Index file not created after table and index created
-
\#
1560 Search crashed with Super-high dimensional binary vector
...
...
core/src/server/Config.cpp
浏览文件 @
aaf7f487
...
...
@@ -1529,8 +1529,7 @@ Status
Config
::
GetStorageConfigS3Enable
(
bool
&
value
)
{
std
::
string
str
=
GetConfigStr
(
CONFIG_STORAGE
,
CONFIG_STORAGE_S3_ENABLE
,
CONFIG_STORAGE_S3_ENABLE_DEFAULT
);
CONFIG_CHECK
(
CheckStorageConfigS3Enable
(
str
));
std
::
transform
(
str
.
begin
(),
str
.
end
(),
str
.
begin
(),
::
tolower
);
value
=
(
str
==
"true"
||
str
==
"on"
||
str
==
"yes"
||
str
==
"1"
);
CONFIG_CHECK
(
StringHelpFunctions
::
ConvertToBoolean
(
str
,
value
));
return
Status
::
OK
();
}
...
...
@@ -1569,8 +1568,7 @@ Status
Config
::
GetMetricConfigEnableMonitor
(
bool
&
value
)
{
std
::
string
str
=
GetConfigStr
(
CONFIG_METRIC
,
CONFIG_METRIC_ENABLE_MONITOR
,
CONFIG_METRIC_ENABLE_MONITOR_DEFAULT
);
CONFIG_CHECK
(
CheckMetricConfigEnableMonitor
(
str
));
std
::
transform
(
str
.
begin
(),
str
.
end
(),
str
.
begin
(),
::
tolower
);
value
=
(
str
==
"true"
||
str
==
"on"
||
str
==
"yes"
||
str
==
"1"
);
CONFIG_CHECK
(
StringHelpFunctions
::
ConvertToBoolean
(
str
,
value
));
return
Status
::
OK
();
}
...
...
@@ -1671,8 +1669,7 @@ Status
Config
::
GetGpuResourceConfigEnable
(
bool
&
value
)
{
std
::
string
str
=
GetConfigStr
(
CONFIG_GPU_RESOURCE
,
CONFIG_GPU_RESOURCE_ENABLE
,
CONFIG_GPU_RESOURCE_ENABLE_DEFAULT
);
CONFIG_CHECK
(
CheckGpuResourceConfigEnable
(
str
));
std
::
transform
(
str
.
begin
(),
str
.
end
(),
str
.
begin
(),
::
tolower
);
value
=
(
str
==
"true"
||
str
==
"on"
||
str
==
"yes"
||
str
==
"1"
);
CONFIG_CHECK
(
StringHelpFunctions
::
ConvertToBoolean
(
str
,
value
));
return
Status
::
OK
();
}
...
...
@@ -1774,8 +1771,7 @@ Status
Config
::
GetWalConfigEnable
(
bool
&
wal_enable
)
{
std
::
string
str
=
GetConfigStr
(
CONFIG_WAL
,
CONFIG_WAL_ENABLE
,
CONFIG_WAL_ENABLE_DEFAULT
);
CONFIG_CHECK
(
CheckWalConfigEnable
(
str
));
std
::
transform
(
str
.
begin
(),
str
.
end
(),
str
.
begin
(),
::
tolower
);
wal_enable
=
(
str
==
"true"
||
str
==
"on"
||
str
==
"yes"
||
str
==
"1"
);
CONFIG_CHECK
(
StringHelpFunctions
::
ConvertToBoolean
(
str
,
wal_enable
));
return
Status
::
OK
();
}
...
...
@@ -1784,8 +1780,7 @@ Config::GetWalConfigRecoveryErrorIgnore(bool& recovery_error_ignore) {
std
::
string
str
=
GetConfigStr
(
CONFIG_WAL
,
CONFIG_WAL_RECOVERY_ERROR_IGNORE
,
CONFIG_WAL_RECOVERY_ERROR_IGNORE_DEFAULT
);
CONFIG_CHECK
(
CheckWalConfigRecoveryErrorIgnore
(
str
));
std
::
transform
(
str
.
begin
(),
str
.
end
(),
str
.
begin
(),
::
tolower
);
recovery_error_ignore
=
(
str
==
"true"
||
str
==
"on"
||
str
==
"yes"
||
str
==
"1"
);
CONFIG_CHECK
(
StringHelpFunctions
::
ConvertToBoolean
(
str
,
recovery_error_ignore
));
return
Status
::
OK
();
}
...
...
@@ -2013,7 +2008,7 @@ Config::SetWalConfigEnable(const std::string& value) {
Status
Config
::
SetWalConfigRecoveryErrorIgnore
(
const
std
::
string
&
value
)
{
CONFIG_CHECK
(
CheckWalConfigRecoveryErrorIgnore
(
value
));
return
SetConfigValueInMem
(
CONFIG_WAL
,
CONFIG_WAL_RECOVERY_ERROR_IGNORE
_DEFAULT
,
value
);
return
SetConfigValueInMem
(
CONFIG_WAL
,
CONFIG_WAL_RECOVERY_ERROR_IGNORE
,
value
);
}
Status
...
...
core/src/server/web_impl/controller/WebController.hpp
浏览文件 @
aaf7f487
...
...
@@ -336,7 +336,7 @@ class WebController : public oatpp::web::server::api::ApiController {
ADD_CORS
(
CreateIndex
)
ENDPOINT
(
"POST"
,
"/
table
s/{collection_name}/indexes"
,
CreateIndex
,
ENDPOINT
(
"POST"
,
"/
collection
s/{collection_name}/indexes"
,
CreateIndex
,
PATH
(
String
,
collection_name
),
BODY_STRING
(
String
,
body
))
{
TimeRecorder
tr
(
std
::
string
(
WEB_LOG_PREFIX
)
+
"POST
\'
/tables/"
+
collection_name
->
std_str
()
+
"/indexes
\'
"
);
tr
.
RecordSection
(
"Received request."
);
...
...
@@ -674,15 +674,15 @@ class WebController : public oatpp::web::server::api::ApiController {
ADD_CORS
(
SystemOp
)
ENDPOINT
(
"PUT"
,
"/system/{
Op}"
,
SystemOp
,
PATH
(
String
,
O
p
),
BODY_STRING
(
String
,
body_str
))
{
TimeRecorder
tr
(
std
::
string
(
WEB_LOG_PREFIX
)
+
"PUT
\'
/system/"
+
O
p
->
std_str
()
+
"
\'
"
);
ENDPOINT
(
"PUT"
,
"/system/{
op}"
,
SystemOp
,
PATH
(
String
,
o
p
),
BODY_STRING
(
String
,
body_str
))
{
TimeRecorder
tr
(
std
::
string
(
WEB_LOG_PREFIX
)
+
"PUT
\'
/system/"
+
o
p
->
std_str
()
+
"
\'
"
);
tr
.
RecordSection
(
"Received request."
);
WebRequestHandler
handler
=
WebRequestHandler
();
handler
.
RegisterRequestHandler
(
::
milvus
::
server
::
RequestHandler
());
String
response_str
;
auto
status_dto
=
handler
.
SystemOp
(
O
p
,
body_str
,
response_str
);
auto
status_dto
=
handler
.
SystemOp
(
o
p
,
body_str
,
response_str
);
std
::
shared_ptr
<
OutgoingResponse
>
response
;
switch
(
status_dto
->
code
->
getValue
())
{
...
...
core/src/server/web_impl/handler/WebRequestHandler.cpp
浏览文件 @
aaf7f487
...
...
@@ -1046,7 +1046,9 @@ WebRequestHandler::CreateIndex(const OString& table_name, const OString& body) {
auto
status
=
request_handler_
.
CreateIndex
(
context_ptr_
,
table_name
->
std_str
(),
index
,
request_json
[
"params"
]);
ASSIGN_RETURN_STATUS_DTO
(
status
);
}
catch
(
nlohmann
::
detail
::
parse_error
&
e
)
{
RETURN_STATUS_DTO
(
BODY_PARSE_FAIL
,
e
.
what
())
}
catch
(
nlohmann
::
detail
::
type_error
&
e
)
{
RETURN_STATUS_DTO
(
BODY_PARSE_FAIL
,
e
.
what
())
}
ASSIGN_RETURN_STATUS_DTO
(
Status
::
OK
())
...
...
core/unittest/server/test_web.cpp
浏览文件 @
aaf7f487
...
...
@@ -646,7 +646,7 @@ class TestClient : public oatpp::web::client::ApiClient {
API_CALL
(
"OPTIONS"
,
"/collections/{collection_name}/indexes"
,
optionsIndexes
,
PATH
(
String
,
collection_name
,
"collection_name"
))
API_CALL
(
"POST"
,
"/
tables/{table_name}/indexes"
,
createIndex
,
PATH
(
String
,
table_name
,
"table
_name"
),
API_CALL
(
"POST"
,
"/
collections/{collection_name}/indexes"
,
createIndex
,
PATH
(
String
,
collection_name
,
"collection
_name"
),
BODY_STRING
(
OString
,
body
))
API_CALL
(
"GET"
,
"/collections/{collection_name}/indexes"
,
getIndex
,
PATH
(
String
,
collection_name
,
"collection_name"
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录