提交 5fedc4a2 编写于 作者: J jinhai

Merge branch 'branch-0.3.1' into 'branch-0.3.1'

MS-328 Check metric type on server start

See merge request megasearch/milvus!316

Former-commit-id: 135d8bcfcc4638866dfed8bdfc896b5db9e8fecf
......@@ -44,6 +44,7 @@ Please mark all change in change log and use the ticket from JIRA.
- MS-305 - Add CPU core percent metric
- MS-310 - Add milvus CPU utilization ratio and CPU/GPU temperature metrics
- MS-324 - Show error when there is not enough gpu memory to build index
- MS-328 - Check metric type on server start
## New Feature
- MS-180 - Add new mem manager
......
......@@ -74,6 +74,12 @@ DBWrapper::DBWrapper() {
}
}
std::string metric_type = engine_config.GetValue(CONFIG_METRICTYPE, "L2");
if(metric_type != "L2" && metric_type != "IP") {
std::cout << "ERROR! Illegal metric type: " << metric_type << ", available options: L2 or IP" << std::endl;
kill(0, SIGUSR1);
}
//set archive config
engine::ArchiveConf::CriteriaT criterial;
int64_t disk = db_config.GetInt64Value(CONFIG_DB_ARCHIVE_DISK, 0);
......@@ -101,6 +107,7 @@ DBWrapper::DBWrapper() {
}
}
//create db instance
std::string msg = opt.meta.path;
try {
zilliz::milvus::engine::DB::Open(opt, &db_);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册