2011-10-31-Recovery [Compatibility Mode]

2011-10-31-Recovery [Compatibility Mode] - Crash Recovery...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Crash Recovery Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke 1 Review: The ACID properties A tomicity: All actions in a Xact happen, or none happen C onsistency: Each Xact transforms the database from one consistent state to another Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke 2 I solation: Execution of concurrent transactions is as though they are evaluated in some serial order D urability: If a Xact commits, its effects persist The Recovery Manager Motivation Atomicity: – Transactions may abort (“Rollback”). Durability: – What if DBMS stops running? (Causes?) Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke 3 crash! Desired Behavior after system restarts: T1, T2 & T3 should be durable. T4 & T5 should be aborted (effects not seen). T1 T2 T3 T4 T5
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Assumptions Concurrency control is in effect Strict 2PL , in particular. Updates are happening “in place” Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke 4 – i.e. data is overwritten on (deleted from) the disk. A simple scheme to guarantee Atomicity & Durability? Handling the Buffer Pool Force every write to disk? – Poor response time. – But provides durability. Force No Steal Steal Trivial (? Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke 5 Steal buffer-pool frames from uncommited Xacts? – If not, poor throughput. – If so, how can we ensure atomicity? No Force Trivial (?) Desired More on Steal and Force STEAL (why enforcing Atomicity is hard) To steal frame F: Current page in F (say P) is written to disk; some Xact holds lock on P. What if the Xact with the lock on P aborts? Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke 6 Must remember the old value of P at steal time (to support UNDO ing the write to page P). NO FORCE (why enforcing Durability is hard) – What if system crashes before a modified page is written to disk? – Write as little as possible, in a convenient place, at commit time,to support REDO ing modifications.
Background image of page 2
Basic Idea: Logging Record REDO and UNDO information, for every update, in a log . – Sequential writes to log (put it on a separate disk). Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke 7 – Minimal info (diff) written to log, so multiple updates fit in a single log page.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/07/2011 for the course CS 4410 taught by Professor Vollset during the Spring '07 term at Cornell University (Engineering School).

Page1 / 9

2011-10-31-Recovery [Compatibility Mode] - Crash Recovery...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online