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
|
include/have_replication_observers_example_plugin.inc
include/group_replication.inc
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. Load plugin replication observers example on server1
include/install_replication_observers_example.inc
# 2. Load plugin replication observers example on server2
[connection server2]
include/install_replication_observers_example.inc
# 3. Enable debug point that will put on hold the notification of recv
# messages
# Adding debug point 'group_replication_message_service_hold_messages' to @@GLOBAL.debug
# 4. Execute UDF that will transmit tag and message over GR send service
SELECT group_replication_service_message_send("tag", "Server2 sent a message");
group_replication_service_message_send("tag", "Server2 sent a message")
The tag and message was sent to the group.
# 5. On server 1 execute UDF that will transmit tag and message over GR
# send service
[connection server1]
SELECT group_replication_service_message_send("tag", "Server1 sent a message");
group_replication_service_message_send("tag", "Server1 sent a message")
The tag and message was sent to the group.
# 6. To decrease failure rate on assert_grep we do a transaction with
# AFTER consistency to add some rounds on GCS communication and stop GR on
# server1, which will make it wait for the delivery of new view, and
# that will happen only after delivery of service message. This will
# give some time to server to receive and write it to error log.
SET @@SESSION.group_replication_consistency= 'AFTER';
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY , b INT);
DROP TABLE test.t1;
include/stop_group_replication.inc
# 7. Assert server1 received both messages transmitted by GR delivery
# message service
include/assert_grep.inc [Server 1 received message from server 2.]
include/assert_grep.inc [Server 1 received message from itself.]
# 8. Assert server2 did not received any message transmitted by GR delivery
# message service due being held on debug point
[connection server2]
include/assert_grep.inc [Server 2 did not received any message.]
# 9. Assert server2 received view from server1 leaving the group
include/assert.inc [Server2 received view from server1 leaving the group]
# 10. Remove debug point and release hold of messages
# Removing debug point 'group_replication_message_service_hold_messages' from @@GLOBAL.debug
SET DEBUG_SYNC= "now SIGNAL signal.notification_continue";
# 11. Assert server2 received both messages transmitted by GR message
# delivery
include/assert_grep.inc [Server 2 received message from itself.]
include/assert_grep.inc [Server 2 received message from server 1.]
# 12. Cleanup
include/uninstall_replication_observers_example.inc
[connection server1]
include/start_group_replication.inc
include/uninstall_replication_observers_example.inc
include/group_replication_end.inc
|