diff --git a/src/rootserver/ob_root_service.cpp b/src/rootserver/ob_root_service.cpp index 89cfe896df..c1186611f6 100644 --- a/src/rootserver/ob_root_service.cpp +++ b/src/rootserver/ob_root_service.cpp @@ -7863,6 +7863,15 @@ int ObRootService::physical_restore_tenant(const obrpc::ObPhysicalRestoreTenantA int64_t job_id = OB_INVALID_ID; int64_t refreshed_schema_version = OB_INVALID_VERSION; ObSchemaGetterGuard schema_guard; + int64_t restore_concurrency = 0; + omt::ObTenantConfigGuard tenant_config(TENANT_CONF(MTL_ID())); + if (tenant_config.is_valid()) { + restore_concurrency = tenant_config->ha_high_thread_score; + } + if (0 == restore_concurrency) { + restore_concurrency = OB_DEFAULT_RESTORE_CONCURRENCY; + } + if (!inited_) { ret = OB_NOT_INIT; LOG_WARN("not init", K(ret)); @@ -7875,7 +7884,7 @@ int ObRootService::physical_restore_tenant(const obrpc::ObPhysicalRestoreTenantA "in upgrade mode is not allowed", KR(ret)); LOG_USER_ERROR(OB_OP_NOT_ALLOW, "restore tenant while in standby cluster or in upgrade mode"); - } else if (0 == GCONF.restore_concurrency) { + } else if (0 == restore_concurrency) { ret = OB_OP_NOT_ALLOW; LOG_WARN("restore tenant when restore_concurrency is 0 not allowed", KR(ret)); LOG_USER_ERROR(OB_OP_NOT_ALLOW, "restore tenant when restore_concurrency is 0"); diff --git a/src/share/backup/ob_backup_struct.h b/src/share/backup/ob_backup_struct.h index b34dcbab62..b35ba8236a 100644 --- a/src/share/backup/ob_backup_struct.h +++ b/src/share/backup/ob_backup_struct.h @@ -93,6 +93,7 @@ const int64_t OB_BACKUP_INVALID_JOB_ID = 0; const int64_t OB_ARCHIVE_INVALID_ROUND_ID = 0; const int64_t OB_INVALID_DEST_ID = -1; const int64_t OB_MAX_BACKUP_QUERY_TIMEOUT = 60 * 1000 * 1000; // 60s +const int64_t OB_DEFAULT_RESTORE_CONCURRENCY = 8; // TODO add tenant BACKUP_META_TIMEOUT parameters in 4.1 static const int64_t OB_MAX_BACKUP_META_TIMEOUT = 30 * 60 * 1000 * 1000; // 30 min diff --git a/src/share/parameter/ob_parameter_seed.ipp b/src/share/parameter/ob_parameter_seed.ipp index 760827a337..50684471d4 100644 --- a/src/share/parameter/ob_parameter_seed.ipp +++ b/src/share/parameter/ob_parameter_seed.ipp @@ -774,9 +774,6 @@ DEF_INT(ha_mid_thread_score, OB_TENANT_PARAMETER, "0", "[0,100]", DEF_INT(ha_low_thread_score, OB_TENANT_PARAMETER, "0", "[0,100]", "the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value", ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); -DEF_INT(restore_concurrency, OB_CLUSTER_PARAMETER, "0", "[0,512]", - "the current work thread num of restore macro block. Range: [0,512] in integer", - ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); DEF_INT(minor_compact_trigger, OB_TENANT_PARAMETER, "2", "[0,16]", "minor_compact_trigger, Range: [0,16] in integer", ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); diff --git a/src/storage/restore/ob_ls_restore_handler.cpp b/src/storage/restore/ob_ls_restore_handler.cpp index 5736b908cf..86eead3f05 100644 --- a/src/storage/restore/ob_ls_restore_handler.cpp +++ b/src/storage/restore/ob_ls_restore_handler.cpp @@ -1337,7 +1337,14 @@ int ObILSRestoreState::check_restore_concurrency_limit_() int ret = OB_SUCCESS; const ObDagNetType::ObDagNetTypeEnum restore_type = ObDagNetType::DAG_NET_TYPE_RESTORE; ObTenantDagScheduler *scheduler = nullptr; - const int64_t restore_concurrency = GCONF.restore_concurrency; + int64_t restore_concurrency = 0; + omt::ObTenantConfigGuard tenant_config(TENANT_CONF(MTL_ID())); + if (tenant_config.is_valid()) { + restore_concurrency = tenant_config->ha_high_thread_score; + } + if (0 == restore_concurrency) { + restore_concurrency = OB_DEFAULT_RESTORE_CONCURRENCY; + } if (!is_inited_) { ret = OB_NOT_INIT; @@ -1352,7 +1359,6 @@ int ObILSRestoreState::check_restore_concurrency_limit_() const int64_t restore_dag_net_count = scheduler->get_dag_net_count(restore_type); if (restore_dag_net_count > restore_concurrency) { - //TODO(yanfeng) Here need same value with ObLSRestoreHandler to control limit in 4.1. ret = OB_REACH_SERVER_DATA_COPY_IN_CONCURRENCY_LIMIT; LOG_WARN("ls restore reach limit", K(ret), K(restore_concurrency), K(restore_dag_net_count)); } diff --git a/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_sys_parameter_stat.result b/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_sys_parameter_stat.result index adb1b85b64..e826cc07bc 100644 --- a/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_sys_parameter_stat.result +++ b/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_sys_parameter_stat.result @@ -161,7 +161,6 @@ rdma_io_thread_count recyclebin_object_expire_time redundancy_level resource_hard_limit -restore_concurrency rootservice_async_task_queue_size rootservice_async_task_thread_count rootservice_list