mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-35938: rpl.rpl_parallel_gco_wait_kill fails - "Can't initialize replace ..."
Test rpl.rpl_parallel_gco_wait_kill has a race condition where
it identifies that SQL using its state as
"Slave has read all relay log", and immediately tries to save
the thread id of the SQL thread by querying for threads with
that same state. However, the state of the SQL thread may
change in-between this time, leading to the query that saves
the SQL thread finding no thread id that matches that state.
Commit 3ee6f69d49
aimed to fix
this in 10.11+ by simplifying the query string to
"%relay log%"; however, it could still fail (though less
often).
This commit instead changes the query to find the SQL thread
from using some state, to using the command "Slave_SQL", which
will not change
This commit is contained in:
@@ -297,7 +297,7 @@ SET GLOBAL slave_parallel_threads=10;
|
||||
# Find the thread id of the driver SQL thread that we want to kill.
|
||||
--let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Slave has read all relay log%'
|
||||
--source include/wait_condition.inc
|
||||
--let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Slave has read all relay log%'`
|
||||
--let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND LIKE 'Slave_SQL'`
|
||||
SET @old_max_queued= @@GLOBAL.slave_parallel_max_queued;
|
||||
SET GLOBAL slave_parallel_max_queued=9000;
|
||||
|
||||
|
Reference in New Issue
Block a user