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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
include/group_replication.inc [rpl_server_count=4]
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
[connection server1]
#
# 1. Start GR on server 1. Create an asynchronous connection to server 3
# Add some data to server 3 that will be replicated to server 1
[connection server1]
include/save_sysvars.inc [ "GLOBAL.group_replication_view_change_uuid" ]
SET GLOBAL group_replication_view_change_uuid = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
Warnings:
Warning 1681 'group_replication_view_change_uuid' is deprecated and will be removed in a future release.
include/start_and_bootstrap_group_replication.inc
Warnings:
Warning 1681 'group_replication_view_change_uuid' is deprecated and will be removed in a future release.
CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_USER='root', SOURCE_AUTO_POSITION=1, SOURCE_PORT=SERVER_3_PORT FOR CHANNEL 'ch1';
Warnings:
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
include/start_slave.inc [FOR CHANNEL 'ch1']
# Add some data on 3 and sync
[connection server3]
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
include/sync_slave_sql_with_master.inc
#
# 2. Insert one last transaction on server 3 that will block on commit on server 1
# Use a point that blocks the transaction after certification but before commit
# Wait for the transaction to block
[connection server1]
# Adding debug point 'ordered_commit_blocked' to @@GLOBAL.debug
[connection server3]
INSERT INTO t1 VALUES (2);
[connection server1]
SET DEBUG_SYNC= "now WAIT_FOR signal.ordered_commit_waiting";
# Removing debug point 'ordered_commit_blocked' from @@GLOBAL.debug
#
# 3. Join member 2 to the group
# Wait for the VCLE to reach application where it will be stuck waiting for its ticket
[connection server2]
include/save_sysvars.inc [ "GLOBAL.group_replication_view_change_uuid" ]
SET GLOBAL group_replication_view_change_uuid = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
Warnings:
Warning 1681 'group_replication_view_change_uuid' is deprecated and will be removed in a future release.
SET GLOBAL group_replication_group_name= "GROUP_REPLICATION_GROUP_NAME";
START GROUP_REPLICATION;
Warnings:
Warning 1681 'group_replication_view_change_uuid' is deprecated and will be removed in a future release.
[connection server1]
include/assert.inc ['There is a worker whose stage reports it is waiting on a ticket']
#
# 4. Unblock the transaction from the async channel, but stop it again before it pops the ticket
# Adding debug point 'rpl_end_of_ticket_blocked' to @@GLOBAL.debug
SET DEBUG_SYNC= "now SIGNAL signal.ordered_commit_continue";
SET DEBUG_SYNC= "now WAIT_FOR signal.end_of_ticket_waiting";
# Removing debug point 'rpl_end_of_ticket_blocked' from @@GLOBAL.debug
#
# 5. Join member 4. The new VCLE will pop the ticket with no broadcast
# Wait for this new VCLE to be queued
[connection server4]
include/save_sysvars.inc [ "GLOBAL.group_replication_view_change_uuid" ]
SET GLOBAL group_replication_view_change_uuid = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
Warnings:
Warning 1681 'group_replication_view_change_uuid' is deprecated and will be removed in a future release.
SET GLOBAL group_replication_group_name= "GROUP_REPLICATION_GROUP_NAME";
START GROUP_REPLICATION;
Warnings:
Warning 1681 'group_replication_view_change_uuid' is deprecated and will be removed in a future release.
[connection server1]
#
# 6. Unblock the stuck ticket
# All members should now be online
SET DEBUG_SYNC= "now SIGNAL signal.end_of_ticket_continue";
#
# 7. Cleaning up
[connection server3]
DROP TABLE t1;
include/sync_slave_sql_with_master.inc
[connection server1]
SET DEBUG_SYNC= 'RESET';
include/stop_slave.inc
CHANGE REPLICATION SOURCE TO SOURCE_AUTO_POSITION=0 FOR CHANNEL "ch1";
include/stop_group_replication.inc
include/restore_sysvars.inc
Warnings:
Warning 1681 'group_replication_view_change_uuid' is deprecated and will be removed in a future release.
[connection server2]
include/stop_group_replication.inc
include/restore_sysvars.inc
Warnings:
Warning 1681 'group_replication_view_change_uuid' is deprecated and will be removed in a future release.
[connection server4]
include/stop_group_replication.inc
include/restore_sysvars.inc
Warnings:
Warning 1681 'group_replication_view_change_uuid' is deprecated and will be removed in a future release.
include/group_replication_end.inc
|