提交 faf723bb 编写于 作者: O obdev 提交者: ob-robot

[CP] ls_task队列满问题新增隐藏配置项

上级 10499651
......@@ -135,13 +135,18 @@ int ObBackupTaskSchedulerQueue::push_task(const ObBackupScheduleTask &task)
int ObBackupTaskSchedulerQueue::push_task_without_lock_(const ObBackupScheduleTask &task)
{
int ret = OB_SUCCESS;
int64_t queue_capacity = max_size_;
omt::ObTenantConfigGuard tenant_config(TENANT_CONF(gen_user_tenant_id(MTL_ID())));
if (tenant_config.is_valid() && 0 != tenant_config->_backup_task_queue_size) {
queue_capacity = tenant_config->_backup_task_queue_size;
}
if (IS_NOT_INIT) {
ret = OB_NOT_INIT;
LOG_WARN("backup scheduler queue not inited", K(ret));
} else if (task_scheduler_->has_set_stop()) {
} else if (get_task_cnt_() >= max_size_) {
} else if (get_task_cnt_() >= queue_capacity) {
ret = OB_SIZE_OVERFLOW;
LOG_WARN("task scheduler queue is full, cant't push task", K(ret), K(get_task_cnt_()));
LOG_WARN("task scheduler queue is full, cant't push task", K(ret), K(get_task_cnt_()), K(queue_capacity));
} else if (OB_FAIL(check_push_unique_task_(task))) {
LOG_WARN("fail to check unique task", K(ret), K(task));
} else {
......
......@@ -141,7 +141,7 @@ private:
class ObBackupTaskScheduler : public ObBackupBaseService
{
public:
const static int64_t MAX_BACKUP_TASK_QUEUE_LIMIT = 1024;
const static int64_t MAX_BACKUP_TASK_QUEUE_LIMIT = 2000;
const static int64_t CONCURRENCY_LIMIT_INTERVAL = 10 * 60 * 1000000L; // 10min
const static int64_t BACKUP_TASK_CONCURRENCY = 1;
const static int64_t BACKUP_SERVER_DATA_LIMIT_INTERVAL = 20 * 60 * 1000000; // 60 min;
......
......@@ -1394,6 +1394,10 @@ ERRSIM_DEF_TIME(backup_lease_takeover_time, OB_CLUSTER_PARAMETER, "10s", "[1s, 5
"Lease Takeover Time for Rootserver Backup heartbeat. Range: [1s, 5m]",
ObParameterAttr(Section::ROOT_SERVICE, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEF_INT(_backup_task_queue_size, OB_TENANT_PARAMETER, "0", "[0, 100000]",
"the size of the backup task scheduler queue for each tenant. "
"Range: [0, 100000] in integer",
ObParameterAttr(Section::ROOT_SERVICE, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
ERRSIM_DEF_TIME(trigger_auto_backup_delete_interval, OB_CLUSTER_PARAMETER, "1h", "[1s,)",
"trigger auto backup delete interval."
"The default value is 1h. Range: [1s,)",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册