1 / 9

Understanding Database Recovery Mechanisms: WAL, Logging, and Commit Strategies

This document explores the critical concepts of database recovery, focusing on "Write-Ahead Logging" (WAL) and its implications for data integrity during transactions. It delves into the processes following commit and abort actions in transaction management, detailing how recovery from logs ensures consistency in both committed and uncommitted transactions. By examining the mechanisms for writing logs, auditing recovery strategies, and understanding outcomes, this guide provides a roadmap for handling failures and maintaining data stability within larger systems.

krista
Télécharger la présentation

Understanding Database Recovery Mechanisms: WAL, Logging, and Commit Strategies

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Recoverability Recoverable sector D0 D1 chooser Larger actions? Commit point

  2. id  begin_ra() ABORT() COMMIT() end_ra()

  3. Version histories Cell storage Install Journal storage x WriteJournal (item x, v, id)

  4. ReadJournal (item x, v, id) Commit record table Bootstrap Slow

  5. Logging: Cell st.: read/write Log: non-volatile+sequential

  6. Plan: 1) Fail  Recover from log • uncommitted  back out (undo) • committed  install (rddo) 2) ABORT ()  undo cur. action (redo)

  7. Append-only: type: UPDATE id: 172 undo: x  old redo: x  new type: OUTCOME id: 174 status: COMMITTED 1) When to write log? 2) How to recover?

  8. Disk-bound DB: write x • WAL protocol • Write ahead logging • Log COMMIT record • before returning from • commit() log update record

  9. Recovery: • Scan log backwards • Winners: COMMITTED or ABORTED • Losers: Everything else • Redo COMM. Winners • Undo Losers

More Related