[MDEV-14721] Big transaction events get lost on semisync master when replicate_events_marked_for_skip=FILTER_ON_MASTER Created: 2017-12-20  Updated: 2020-08-25  Resolved: 2018-02-02

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.2.11
Fix Version/s: 10.1.32, 10.2.13

Type: Bug Priority: Critical
Reporter: Andrei Elkin Assignee: Andrei Elkin
Resolution: Fixed Votes: 2
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-16001 parallel replication appears in deadlock Closed
Sprint: 10.2.12, 10.0.34, 10.1.31, 10.2.13

 Description   

In a regular Master-Slave configuration the Slave sql erros out a dup key.

The slave has been set up via backup restore and is claimed not to have
any local updates. The backup restore procedure is standard to include
`set global gtid_slave_pos=$GTID_from_backup` where the gtid value is
extracted from `xtrabackup_info`. Barring a mistake of the slave gtid state setting,
the following
``change master to master_host='xx.xx.xxx', master_port=zzzz master_user='user', master_password='xxxxx', master_use_gtid=slave_pos;
start slave;```

should've worked out without any issue.
However the slave stopped. More details can be found on the customer issue page.



 Comments   
Comment by Michael Widenius [ 2018-01-27 ]

When events of a big transaction are binlogged offsetting over 2GB from
the beginning of the log the semisync master's dump thread
lost such events.
The events were skipped by the Dump thread that found their skipping
status erroneously.

The current fixes make sure the skipping status is computed correctly.
The test verifies them simulating the 2GB offset.

Comment by Andrei Elkin [ 2018-02-02 ]

Pushed as c09371dce66c483 to 10.2 and up.

Comment by Andrei Elkin [ 2018-04-24 ]

The 10.1 branch was patched as well with the commit id
9005108234ca97ce9e86935fd79ea0b3fb97ec43

The release can be seen from here:
git describe --contains 9005108234ca97ce9e86935fd79ea0b3fb97ec43
mariadb-10.1.32~66

Generated at Thu Feb 08 08:15:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.