Write-ahead-Logging

Write-ahead-Logging - Crashes and Recovery Write-ahead...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: Crashes and Recovery Write-ahead logging Announcements Exams back at the end of class Project 2, part 1 grades tags/part1/grades.txt Last time Transactions and distributed transactions The ACID properties Isolation with 2-phase locking Needed an atomic commit step, at the end 2-phase commit voting phase commit phase 2-phase commit canCommit? Yes doCommit haveCommitted Coordinator Participant participant not allowed to cause an abort after it says it canCommit committed prepared done uncertain (objects still locked) prepared (persistence) committed Failure model Network is unreliable Servers can fail But their disks dont fail Can recover state Today: Crashes and recovery Goals: Recover state after crash Committed transactions are not lost Non-committed transactions either continued or aborted Low overhead Plan: Consider recovery of local system Then consider role in distributed systems Write-ahead logging / Journaling Keep a separate log of all operations Transaction begin, commit, abort All updates A transactions operations are provisional until commit is logged to disk The log records the consistent state of the system Disk writes of single pages are usually atomic begin / commit / abort records Log Sequence Number (LSN) Usually implicit, the address of the first-byte of the log entry LSN of previous record for transaction Linked list of log records for each transaction Transaction ID Operation type update...
View Full Document

This note was uploaded on 11/02/2011 for the course CS 440 taught by Professor Anderson during the Spring '11 term at Carnegie Mellon.

Page1 / 23

Write-ahead-Logging - Crashes and Recovery Write-ahead...

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

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