DOC PREVIEW
CORNELL CS 632 - Lecture 6 Recovery

This preview shows page 1-2-22-23 out of 23 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

PowerPoint PresentationSlide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 2301/14/19 1CS 632 Lecture 6RecoveryPrinciples of Transaction-Oriented Database RecoveryTheo Haerder, Andreas Reuter, 1983ARIES: A Transaction Recovery Method Supporting Fine-Granularity Locking and Partial Rollbacks Using Write-Ahead LoggingC. Mohan, Don Haderle,Bruce Lindsay, Hamid Piralesh, and Peter Schwartz, 199201/14/19 2Principles of Transaction-Oriented Database Recovery1. DATABASE RECOVERY: WHAT IT IS EXPECTED TO DO1. What Is a Transaction2. Which Failures Have To Be Anticipated3. Summary of Recovery Actions2. THE MAPPING HIERARCHY OF A DBMS1. The Mapping Process2. The Storage Hierarchy3. Different Views of a Database4. Mapping Concepts for Updates3. CRASH RECOVERY1. Dependencies Between Buffer Management and Recovery Component2. Classification of Log Data3. Checkpoints4. ARCHIVE RECOVERY01/14/19 3What is a transaction?•actions executed indivisibly•four properties required (the ACID properties):1. Atomicity:all actions in the transaction happen, or none happen2. Consistency:if a transaction preserves the consistency of the DB3. Isolation:execution of one transaction is isolated from that of other transactions4. Durability:if a transaction commits, its effects persist01/14/19 4Which Failures Have to Be Anticipated?Transaction Failures:• caused by bad input or other violations of consistencySystem Failures:• caused by: bugs in the DBMS code operating system fault hardware failure• occur less frequentlyMedia Failures:• caused by: software errors hardware errors physical errors01/14/19 5Summary of Recovery ActionsTransaction Undo•when a transaction aborts itselfGlobal Undo•when recovering from a system failure•incomplete transactionsPartial Redo•when recovering from a system failure•complete transactionsGlobal Redo•archive recovery•full redundancy01/14/19 601/14/19 701/14/19 8Different Views of a DatabaseCurrent database• the contents are found on disk or in the DB bufferMaterialized database• the state that the DBMS finds at restart after a crashPhysical database• all blocks of the on-line copyThree types of update operations:• modification of page contents – affects the current database• write – affects the physical database• propagation – affects the materialized database01/14/19 9Mapping Concepts for UpdatesTwo types of propagation strategies:• ATOMIC• NOT ATOMICTwo schemes for propagation:01/14/19 10Dependencies Between Buffer Management and Recovery ComponentUNDO Recovery Actions:• STEAL – undo actions necessary• NO STEAL – undo actions not necessaryREDO Recovery Actions:• FORCE – redo actions not necessary• NO FORCE – redo actions necessaryPartial REDO: no logging necessaryGlobal REDO:logging necessary01/14/19 11Classification of Log DataPhysical State Logging on Page Level• before image – after imagePhysical Transition Logging on Page Level• differences between old and new statesPhysical State Logging on Access Path LevelPhysical/Logical Transition Logging on the Access PathLogical Logging on the Record-Oriented Level01/14/19 12Checkpoints• limit the amount of REDO recovery required after a crash • involve three steps:• write a BEGIN_CHECKPOINT record• write all checkpoint data• write an END_CHECKPOINT record• types:•Transaction-Oriented Checkpoints•Transaction-Consistent Checkpoints•Action-Consistent Checkpoints•Fuzzy Checkpoints01/14/19 1301/14/19 14Conclusion• taxonomy for classifying the implementation techniques for database recovery• four criteria:• Propagation• ATOMIC/ NOT ATOMIC• Buffer Handling• STEAL / NO STEAL• EOT Processing• FORCE / NO FORCE• Checkpointing01/14/19 1501/14/19 16ARIES: A Transaction Recovery Method Supporting Fine-Granularity Lockingand Partial Rollbacks Using Write-Ahead LoggingARIES – Algorithm for Recovery and Isolation Exploiting Semantics01/14/19 17Goals• Simplicity• Operation logging• Flexible storage management• Partial rollbacks• Flexible buffer management• Recovery Independence• Logical undo• Parallelism and fast recovery• Minimal overhead01/14/19 18Normal Processing• Updates• Total or Partial Rollbacks• savepoints• Transaction Termination• Checkpoints• fuzzy checkpointsRestart Processing• Analysis Pass• Redo Pass• Undo Pass01/14/19 1901/14/19 20Log Records• LSN (Log Sequence Number)• unique id for each log record • Type• type of record• TransId• id of transaction that wrote the record• PrevLSN• LSN of the previous log record written by the same transaction that wrote the record• PageID• id of the page referred by the log• UndoNextLSN• present in CLR• Data• redo/undo data describing the update01/14/19 21Page Structure• page_LSN – the LSN of the log record describing the latestupdate to the pageTransaction Table• TransId – the id of the transaction• State• LastLSN• UndoNextLSNDirty Pages Table• PageId• RecLSN01/14/19 22Restart Processing• Analysis Pass• Redo Pass• Undo Pass• Selective or Deferred Restart01/14/19 23Media Recovery• fuzzy image copy (fuzzy archive dump)• image copy checkpoint• media recovery redo pointNested Top Actions• top actions• nested top


View Full Document

CORNELL CS 632 - Lecture 6 Recovery

Download Lecture 6 Recovery
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 6 Recovery and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 6 Recovery 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?