Debian Codegraph @

mysql-test/suite/group_replication/r/gr_acf_sender_no_majority_connection.result

raw
1 include/group_replication.inc [rpl_server_count=4]
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection server1]
6
7 ############################################################
8 # 1. Deploy a 2 members group in single primary mode.
9 [connection server1]
10 include/start_and_bootstrap_group_replication.inc
11 [connection server2]
12 include/start_group_replication.inc
13
14 ############################################################
15 # 2. Configure replica to manage the asynchronous connection
16 # to group and server3.
17 [connection server4]
18 SELECT asynchronous_connection_failover_add_managed('ch1', 'GroupReplication', 'GROUP_NAME', '127.0.0.1', SERVER_MYPORT_1, '', 90, 70);;
19 asynchronous_connection_failover_add_managed('ch1', 'GroupReplication', 'GROUP_NAME', '127.0.0.1', SERVER_MYPORT_1, '', 90, 70)
20 The UDF asynchronous_connection_failover_add_managed() executed successfully.
21 SELECT asynchronous_connection_failover_add_source('ch1', '127.0.0.1', SERVER_MYPORT_3, '', 50);;
22 asynchronous_connection_failover_add_source('ch1', '127.0.0.1', SERVER_MYPORT_3, '', 50)
23 The UDF asynchronous_connection_failover_add_source() executed successfully.
24 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover for server1']
25 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover for server3']
26 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover_managed for server1']
27
28 ############################################################
29 # 3. Create and start the managed channel connected to server1.
30 [connection server4]
31 CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_USER='root', SOURCE_AUTO_POSITION=1, SOURCE_CONNECTION_AUTO_FAILOVER=1, SOURCE_PORT=SERVER_1_PORT, SOURCE_RETRY_COUNT=0 FOR CHANNEL 'ch1';
32 Warnings:
33 Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
34 Note 1760 Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
35 include/start_slave.inc [FOR CHANNEL 'ch1']
36 include/assert.inc [Verify channel ch1 IO_THREAD is ON and connected to server1]
37
38 ############################################################
39 # 4. Disconnect the managed channel.
40 [connection server4]
41 include/stop_slave.inc [FOR CHANNEL 'ch1']
42
43 ############################################################
44 # 5. Kill server2, the group will block due no majority.
45 [connection server2]
46 # Kill and restart
47 include/rpl_reconnect.inc
48 [connection server1]
49 include/gr_wait_for_member_state.inc
50
51 ############################################################
52 # 6. Start the managed channel.
53 # Despite server2 has the second biggest weight, since
54 # the group has no majority, the replica will connect
55 # to server3.
56 [connection server3]
57 [connection server4]
58 include/start_slave.inc [FOR CHANNEL 'ch1']
59 Wait until ch1 IO_THREAD is connected to server3
60
61 ############################################################
62 # 7. Assert that group information did not change, since it
63 # lost the majority.
64 [connection server4]
65 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover for server1']
66 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover for server2']
67
68 ############################################################
69 # 8. Restore the majority on the group by forcing its membership
70 # to only server1.
71 [connection server1]
72 SET GLOBAL group_replication_force_members= "GROUP_REPLICATION_LOCAL_ADDR_SERVER2";
73 include/gr_wait_primary_member_uuid.inc
74 SET GLOBAL group_replication_force_members= "";
75
76 ############################################################
77 # 9. Since server1 has bigger weight than server3, the managed
78 # channel must reconnect to server1 now that the group has
79 # majority.
80 [connection server4]
81 Wait until ch1 IO_THREAD is connected to server1
82
83 ############################################################
84 # 10. Clean up.
85 [connection server4]
86 include/stop_slave.inc [FOR CHANNEL 'ch1']
87 include/rpl_reset_slave.inc
88 SELECT asynchronous_connection_failover_delete_managed('ch1', 'GROUP_NAME');
89 asynchronous_connection_failover_delete_managed('ch1', 'GROUP_NAME')
90 The UDF asynchronous_connection_failover_delete_managed() executed successfully.
91 include/assert.inc ['There are 0 rows in performance_schema.replication_asynchronous_connection_failover_managed for group']
92 SELECT asynchronous_connection_failover_delete_source('ch1', '127.0.0.1', SERVER_MYPORT_3, '');;
93 asynchronous_connection_failover_delete_source('ch1', '127.0.0.1', SERVER_MYPORT_3, '')
94 The UDF asynchronous_connection_failover_delete_source() executed successfully.
95 include/assert.inc ['There are no rows in performance_schema.replication_asynchronous_connection_failover']
96 include/assert.inc ['There are no rows in performance_schema.replication_asynchronous_connection_failover_managed']
97 SET SESSION sql_log_bin = 0;
98 call mtr.add_suppression("The source .* for channel 'ch1' has joined the group .*, and so added its entry into replication_asynchronous_connection_failover table.");
99 call mtr.add_suppression("The Monitor IO thread detected that the source .* does not belong to the group majority, thence the channel .* will try to connect to another source.*");
100 call mtr.add_suppression("The IO thread detected that the source .* does not belong to the group majority, thence the channel .* will try to connect to another source.");
101 call mtr.add_suppression("The source .* for channel 'ch1' has left the group .*, and so removed its entry from replication_asynchronous_connection_failover table.");
102 call mtr.add_suppression("The group .* for the channel .* has been removed, and so removed its entry from replication_asynchronous_connection_failover_managed and all the group members from replication_asynchronous_connection_failover table.");
103 call mtr.add_suppression("The group .* for the channel .* has been added, and so added its entry in replication_asynchronous_connection_failover_managed and source to replication_asynchronous_connection_failover table.");
104 call mtr.add_suppression("The Monitor IO thread failed to detect if the source belongs to the group majority on the source .* for channel 'ch1'.");
105 SET SESSION sql_log_bin = 1;
106 [connection server1]
107 include/stop_group_replication.inc
108 include/group_replication_end.inc