Verify that creating fts indexe with rs crash, and fts and other index parallel.
This commit is contained in:
parent
fefdcc2c54
commit
7f7e493ef3
@ -290,6 +290,7 @@ int ObDropFTSIndexTask::prepare(const share::ObDDLTaskStatus &new_status)
|
||||
int ret = OB_SUCCESS;
|
||||
bool has_finished = false;
|
||||
ObSchemaGetterGuard schema_guard;
|
||||
DEBUG_SYNC(DROP_FTS_INDEX_PREPARE_STATUS);
|
||||
if (OB_UNLIKELY(!is_inited_)) {
|
||||
ret = OB_NOT_INIT;
|
||||
LOG_WARN("ObDropFTSIndexTask has not been inited", K(ret));
|
||||
|
@ -506,7 +506,7 @@ int ObFtsIndexBuildTask::prepare()
|
||||
} else {
|
||||
state_finished = true;
|
||||
}
|
||||
|
||||
DEBUG_SYNC(BUILD_FTS_INDEX_PREPARE_STATUS);
|
||||
if (state_finished || OB_FAIL(ret)) {
|
||||
ObDDLTaskStatus next_status = static_cast<ObDDLTaskStatus>(task_status_);
|
||||
ObDDLTaskStatus old_status = static_cast<ObDDLTaskStatus>(task_status_);
|
||||
@ -604,6 +604,7 @@ int ObFtsIndexBuildTask::prepare_rowkey_doc_table()
|
||||
int ret = OB_SUCCESS;
|
||||
bool state_finished = false;
|
||||
const ObIndexType index_type = ObIndexType::INDEX_TYPE_ROWKEY_DOC_ID_LOCAL;
|
||||
DEBUG_SYNC(CREATE_TFS_INDEX_ROWKEY_DOC_STATUS);
|
||||
if (OB_UNLIKELY(!is_inited_)) {
|
||||
ret = OB_NOT_INIT;
|
||||
LOG_WARN("not init", K(ret));
|
||||
@ -663,6 +664,7 @@ int ObFtsIndexBuildTask::prepare_aux_index_tables()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
DEBUG_SYNC(BEFOR_PREPARE_CREATE_TFS_INDEX_DOC_ROWKEY);
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (OB_FAIL(prepare_aux_table(doc_rowkey_type,
|
||||
doc_rowkey_task_submitted_,
|
||||
@ -679,6 +681,7 @@ int ObFtsIndexBuildTask::prepare_aux_index_tables()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
DEBUG_SYNC(BEFOR_PREPARE_CREATE_TFS_INDEX_WORD_DOC);
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (OB_FAIL(prepare_aux_table(domain_index_aux_type,
|
||||
domain_index_aux_task_submitted_,
|
||||
@ -697,6 +700,7 @@ int ObFtsIndexBuildTask::prepare_aux_index_tables()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
DEBUG_SYNC(BEFOR_PREPARE_CREATE_TFS_INDEX_DOC_WORD);
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (OB_FAIL(prepare_aux_table(fts_doc_word_type,
|
||||
fts_doc_word_task_submitted_,
|
||||
|
@ -6976,7 +6976,7 @@ int ObDDLService::alter_table_index(obrpc::ObAlterTableArg &alter_table_arg,
|
||||
if (index_arg->index_action_type_ == ObIndexArg::ADD_INDEX) {
|
||||
ObCreateIndexArg *create_index_arg = static_cast<ObCreateIndexArg *>(index_arg);
|
||||
uint64_t tenant_data_version = 0;
|
||||
const bool is_check_fts_index_conflict = !create_index_arg->is_inner_ && share::schema::is_fts_index(create_index_arg->index_type_);
|
||||
const bool is_check_fts_index_conflict = !create_index_arg->is_inner_ && share::schema::is_fts_or_multivalue_index(create_index_arg->index_type_);
|
||||
if (is_check_fts_index_conflict && OB_FAIL(check_fts_index_conflict(origin_table_schema.get_tenant_id(), origin_table_schema.get_table_id()))) {
|
||||
if (OB_EAGAIN != ret) {
|
||||
LOG_WARN("failed to check fts index ", K(ret));
|
||||
@ -43575,7 +43575,11 @@ int ObDDLService::check_fts_index_conflict(const uint64_t tenant_id, const uint6
|
||||
} else {
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < task_records.count(); ++i) {
|
||||
const ObDDLTaskRecord &cur_record = task_records.at(i);
|
||||
if (cur_record.ddl_type_ == ObDDLType::DDL_CREATE_FTS_INDEX || cur_record.ddl_type_ == ObDDLType::DDL_DROP_FTS_INDEX) {
|
||||
if (cur_record.ddl_type_ == ObDDLType::DDL_CREATE_FTS_INDEX
|
||||
|| cur_record.ddl_type_ == ObDDLType::DDL_DROP_FTS_INDEX
|
||||
|| cur_record.ddl_type_ == ObDDLType::DDL_CREATE_MULTIVALUE_INDEX
|
||||
|| cur_record.ddl_type_ == ObDDLType::DDL_DROP_MULVALUE_INDEX) {
|
||||
LOG_INFO("cur_record.ddl_type is: ", K(cur_record.ddl_type_));
|
||||
ret = OB_EAGAIN;
|
||||
LOG_WARN("fts index is building, will retry later", K(ret), K(table_id), K(cur_record));
|
||||
}
|
||||
@ -43643,7 +43647,7 @@ int ObDDLService::drop_index_to_scheduler_(ObMySQLTransaction &trans,
|
||||
} else {
|
||||
const bool is_fts_or_multivalue_or_vec_index = (index_table_schema->is_fts_or_multivalue_index() || index_table_schema->is_vec_index());
|
||||
const bool is_inner_and_domain_index = drop_index_arg->is_inner_ && is_fts_or_multivalue_or_vec_index;
|
||||
const bool need_check_fts_index_conflict = !drop_index_arg->is_inner_ && index_table_schema->is_fts_index();
|
||||
const bool need_check_fts_index_conflict = !drop_index_arg->is_inner_ && index_table_schema->is_fts_or_multivalue_index();
|
||||
const bool need_check_vec_index_conflict = !drop_index_arg->is_inner_ && index_table_schema->is_vec_index();
|
||||
bool has_index_task = false;
|
||||
typedef common::ObSEArray<share::schema::ObTableSchema, 4> TableSchemaArray;
|
||||
|
@ -349,7 +349,7 @@ int ObIndexBuilder::drop_index(const ObDropIndexArg &arg, obrpc::ObDropIndexRes
|
||||
bool has_other_domain_index = false;
|
||||
const bool is_vec_or_fts_or_multivalue_index = index_table_schema->is_fts_or_multivalue_index() || index_table_schema->is_vec_index();
|
||||
const bool is_inner_and_fts_index = arg.is_inner_ && !arg.is_parent_task_dropping_fts_index_ && index_table_schema->is_fts_index();
|
||||
const bool need_check_fts_index_conflict = !arg.is_inner_ && index_table_schema->is_fts_index();
|
||||
const bool need_check_fts_index_conflict = !arg.is_inner_ && index_table_schema->is_fts_or_multivalue_index();
|
||||
const bool is_inner_and_multivalue_index = arg.is_inner_ && index_table_schema->is_multivalue_index();
|
||||
const bool is_inner_and_vec_index = arg.is_inner_ && !arg.is_vec_inner_drop_ && index_table_schema->is_vec_index();
|
||||
const bool need_check_vec_index_conflict = !arg.is_inner_ && index_table_schema->is_vec_index();
|
||||
@ -1226,7 +1226,7 @@ int ObIndexBuilder::do_create_index(
|
||||
LOG_WARN("table not exist", K(arg), K(ret));
|
||||
} else if (FALSE_IT(table_id = table_schema->get_table_id())) {
|
||||
} else if (!arg.is_inner_
|
||||
&& share::schema::is_fts_index(arg.index_type_)
|
||||
&& share::schema::is_fts_or_multivalue_index(arg.index_type_)
|
||||
&& OB_FAIL(ddl_service_.check_fts_index_conflict(table_schema->get_tenant_id(), table_id))) {
|
||||
if (OB_EAGAIN != ret) {
|
||||
LOG_WARN("failed to check fts index ", K(ret), K(arg));
|
||||
|
@ -662,6 +662,12 @@ class ObString;
|
||||
ACT(RS_CHANGE_TURN_DEBUG_SYNC,)\
|
||||
ACT(AFTER_MIGRATION_CREATE_ALL_TABLET,)\
|
||||
ACT(BEFORE_PARALLEL_BUILD_TABLET_INFO_TABLET,)\
|
||||
ACT(BUILD_FTS_INDEX_PREPARE_STATUS,)\
|
||||
ACT(DROP_FTS_INDEX_PREPARE_STATUS,)\
|
||||
ACT(CREATE_TFS_INDEX_ROWKEY_DOC_STATUS,)\
|
||||
ACT(BEFOR_PREPARE_CREATE_TFS_INDEX_DOC_ROWKEY,)\
|
||||
ACT(BEFOR_PREPARE_CREATE_TFS_INDEX_WORD_DOC,)\
|
||||
ACT(BEFOR_PREPARE_CREATE_TFS_INDEX_DOC_WORD,)\
|
||||
ACT(MAX_DEBUG_SYNC_POINT,)
|
||||
|
||||
DECLARE_ENUM(ObDebugSyncPoint, debug_sync_point, OB_DEBUG_SYNC_POINT_DEF);
|
||||
|
Loading…
x
Reference in New Issue
Block a user