diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index 74b6703a2822e523abd06844d4dd56aba40abc09..06511ae01b945e3c8ff48b6f0579e7a121cd4ea9 100644 --- a/cpp/CHANGELOG.md +++ b/cpp/CHANGELOG.md @@ -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 - MS-493 - Knowhere unittest crash ## Improvement diff --git a/cpp/src/server/grpc_impl/GrpcRequestTask.cpp b/cpp/src/server/grpc_impl/GrpcRequestTask.cpp index e0529c1999b080056d6bf29c4de87ccee12246b2..4bbc15f87357d61820f8f038b1240c5d9a6d21c2 100644 --- a/cpp/src/server/grpc_impl/GrpcRequestTask.cpp +++ b/cpp/src/server/grpc_impl/GrpcRequestTask.cpp @@ -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()); }