[CP] change cluster level parameter to tenant level for backup

This commit is contained in:
oceanoverflow
2023-11-10 10:39:14 +00:00
committed by ob-robot
parent 6620db0b8b
commit fa3f962aad
6 changed files with 36 additions and 8 deletions

View File

@ -1335,8 +1335,17 @@ int ObBackupTaskScheduler::check_alive_(int64_t &last_check_task_on_server_ts, b
Bool res = false;
bool force_update = false;
const int64_t now = ObTimeUtility::current_time();
const int64_t backup_task_keep_alive_interval = GCONF._backup_task_keep_alive_interval;
const int64_t backup_task_keep_alive_timeout = GCONF._backup_task_keep_alive_timeout;
int64_t backup_task_keep_alive_interval = 0;
int64_t backup_task_keep_alive_timeout = 0;
omt::ObTenantConfigGuard tenant_config(TENANT_CONF(MTL_ID()));
if (!tenant_config.is_valid()) {
backup_task_keep_alive_interval = 10_s;
backup_task_keep_alive_timeout = 10_min;
} else {
backup_task_keep_alive_interval = tenant_config->_backup_task_keep_alive_interval;
backup_task_keep_alive_timeout = tenant_config->_backup_task_keep_alive_timeout;
}
if ((now <= backup_task_keep_alive_interval + last_check_task_on_server_ts) && !reload_flag) {
} else if (OB_FAIL(queue_.get_schedule_tasks(schedule_tasks, allocator))) {
LOG_WARN("get scheduelr tasks error", K(ret));