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

MS-620 Get table row counts display wrong error code

See merge request megasearch/milvus!680

Former-commit-id: e45a1edafd3591361e132a256686e43ed8723280
pull/191/head
peng.xu 2019-10-10 11:41:26 +08:00
commit b61f982265
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,7 @@ Please mark all change in change log and use the ticket from JIRA.
- MS-599 - search wrong result when table created with metric_type: IP
- MS-601 - Docker logs error caused by get CPUTemperature error
- MS-622 - Delete vectors should be failed if date range is invalid
- MS-620 - Get table row counts display wrong error code
## Improvement
- MS-552 - Add and change the easylogging library

View File

@ -706,7 +706,11 @@ CountTableTask::OnExecute() {
uint64_t row_count = 0;
status = DBWrapper::DB()->GetTableRowCount(table_name_, row_count);
if (!status.ok()) {
return status;
if (status.code(), DB_NOT_FOUND) {
return Status(SERVER_TABLE_NOT_EXIST, "Table " + table_name_ + " not exists");
} else {
return status;
}
}
row_count_ = static_cast<int64_t>(row_count);