提交 5e037e42 编写于 作者: Z zirui.chen

MS-470 Drop index success, which table not created


Former-commit-id: 8ec6d5e60b2095d418446324530ca8e5a84ba8ba
上级 2522b042
......@@ -24,6 +24,7 @@ Please mark all change in change log and use the ticket from JIRA.
- MS-462 - Run milvus server twices, should display error
- MS-463 - Search timeout
- MS-467 - mysql db test failed
- MS-470 - Drop index success, which table not created
- MS-471 - code coverage run failed
## Improvement
......
......@@ -960,8 +960,15 @@ DropIndexTask::OnExecute() {
return SetError(res, "Invalid table name: " + table_name_);
}
//step 2: check table existence
engine::Status stat = DBWrapper::DB()->DropIndex(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_);
if (!stat.ok()) {
return SetError(DB_META_TRANSACTION_FAILED, stat.ToString());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册