Bug #94429 MySQL 5.7 lowest member version join check should be with group lowest
Submitted: 21 Feb 2019 18:00 Modified: 12 Mar 2019 16:14
Reporter: Jaideep Karande Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S3 (Non-critical)
Version:5.7.26 OS:Any
Assigned to: CPU Architecture:Any

[21 Feb 2019 18:00] Jaideep Karande
Description:
Example:
Start GR on M1 with version 5.7.26
Start GR on M2 with version 8.0.16
Start GR on M3 with version 5.7.26
M3 will not join the group even though M1 version 5.7.26 is part of the group.
At present check is done against highest member version.
(actually, the check is done with all members, which is equivalent to highest member version)

The issue exists and checked on 8.0.16.

+ Function check_version_compatibility_with_group() loops group_member_mgr.
group_member_mgr also return self, self check should be avoided.

Reason: New joinee can never be lower than the lowest version of the group if the member considers self-version as part of the group.

How to repeat:
--source include/big_test.inc
--source include/have_debug.inc
--source include/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--let $rpl_server_count= 3
--source include/group_replication.inc

--echo
--echo # 1. Bootstrap M1 and start GR start GR on M2 with version 9.0.17.
--echo

--let $rpl_connection_name= server1
--source include/rpl_connection.inc

--source include/start_and_bootstrap_group_replication.inc

--let $rpl_connection_name= server2
--source include/rpl_connection.inc
SET @debug3_save= @@GLOBAL.DEBUG;
SET @@GLOBAL.DEBUG= 'd,group_replication_compatibility_higher_major_version';
SET SESSION sql_log_bin=0;
--source include/start_group_replication.inc

--let $rpl_connection_name= server3
--source include/rpl_connection.inc
--source include/start_group_replication.inc

Suggested fix:
Check only against lowest major version. +Skip self-check.
[12 Mar 2019 16:14] Margaret Fisher
Posted by developer:
 
Changelog entry added for MySQL 5.7.27 and 8.0.17:

In Group Replication, joining members could wrongly identify themselves as incompatible with an existing replication group even if there were members at the same version already in the group, because they checked against all other members, including the member at the highest version. Joining members also included their own version in the compatibility check. Now, joining members only compare themselves with the existing group member at the lowest version, and do not count their own version.