Server IP : 172.67.216.182 / Your IP : 162.158.163.215 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/mysql-test/suite/group_replication/t/ |
Upload File : |
################################################################################ # This test proves that skipping a View Change Event is possible. # To test this, a View Change is generated when one of the servers has # its applier stopped. We then inject an empty transaction and see that the # View Change was skipped. # # Test: # 0. The test requires three servers: M1, M2 and M3. # 1. Bootstrap start a group on M1. Start GR on M2. # 2. Stop applier thread on M2. Stop GR on M1. # 3. On M2, skip the View Change Event generated when M1 left. # 4. Start applier thread on M2. # 5. Start GR on M3. Verify sequence of events in binlog. There must be empty # transaction for UUID_GROUP:3 i.e. instead of view change event from M1. ################################################################################ --let $group_replication_group_name= fc0d4480-abd1-11e4-bcd8-0800200c9a66 --source ../inc/have_group_replication_plugin.inc --let $rpl_server_count= 3 --let $rpl_skip_group_replication_start= 1 --source ../inc/group_replication.inc # The sequence of events that make up a View Change --let $vcle_seq= Gtid # Query/BEGIN # View_change # Query/COMMIT # The sequence of events that make up an empty transaction --let $empty_seq= Gtid # Query/BEGIN # Query/COMMIT --echo # --echo # Setup a new server group --echo # --connection server1 --echo server1 --source ../inc/start_and_bootstrap_group_replication.inc --connection server2 --echo server2 --source include/start_group_replication.inc --echo # --echo # Stop the applier on server 2 and stop group replication on server 1 --echo # --connection server2 --echo server2 STOP SLAVE SQL_THREAD FOR CHANNEL "group_replication_applier"; --connection server1 --echo server1 --source include/stop_group_replication.inc --echo # --echo # Skip the View Change Event generated when server 1 left --echo # --connection server2 --echo server2 --eval SET @@SESSION.GTID_NEXT= "$group_replication_group_name:3" BEGIN; COMMIT; SET GTID_NEXT='AUTOMATIC'; START SLAVE SQL_THREAD FOR CHANNEL "group_replication_applier"; --echo # --echo # Check on server 3 that one of the View Change events was skipped --echo # --connection server3 --echo server3 --source include/start_group_replication.inc # VCE (s1 joined) | VCE (s2 joined) | Skipped VCE (s1 left) | VCE (s3 joined) --let $event_sequence= $vcle_seq # $vcle_seq # $empty_seq # $vcle_seq --source include/assert_binlog_events.inc --source ../inc/group_replication_end.inc