Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
c63c622c
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,发现更多精彩内容 >>
提交
c63c622c
编写于
10月 29, 2019
作者:
S
starlord
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update message
Former-commit-id: 568dbdc5d6dc233716682ebec33e6bd3dfe45500
上级
96dffcf8
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
15 addition
and
20 deletion
+15
-20
core/conf/server_config.template
core/conf/server_config.template
+3
-3
core/src/server/Config.cpp
core/src/server/Config.cpp
+12
-17
未找到文件。
core/conf/server_config.template
浏览文件 @
c63c622c
...
...
@@ -2,7 +2,7 @@
server_config:
address: 0.0.0.0 # milvus server ip address (IPv4)
port: 19530 #
port range: 1025 ~ 65534
port: 19530 #
milvus server port, must in range [1025, 6553]
deploy_mode: single # deployment type: single, cluster_readonly, cluster_writable
time_zone: UTC+8 # time zone, must be in format: UTC+X
...
...
@@ -24,7 +24,7 @@ metric_config:
enable_monitor: false # enable monitoring or not, must be a boolean
collector: prometheus # prometheus
prometheus_config:
port: 8080 # port prometheus uses to fetch metrics,
range: 1025 ~ 65534
port: 8080 # port prometheus uses to fetch metrics,
must in range [1025, 6553]
cache_config:
cpu_cache_capacity: 16 # GB, CPU memory used for cache, must be a positive integer
...
...
@@ -40,4 +40,4 @@ engine_config:
resource_config:
search_resources: # define the GPUs used for search computation, must be in format: gpux
- gpu0
index_build_device: gpu0 # GPU used for building index
\ No newline at end of file
index_build_device: gpu0 # GPU used for building index, must be in format: gpux
\ No newline at end of file
core/src/server/Config.cpp
浏览文件 @
c63c622c
...
...
@@ -363,8 +363,8 @@ Config::PrintAll() {
Status
Config
::
CheckServerConfigAddress
(
const
std
::
string
&
value
)
{
if
(
!
ValidationUtil
::
ValidateIpAddress
(
value
).
ok
())
{
std
::
string
msg
=
"Invalid server IP address: "
+
value
+
". Possible reason: server_config.address is invalid in server_config.yaml
."
;
std
::
string
msg
=
"Invalid server IP address: "
+
value
+
". Possible reason: server_config.address is invalid
."
;
return
Status
(
SERVER_INVALID_ARGUMENT
,
msg
);
}
return
Status
::
OK
();
...
...
@@ -373,14 +373,13 @@ Config::CheckServerConfigAddress(const std::string& value) {
Status
Config
::
CheckServerConfigPort
(
const
std
::
string
&
value
)
{
if
(
!
ValidationUtil
::
ValidateStringIsNumber
(
value
).
ok
())
{
std
::
string
msg
=
"Port "
+
value
+
" is not a number. "
+
"Possible reason: server_config.port in server_config.yaml is invalid."
;
std
::
string
msg
=
"Port "
+
value
+
" is not a number. "
+
"Possible reason: server_config.port is invalid."
;
return
Status
(
SERVER_INVALID_ARGUMENT
,
msg
);
}
else
{
int32_t
port
=
std
::
stoi
(
value
);
if
(
!
(
port
>
1024
&&
port
<
65535
))
{
std
::
string
msg
=
"Port "
+
value
+
" is not in range [1025, 65534]. "
+
"Possible reason: server_config.port i
n server_config.yaml i
s invalid."
;
"Possible reason: server_config.port is invalid."
;
return
Status
(
SERVER_INVALID_ARGUMENT
,
msg
);
}
}
...
...
@@ -391,7 +390,7 @@ Status
Config
::
CheckServerConfigDeployMode
(
const
std
::
string
&
value
)
{
if
(
value
!=
"single"
&&
value
!=
"cluster_readonly"
&&
value
!=
"cluster_writable"
)
{
return
Status
(
SERVER_INVALID_ARGUMENT
,
"Error: server_config.deploy_mode i
n server_config.yaml i
s not one of "
"Error: server_config.deploy_mode is not one of "
"single, cluster_readonly, and cluster_writable."
);
}
return
Status
::
OK
();
...
...
@@ -418,8 +417,7 @@ Config::CheckServerConfigTimeZone(const std::string& value) {
Status
Config
::
CheckDBConfigPrimaryPath
(
const
std
::
string
&
value
)
{
if
(
value
.
empty
())
{
return
Status
(
SERVER_INVALID_ARGUMENT
,
"db_path is empty. Possible reason: db_config.db_path in server_config.yaml is empty."
);
return
Status
(
SERVER_INVALID_ARGUMENT
,
"db_path is empty. Possible reason: db_config.db_path is empty."
);
}
return
Status
::
OK
();
}
...
...
@@ -433,8 +431,7 @@ Status
Config
::
CheckDBConfigBackendUrl
(
const
std
::
string
&
value
)
{
if
(
!
ValidationUtil
::
ValidateDbURI
(
value
).
ok
())
{
std
::
string
msg
=
"Invalid db_backend_url: "
+
value
+
". Possible reason: db_config.db_backend_url is invalid in server_config.yaml. "
+
"Invalid db_backend_url: "
+
value
+
". Possible reason: db_config.db_backend_url is invalid. "
+
"The correct format should be like sqlite://:@:/ or mysql://root:123456@127.0.0.1:3306/milvus."
;
return
Status
(
SERVER_INVALID_ARGUMENT
,
"invalid db_backend_url: "
+
value
);
}
...
...
@@ -445,7 +442,7 @@ Status
Config
::
CheckDBConfigArchiveDiskThreshold
(
const
std
::
string
&
value
)
{
if
(
!
ValidationUtil
::
ValidateStringIsNumber
(
value
).
ok
())
{
std
::
string
msg
=
"Invalid archive disk threshold: "
+
value
+
"Possible reason: db_config.archive_disk_threshold i
n server_config.yaml i
s invalid."
;
"Possible reason: db_config.archive_disk_threshold is invalid."
;
return
Status
(
SERVER_INVALID_ARGUMENT
,
msg
);
}
return
Status
::
OK
();
...
...
@@ -455,7 +452,7 @@ Status
Config
::
CheckDBConfigArchiveDaysThreshold
(
const
std
::
string
&
value
)
{
if
(
!
ValidationUtil
::
ValidateStringIsNumber
(
value
).
ok
())
{
std
::
string
msg
=
"Invalid archive days threshold: "
+
value
+
"Possible reason: db_config.archive_disk_threshold i
n server_config.yaml i
s invalid."
;
"Possible reason: db_config.archive_disk_threshold is invalid."
;
return
Status
(
SERVER_INVALID_ARGUMENT
,
msg
);
}
return
Status
::
OK
();
...
...
@@ -465,15 +462,13 @@ Status
Config
::
CheckDBConfigInsertBufferSize
(
const
std
::
string
&
value
)
{
if
(
!
ValidationUtil
::
ValidateStringIsNumber
(
value
).
ok
())
{
std
::
string
msg
=
"Invalid insert buffer size: "
+
value
+
"Possible reason: db_config.insert_buffer_size in server_config.yaml "
"is not a positive integer."
;
"Possible reason: db_config.insert_buffer_size is not a positive integer."
;
return
Status
(
SERVER_INVALID_ARGUMENT
,
msg
);
}
else
{
int64_t
buffer_size
=
std
::
stoi
(
value
)
*
GB
;
if
(
buffer_size
<=
0
)
{
std
::
string
msg
=
"Invalid insert buffer size: "
+
value
+
"Possible reason: db_config.insert_buffer_size in server_config.yaml "
"is not a positive integer."
;
"Possible reason: db_config.insert_buffer_size is not a positive integer."
;
return
Status
(
SERVER_INVALID_ARGUMENT
,
msg
);
}
...
...
@@ -535,7 +530,7 @@ Config::CheckCacheConfigCpuCacheCapacity(const std::string& value) {
CommonUtil
::
GetSystemMemInfo
(
total_mem
,
free_mem
);
if
(
static_cast
<
uint64_t
>
(
cpu_cache_capacity
)
>=
total_mem
)
{
std
::
string
msg
=
"Invalid cpu cache capacity: "
+
value
+
"Possible reason:
Cache config
cpu_cache_capacity exceeds system memory."
;
"Possible reason:
cache_config.
cpu_cache_capacity exceeds system memory."
;
return
Status
(
SERVER_INVALID_ARGUMENT
,
msg
);
}
else
if
(
static_cast
<
double
>
(
cpu_cache_capacity
)
>
static_cast
<
double
>
(
total_mem
*
0.9
))
{
std
::
cerr
<<
"WARNING: cpu cache capacity value is too big"
<<
std
::
endl
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录