Reputation: 279
As I searched online, STEAL and FORCE is defined as follows
FORCE or NO-FORCE: Should all updates of a transaction be forced to disk before the transaction commits?
Besides, I was told that
A transaction is not considered committed until all its log records have been written to stable storage
Then how is WAL different from a FORCE approach? I feel like in both cases, changes has to be flushed to disk as we commit the transaction....
Upvotes: 1
Views: 958
Reputation: 18339
With WAL you have a sequential writes to a log. The updates to pages throughout the database can be written asynchronously to the log entries.
A force approach requires that all dirty pages in the buffer pool be flushed to disk synchronously with the commit operation. This is a much more expensive operation and limits throughput.
Basic tradeoff: Longer recovery time after a crash with WAL vs. lower throughput with force.
Upvotes: 2