diff --git a/src/rootserver/backup/ob_backup_task_scheduler.cpp b/src/rootserver/backup/ob_backup_task_scheduler.cpp index 05d097d2f..127c2b805 100644 --- a/src/rootserver/backup/ob_backup_task_scheduler.cpp +++ b/src/rootserver/backup/ob_backup_task_scheduler.cpp @@ -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)); diff --git a/src/share/backup/ob_backup_struct.h b/src/share/backup/ob_backup_struct.h index bacd8933b..2c28f46b6 100644 --- a/src/share/backup/ob_backup_struct.h +++ b/src/share/backup/ob_backup_struct.h @@ -107,6 +107,7 @@ static constexpr const int64_t FAKE_MAX_FILE_ID = MAX_FAKE_PROVIDE_ITEM_COUNT / static constexpr const int64_t OB_COMMENT_LENGTH = 1024; static constexpr const int64_t DEFAULT_ARCHIVE_FILE_SIZE = 64 << 20; // 64MB +static constexpr const int64_t DEFAULT_BACKUP_DATA_FILE_SIZE = 4 * 1024LL * 1024LL * 1024LL; // 4GB //add by physical backup and restore const char *const OB_STR_INCARNATION = "incarnation"; diff --git a/src/share/parameter/ob_parameter_seed.ipp b/src/share/parameter/ob_parameter_seed.ipp index a28c2f7dc..a423b582f 100755 --- a/src/share/parameter/ob_parameter_seed.ipp +++ b/src/share/parameter/ob_parameter_seed.ipp @@ -1126,17 +1126,17 @@ DEF_TIME(_ob_ddl_timeout, OB_CLUSTER_PARAMETER, "1000s", "[1s,)", ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); // backup 备份恢复相关的配置 -DEF_CAP(backup_data_file_size, OB_CLUSTER_PARAMETER, "4G", "[512M,4G]", +DEF_CAP(backup_data_file_size, OB_TENANT_PARAMETER, "4G", "[512M,4G]", "backup data file size. " "Range: [512M, 4G] in integer", ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); -DEF_TIME(_backup_task_keep_alive_interval, OB_CLUSTER_PARAMETER, "10s", "[1s,)", +DEF_TIME(_backup_task_keep_alive_interval, OB_TENANT_PARAMETER, "10s", "[1s,)", "control backup task keep alive interval" "Range: [1s, +∞)", ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); -DEF_TIME(_backup_task_keep_alive_timeout, OB_CLUSTER_PARAMETER, "10m", "[1s,)", +DEF_TIME(_backup_task_keep_alive_timeout, OB_TENANT_PARAMETER, "10m", "[1s,)", "control backup task keep alive timeout" "Range: [1s, +∞)", ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); diff --git a/src/storage/backup/ob_backup_ctx.h b/src/storage/backup/ob_backup_ctx.h index bc9c4893b..cd8ab4b8a 100644 --- a/src/storage/backup/ob_backup_ctx.h +++ b/src/storage/backup/ob_backup_ctx.h @@ -148,7 +148,12 @@ public: private: int64_t get_data_file_size() const { - return GCONF.backup_data_file_size; + omt::ObTenantConfigGuard tenant_config(TENANT_CONF(MTL_ID())); + if (!tenant_config.is_valid()) { + return share::DEFAULT_BACKUP_DATA_FILE_SIZE; + } else { + return tenant_config->backup_data_file_size; + } } int open_file_writer_(const share::ObBackupPath &backup_path); int prepare_file_write_ctx_( diff --git a/src/storage/backup/ob_backup_extern_info_mgr.h b/src/storage/backup/ob_backup_extern_info_mgr.h index 76b9b1da3..c6fe56384 100644 --- a/src/storage/backup/ob_backup_extern_info_mgr.h +++ b/src/storage/backup/ob_backup_extern_info_mgr.h @@ -100,7 +100,14 @@ public: private: int write_meta_data_(const blocksstable::ObBufferReader &meta_data, const common::ObTabletID &tablet_id); int prepare_backup_file_(const int64_t file_id); - int64_t get_data_file_size() const { return GCONF.backup_data_file_size; } + int64_t get_data_file_size() const { + omt::ObTenantConfigGuard tenant_config(TENANT_CONF(MTL_ID())); + if (!tenant_config.is_valid()) { + return DEFAULT_BACKUP_DATA_FILE_SIZE; + } else { + return tenant_config->backup_data_file_size; + } + } bool need_switch_file_(const blocksstable::ObBufferReader &buffer); int switch_file_(); int flush_trailer_(); diff --git a/src/storage/backup/ob_backup_task.cpp b/src/storage/backup/ob_backup_task.cpp index 034b6c212..20259efa0 100644 --- a/src/storage/backup/ob_backup_task.cpp +++ b/src/storage/backup/ob_backup_task.cpp @@ -744,7 +744,13 @@ int ObLSBackupDataDagNet::fill_dag_net_key(char *buf, const int64_t buf_len) con int ObLSBackupDataDagNet::get_batch_size_(int64_t &batch_size) { int ret = OB_SUCCESS; - const int64_t data_file_size = GCONF.backup_data_file_size; + int64_t data_file_size = 0; + omt::ObTenantConfigGuard tenant_config(TENANT_CONF(MTL_ID())); + if (!tenant_config.is_valid()) { + data_file_size = DEFAULT_BACKUP_DATA_FILE_SIZE; + } else { + data_file_size = tenant_config->backup_data_file_size; + } if (0 == data_file_size) { batch_size = OB_DEFAULT_BACKUP_BATCH_COUNT; } else {