Avoiding Redo
To avoid redo, flush all of T’s updates to the stable database before it commits. (They must be in stable storage.)
- Usually called a Force algorithm, because updates are forced to disk before commit.
- It’s easy, because you don’t need stable bookkeeping of after-images
- But it’s inefficient for hot pages. (Consider TPC-A/B.)
Conversely, a recovery algorithm requires redo if a transaction may commit before all of its updates are in the stable database.