In transaction processing systems we have to guarantee the
transaction committed will be durable permanently. For example,
In an online commerce platform, The completed transaction will
remain safe even if the system crashes. This can be achieved by
flushing the transactional log records to non-volatile storage
devices before acknowledging the commit. MySQL guarantees maximum
durability of transaction by optimally setting following system
variables :
innodb_doublewrite (enabled by
default)
InnoDB stores all data twice, first to doublewrite buffer
(storage area in system tablespace to write pages that are
flushed from InnoDB buffer pool, before written in data file). If
ever operating system / storage / mysqld process crash during the
middle of page write, InnoDB can still find a durable copy of the
page from doublewrite buffer for recovery. Though data is written
twice, the doublewrite buffer …
[Read more]