patch backup piece to 3.1. open source

This commit is contained in:
xuhuleon
2021-09-02 15:26:39 +08:00
committed by wangzelin.wzl
parent 153f16ad8a
commit 62cb470338
314 changed files with 88279 additions and 35466 deletions

View File

@ -286,6 +286,8 @@ int ObRootBalancer::init(common::ObServerConfig& cfg, share::schema::ObMultiVers
LOG_WARN("init failed", K(ret));
} else if (OB_FAIL(pg_validate_.init(sql_proxy, task_mgr, server_mgr, zone_mgr))) {
LOG_WARN("failed to init partition validator", K(ret));
} else if (OB_FAIL(pg_backup_backupset_.init(sql_proxy, zone_mgr, server_mgr, task_mgr))) {
LOG_WARN("failed to init partition backup backupset", K(ret));
} else {
config_ = &cfg;
zone_mgr_ = &zone_mgr;
@ -1040,6 +1042,12 @@ int ObRootBalancer::multiple_zone_deployment_tenant_balance(const uint64_t tenan
}
}
if (OB_SUCCESS == ret) {
if (OB_FAIL(pg_backup_backupset_.partition_backup_backupset(tenant_id))) {
LOG_WARN("failed to partition backup backupset", KR(ret), K(tenant_id));
}
}
// step4: The status of the operation unit migration
if (OB_FAIL(migrate_unit_.unit_migrate_finish(task_cnt))) {
LOG_WARN("check unit migrate finish failed", K(ret), K(tenant_id));
@ -1362,6 +1370,19 @@ int64_t ObRootBalancer::get_schedule_interval() const
return idling_.get_idle_interval_us();
}
int ObRootBalancer::get_backup_start_snapshot(int64_t &task_start_snapshot)
{
int ret = OB_SUCCESS;
task_start_snapshot = 0;
if (OB_UNLIKELY(!inited_)) {
ret = OB_NOT_INIT;
LOG_WARN("not init", K(ret));
} else if (OB_FAIL(pg_backup_.get_task_start_snapshot(task_start_snapshot))) {
LOG_WARN("failed to get task start snapshot", K(ret));
}
return ret;
}
int64_t ObBlacklistProcess::get_deep_copy_size() const
{
return sizeof(*this);