modern techniques for transaction oriented database
play

Modern techniques for transaction- oriented database recovery - PowerPoint PPT Presentation

Modern techniques for transaction- oriented database recovery Caetano Sauer My pleas 1.Demand on-demand recovery 2.Make the log great again Demand on-demand recovery ARIES Recovery info B A B A Transactions Pages requiring requiring


  1. Modern techniques for transaction- oriented database recovery Caetano Sauer

  2. My pleas 1.Demand on-demand recovery 2.Make the log great again

  3. Demand on-demand recovery

  4. ARIES Recovery info B A B A Transactions Pages requiring requiring Buffer pool Database undo redo 1. Log analysis LOG 2. REDO scan 3. UNDO scan system mostly unavailable during three phases

  5. ARIES restart Recovery info B A B A Transactions Pages requiring requiring Buffer pool Database undo redo 1. Log analysis LOG 2. REDO scan 3. UNDO scan system mostly unavailable during three phases 6

  6. Instant recovery (post-failure) lock(f) Recovery info Running txn. fix(B) Transactions Pages B requiring requiring lock undo redo conflict! + locks Buffer pool Aborting txn. LOG ... (pre-failure) per-page log chains redo and undo on demand, without waiting for log scans same recovery actions, different schedule

  7. Failure classes Failure class Loss Typical cause Response Transaction Single-transaction progress Deadlock, constraint violation Rollback System Server process (in-memory state) Software fault, power loss Restart Media Persistent database contents Hardware fault Restore Single page Local integrity Partial writes, wear-out Repair

  8. Make the log great again

  9. Throw away the database! Main memory Main memory write- read- optimized optimized Log DB ? Dual storage Single storage “... a DBMS is really two DBMSs, one managing the database as we know it and a second one managing the log.” Michael Stonebraker

  10. The log as a partitioned B-tree A B A B A B P0 P1 P2 LSN domain x y z w like an LSM, but with page identifiers and their log records

  11. The log as a partitioned B-tree (implementation) Partitioned log index sorted unsorted partitions partition A B A B A B page → LSN mapping log appends A B (txn. commit) P0 P1 P2 LSN domain x y z u w (sort low-water mark)

  12. Merging Before: A B A B A B � x, y � � y, z � � z, w � merge After: A B A B � x, z � � z, w �

  13. FineLine Write-ahead logging: FineLine: fetch Data Data structure structure read reorg. Log Database write index append WAL append Log records Log records volatile persistent volatile persistent

  14. FineLine recovery Data structure Indexed log Log records volatile persistent

  15. FineLine recovery fetch Indexed log volatile persistent

  16. FineLine recovery fetch Indexed log volatile persistent

  17. FineLine recovery fetch Indexed log volatile persistent

  18. In-memory FineLine database fetch Indexed log append volatile persistent ➢ nodes recovered automatically during fetch ➢ volatile structures = in-memory database ➢ no undo, no dirty pages, no checkpoints, no offline log scans

  19. In-memory DBMS databases Buffer mgmt. Log-structured Physiological storage logging

  20. My pleas 1.Demand on-demand recovery 2.Make the log great again

  21. Standing on the shoulders of Giants

  22. Thank you! csauer@tableau.com

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend