[MDEV-6391] GTID binlog state not recovered if mariadb-bin.state is removed Created: 2014-06-26  Updated: 2015-02-27  Resolved: 2015-02-27

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.0.13
Fix Version/s: 10.0.17

Type: Bug Priority: Critical
Reporter: Kristian Nielsen Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: gtid, replication


 Description   

When a master server starts up, it needs to initialise the binlog GTID state,
so that it can log the correct GTID_LIST event at the start of the newly
created next binlog file and initialise @@gtid_binlog_pos correctly and so on.

After a normal shutdown, this happens by reading the mariadb-bin.state file.

After a crash, the last binlog file is marked as crashed, and the binlog GTID
state is initialised as part of binlog crash recovery.

However, if a normal shutdown took place (so the last binlog file is not
marked as crashed), but the mariadb-bin.state file was lost before server
starts up again, the code currently wrongly initialises the binlog GTID state
to empty. This is very wrong and can lead to all sorts of problems.

A typical way to lose the .state file is if the binlogs are copied to a new
server. But in any case, the server must never knowingly start up with a
binlog GTID state that is inconsistent with the binlogs actually in use.



 Comments   
Comment by Kristian Nielsen [ 2015-02-27 ]

Pushed to 10.0.17:

http://lists.askmonty.org/pipermail/commits/2015-February/007501.html

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