无法停止 Zone

从 obproxy 发起停止 zone 的操作报错,信息如下,麻烦问一下各位这是什么问题呢?

MySQL [oceanbase]> select * from __all_server;
+----------------------------+----------------------------+--------------+----------+----+-------+------------+-----------------+--------+-----------------------+----------------------------------------------------------------------------------------+-----------+--------------------+--------------+----------------+-------------------+
| gmt_create                 | gmt_modified               | svr_ip       | svr_port | id | zone  | inner_port | with_rootserver | status | block_migrate_in_time | build_version                                                                          | stop_time | start_service_time | first_sessid | with_partition | last_offline_time |
+----------------------------+----------------------------+--------------+----------+----+-------+------------+-----------------+--------+-----------------------+----------------------------------------------------------------------------------------+-----------+--------------------+--------------+----------------+-------------------+
| 2022-06-09 17:46:57.036258 | 2022-06-20 10:02:29.420760 | 10.211.55.74 |     2882 |  1 | zone1 |       2881 |               1 | active |                     0 | 3.1.3_10100032022041510-a09d3134c10665f03fd56d7f8bdd413b2b771977(Apr 15 2022 02:16:22) |         0 |   1655690549373421 |            0 |              1 |                 0 |
| 2022-06-09 17:46:58.046374 | 2022-06-20 10:02:29.433062 | 10.211.55.75 |     2882 |  2 | zone2 |       2881 |               0 | active |                     0 | 3.1.3_10100032022041510-a09d3134c10665f03fd56d7f8bdd413b2b771977(Apr 15 2022 02:16:22) |         0 |   1655690549386718 |            0 |              1 |                 0 |
| 2022-06-09 17:46:57.342416 | 2022-06-20 10:02:27.874724 | 10.211.55.76 |     2882 |  3 | zone3 |       2881 |               0 | active |                     0 | 3.1.3_10100032022041510-a09d3134c10665f03fd56d7f8bdd413b2b771977(Apr 15 2022 02:16:22) |         0 |   1655690547378765 |            0 |              1 |                 0 |
+----------------------------+----------------------------+--------------+----------+----+-------+------------+-----------------+--------+-----------------------+----------------------------------------------------------------------------------------+-----------+--------------------+--------------+----------------+-------------------+
3 rows in set (0.011 sec)

MySQL [oceanbase]> alter system stop zone zone3;
ERROR 4660 (HY000): cannot stop server or stop zone in multiple zones
MySQL [oceanbase]>

报错信息:

ERROR 4660 (HY000): cannot stop server or stop zone in multiple zones

文档中找到如下描述,不知道是否跟报错有关:

  • 停止 Zone 时需要确保多数派副本均在线,否则操作会失败。

select * from __all_zone; 看一下zone的状态是不是都是正常的

感谢老师提供思路,我第一次去尝试停止 zone1,出现 timeout,但是实际上已经停止了,再去停止 zon3 就报了这个错误。

我现在多次去系统视图查看然后返回测试,发现3个zone里面,停掉了第一个,再去停第二个就会报这个错误。

在这里请教一下老师,这个知识点应该怎么理解?一个集群中只能停止一个zone吗?

hardcode限制,stop zone时判断是否有其他 inactive zone 或者其他 zone下是否有不能提供服务的节点。以上两种任一情况都无法完成stop zone 操作。

好的,感谢老师~