[英]Could anyone explain why is Write-Ahead Log the use NO-FORCE?
As I searched online, STEAL and FORCE is defined as follows 当我在线搜索时,STEAL和FORCE的定义如下
FORCE or NO-FORCE: Should all updates of a transaction be forced to disk before the transaction commits? FORCE或NO-FORCE:是否应在提交事务之前将所有事务更新强制插入磁盘?
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? 那么,WAL与FORCE方法有何不同? I feel like in both cases, changes has to be flushed to disk as we commit the transaction.... 我觉得在两种情况下,提交事务时都必须将更改刷新到磁盘上。
With WAL you have a sequential writes to a log. 使用WAL,您可以连续写入日志。 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. 基本的权衡:WAL崩溃后的恢复时间更长,而强制下的吞吐量更低。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.