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 |
+----------------------------------------------------------------------------------+----------------+----------------+
标签:group,在线,work,节点,MGR,+---------------------------------------------------------- 来源: https://blog.51cto.com/roidba/2785269