[CP] choose sys ls server to backup complement log task.
This commit is contained in:
@ -141,7 +141,8 @@ int ObBackupDataScheduler::do_get_need_reload_task_(
|
||||
ObBackupLSTaskAttr &ls_task = ls_tasks.at(i);
|
||||
ObBackupScheduleTask *task = nullptr;
|
||||
bool is_dropped = false;
|
||||
if (OB_FAIL(ObBackupDataLSTaskMgr::check_ls_is_dropped(ls_task, *sql_proxy_, is_dropped))) {
|
||||
if (!(job.plus_archivelog_ && set_task_attr.status_.is_backup_log())
|
||||
&& OB_FAIL(ObBackupDataLSTaskMgr::check_ls_is_dropped(ls_task, *sql_proxy_, is_dropped))) {
|
||||
LOG_WARN("failed to check ls is dropped", K(ret), K(ls_task));
|
||||
} else if (is_dropped) {
|
||||
// ls deleted, no need to reload, mark it to finish
|
||||
|
@ -412,7 +412,7 @@ int ObBackupDataBaseTask::set_optional_servers_(const ObIArray<common::ObAddr> &
|
||||
uint64_t tenant_id = get_tenant_id();
|
||||
share::ObLSTableOperator *lst_operator = GCTX.lst_operator_;
|
||||
int64_t cluster_id = GCONF.cluster_id;
|
||||
ObLSID server_ls_id = ls_id_.id() == 0 ? ObLSID(ObLSID::SYS_LS_ID) : ls_id_;
|
||||
ObLSID server_ls_id = execute_on_sys_server_() ? ObLSID(ObLSID::SYS_LS_ID) : ls_id_;
|
||||
if (nullptr == lst_operator) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("lst_operator ptr is null", K(ret));
|
||||
|
@ -272,6 +272,7 @@ public:
|
||||
private:
|
||||
virtual int do_update_dst_and_doing_status_(common::ObISQLClient &sql_proxy, common::ObAddr &dst,
|
||||
share::ObTaskId &trace_id) final override;
|
||||
virtual bool execute_on_sys_server_() const { return false; }
|
||||
bool check_replica_in_black_server_(const share::ObLSReplica &replica, const ObIArray<common::ObAddr> &black_servers);
|
||||
public:
|
||||
INHERIT_TO_STRING_KV("ObBackupScheduleTask", ObBackupScheduleTask, K_(incarnation_id), K_(backup_set_id),
|
||||
@ -315,10 +316,11 @@ public:
|
||||
virtual int64_t get_deep_copy_size() const override;
|
||||
virtual int execute(obrpc::ObSrvRpcProxy &rpc_proxy) const override;
|
||||
virtual int build(const share::ObBackupJobAttr &job_attr, const share::ObBackupSetTaskAttr &set_task_attr,
|
||||
const share::ObBackupLSTaskAttr &ls_attr);
|
||||
const share::ObBackupLSTaskAttr &ls_attr);
|
||||
private:
|
||||
int calc_start_replay_scn_(const share::ObBackupJobAttr &job_attr, const share::ObBackupSetTaskAttr &set_task_attr,
|
||||
const share::ObBackupLSTaskAttr &ls_attr, share::SCN &scn);
|
||||
bool execute_on_sys_server_() const override { return true; }
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ObBackupComplLogTask);
|
||||
};
|
||||
@ -332,6 +334,7 @@ public:
|
||||
virtual int64_t get_deep_copy_size() const override;
|
||||
virtual int execute(obrpc::ObSrvRpcProxy &rpc_proxy) const override;
|
||||
private:
|
||||
bool execute_on_sys_server_() const override { return true; }
|
||||
DISALLOW_COPY_AND_ASSIGN(ObBackupBuildIndexTask);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user