← Back to team overview

maria-discuss team mailing list archive

Re: WL#4925 and multi-source replication

 

Greg <skygreg@xxxxxxxxx> writes:

> With "kill -9 mysqld", and sync_binlog=0, I'm not really surprised since
> mysql will not fdatasync after each commit, right ?

Right. So this is mostly just my own academic interest, in practice it is of
course real crashes/powerfailures we want to handle, not SIGKILL.

If you are interested, this is my thinking: the server always does a write(2)
system call on the binlog at (group) commit, even with sync_binlog=0. So even
if we SIGKILL the server, the data is still in the kernel buffers (at least on
Linux), and will eventually reach disk.

However, you are using DRBD. I am guessing that when mysqld on one node dies,
a failover is done to the other node, and this looses data in the kernel disk
buffers on the first node that have not been fdatasync()'ed.

So I learned a bit about DRBD, thanks ;-)

 - Kristian.


Follow ups

References