[MDEV-8193] UNTIL clause in START SLAVE is sporadically disobeyed by parallel replication Created: 2015-05-20  Updated: 2015-09-11  Resolved: 2015-09-11

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.0, 10.1
Fix Version/s: 10.0.22, 10.1.8

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: parallelslave


 Description   

The test below has 3 different outcomes for me:

1) SQL thread stops at the requested position, the number of rows in the table is as expected (10);
2) SQL thread executes an extra event and then stops, the position differs from the requested one, the number of rows in the table is 12;
3) SQL thread does not stop at all, waiting on the condition times out, the number of rows in the table is 16.

So, run the test with --trials=N.
For me, 5 is enough to get one of the problems, but your mileage may vary.

--source include/master-slave.inc
--source include/have_binlog_format_row.inc
 
--connection slave
 
--source include/stop_slave_sql.inc
 
--connection master
 
create table t1 (i int);
flush logs;
insert into t1 values (1),(2);
insert into t1 values (3),(4);
insert into t1 values (5),(6);
insert into t1 values (7),(8);
insert into t1 values (9),(10);
 
--let $master_file = query_get_value(show master status,File,1)
--let $master_pos = query_get_value(show master status,Position,1)
 
insert into t1 values (11),(12);
insert into t1 values (13),(14);
insert into t1 values (15),(16);
 
--connection slave
 
set global slave_parallel_threads = 1;
eval start slave until master_log_file='$master_file', master_log_pos=$master_pos;
 
--let $show_statement = SHOW SLAVE STATUS
--let $field = Slave_SQL_Running
--let $condition = = 'No'
--let $wait_timeout = 10
 
--source include/wait_show_condition.inc
 
if (`select COUNT(*) > 10 from t1`) 
{
	SELECT * FROM t1;
	query_vertical show slave status;
	die "Extra rows in the table";
}
 
drop table t1;
set global slave_parallel_threads = DEFAULT;
--source include/stop_slave_io.inc
 
--connection master
drop table t1;

Checked on 10.0 commit 0880284bf7 and 10.1 commit 3e55ef26d.



 Comments   
Comment by Kristian Nielsen [ 2015-09-11 ]

http://lists.askmonty.org/pipermail/commits/2015-September/008361.html

Generated at Thu Feb 08 07:25:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.