diff --git a/src/rootserver/backup/ob_backup_schedule_task.cpp b/src/rootserver/backup/ob_backup_schedule_task.cpp index a6d770fb51..6646294c06 100644 --- a/src/rootserver/backup/ob_backup_schedule_task.cpp +++ b/src/rootserver/backup/ob_backup_schedule_task.cpp @@ -18,6 +18,7 @@ #include "share/backup/ob_backup_clean_operator.h" #include "share/ob_srv_rpc_proxy.h" #include "share/ls/ob_ls_table_operator.h" +#include "rootserver/ob_rs_event_history_table_operator.h" namespace oceanbase { using namespace common; @@ -400,6 +401,13 @@ int ObBackupDataLSTask::execute(obrpc::ObSrvRpcProxy &rpc_proxy) const } else if (OB_FAIL(rpc_proxy.timeout(timeout).to(get_dst()).backup_ls_data(arg))) { LOG_WARN("fail to send backup ls data task", K(ret), K(arg)); } else { + ROOTSERVICE_EVENT_ADD("backup", "send backup data task", + "tenant_id", arg.tenant_id_, + "task_id", arg.task_id_, + "trace_id", arg.trace_id_, + "turn_id", arg.turn_id_, + "retry_id", arg.retry_id_, + "dst_server", arg.dst_server_); LOG_INFO("start to backup ls data", K(arg)); } return ret; diff --git a/src/share/restore/ob_ls_restore_status.h b/src/share/restore/ob_ls_restore_status.h index 5d1c7092d5..d64958ffc6 100644 --- a/src/share/restore/ob_ls_restore_status.h +++ b/src/share/restore/ob_ls_restore_status.h @@ -88,8 +88,9 @@ public: return ((status_ >= Status::RESTORE_START && status_ <= Status::RESTORE_SYS_TABLETS) || status_ == Status::RESTORE_FAILED); } - // if restore status is not in [RESTORE_START, RESTORE_SYS_TABLETS], log_replay_service can replay log. - bool can_replay_log() const { return ! (status_ >= Status::RESTORE_START && status_ <= Status::RESTORE_SYS_TABLETS); } + // if restore status is not in [RESTORE_START, RESTORE_SYS_TABLETS] or restore_failed, log_replay_service can replay log. + bool can_replay_log() const { return ! (status_ >= Status::RESTORE_START && status_ <= Status::RESTORE_SYS_TABLETS) + && status_ != Status::RESTORE_FAILED; } bool can_restore_log() const { return status_ == RESTORE_NONE || (status_ >= QUICK_RESTORE && status_ < RESTORE_FAILED); } Status get_status() const { return status_; } int set_status(int32_t status);