[MDEV-4986] GTID - do not do on-disk update of master.info after every event group Created: 2013-09-03  Updated: 2013-11-29  Resolved: 2013-11-29

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 10.0.7

Type: Bug Priority: Major
Reporter: Kristian Nielsen Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: gtid


 Description   

In GTID mode, we should not update the master.info file after every
transaction.

Such update is pointless (we will delete the relay logs in any case at next
slave start), and decreases performance. But the more serious issue is that if
we crash during such update, we might end up with a partially written, and
thus corrupt, state. This could in the worst case prevent slave restart
(eg. if using_gtid flag got cleared), and thus breaks crash-safe slave promises.

In addition, when we do write master.info, it could happen that the file gets
shorter. In this case we need to make sure we do not leave old junk at the end
of the file. Probably best is to just leave an end marker, beyond which no more
data is valid.



 Comments   
Comment by Kristian Nielsen [ 2013-11-29 ]

Pushed to 10.0-base.

This was in fact done in mdev-4506, parallel replication.
Unfortunately, one of the if () conditionals was reversed,
so sync to disk was disabled in non-gtid mode rather
than in gtid mode, which should be fixed now.

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