GBase 8a数据库集群V95版本的readonly状态,会阻塞后续的数据变动操作(DML,DDL)等

GBase 8a 数据库集群,在V95版本里如果发生过readonly状态,也就是只读状态,会自动阻塞后续的DML,DDL等数据变动操作。当readonly状态恢复成normal时,系统并不是立即恢复,而是通过一个参数gcluster_mode_checkinterval定时检测,也就是最长你要等待这个时间,SQL才能正常运行下去。

参数

gcluster新增配置参数

# 是否在readonly状态下等待
gcluster_mode_wait=1

#等待【分钟】数,注意不是秒
gcluster_mode_checkinterval=5

样例

gbase> show variables like '%gcluster_mode_wait%';
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| gcluster_mode_wait | 1     |
+--------------------+-------+
1 row in set (Elapsed: 00:00:00.00)
gbase> set gcluster_mode_wait=0;
ERROR 1238 (HY000): Variable 'gcluster_mode_wait' is a read only variable


gbase> show variables like '%checkint%';
+-----------------------------+-------+
| Variable_name               | Value |
+-----------------------------+-------+
| gcluster_mode_checkinterval | 5     |
+-----------------------------+-------+
1 row in set (Elapsed: 00:00:00.00)

gbase> set gcluster_mode_checkinterval=3;
ERROR 1238 (HY000): Variable 'gcluster_mode_checkinterval' is a read only variable

注意

这2个参数是只读的,只能通过修改配置文件,然后重启服务实现。 仅在调度集群gcluster有效。