don't enable replay after reboot.
This commit is contained in:
@ -18,6 +18,7 @@
|
|||||||
#include "share/backup/ob_backup_clean_operator.h"
|
#include "share/backup/ob_backup_clean_operator.h"
|
||||||
#include "share/ob_srv_rpc_proxy.h"
|
#include "share/ob_srv_rpc_proxy.h"
|
||||||
#include "share/ls/ob_ls_table_operator.h"
|
#include "share/ls/ob_ls_table_operator.h"
|
||||||
|
#include "rootserver/ob_rs_event_history_table_operator.h"
|
||||||
namespace oceanbase
|
namespace oceanbase
|
||||||
{
|
{
|
||||||
using namespace common;
|
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))) {
|
} 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));
|
LOG_WARN("fail to send backup ls data task", K(ret), K(arg));
|
||||||
} else {
|
} 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));
|
LOG_INFO("start to backup ls data", K(arg));
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@ -88,8 +88,9 @@ public:
|
|||||||
return ((status_ >= Status::RESTORE_START && status_ <= Status::RESTORE_SYS_TABLETS) ||
|
return ((status_ >= Status::RESTORE_START && status_ <= Status::RESTORE_SYS_TABLETS) ||
|
||||||
status_ == Status::RESTORE_FAILED);
|
status_ == Status::RESTORE_FAILED);
|
||||||
}
|
}
|
||||||
// if restore status is not in [RESTORE_START, RESTORE_SYS_TABLETS], log_replay_service can replay log.
|
// 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); }
|
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); }
|
bool can_restore_log() const { return status_ == RESTORE_NONE || (status_ >= QUICK_RESTORE && status_ < RESTORE_FAILED); }
|
||||||
Status get_status() const { return status_; }
|
Status get_status() const { return status_; }
|
||||||
int set_status(int32_t status);
|
int set_status(int32_t status);
|
||||||
|
|||||||
Reference in New Issue
Block a user