mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Merge branch 'branch-0.4.0' into 'branch-0.4.0'
MS-470 Drop index success, which table not created See merge request megasearch/milvus!487 Former-commit-id: e74992b4089c1e93d05d4f5332e2d1b438640441
This commit is contained in:
commit
96d580ab41
@ -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
|
||||
|
||||
@ -955,8 +955,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());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user