skip building delay deleted index
This commit is contained in:
parent
67b1a08ed1
commit
9b1ec8ad77
@ -565,6 +565,8 @@ int ObGlobalIndexBuilder::check_and_get_index_schema(share::schema::ObSchemaGett
|
||||
} else if (OB_UNLIKELY(NULL == index_schema)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("index schema ptr is null", K(ret), K(index_table_id));
|
||||
} else if (index_schema->is_dropped_schema()) {
|
||||
// table delay delete, do not build index
|
||||
} else {
|
||||
} // no more to do
|
||||
return ret;
|
||||
|
@ -618,7 +618,7 @@ int ObRSBuildIndexTask::wait_trans_end(bool& is_end)
|
||||
LOG_WARN("fail to get schema guard", K(ret), K(fetch_tenant_id), K_(index_id));
|
||||
} else if (OB_FAIL(schema_guard.get_table_schema(index_id_, index_schema))) {
|
||||
LOG_WARN("fail to get table schema", K(ret), K(index_id_));
|
||||
} else if (OB_ISNULL(index_schema)) {
|
||||
} else if (OB_ISNULL(index_schema) || index_schema->is_dropped_schema()) {
|
||||
// index table has been dropped
|
||||
ret = OB_SUCCESS;
|
||||
is_end = true;
|
||||
@ -732,7 +732,7 @@ int ObRSBuildIndexTask::wait_build_index_end(bool& is_end)
|
||||
LOG_WARN("fail to get schema guard", K(ret), K(fetch_tenant_id), K_(index_id));
|
||||
} else if (OB_FAIL(schema_guard.get_table_schema(index_id_, index_schema))) {
|
||||
LOG_WARN("fail to get table schema", K(ret), K(index_id_));
|
||||
} else if (OB_ISNULL(index_schema)) {
|
||||
} else if (OB_ISNULL(index_schema) || index_schema->is_dropped_schema()) {
|
||||
ret = OB_SUCCESS;
|
||||
is_end = true;
|
||||
} else if (OB_FAIL(schema_guard.get_table_schema(index_schema->get_data_table_id(), table_schema))) {
|
||||
|
@ -467,7 +467,7 @@ int ObTenantDDLCheckSchemaTask::process_schedule_build_index_task()
|
||||
// do nothing
|
||||
} else if (OB_FAIL(schema_guard.get_table_schema(table_ids.at(i), index_schema))) {
|
||||
STORAGE_LOG(WARN, "fail to get table schema", K(ret));
|
||||
} else if (OB_ISNULL(index_schema)) {
|
||||
} else if (OB_ISNULL(index_schema) || index_schema->is_dropped_schema()) {
|
||||
ret = OB_SUCCESS;
|
||||
STORAGE_LOG(INFO, "table has been deleted, do not need to create index", K(ret), "table_id", table_ids.at(i));
|
||||
} else if (OB_FAIL(find_build_index_partitions(index_schema, schema_guard, partition_keys))) {
|
||||
@ -998,7 +998,7 @@ int ObBuildIndexScheduleTask::send_copy_replica_rpc()
|
||||
STORAGE_LOG(WARN, "fail to get schema guard", K(ret), K(schema_version_));
|
||||
} else if (OB_FAIL(schema_guard.get_table_schema(index_id_, index_schema))) {
|
||||
STORAGE_LOG(WARN, "fail to get table schema", K(ret), K(pkey_), K(index_id_));
|
||||
} else if (OB_ISNULL(index_schema)) {
|
||||
} else if (OB_ISNULL(index_schema) || index_schema->is_dropped_schema()) {
|
||||
ret = OB_SUCCESS;
|
||||
} else if (OB_FAIL(schema_guard.get_table_schema(index_schema->get_data_table_id(), data_table_schema))) {
|
||||
STORAGE_LOG(WARN, "fail to get table schema", K(ret));
|
||||
@ -1414,7 +1414,7 @@ int ObBuildIndexScheduleTask::process()
|
||||
STORAGE_LOG(WARN, "fail to get schema guard", K(ret), K(pkey_), K(index_id_));
|
||||
} else if (OB_FAIL(schema_guard.get_table_schema(index_id_, index_schema))) {
|
||||
STORAGE_LOG(WARN, "fail to get table schema", K(ret), K(pkey_), K(index_id_));
|
||||
} else if (OB_ISNULL(index_schema)) {
|
||||
} else if (OB_ISNULL(index_schema) || index_schema->is_dropped_schema()) {
|
||||
if (UNIQUE_INDEX_CHECKING != state_) {
|
||||
STORAGE_LOG(INFO, "index schema has been deleted, skip build it", K(pkey_), K(index_id_));
|
||||
is_end = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user