403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.88.33
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/mysql-test/suite/group_replication/t/gr_slow_member_garbage_collection.test
################################################################################
# BUG#20776314 THE CERTIFIER BROADCAST THREAD IS PRONE TO CONCURRENCY PROBLEMS
#
# This test fixes the first issue with the bug :
#
# If the garbage collection is in progress, we should discard all the
# incoming stable set message (certifier messages) as they will update the
# stable_gtid_set which will cause a concurrency problem.
#
# Test:
# 0. The test requires two servers: M1 and M2.
# 1. With both the members ONLINE. Commit a transaction (T1) on M1, that will
#    be certified and applied on both members. Wait for first round of garbage
#    collection to finish.
# 2. Stop GR on M2. Set DEBUG point to block garbage collection on M2. Start GR
#    on M2.
# 3. Commit a transaction (T2) on M1, that will be certified and applied on both
#    members. Wait for second round of garbage collection to finish on M1. Wait
#    for the third round of garbage collection to finish on M2.
# 4. Clean up.
################################################################################

--source include/big_test.inc
--source include/have_debug.inc
--source ../inc/have_group_replication_plugin.inc
--source ../inc/group_replication.inc

--connection server1
--echo ############################################################
--echo # Commit a transaction (T1) on server 1, that will be
--echo # certified and applied on both members.
CREATE TABLE t1(i INT PRIMARY KEY);
--source include/rpl_sync.inc

--connection server1
--echo # Wait for the first round of garbage collection to finish on server 1.
--let $wait_timeout= 65
--let $wait_condition= SELECT Transactions_committed_all_members<>"" FROM performance_schema.replication_group_member_stats
--source include/wait_condition.inc

--connection server2
--echo # Wait for the first round of garbage collection to finish on server 2.
--let $wait_timeout= 65
--let $wait_condition= SELECT Transactions_committed_all_members<>"" FROM performance_schema.replication_group_member_stats
--source include/wait_condition.inc

--echo # First round of garbage collection finished
--let $first_garbage_collection_transactions_committed= `SELECT Transactions_committed_all_members from performance_schema.replication_group_member_stats`

--connection server2
--echo ############################################################
--echo # Block garbage collection on server 2.
--source include/stop_group_replication.inc
SET @debug_save= @@GLOBAL.DEBUG;
# Setting the debug flag for the garbage collection blocking.
SET @@GLOBAL.DEBUG= '+d,certifier_garbage_collection_block';
--source include/start_group_replication.inc

--connection server1
--echo ############################################################
--echo # Commit a transaction (T2) on server 1, that will be
--echo # certified and applied on both members.
INSERT INTO t1 VALUES(1);
--source include/rpl_sync.inc

--connection server1
--echo # Wait for the second round of garbage collection to finish on server 1.
--let $wait_timeout= 65
--let $wait_condition= SELECT Transactions_committed_all_members<>"$first_garbage_collection_transactions_committed" FROM performance_schema.replication_group_member_stats
--source include/wait_condition.inc

--connection server2
--echo # Wait for the third round of garbage collection to finish on server 2.
--echo # Round on which garbage collection will be unblocked.
# wait_timeout = 60 +     60 +     30  = 150
#              2nd GC   3rd GC   extra

--let $wait_timeout= 150
--let $wait_condition= SELECT Transactions_committed_all_members<>"$first_garbage_collection_transactions_committed" FROM performance_schema.replication_group_member_stats
--source include/wait_condition.inc

# Cleanup

--connection server2
SET @@GLOBAL.DEBUG= @debug_save;

--connection server1
DROP TABLE t1;
--source ../inc/group_replication_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit