ls inner handler didn't enable when migrate from src ls which's restore status is restore_sys
This commit is contained in:
committed by
wangzelin.wzl
parent
715aa49d82
commit
610919b622
@ -1219,21 +1219,25 @@ int ObUserTenantBackupJobMgr::report_failed_to_initiator_()
|
|||||||
int ObUserTenantBackupJobMgr::check_can_backup_()
|
int ObUserTenantBackupJobMgr::check_can_backup_()
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
ObTenantArchiveRoundAttr round_attr;
|
if (share::ObBackupStatus::CANCELING == job_attr_->status_.status_) {
|
||||||
if (OB_FAIL(ObTenantArchiveMgr::get_tenant_current_round(job_attr_->tenant_id_, job_attr_->incarnation_id_, round_attr))) {
|
// backup job is canceling, no need to check log archive status
|
||||||
if (OB_ENTRY_NOT_EXIST == ret) {
|
} else {
|
||||||
ret = OB_LOG_ARCHIVE_NOT_RUNNING;
|
ObTenantArchiveRoundAttr round_attr;
|
||||||
|
if (OB_FAIL(ObTenantArchiveMgr::get_tenant_current_round(job_attr_->tenant_id_, job_attr_->incarnation_id_, round_attr))) {
|
||||||
|
if (OB_ENTRY_NOT_EXIST == ret) {
|
||||||
|
ret = OB_LOG_ARCHIVE_NOT_RUNNING;
|
||||||
|
LOG_WARN("[DATA_BACKUP]not supported backup when log archive is not doing", K(ret), K(round_attr));
|
||||||
|
} else {
|
||||||
|
LOG_WARN("failed to get cur log archive round", K(ret), K(round_attr));
|
||||||
|
}
|
||||||
|
} else if (ObArchiveRoundState::Status::DOING != round_attr.state_.status_) {
|
||||||
|
if (ObArchiveRoundState::Status::INTERRUPTED == round_attr.state_.status_) {
|
||||||
|
ret = OB_LOG_ARCHIVE_INTERRUPTED;
|
||||||
|
} else {
|
||||||
|
ret = OB_LOG_ARCHIVE_NOT_RUNNING;
|
||||||
|
}
|
||||||
LOG_WARN("[DATA_BACKUP]not supported backup when log archive is not doing", K(ret), K(round_attr));
|
LOG_WARN("[DATA_BACKUP]not supported backup when log archive is not doing", K(ret), K(round_attr));
|
||||||
} else {
|
|
||||||
LOG_WARN("failed to get cur log archive round", K(ret), K(round_attr));
|
|
||||||
}
|
}
|
||||||
} else if (ObArchiveRoundState::Status::DOING != round_attr.state_.status_) {
|
|
||||||
if (ObArchiveRoundState::Status::INTERRUPTED == round_attr.state_.status_) {
|
|
||||||
ret = OB_LOG_ARCHIVE_INTERRUPTED;
|
|
||||||
} else {
|
|
||||||
ret = OB_LOG_ARCHIVE_NOT_RUNNING;
|
|
||||||
}
|
|
||||||
LOG_WARN("[DATA_BACKUP]not supported backup when log archive is not doing", K(ret), K(round_attr));
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,9 +46,9 @@ int ObExprToOutfileRow::calc_result_typeN(ObExprResType &type,
|
|||||||
//objs[2] closed_cht char
|
//objs[2] closed_cht char
|
||||||
//objs[3] is_optional bool
|
//objs[3] is_optional bool
|
||||||
//objs[4] escaped_cht char
|
//objs[4] escaped_cht char
|
||||||
//objs[5:] params
|
//objs[5:] params
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
UNUSED(type_ctx);
|
UNUSED(type_ctx);
|
||||||
if (OB_UNLIKELY(param_num <= PARAM_SELECT_ITEM)) {
|
if (OB_UNLIKELY(param_num <= PARAM_SELECT_ITEM)) {
|
||||||
ret = OB_INVALID_ARGUMENT_NUM;
|
ret = OB_INVALID_ARGUMENT_NUM;
|
||||||
LOG_WARN("invalid argument number", K(ret), K(param_num));
|
LOG_WARN("invalid argument number", K(ret), K(param_num));
|
||||||
@ -87,9 +87,9 @@ int ObExprToOutfileRow::cg_expr(ObExprCGCtx &, const ObRawExpr &, ObExpr &expr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
expr.eval_func_ = &to_outfile_str;
|
expr.eval_func_ = &to_outfile_str;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ObExprToOutfileRow::extend_buffer(ObExprOutFileInfo &out_info,
|
int ObExprToOutfileRow::extend_buffer(ObExprOutFileInfo &out_info,
|
||||||
ObIAllocator &allocator)
|
ObIAllocator &allocator)
|
||||||
@ -163,9 +163,9 @@ int ObExprToOutfileRow::to_outfile_str(const ObExpr &expr, ObEvalCtx &ctx, ObDat
|
|||||||
auto rt_ctx_id = static_cast<uint64_t>(expr.expr_ctx_id_);
|
auto rt_ctx_id = static_cast<uint64_t>(expr.expr_ctx_id_);
|
||||||
if (NULL == (out_info = static_cast<ObExprOutFileInfo *>
|
if (NULL == (out_info = static_cast<ObExprOutFileInfo *>
|
||||||
(ctx.exec_ctx_.get_expr_op_ctx(rt_ctx_id)))) {
|
(ctx.exec_ctx_.get_expr_op_ctx(rt_ctx_id)))) {
|
||||||
if (OB_FAIL(ctx.exec_ctx_.create_expr_op_ctx(rt_ctx_id, out_info))) {
|
if (OB_FAIL(ctx.exec_ctx_.create_expr_op_ctx(rt_ctx_id, out_info))) {
|
||||||
LOG_WARN("failed to create operator ctx", K(ret));
|
LOG_WARN("failed to create operator ctx", K(ret));
|
||||||
} else if (OB_FAIL(calc_outfile_info(expr, ctx,
|
} else if (OB_FAIL(calc_outfile_info(expr, ctx,
|
||||||
ctx.exec_ctx_.get_allocator(), *out_info))) {
|
ctx.exec_ctx_.get_allocator(), *out_info))) {
|
||||||
LOG_WARN("fail calc outfile info", K(ret));
|
LOG_WARN("fail calc outfile info", K(ret));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1380,6 +1380,15 @@ int ObStartMigrationTask::deal_local_restore_ls_(bool &need_generate_dag)
|
|||||||
} else if (ls_restore_status.is_restore_start() || ls_restore_status.is_restore_sys_tablets()) {
|
} else if (ls_restore_status.is_restore_start() || ls_restore_status.is_restore_sys_tablets()) {
|
||||||
if (OB_FAIL(ls->get_log_handler()->enable_sync())) {
|
if (OB_FAIL(ls->get_log_handler()->enable_sync())) {
|
||||||
LOG_WARN("failed to enable log sync", K(ret), KPC(ctx_), KPC(ls));
|
LOG_WARN("failed to enable log sync", K(ret), KPC(ctx_), KPC(ls));
|
||||||
|
} else if (OB_FAIL(ls->get_tablet_svr()->online())) {
|
||||||
|
LOG_WARN("failed to online tablet svr", K(ret), KPC(ctx_), KPC(ls));
|
||||||
|
} else if (OB_FAIL(ls->get_tx_svr()->online())) {
|
||||||
|
LOG_WARN("failed to online tx svr", K(ret), KPC(ctx_), KPC(ls));
|
||||||
|
} else if (OB_FAIL(ls->get_ddl_log_handler()->online())) {
|
||||||
|
LOG_WARN("failed to online ddl log handler", K(ret), KPC(ctx_), KPC(ls));
|
||||||
|
} else if (OB_FAIL(ls->get_ls_wrs_handler()->online())) {
|
||||||
|
LOG_WARN("failed to online ls wrs handler", K(ret), KPC(ctx_), KPC(ls));
|
||||||
|
} else if (OB_FALSE_IT(ls->get_checkpoint_executor()->online())) {
|
||||||
} else {
|
} else {
|
||||||
need_generate_dag = false;
|
need_generate_dag = false;
|
||||||
LOG_INFO("ls restore status is in restore start or in restore sys tablets, no need generate dag",
|
LOG_INFO("ls restore status is in restore start or in restore sys tablets, no need generate dag",
|
||||||
|
|||||||
@ -206,6 +206,8 @@ public:
|
|||||||
checkpoint::ObDataCheckpoint *get_data_checkpoint() { return &data_checkpoint_; }
|
checkpoint::ObDataCheckpoint *get_data_checkpoint() { return &data_checkpoint_; }
|
||||||
transaction::ObKeepAliveLSHandler *get_keep_alive_ls_handler() { return &keep_alive_ls_handler_; }
|
transaction::ObKeepAliveLSHandler *get_keep_alive_ls_handler() { return &keep_alive_ls_handler_; }
|
||||||
ObLSRestoreHandler *get_ls_restore_handler() { return &ls_restore_handler_; }
|
ObLSRestoreHandler *get_ls_restore_handler() { return &ls_restore_handler_; }
|
||||||
|
ObLSDDLLogHandler *get_ddl_log_handler() { return &ls_ddl_log_handler_; }
|
||||||
|
|
||||||
// ObObLogHandler interface:
|
// ObObLogHandler interface:
|
||||||
// get the log_service pointer
|
// get the log_service pointer
|
||||||
logservice::ObLogHandler *get_log_handler() { return &log_handler_; }
|
logservice::ObLogHandler *get_log_handler() { return &log_handler_; }
|
||||||
|
|||||||
Reference in New Issue
Block a user