mirror of https://github.com/milvus-io/milvus.git
MS-492 Drop index failed if index have been created with index_type: FLAT
Former-commit-id: 6451e083ad60c076e98d063662a914f09832abfcpull/191/head
parent
acae77d694
commit
ce7de0941f
|
@ -26,6 +26,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
|||
- MS-467 - mysql db test failed
|
||||
- MS-470 - Drop index success, which table not created
|
||||
- MS-471 - code coverage run failed
|
||||
- MS-492 - Drop index failed if index have been created with index_type: FLAT
|
||||
|
||||
## Improvement
|
||||
- MS-327 - Clean code for milvus
|
||||
|
|
|
@ -955,15 +955,8 @@ DropIndexTask::OnExecute() {
|
|||
return SetError(res, "Invalid table name: " + table_name_);
|
||||
}
|
||||
|
||||
//step 2:check index existence
|
||||
engine::TableIndex index;
|
||||
engine::Status stat = DBWrapper::DB()->DescribeIndex(table_name_, index);
|
||||
if (index.engine_type_ == 1) {
|
||||
return SetError(SERVER_UNEXPECTED_ERROR, "index not existed");
|
||||
}
|
||||
|
||||
//step 3: check table existence
|
||||
stat = DBWrapper::DB()->DropIndex(table_name_);
|
||||
//step 2: check table existence
|
||||
auto stat = DBWrapper::DB()->DropIndex(table_name_);
|
||||
if (!stat.ok()) {
|
||||
return SetError(DB_META_TRANSACTION_FAILED, stat.ToString());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue