mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-29 23:15:28 +08:00
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
This commit is contained in:
commit
620c554a12
@ -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*
|
||||
*src/grpc*
|
||||
*milvus/include*
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user