提交 620c554a 编写于 作者: P peng.xu

Merge branch 'branch-0.5.0' into 'branch-0.5.0'

Branch 0.5.0

See merge request megasearch/milvus!679

Former-commit-id: 2666d839cd4e4eb1f68b18f6ca1c614612a28b91
......@@ -121,9 +121,15 @@ $ sudo apt-get install clang-tidy clang-format
$ rm cmake_build/CMakeCache.txt
```
Check code style
```shell
$ ./build.sh -l
```
To format the code
```shell
$ cd cmake_build
$ make clang-format
```
##### Run unit test
......
......@@ -5,4 +5,5 @@
*thirdparty*
*easylogging++*
*SqliteMetaImpl.cpp
*src/grpc*
\ No newline at end of file
*src/grpc*
*milvus/include*
\ No newline at end of file
......@@ -99,7 +99,7 @@ ValidationUtil::ValidateTableIndexType(int32_t index_type) {
Status
ValidationUtil::ValidateTableIndexNlist(int32_t nlist) {
if (nlist <= 0) {
std::string msg = "Invalid nlist value: " + std::to_string(nlist);
std::string msg = "nlist value should be greater than 0";
SERVER_LOG_ERROR << msg;
return Status(SERVER_INVALID_INDEX_NLIST, msg);
}
......@@ -132,7 +132,7 @@ ValidationUtil::ValidateTableIndexMetricType(int32_t metric_type) {
Status
ValidationUtil::ValidateSearchTopk(int64_t top_k, const engine::meta::TableSchema& table_schema) {
if (top_k <= 0 || top_k > 2048) {
std::string msg = "Invalid top k value: " + std::to_string(top_k);
std::string msg = "Invalid top k value: " + std::to_string(top_k) + ", rational range [1, 2048]";
SERVER_LOG_ERROR << msg;
return Status(SERVER_INVALID_TOPK, msg);
}
......@@ -143,7 +143,8 @@ ValidationUtil::ValidateSearchTopk(int64_t top_k, const engine::meta::TableSchem
Status
ValidationUtil::ValidateSearchNprobe(int64_t nprobe, const engine::meta::TableSchema& table_schema) {
if (nprobe <= 0 || nprobe > table_schema.nlist_) {
std::string msg = "Invalid nprobe value: " + std::to_string(nprobe);
std::string msg = "Invalid nprobe value: " + std::to_string(nprobe) + ", rational range [1, " +
std::to_string(table_schema.nlist_) + "]";
SERVER_LOG_ERROR << msg;
return Status(SERVER_INVALID_NPROBE, msg);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册