mirror of
https://github.com/MariaDB/server.git
synced 2025-11-25 17:25:02 +03:00
Parallel slave failed to retry in retry_event_group() with error
WSREP: Parallel slave worker failed at wsrep_before_command() hook
Fix wsrep transaction cleanup/restart in retry_event_group() to properly
clean up previous transaction by calling wsrep_after_statement().
Also move call to reset error after call to wsrep_after_statement()
to make sure that it remains effective.
Add a MTR test galera_as_slave_parallel_retry to reproduce the error
when the fix is not present.
Other issues which were detected when testing with sysbench:
Check if parallel slave is killed for retry before waiting for prior
commits in THD::wsrep_parallel_slave_wait_for_prior_commit(). This
is required with slave-parallel-mode=optimistic to avoid deadlock
when a slave later in commit order manages to reach prepare phase
before a lock conflict is detected.
Suppress wsrep applier specific warning for slave threads.
Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
23 lines
713 B
Plaintext
23 lines
713 B
Plaintext
connection node_2;
|
|
connection node_1;
|
|
connect master, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
|
connect node_1_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
|
connection node_1;
|
|
START SLAVE;
|
|
connection master;
|
|
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
|
|
connection node_1;
|
|
SET GLOBAL debug_dbug = '+d,rpl_parallel_simulate_temp_err_xid,sync.wsrep_retry_event_group';
|
|
connection master;
|
|
INSERT INTO t1 VALUES (1);
|
|
connection node_1_ctrl;
|
|
SET debug_sync = 'now WAIT_FOR sync.wsrep_retry_event_group_reached';
|
|
SET GLOBAL debug_dbug = '';
|
|
SET debug_sync = 'now SIGNAL signal.wsrep_retry_event_group';
|
|
connection node_1;
|
|
SET debug_sync = 'RESET';
|
|
connection master;
|
|
DROP TABLE t1;
|
|
connection node_1;
|
|
STOP SLAVE;
|