【 使用环境 】测试环境
【 OB or 其他组件 】
【 使用版本 】observer 3.2.4
【问题描述】我们不想事务调度由只读语句控制,在测试环境测试参数的时候发现按照文档中的设置不生效
【复现路径】
复现方式:
1-1-1 架构
mysql租户,primary_zone(zone1,zone2;zone3)
create table tab1 (x int);
create table tab2 (x int);
create table t1 (x int);
–leader情况如下
±------------±-----------------±-----------±-------------±------±--------------±---------±-------±-------------+
| tenant_name | table_id | table_name | partition_id | zone | svr_ip | svr_port | role | primary_zone |
±------------±-----------------±-----------±-------------±------±--------------±---------±-------±-------------+
| ob_mysql | 1108307720848217 | t1 | 0 | zone1 | 192.168.0.221 | 2882 | leader | |
| ob_mysql | 1108307720848215 | tab1 | 0 | zone2 | 192.168.0.222 | 2882 | leader | |
| ob_mysql | 1108307720848216 | tab2 | 0 | zone2 | 192.168.0.222 | 2882 | leader | |
±------------±-----------------±-----------±-------------±------±--------------±---------±-------±-------------+
ob_proxy_readonly_transaction_routing_policy参数已经设置为false
执行如下方式测试plan_type
begin;
select * from t1; --plan_type=1
select * from tab1; --plan_type=2
select * from tab2; --plan_type=2
commit;
按照文档中的描述,第一条只读语句的t1表不应该做为这个事务的调度者,后续的tab1,tab2都应该路由到自己正常的节点才对,也就是plan_type应该要为1。
如果不启事务,那么t1,tab1,tab2都会路由到正确的节点(plan_type=1)
想请问下,是这个参数配置的方式不对,还是理解有问题呢?