← Back to team overview

maria-developers team mailing list archive

Re: GTIDs, events sequence and alternate futures

 

Pavel Ivanov <pivanof@xxxxxxxxxx> writes:

> What will happen with MariaDB if sem-sync master is enabled, some
> transactions is completed, but before it gets any semi-sync acks all
> slaves get disconnected? Will this transaction be rolled back? Or it
> will be left committed basically creating an alternate future?

It can not be rolled back. Before slaves can send semi-sync acks, the
transaction must first be written to the binlog. Once a transaction has been
written to the binlog, it can not be rolled back.

> When all flushing to disk is turned off (and maybe with some other
> conditions I don't know) is it possible to get in situation when
> binlogs and InnoDB state will get out of sync? And I don't mean after
> a power outage (without flushing it obviously can lead to any kind of
> bad results), but after mysqld crash. And was the answer to this

With sync_binlog=0 and innodb_flush_log_at_trx_commit=2, InnoDB and the binlog
should still be crash-safe and in sync. Because the data is written to the
kernel with the write(2) system call, so will survive mysqld crash.

If the kernel crashes (or a power outage), fsync() is required, as you say.

I think innodb_flush_log_at_trx_commit=0 is not crash-safe.

> question different for earlier MariaDB/MySQL versions?

I do not know of any difference to earlier versions. Except for the odd bug
fix, and also of course really old versions (pre-5.0?) have no XA between
InnoDB and binlog.

 - Kristian.


Follow ups

References