How does Altibase prevent data loss?

Altibase provides multiple durability[1] levels so that a user can select an optimal durability with consideration of its business. For example, Altibase Enhanced Durability level guarantees no data loss with abnormal DBMS shutdown while Altibase Strict Durability level recovers 100% data without any data loss even with abnormal hardware shutdown including power failure.

Durability depends on how to write transaction redo log on disk. The four durability levels are decided on transaction redo log journal mechanism. The four durability levels are ‘No Durability’, ‘Relaxed Durability’, ‘Enhanced Durability’ and ‘Strict Durability’. With multiple durability levels, a user can control a balance between performance and durability.

No Durability

When a table is created in a volatile tablespace, this table works based on No Durability. A volatile tablespace is a kind of tablespaces Altibase supports in which all data is volatile so the data is not recoverable when Altibase restarts. No transaction redo log is written in No Durability. This shows the highest performance among the four durability levels.

Relaxed Durability

A transaction does not wait until logs have been written to disk and a memory log buffer is used

Set COMMIT_WRITE_WAIT_MODE and LOG_BUFFER_TYPE to 0 and 1, respectively. With this method, transactions store their update logs in a memory log buffer, and the log flush thread itself flushes the logs in the log buffer to the log file. Although there will be no data loss with normal shutdown, there could be a bounded data loss with abnormal DBMS shutdown using this durability level.

FAQ_Fig1

 

Enhanced Durability

A transaction does not wait until logs have been written to disk and a kernel log buffer is used.

Set COMMIT_WRITE_WAIT_MODE and LOG_BUFFER_TYPE to 0 and 0, respectively. With the default Altibase durability property settings, update logs are stored in the log buffer of the OS kernel area, and transactions do not wait until their update logs have been written to the log file. The Enhanced Durability level guarantees no data loss with abnormal DBMS shutdown, but there could be a bounded data loss when there is abnormal hardware shutdown such as power failure.

FAQ_Fig2

 

Strict Durability

A transaction waits until logs have been written to disk and a kernel log buffer is used.

Set COMMIT_WRITE_WAIT_MODE and LOG_BUFFER_TYPE to 1 and 0, respectively. With this method, transaction update logs are stored in the log buffer of the OS kernel area, and logs for committed transactions are written directly to a log file. The Strict durability level recovers all of data without any data loss even with abnormal hardware shutdown including power failure. This shows the lowest performance among the durability levels.

FAQ_Fig3

[1] Durability, which is one of the four properties of a transaction, means that after a transaction has been committed, the committed transaction must be guaranteed, even if a database failure occurs before the changed data are physically written to disk.

Altibase – Downloading is Believing.