mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-5262: Missing retry after temp error in parallel replication
Handle retry of event groups that span multiple relay log files. - If retry reaches the end of one relay log file, move on to the next. - Handle refcounting of relay log files, and avoid purging relay log files until all event groups have completed that might have needed them for transaction retry.
This commit is contained in:
committed by
Kristian Nielsen
parent
d60915692c
commit
787c470cef
@ -141,9 +141,56 @@ a b
|
||||
7 1
|
||||
8 1
|
||||
9 1
|
||||
*** Test retry of event group that spans multiple relay log files. ***
|
||||
CREATE TABLE t2 (a int PRIMARY KEY, b BLOB) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1,"Hulubullu");
|
||||
include/stop_slave.inc
|
||||
SET @old_max= @@GLOBAL.max_relay_log_size;
|
||||
SET GLOBAL max_relay_log_size=4096;
|
||||
SET gtid_seq_no = 100;
|
||||
SET @old_server_id = @@server_id;
|
||||
SET server_id = 12;
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (10, 4);
|
||||
COMMIT;
|
||||
SET server_id = @old_server_id;
|
||||
SELECT * FROM t1 WHERE a >= 10 ORDER BY a;
|
||||
a b
|
||||
10 4
|
||||
SELECT a, LENGTH(b) FROM t2 ORDER BY a;
|
||||
a LENGTH(b)
|
||||
1 9
|
||||
2 5006
|
||||
3 5012
|
||||
SET @old_dbug= @@GLOBAL.debug_dbug;
|
||||
SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_gtid_0_x_100";
|
||||
include/start_slave.inc
|
||||
SET GLOBAL debug_dbug=@old_dbug;
|
||||
retries
|
||||
1
|
||||
SELECT * FROM t1 WHERE a >= 10 ORDER BY a;
|
||||
a b
|
||||
10 4
|
||||
SELECT a, LENGTH(b) FROM t2 ORDER BY a;
|
||||
a LENGTH(b)
|
||||
1 9
|
||||
2 5006
|
||||
3 5012
|
||||
INSERT INTO t1 VALUES (11,11);
|
||||
SELECT * FROM t1 WHERE a >= 10 ORDER BY a;
|
||||
a b
|
||||
10 4
|
||||
11 11
|
||||
SELECT a, LENGTH(b) FROM t2 ORDER BY a;
|
||||
a LENGTH(b)
|
||||
1 9
|
||||
2 5006
|
||||
3 5012
|
||||
4 5000
|
||||
SET GLOBAL max_relay_log_size=@old_max;
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
|
||||
include/start_slave.inc
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1, t2;
|
||||
DROP function foo;
|
||||
include/rpl_end.inc
|
||||
|
Reference in New Issue
Block a user