MGR在线切换主节点

核心系统要扩容,在线滚动切换主节点,对业务造成极小影响,记录一下。

server_uuid通过发出以下命令, 传递要成为组新主成员的成员的:

SELECT group_replication_set_as_primary(member_uuid);
在操作运行期间,您可以通过发出以下命令来检查其进度:

SELECT event_name, work_completed, work_estimated FROM performance_schema.events_stages_current WHERE event_name LIKE "%stage/group_rpl%";
+----------------------------------------------------------------------------------+----------------+----------------+
| event_name                                                                       | work_completed | work_estimated |
+----------------------------------------------------------------------------------+----------------+----------------+
| stage/group_rpl/Primary Election: Waiting for members to turn on super_read_only |              3 |              5 |
+----------------------------------------------------------------------------------+----------------+----------------+
上一篇:【赵强老师】在MongoDB中使用MapReduce方式计算聚合


下一篇:容器化RDS:计算存储分离还是本地存储?