Debian Codegraph @

mysql-test/suite/group_replication/r/gr_acf_sender_no_majority.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. Kill server1, the group will block due no majority.
40 [connection server1]
41 # Kill and restart
42 include/rpl_reconnect.inc
43 [connection server2]
44 include/gr_wait_for_member_state.inc
45
46 ############################################################
47 # 5. Despite server2 has the second biggest weight, since
48 # the group has no majority, the replica will connect
49 # to server3.
50 [connection server3]
51 [connection server4]
52 Wait until ch1 IO_THREAD is connected to server3
53
54 ############################################################
55 # 6. Wait 30 seconds and validate that replica is still connected
56 # to server3.
57 [connection server4]
58 include/assert.inc [Verify channel ch1 IO_THREAD is ON and connected to server3]
59
60 ############################################################
61 # 7. Assert that group information did not change, since it
62 # lost the majority.
63 [connection server4]
64 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover for server1']
65 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover for server2']
66
67 ############################################################
68 # 8. Restore the majority on the group by forcing its membership
69 # to only server2.
70 [connection server2]
71 SET GLOBAL group_replication_force_members= "GROUP_REPLICATION_LOCAL_ADDR_SERVER2";
72 include/gr_wait_primary_member_uuid.inc
73 SET GLOBAL group_replication_force_members= "";
74
75 ############################################################
76 # 9. Since server2 has bigger weight than server3, the managed
77 # channel must reconnect to server2 now that the group has
78 # majority.
79 [connection server4]
80 Wait until ch1 IO_THREAD is connected to server2
81
82 ############################################################
83 # 10. Clean up.
84 [connection server4]
85 include/stop_slave.inc [FOR CHANNEL 'ch1']
86 include/rpl_reset_slave.inc
87 SELECT asynchronous_connection_failover_delete_managed('ch1', 'GROUP_NAME');
88 asynchronous_connection_failover_delete_managed('ch1', 'GROUP_NAME')
89 The UDF asynchronous_connection_failover_delete_managed() executed successfully.
90 include/assert.inc ['There are 0 rows in performance_schema.replication_asynchronous_connection_failover_managed for group']
91 SELECT asynchronous_connection_failover_delete_source('ch1', '127.0.0.1', SERVER_MYPORT_3, '');;
92 asynchronous_connection_failover_delete_source('ch1', '127.0.0.1', SERVER_MYPORT_3, '')
93 The UDF asynchronous_connection_failover_delete_source() executed successfully.
94 include/assert.inc ['There are no rows in performance_schema.replication_asynchronous_connection_failover']
95 include/assert.inc ['There are no rows in performance_schema.replication_asynchronous_connection_failover_managed']
96 SET SESSION sql_log_bin = 0;
97 call mtr.add_suppression("The source .* for channel 'ch1' has joined the group .*, and so added its entry into replication_asynchronous_connection_failover table.");
98 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.*");
99 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.");
100 call mtr.add_suppression("The source .* for channel 'ch1' has left the group .*, and so removed its entry from replication_asynchronous_connection_failover table.");
101 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.");
102 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.");
103 call mtr.add_suppression("The Monitor IO thread failed to detect if the source belongs to the group majority on the source.*");
104 SET SESSION sql_log_bin = 1;
105 [connection server2]
106 include/stop_group_replication.inc
107 include/group_replication_end.inc