MS-492 Drop index failed if index have been created with index_type: FLAT

Former-commit-id: 6451e083ad60c076e98d063662a914f09832abfc
pull/191/head
starlord 2019-09-06 14:39:26 +08:00
parent acae77d694
commit ce7de0941f
2 changed files with 3 additions and 9 deletions

View File

@ -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

View File

@ -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());
}