Friday, November 22, 2013

WAL and its benefits

In one of my courses this semester, I am learning about an interesting idea behind crash recovery in a database, called WAL. It simply stands for Write Ahead Logging. It is with the help of WAL, that we can ensure two important properties of the database: Atomicity and Durability. The idea is to write to the log, anything that a transaction will be doing to the database, and then pushing the log to a stable storage, before actually allowing the transaction to modify the database. This way, even when a system crashes when a active database transaction is modifying the database, we can still recover from the crash by using the logs created using WAL. Simple, but genius!

SQLite database and MongoDB uses WAL as per the Wiki Page

No comments:

Post a Comment