Description:
Observation: If a server hits with "ER_GROUP_REPLICATION_CONFIGURATION" while starting plugin, then it fails to capture its own details in the ER_GRP_RPL_MEMBER_CHANGE message.
For example:-
=============
M1: 'Group membership changed to , 127.0.0.1:13031, 127.0.0.1:13032 on view 15270672868053676:5.' << This doesn't look correct.
M2: 'Group membership changed to 127.0.0.1:13030, 127.0.0.1:13031, 127.0.0.1:13032 on view 15270672868053676:5.'
M3: 'Group membership changed to 127.0.0.1:13030, 127.0.0.1:13031, 127.0.0.1:13032 on view 15270672868053676:5.'
MTR testcase output:
=====================
Mysqltest client output from logfile
----------- MYSQLTEST OUTPUT START -----------
include/group_replication.inc [rpl_server_count=3]
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection server1]
VIEW_ID: 15270672868053676
[connection server1]
include/stop_group_replication.inc
SET GLOBAL group_replication_enforce_update_everywhere_checks= OFF;
SET GLOBAL group_replication_single_primary_mode= ON;
START GROUP_REPLICATION;
ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log.
## Check the Group membership change messages ##
## SERVER1:
Matching lines are:
2018-05-23T09:21:51.802185Z 0 [Note] [MY-011503] [Repl] Plugin group_replication reported: 'Group membership changed to , 127.0.0.1:13031, 127.0.0.1:13032 on view 15270672868053676:5.'
Occurrences of '15270672868053676:5' in the input file: 1
## SERVER2:
[connection server2]
Matching lines are:
2018-05-23T09:21:51.802025Z 0 [Note] [MY-011503] [Repl] Plugin group_replication reported: 'Group membership changed to 127.0.0.1:13030, 127.0.0.1:13031, 127.0.0.1:13032 on view 15270672868053676:5.'
Occurrences of '15270672868053676:5' in the input file: 1
## SERVER3:
[connection server3]
Matching lines are:
2018-05-23T09:21:51.802110Z 0 [Note] [MY-011503] [Repl] Plugin group_replication reported: 'Group membership changed to 127.0.0.1:13030, 127.0.0.1:13031, 127.0.0.1:13032 on view 15270672868053676:5.'
Occurrences of '15270672868053676:5' in the input file: 1
------------ MYSQLTEST OUTPUT END -----------
How to repeat:
MTR testcase tested on 8.0.12. Manually checked the same behavior on 5.7.23 as well.
Run command:
=============
$ ./mtr group_replication.gr_membership_chg_msg.test
Where,
$ cat gr_membership_chg_msg.cnf
!include ../my.cnf
[mysqld.1]
log_error_verbosity=3
[mysqld.2]
log_error_verbosity=3
[mysqld.3]
log_error_verbosity=3
[ENV]
SERVER_MYPORT_3= @mysqld.3.port
SERVER_MYSOCK_3= @mysqld.3.socket
$ cat gr_membership_chg_msg.test
###############################################################################
--let $group_replication_group_name= aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
--source include/have_group_replication_plugin.inc
--let $rpl_server_count= 3
--source include/group_replication.inc
--echo
let $cur_view_id= `SELECT DISTINCT SUBSTR(VIEW_ID,1,length(VIEW_ID)-2) FROM
performance_schema.replication_group_member_stats;`;
--echo VIEW_ID: $cur_view_id
--echo
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--source include/stop_group_replication.inc
SET GLOBAL group_replication_enforce_update_everywhere_checks= OFF;
SET GLOBAL group_replication_single_primary_mode= ON;
--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;
--sleep 10
--echo
--echo ## Check the Group membership change messages ##
--echo ## SERVER1:
--let $grep_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $grep_pattern = $cur_view_id:5
--let $grep_output = print_each
--source include/grep_pattern.inc
--echo
--echo ## SERVER2:
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
--let $grep_file= $MYSQLTEST_VARDIR/log/mysqld.2.err
--let $grep_pattern = $cur_view_id:5
--let $grep_output = print_each
--source include/grep_pattern.inc
--echo
--echo ## SERVER3:
--let $rpl_connection_name= server3
--source include/rpl_connection.inc
--let $grep_file= $MYSQLTEST_VARDIR/log/mysqld.3.err
--let $grep_pattern = $cur_view_id:5
--let $grep_output = print_each
--source include/grep_pattern.inc
--die "OK TO STOP HERE"