It is said that no steal means that transaction s updated buffer is not written to disk before that transaction commits and no force has a similar definition then what's the difference between them?
1 Answers
Suppose a transaction T1 wants to read a data object X, but the working memory is full with all the other transactions' work. So T1 needs to clear some memory, which it does by kicking some other page in working memory to stable storage. This can be dangerous, because we can't be sure that what T1 is pushing to stable storage has been committed yet. This is known as stealing.
Forcing means that every time a transaction commits, all the affected pages will be pushed to stable storage. This is inefficient, because each page may be written by many transactions and will slow the system down.
Most crash recovery uses a steal/no-force approach, accepting the risks of writing possibly uncommitted data to memory to gain the speed of not forcing all commit effects to memory.

- 3,832
- 2
- 19
- 30
-
2Nice explanation :D Help me remember those concepts :D "Stealing" really makes me difficult to understand until I see this post. – hqt Sep 09 '19 at 19:34
-
**Question:** Why is it dangerous that we can't be sure that what T1 is pushing to stable storage has been committed yet? – Sebastian Nielsen Mar 20 '20 at 18:28
-
@SebastianNielsen because we haven't committed the working memory at that point yet. This can lead to a dirty write, if some other transaction reads that data. – urgentx Nov 10 '20 at 02:43
-
Does `force` cause uncommitted data written into the stable storage too? I guess it's the case because `force` causes all the related pages to be pushed to the stable storage, some of these pages may contain uncommitted data from other transactions. Am I right? – Searene Oct 17 '21 at 14:46
-
@Searene you are right – urgentx Oct 18 '21 at 09:28