Fix rebuild offline and online failed cannnot do backfill tx bug

This commit is contained in:
godyangfight
2022-11-25 07:35:52 +00:00
committed by wangzelin.wzl
parent 18e8a1e6aa
commit 2032dc8477
3 changed files with 26 additions and 7 deletions

View File

@ -927,10 +927,19 @@ int ObStartPrepareMigrationTask::generate_prepare_migration_dags_()
ObBackfillTXCtx *backfill_tx_ctx = nullptr;
ObTabletID tablet_id;
ObStartPrepareMigrationDag *start_prepare_migration_dag = nullptr;
ObLSHandle ls_handle;
ObLS *ls = nullptr;
if (!is_inited_) {
ret = OB_NOT_INIT;
LOG_WARN("start prepare migration task do not init", K(ret));
} else if (OB_FAIL(ObStorageHADagUtils::get_ls(ctx_->arg_.ls_id_, ls_handle))) {
LOG_WARN("failed to get ls", K(ret), KPC(ctx_));
} else if (OB_ISNULL(ls = ls_handle.get_ls())) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("ls should not be NULL", K(ret), KP(ls));
} else if (ls->is_offline()) {
LOG_INFO("ls is in offline status, no need generate backfill dag", KPC(ls));
} else if (OB_ISNULL(start_prepare_migration_dag = static_cast<ObStartPrepareMigrationDag *>(this->get_dag()))) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("start prepare migration dag should not be NULL", K(ret), KP(start_prepare_migration_dag));