← Back
Editing: gr_slave_max_allowed_packet_dependency.test
################################################################################ # This test checks that group replication applier thread is dependent upon # slave_max_allowed_packet to allow the processing of larger View_change packets. # If the certification database is too big to transmit, all donors will encode # an error instead that will make the joiner fail. # # References: # BUG#26770576: ALL MEMBERS ARE EXITED FROM GR WHEN 1/3 NODE TRIED TO REJOIN AFTER SHUTDOWN # BUG#28443958: ALL MEMBERS ARE EXITED FROM GR WHEN 1/4 NODE TRIED TO REJOIN AFTER NETWORK DROP # # Test: # 0. The test requires two server in multi primary mode # 1. Bootstrap server1 (disable certification database garbage collection). # Set slave_max_allowed_packet to lowest value # 2. Generate 200 transactions on server1 to increase # certification database size. # 3. Start GR on server2, view_change packet will be high in size. # Without certification information, server 2 can't join and moves to ERROR state # 4. Set a bigger value of slave_max_allowed_packet on server1 # Restart server2 and see it come ONLINE. # 5. Verification. # 6. Cleanup. ################################################################################ --source include/big_test.inc --source include/have_debug.inc --source ../inc/have_group_replication_plugin.inc --let $rpl_skip_group_replication_start= 1 --source ../inc/group_replication.inc --echo --echo # 1. Bootstrap server1 (disable certification database garbage collection). --echo # Set slave_max_allowed_packet to lowest value --let $rpl_connection_name= server1 --source include/rpl_connection.inc --source ../inc/start_and_bootstrap_group_replication.inc SET @debug_save1= @@GLOBAL.DEBUG; SET @@GLOBAL.DEBUG= 'd,group_replication_do_not_clear_certification_database'; SET @debug_save_slave_max_allowed_packet= @@GLOBAL.slave_max_allowed_packet; SET GLOBAL slave_max_allowed_packet=1024; --echo --echo # 2. Generate 200 transactions on server1 to increase --echo # certification database size. ## We have disabled cleaning of certification database. ## We have limited packet size to 1 KB slave_max_allowed_packet. ## The certification will not be encoded and member2 will ## go to ERROR state if the view change log event to be generated is bigger then ## slave_max_allowed_packet ## As of now size of certification database is growing to approx 13339 ## which includes (12+48)*200 and other View_change information. --let $rpl_connection_name= server1 --source include/rpl_connection.inc CREATE TABLE t1 (a INT PRIMARY KEY); --disable_query_log --let $rows= 200 WHILE($rows) { --eval INSERT INTO t1 (a) VALUES ( $rows ) --dec $rows } --enable_query_log --echo --echo # 3. Start GR on server2, view_change packet will be high in size. --echo # Without certification information, server 2 can't join and moves to ERROR state --echo --let $rpl_connection_name= server2 --source include/rpl_connection.inc --let $group_replication_start_member_state= ERROR --source include/start_group_replication.inc # Safety sleep against delays on writing --sleep 1 --let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.2.err --let $assert_only_after = CURRENT_TEST: group_replication.gr_slave_max_allowed_packet_dependency --let $assert_count = 1 --let $assert_select = The certification information could not be set in this server: 'Certification information is too large for transmission.' --let $assert_text = Found the expected error about the view change log even being over size --source include/assert_grep.inc --echo --echo # 4. Set a bigger value of slave_max_allowed_packet on server1 --echo # Restart server2 and see it come ONLINE. --let $rpl_connection_name= server1 --source include/rpl_connection.inc SET @@GLOBAL.slave_max_allowed_packet=@debug_save_slave_max_allowed_packet; --let $rpl_connection_name= server2 --source include/rpl_connection.inc --source include/stop_group_replication.inc --let $wait_timeout=150 --source include/start_group_replication.inc --let $rpl_connection_name= server1 --source include/rpl_connection.inc --let $group_replication_number_of_members= 2 --source ../inc/gr_wait_for_number_of_members.inc --echo --echo # 5. Verification. --let $diff_tables=server1:t1, server2:t1 --source include/diff_tables.inc --echo --echo # 6. Cleanup. DROP TABLE t1; --let $rpl_connection_name= server1 --source include/rpl_connection.inc SET @@GLOBAL.DEBUG= @debug_save1; --let $rpl_connection_name= server2 --source include/rpl_connection.inc SET session sql_log_bin=0; call mtr.add_suppression("The certification information could not be set in this server: 'Certification information is too large for transmission.'"); call mtr.add_suppression("Error when processing certification information in the recovery process"); call mtr.add_suppression("Fatal error during the recovery process of Group Replication. The server will leave the group."); call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going."); call mtr.add_suppression("All donors left. Aborting group replication recovery."); call mtr.add_suppression("Skipping leave operation: member already left the group."); call mtr.add_suppression("On shutdown there was a timeout receiving a view change. This can lead to a possible inconsistent state. Check the log for more details"); SET session sql_log_bin=1; --source ../inc/group_replication_end.inc
Save File
Cancel