Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6, 10.11, 11.4, 11.8, 12.3
-
None
-
Can result in hang or crash
Description
In a semi-sync replication topology with the slave configured with --replicate-events-marked-for-skip=FILTER_ON_SLAVE, when the master skips any transactions with @@skip_replicate=1, these transactions hang the server waiting for an ACK which can never come.
Consider the following MTR test case and opt file:
-master.opt file:
--replicate-events-marked-for-skip=filter_on_master
|
MTR file:
--source include/have_binlog_format_row.inc
|
--source include/master-slave.inc
|
|
|
--connection master
|
set @@global.rpl_semi_sync_master_timeout= 2000; # 2s
|
set @@global.rpl_semi_sync_master_enabled=1;
|
|
|
--connection slave
|
--source include/stop_slave.inc
|
set @old_enabled= @@global.rpl_semi_sync_slave_enabled;
|
set @@global.rpl_semi_sync_slave_enabled=1;
|
--source include/start_slave.inc
|
|
|
--connection master
|
--let $master_ss_status= query_get_value(SHOW STATUS LIKE 'rpl_semi_sync_master_status', Value, 1)
|
if (`SELECT strcmp("$master_ss_status", "ON") != 0`)
|
{
|
SHOW STATUS LIKE 'rpl_semi_sync_master_status';
|
--die rpl_semi_sync_master_status should be ON to start
|
}
|
|
|
--echo #
|
--echo # Initialize test data (this is ACKed)
|
--connection master
|
create table t1 (a int);
|
insert into t1 values (1);
|
--source include/save_master_gtid.inc
|
|
|
--connection slave
|
--source include/sync_with_master_gtid.inc
|
|
|
--echo # And now a skipped event
|
--connection master
|
set @old_skip_replication= @@session.skip_replication;
|
set session skip_replication=1;
|
create database db_ignore;
|
set session skip_replication= @old_skip_replication;
|
The create database db_ignore hangs waiting for an ACK.
The correct behavior would be for transactions to not await ACKs when they are binlogged with `skip_replicate`.
Attachments
Issue Links
- relates to
-
MDEV-9345 Replication to enable filtering on master
-
- In Review
-