接收到报警通知,db3这台组复制成员故障down机了,等修复好,启动服务器,然后再启动mysql实例,进去查看状态,变成了RECOVERING,如下所示;mysql> SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+----------------------+-------------+--------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE |
+---------------------------+--------------------------------------+----------------------+-------------+--------------+
| group_replication_applier | 3381d155-d7d1-11e6-94f7-b8ca3af6e36c | hch_test_dbm2_121_71 | 3317 | ONLINE |
| group_replication_applier | 664b9ce9-d7de-11e6-9e8c-18a99b763071 | hch_test_web_1_24 | 3317 | ONLINE |
| group_replication_applier | 84dba8ff-d7d2-11e6-aa9a-18a99b76310d | bpe_service | 3317 | RECOVERING |
+---------------------------+--------------------------------------+----------------------+-------------+--------------+
3 rows in set (0.00 sec)
mysql>这种状态有点类似mongodb的sendary的RECOVERING状态,对于刚刚出现的MySQL Group Replication新技术,遇到这种情况,这种情况怎么办?
在mongodb的这种模式下,一般是secondary从primary库上不停复制数据,所以我们遵循这种思路,去看下db2的数据目录,看到有很多relay-bin的recovery日志在应用执行,如下所示relay日志包记录-rw-r----- 1 mysql mysql 383 1月 17 16:08 bpe_service-relay-bin-group_replication_applier.000019
-rw-r----- 1 mysql mysql 502 1月 17 16:11 bpe_service-relay-bin-group_replication_applier.000020
-rw-r----- 1 mysql mysql 502 1月 17 16:23 bpe_service-relay-bin-group_replication_applier.000021
-rw-r----- 1 mysql mysql 421 1月 17 16:23 bpe_service-relay-bin-group_replication_applier.000022
-rw-r----- 1 mysql mysql 228 1月 17 16:23 bpe_service-relay-bin-group_replication_applier.index
-rw-r----- 1 mysql mysql 312 1月 17 16:24 bpe_service-relay-bin-group_replication_recovery.000007
-rw-r----- 1 mysql mysql 1.1G 1月 17 16:24 bpe_service-relay-bin-group_replication_recovery.000008
-rw-r----- 1 mysql mysql 391 1月 17 16:24 bpe_service-relay-bin-group_replication_recovery.000009
-rw-r----- 1 mysql mysql 312 1月 17 16:24 bpe_service-relay-bin-group_replication_recovery.000010
-rw-r----- 1 mysql mysql 1.1G 1月 17 16:24 bpe_service-relay-bin-group_replication_recovery.000011
-rw-r----- 1 mysql mysql 391 1月 17 16:24 bpe_service-relay-bin-group_replication_recovery.000012
-rw-r----- 1 mysql mysql 312 1月 17 16:24 bpe_service-relay-bin-group_replication_recovery.000013
-rw-r----- 1 mysql mysql 1.1G 1月 17 16:25 bpe_service-relay-bin-group_replication_recovery.000014
-rw-r----- 1 mysql mysql 391 1月 17 16:25 bpe_service-relay-bin-group_replication_recovery.000015
-rw-r----- 1 mysql mysql 312 1月 17 16:25 bpe_service-relay-bin-group_replication_recovery.000016
-rw-r----- 1 mysql mysql 1.1G 1月 17 16:25 bpe_service-relay-bin-group_replication_recovery.000017
-rw-r----- 1 mysql mysql 391 1月 17 16:25 bpe_service-relay-bin-group_replication_recovery.000018
-rw-r----- 1 mysql mysql 312 1月 17 16:25 bpe_service-relay-bin-group_re