fix failed index errorly release snapshot

This commit is contained in:
YoungYang0820
2021-11-15 12:03:41 +08:00
committed by LINxiansheng
parent b68eff8a02
commit 942e2c6644
2 changed files with 3 additions and 6 deletions

View File

@ -540,6 +540,7 @@ int ObRSBuildIndexTask::process()
if (OB_FAIL(report_index_status(index_status))) {
LOG_WARN("fail to report index status", K(ret));
need_retry_ = true;
need_release_snapshot = false;
}
}
if (need_release_snapshot) {

View File

@ -235,12 +235,8 @@ int ObCreateIndexExecutor::sync_check_index_status(sql::ObSQLSessionInfo& my_ses
LOG_WARN("fail to get index table schema", KR(ret), K(refreshed_schema_version), K(index_table_id));
} else if (OB_ISNULL(index_schema)) {
// maybe ddl(drop index,drop table,truncate table) in another session has dropped this index.
if (!is_update_global_indexes) {
ret = OB_ERR_ADD_INDEX;
LOG_USER_ERROR(OB_ERR_ADD_INDEX);
} else {
ret = OB_ERR_UNEXPECTED;
}
ret = OB_ERR_ADD_INDEX;
LOG_USER_ERROR(OB_ERR_ADD_INDEX);
LOG_WARN("index table schema is null",
KR(ret),
K(index_table_id),