Is Aria a good choice in environments where power often fails?

You are viewing an old version of this question. View the current version here.

MariaDB plugins and plugin information.

Answer

Aria is designed to be crash safe. - All changes are first written to log and synced - A background process are moving out changed pages and write them the data files. - A block is not written to a datafile until after the change is recorded in the log. - If MariaDB crashes, the recovery routines will update all not changed pages and then roll back the running statements. All of this is logged and can be redone.

From the above point of view, things should good, at least as good as with most other databases. There is however one thing missing (which is the case also for most other storage engines and databases, except InnoDB)

If you get a half write on a data page (not log page), then the recovery will not be able to recover that page and you will lose the information on that page. When run with page checksums this will be noticed, but the table has to be repaired before it can be used again. InnoDB fixes this with it's double write buffer, but Aria doesn't have that.

To summarize: If your system supports atomic writes for up to 8K blocks you are fine. If not, then you may loose something from one data page that is written at exactly the same time you have a total power failure. This is not something that is not very likely to happen, but possible.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.