1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
###############################################################################
# Bug#27294009 - XCOM ENTERS AN INFINITE LOOP IN CASE OF A REQUEST_RETRY
#
# This test verifies that when the bootstrap node is not correctly set up in a
# group, control requests (e.g., join, leave) will fail cleanly. Before fixing
# this bug, issuing control requests to a group without the boot node correctly
# set up would lead to nodes hanging indefinitely.
#
# The ideal scenario to test this bug fix would be to simultaneously start a
# group with two (or more) nodes without setting any as the boot node. However,
# due to the synchronous nature of MTR tests, it is not possible to do so, as
# nodes will try (and fail) to connect to each other in succession, never
# getting a chance to actually communicate. Hence, it is necessary to trick a
# single node into connecting to itself.
#
# Test:
# 0. This test requires one server.
# 1. Set up seeds with alternative localhost addresses to force the node to
# connect to itself.
# 2. Start group replication without setting the boot node flag to true.
# 3. The join request fails cleanly without the node hanging.
# 4. Clean up.
###############################################################################
--source include/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source include/group_replication.inc
--echo ############################################################
--echo # 1. Suppress expected error messages
--echo ############################################################
SET SESSION sql_log_bin= 0;
call mtr.add_suppression("Plugin group_replication reported: 'read failed'");
call mtr.add_suppression("Plugin group_replication reported: '\\[GCS\\] read failed'");
call mtr.add_suppression("Plugin group_replication reported: 'Timeout on wait for view after joining group'");
call mtr.add_suppression("\\[GCS\\] Error connecting to all peers. Member join failed. Local port:*");
call mtr.add_suppression("\\[GCS\\] The member was unable to join the group.*");
SET SESSION sql_log_bin= 1;
--echo ############################################################
--echo # 2. Define and setup seeds to force self connect
--echo ############################################################
--let $local_address= `SELECT @@GLOBAL.group_replication_local_address;`
--let $xcom_port = `SELECT SUBSTR("$local_address",11,5);`
--let $localhost_addr = `SELECT CONCAT("localhost:","$xcom_port");`
--let $localhost_alt_addr = `SELECT CONCAT("127.0.0.1:","$xcom_port");`
--replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME
--eval SET @@global.group_replication_group_name="$group_replication_group_name"
--replace_result $xcom_port XCOM_PORT
--eval SET @@global.group_replication_group_seeds=`localhost:$xcom_port, 127.0.0.1:$xcom_port`
--echo ############################################################
--echo # 3. Start the node and expect it to fail
--echo ############################################################
--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;
--echo ############################################################
--echo # 4. Clean up
--echo ############################################################
--source include/group_replication_end.inc
|