数据备份-设置ha_low_thread_score参数未生效

【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】4.3.1
【问题描述】数据备份-设置ha_low_thread_score参数未生效
【复现路径】
1.查看当前参数ha_low_thread_score 的值
obclient [oceanbase]> SHOW PARAMETERS LIKE ‘%ha_low_thread_score%’\G
*************************** 1. row ***************************
zone: zone4
svr_type: observer
svr_ip: 10.0.22.31
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 0
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
*************************** 2. row ***************************
zone: zone1
svr_type: observer
svr_ip: 10.0.22.30
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 0
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE

2.设置集群中所有租户的备份并发度
obclient [oceanbase]> ALTER SYSTEM SET ha_low_thread_score = 10 TENANT = all_user;
Query OK, 0 rows affected (0.354 sec)

3.再次查看参数ha_low_thread_score 的值
obclient [oceanbase]> SHOW PARAMETERS LIKE ‘%ha_low_thread_score%’\G
*************************** 1. row ***************************
zone: zone2
svr_type: observer
svr_ip: 10.0.22.12
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 0
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
*************************** 2. row ***************************
zone: zone3
svr_type: observer
svr_ip: 10.0.22.13
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 0
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE

4.重新设置集群中所有租户的备份并发度(增加scope=both)
obclient [oceanbase]> ALTER SYSTEM SET ha_low_thread_score = 10 SCOPE=BOTH TENANT = all_user;
Query OK, 0 rows affected (0.149 sec)

5.再次查看参数ha_low_thread_score 的值
obclient [oceanbase]> SHOW PARAMETERS LIKE ‘%ha_low_thread_score%’\G
*************************** 1. row ***************************
zone: zone3
svr_type: observer
svr_ip: 10.0.22.13
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 0
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
*************************** 2. row ***************************
zone: zone2
svr_type: observer
svr_ip: 10.0.22.12
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 0
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE

【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):

【SOP系列 22 】——故障诊断第一步(自助诊断和诊断信息收集)

使用ALTER SYSTEM SET ha_high_thread_score = XX; 修改方式试下呢
参数说明: ha_low_thread_score-OceanBase 数据库-OceanBase文档中心-分布式数据库使用文档

1.按照您的建议,确实可行,但这样无法只给指定的租户设置
obclient [oceanbase]> ALTER SYSTEM SET ha_low_thread_score = 10;
Query OK, 0 rows affected (0.037 sec)

obclient [oceanbase]> SHOW PARAMETERS LIKE ‘%ha_low_thread_score%’\G
*************************** 1. row ***************************
zone: zone2
svr_type: observer
svr_ip: 10.0.22.12
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 10
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
*************************** 2. row ***************************
zone: zone3
svr_type: observer
svr_ip: 10.0.22.13
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 10
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
*************************** 3. row ***************************
zone: zone1
svr_type: observer
svr_ip: 10.0.22.30
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 10
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
*************************** 4. row ***************************
zone: zone4
svr_type: observer
svr_ip: 10.0.22.31
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 10
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
4 rows in set (0.039 sec)

obclient [oceanbase]> ALTER SYSTEM SET ha_low_thread_score = 3;
Query OK, 0 rows affected (0.027 sec)

obclient [oceanbase]> SHOW PARAMETERS LIKE ‘%ha_low_thread_score%’\G
*************************** 1. row ***************************
zone: zone1
svr_type: observer
svr_ip: 10.0.22.30
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 3
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
*************************** 2. row ***************************
zone: zone2
svr_type: observer
svr_ip: 10.0.22.12
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 3
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
*************************** 3. row ***************************
zone: zone4
svr_type: observer
svr_ip: 10.0.22.31
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 3
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
*************************** 4. row ***************************
zone: zone3
svr_type: observer
svr_ip: 10.0.22.13
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 3
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
4 rows in set (0.041 sec)

2.根据以往的经验,属性中存在zone属性,尝试指定zone属于,设置成功
obclient [oceanbase]> ALTER SYSTEM SET ha_low_thread_score = 5 zone=zone3;
Query OK, 0 rows affected (0.011 sec)

obclient [oceanbase]> SHOW PARAMETERS LIKE ‘%ha_low_thread_score%’\G
*************************** 1. row ***************************
zone: zone1
svr_type: observer
svr_ip: 10.0.22.30
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 3
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
*************************** 2. row ***************************
zone: zone2
svr_type: observer
svr_ip: 10.0.22.12
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 3
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
*************************** 3. row ***************************
zone: zone3
svr_type: observer
svr_ip: 10.0.22.13
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 5
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
*************************** 4. row ***************************
zone: zone4
svr_type: observer
svr_ip: 10.0.22.31
svr_port: 2882
name: ha_low_thread_score
data_type: INT
value: 3
info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
section: OBSERVER
scope: TENANT
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
4 rows in set (0.077 sec)

obclient [oceanbase]>

疑问点,这种是否符合设计方案,如果是,那这样的应用场景是什么?

参考:OceanBase分布式数据库-海量数据 笔笔算数
可以指定table、zone、server

ALTER SYSTEM [SET] alter_system_set_parameter_action [, alter_system_set_parameter_action…]
alter_system_set_parameter_action:
parameter_name = expression [COMMENT [=] ‘text’] [SCOPE = {MEMORY | SPFILE | BOTH}] [SERVER [=] ‘ip:port’ | ZONE [=] ‘zone_name’ | TENANT [=] {sys | all_user | all | all_meta | tenant_name}]

ALTER SYSTEM SET ha_low_thread_score = 10 TENANT = all_user;

这里的 all_user 只是针对用户租户生效,是不是当前环境只有一个sys租户呢?

查一下看看:
select * from dba_ob_tenants;