[MDEV-11268] Start slave causing data loss Created: 2016-11-10  Updated: 2022-09-08

Status: Open
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.0.14
Fix Version/s: 10.1

Type: Bug Priority: Major
Reporter: James Pettyjohn Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: replication, slave
Environment:

CentOS release 6.4 (Final)
kernel-2.6.32-358.el6.x86_64



 Description   

I had bidirectional replication setup on two instances of MariaDB (DB1 and DB2). DB1 was the only one used for reading or writing and DB2 was a hot spare.

On 2016-09-10 DB2 went out of sync and had to manually reloaded, after doing so the replication has only been one way - from DB1 to DB2.

On 2016-10-08 'start slave;' was run on DB1 and turned off a few minutes later. I would have presumed this to have no effect as the binary logs expire after 3 days and the replication was off for 2 months. But at that point the following happened:

1) Records between 2016-09-10 and 2016-11-08 disappeared on DB1 for these same tables.
2) Replication to DB2 failed with PRIMARY key already exists errors on these tables as the primary key began to be re-used
3) The DB1 binlogs of 2016-11-08 include the records which disappeared, these records were replicated to DB2
4) The DB2 binlogs which were still relayed to DB1 from 2016-09-10 were still present on DB1 from the 10th of September and do not involve the tables in question.

The tables in question are InnoDB, rowformat Compact and Collation latin1_swedish_ci.



 Comments   
Comment by Lixun Peng [ 2017-02-21 ]

Is it possible to provide your configure file and binlog files to us?

Generated at Thu Feb 08 07:48:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.