Commit 7dbada16 authored by Serge Kozlov's avatar Serge Kozlov

BUG#12604949. Increased timeout for switching sync->async. Number of iterations for loops sets 10.

parent 629d2189
...@@ -93,7 +93,7 @@ Variable_name Value ...@@ -93,7 +93,7 @@ Variable_name Value
Rpl_semi_sync_master_no_tx 0 Rpl_semi_sync_master_no_tx 0
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_yes_tx 301 Rpl_semi_sync_master_yes_tx 11
[ on slave ] [ on slave ]
[ slave status after replicated inserts ] [ slave status after replicated inserts ]
show status like 'Rpl_semi_sync_slave_status'; show status like 'Rpl_semi_sync_slave_status';
...@@ -101,13 +101,13 @@ Variable_name Value ...@@ -101,13 +101,13 @@ Variable_name Value
Rpl_semi_sync_slave_status ON Rpl_semi_sync_slave_status ON
select count(distinct a) from t1; select count(distinct a) from t1;
count(distinct a) count(distinct a)
300 10
select min(a) from t1; select min(a) from t1;
min(a) min(a)
1 1
select max(a) from t1; select max(a) from t1;
max(a) max(a)
300 10
# BUG#50157 # BUG#50157
# semi-sync replication crashes when replicating a transaction which # semi-sync replication crashes when replicating a transaction which
...@@ -133,6 +133,7 @@ SET SESSION AUTOCOMMIT= 1; ...@@ -133,6 +133,7 @@ SET SESSION AUTOCOMMIT= 1;
# #
include/stop_slave.inc include/stop_slave.inc
[ on master ] [ on master ]
set global rpl_semi_sync_master_timeout= 5000;
[ master status should be ON ] [ master status should be ON ]
show status like 'Rpl_semi_sync_master_status'; show status like 'Rpl_semi_sync_master_status';
Variable_name Value Variable_name Value
...@@ -142,7 +143,7 @@ Variable_name Value ...@@ -142,7 +143,7 @@ Variable_name Value
Rpl_semi_sync_master_no_tx 0 Rpl_semi_sync_master_no_tx 0
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_yes_tx 304 Rpl_semi_sync_master_yes_tx 14
show status like 'Rpl_semi_sync_master_clients'; show status like 'Rpl_semi_sync_master_clients';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_clients 1 Rpl_semi_sync_master_clients 1
...@@ -157,7 +158,7 @@ Variable_name Value ...@@ -157,7 +158,7 @@ Variable_name Value
Rpl_semi_sync_master_no_tx 1 Rpl_semi_sync_master_no_tx 1
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_yes_tx 304 Rpl_semi_sync_master_yes_tx 14
insert into t1 values (100); insert into t1 values (100);
[ master status should be OFF ] [ master status should be OFF ]
show status like 'Rpl_semi_sync_master_status'; show status like 'Rpl_semi_sync_master_status';
...@@ -165,10 +166,10 @@ Variable_name Value ...@@ -165,10 +166,10 @@ Variable_name Value
Rpl_semi_sync_master_status OFF Rpl_semi_sync_master_status OFF
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_no_tx 302 Rpl_semi_sync_master_no_tx 12
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_yes_tx 304 Rpl_semi_sync_master_yes_tx 14
# #
# Test semi-sync status on master will be ON again when slave catches up # Test semi-sync status on master will be ON again when slave catches up
# #
...@@ -198,10 +199,10 @@ Variable_name Value ...@@ -198,10 +199,10 @@ Variable_name Value
Rpl_semi_sync_master_status ON Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_no_tx 302 Rpl_semi_sync_master_no_tx 12
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_yes_tx 304 Rpl_semi_sync_master_yes_tx 14
show status like 'Rpl_semi_sync_master_clients'; show status like 'Rpl_semi_sync_master_clients';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_clients 1 Rpl_semi_sync_master_clients 1
...@@ -217,10 +218,10 @@ include/stop_slave.inc ...@@ -217,10 +218,10 @@ include/stop_slave.inc
[ Semi-sync master status variables before FLUSH STATUS ] [ Semi-sync master status variables before FLUSH STATUS ]
SHOW STATUS LIKE 'Rpl_semi_sync_master_no_tx'; SHOW STATUS LIKE 'Rpl_semi_sync_master_no_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_no_tx 302 Rpl_semi_sync_master_no_tx 12
SHOW STATUS LIKE 'Rpl_semi_sync_master_yes_tx'; SHOW STATUS LIKE 'Rpl_semi_sync_master_yes_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_yes_tx 305 Rpl_semi_sync_master_yes_tx 15
FLUSH NO_WRITE_TO_BINLOG STATUS; FLUSH NO_WRITE_TO_BINLOG STATUS;
[ Semi-sync master status variables after FLUSH STATUS ] [ Semi-sync master status variables after FLUSH STATUS ]
SHOW STATUS LIKE 'Rpl_semi_sync_master_no_tx'; SHOW STATUS LIKE 'Rpl_semi_sync_master_no_tx';
......
...@@ -63,7 +63,7 @@ if ($value == No such row) ...@@ -63,7 +63,7 @@ if ($value == No such row)
{ {
set sql_log_bin=0; set sql_log_bin=0;
eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN'; eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
set global rpl_semi_sync_master_timeout= 5000; /* 5s */ set global rpl_semi_sync_master_timeout= 60000; /* 60s */
set sql_log_bin=1; set sql_log_bin=1;
} }
enable_query_log; enable_query_log;
...@@ -170,7 +170,7 @@ replace_result $_connections_semisync_slave CONNECTIONS_SEMISYNC_SLAVE; ...@@ -170,7 +170,7 @@ replace_result $_connections_semisync_slave CONNECTIONS_SEMISYNC_SLAVE;
replace_result $_connections_normal_slave CONNECTIONS_NORMAL_SLAVE; replace_result $_connections_normal_slave CONNECTIONS_NORMAL_SLAVE;
eval select $_connections_semisync_slave - $_connections_normal_slave as 'Should be 0'; eval select $_connections_semisync_slave - $_connections_normal_slave as 'Should be 0';
let $i=300; let $i=10;
echo [ insert records to table ]; echo [ insert records to table ];
disable_query_log; disable_query_log;
while ($i) while ($i)
...@@ -234,6 +234,7 @@ source include/stop_slave.inc; ...@@ -234,6 +234,7 @@ source include/stop_slave.inc;
connection master; connection master;
echo [ on master ]; echo [ on master ];
set global rpl_semi_sync_master_timeout= 5000;
# The first semi-sync check should be on because after slave stop, # The first semi-sync check should be on because after slave stop,
# there are no transactions on the master. # there are no transactions on the master.
...@@ -260,7 +261,7 @@ show status like 'Rpl_semi_sync_master_yes_tx'; ...@@ -260,7 +261,7 @@ show status like 'Rpl_semi_sync_master_yes_tx';
# Semi-sync status on master is now OFF, so all these transactions # Semi-sync status on master is now OFF, so all these transactions
# will be replicated asynchronously. # will be replicated asynchronously.
let $i=300; let $i=10;
disable_query_log; disable_query_log;
while ($i) while ($i)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment