Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
fb774eb1
Commit
fb774eb1
authored
Mar 15, 2024
by
Kristian Nielsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix occasional test failure of rpl.rpl_parallel_stop_slave
Signed-off-by:
Kristian Nielsen
<
knielsen@knielsen-hq.org
>
parent
7f498fba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.result
...st/suite/binlog_encryption/rpl_parallel_stop_slave.result
+3
-1
mysql-test/suite/rpl/r/rpl_parallel_stop_slave.result
mysql-test/suite/rpl/r/rpl_parallel_stop_slave.result
+3
-1
mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test
mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test
+22
-1
No files found.
mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.result
View file @
fb774eb1
...
...
@@ -35,7 +35,9 @@ connection con_temp1;
BEGIN;
INSERT INTO t2 VALUES (21);
connection server_2;
START SLAVE;
START SLAVE IO_THREAD;
include/wait_for_slave_param.inc [Read_Master_Log_Pos]
START SLAVE SQL_THREAD;
connection con_temp2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
...
...
mysql-test/suite/rpl/r/rpl_parallel_stop_slave.result
View file @
fb774eb1
...
...
@@ -35,7 +35,9 @@ connection con_temp1;
BEGIN;
INSERT INTO t2 VALUES (21);
connection server_2;
START SLAVE;
START SLAVE IO_THREAD;
include/wait_for_slave_param.inc [Read_Master_Log_Pos]
START SLAVE SQL_THREAD;
connection con_temp2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
...
...
mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test
View file @
fb774eb1
...
...
@@ -53,6 +53,7 @@ COMMIT;
INSERT
INTO
t3
VALUES
(
21
,
21
);
INSERT
INTO
t3
VALUES
(
22
,
22
);
--
save_master_pos
--
let
$master_pos
=
query_get_value
(
SHOW
MASTER
STATUS
,
Position
,
1
)
# Start a connection that will block the replicated transaction halfway.
--
connection
con_temp1
...
...
@@ -60,7 +61,27 @@ BEGIN;
INSERT
INTO
t2
VALUES
(
21
);
--
connection
server_2
START
SLAVE
;
#
# Parallel replication will complete any in-progress event group at STOP SLAVE,
# but only if the event group is already queued up for the worker thread. If
# the SQL driver thread is delayed in queueing up events, the parallel worker
# thread can abort the event group, leaving the non-transactional update to the
# MyISAM table that cannot be rolled back (MDEV-7432). If this happens the test
# would fail with duplicate key error after slave restart.
#
# To avoid this, we here wait for the IO thread to read all master events, and
# for the SQL driver thread to queue all the events for workers. This wait
# should be removed if/when MDEV-7432 is fixed.
#
START
SLAVE
IO_THREAD
;
--
let
$slave_param
=
Read_Master_Log_Pos
--
let
$slave_param_value
=
$master_pos
--
source
include
/
wait_for_slave_param
.
inc
START
SLAVE
SQL_THREAD
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
State
LIKE
'%Slave has read all relay log; waiting for more updates%'
--
source
include
/
wait_condition
.
inc
# Wait for the MyISAM change to be visible, after which replication will wait
# for con_temp1 to roll back.
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
t1
WHERE
a
=
20
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment