aries example l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
ARIES Example PowerPoint Presentation
Download Presentation
ARIES Example

Loading in 2 Seconds...

play fullscreen
1 / 30

ARIES Example - PowerPoint PPT Presentation


  • 879 Views
  • Uploaded on

WA,B. WC. 1. CRASH. WD. WA. 2. WB. WE. 3. CP. Flush. ARIES Example. ARIES - What is Logged. “Physiological Logging” REDO Records Updates to data pages and index pages are logged separately But may use operational logging (e.g., INCREMENT/DECREMENT)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

ARIES Example


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
aries example

WA,B

WC

1

CRASH

WD

WA

2

WB

WE

3

CP

Flush

ARIES Example
aries what is logged
ARIES - What is Logged
  • “Physiological Logging”
    • REDO Records
      • Updates to data pages and index pages are logged separately
      • But may use operational logging (e.g., INCREMENT/DECREMENT)
        • Because escrow locks allow multiple writers
    • UNDO Records are Purely Logical
      • Only one record for index and data pages
      • May use operational logging
aries data structures

WA,B

WC

1

CRASH

WD

WA

2

WB

WE

3

CP

Flush

ARIES Data Structures

xactionTable

dirtyPgTable

Checkpoint

Disk

crash recovery
Crash Recovery
  • 3 Phases
    • Analysis
      • Rebuild data structures
      • Determine winners & losers
    • Redo
      • “Repeat history”
      • Why?
    • Undo
      • Undo Losers
analysis6
Analysis

Disk

xactionTable

dirtyPgTable

analysis7
Analysis

Disk

xactionTable

dirtyPgTable

analysis8
Analysis

Disk

xactionTable

dirtyPgTable

analysis9
Analysis

Disk

xactionTable

dirtyPgTable

analysis10
Analysis

Disk

xactionTable

dirtyPgTable

analysis11

Not the same as just before

crash (note disk state)

Analysis

dirtyPgTable

Disk

xactionTable

Losers

slide12
Redo

dirtyPgTable

  • Where to begin?
    • Checkpoint?
    • Min(recLSN)!
  • What to REDO
    • Everything?
      • Slow
      • Problematic if using operational (escrow) logging
    • Redo an update UNLESS:

1.

2.

3.

Disk

redo example
Redo Example

DirtyPgTable

  • Redo UNLESS
  • Page is not in dirtyPgTable
  • If LSN < recLSN
  • If LSN <= pageLSN

Disk

redo example14
Redo Example

DirtyPgTable

  • Redo UNLESS
  • Page is not in dirtyPgTable
  • If LSN < recLSN
  • If LSN <= pageLSN

Disk

redo example15
Redo Example

DirtyPgTable

  • Redo UNLESS
  • Page is not in dirtyPgTable
  • If LSN < recLSN
  • If LSN <= pageLSN

Disk

redo example16
Redo Example

DirtyPgTable

  • Redo UNLESS
  • Page is not in dirtyPgTable
  • If LSN < recLSN
  • If LSN <= pageLSN

Disk

redo example17
Redo Example

DirtyPgTable

  • Redo UNLESS
  • Page is not in dirtyPgTable
  • If LSN < recLSN
  • If LSN <= pageLSN

Disk

redo example18
Redo Example

DirtyPgTable

  • Redo UNLESS
  • Page is not in dirtyPgTable
  • If LSN < recLSN
  • If LSN <= pageLSN

Disk

redo example19
Redo Example

DirtyPgTable

  • Redo UNLESS
  • Page is not in dirtyPgTable
  • If LSN < recLSN
  • If LSN <= pageLSN

Disk

State identical to pre-crash state

slide20
Undo
  • Walk backwards, following prevLSNs to UNDO losers

xactionTable

slide21
Undo
  • Walk backwards, following prevLSNs to UNDO losers

xactionTable

slide22
Undo
  • Walk backwards, following prevLSNs to UNDO losers

xactionTable

  • Why can we just blindly apply UNDOs?
undo wrinkles
UNDO Wrinkles
  • Logical UNDO
    • Why?
  • “Compensation Log Records” -- CLRs
    • Avoid repeating UNDO work
    • Why?
undo with clr
UNDO with CLR

Losers: 3

redo with clr
REDO with CLR
  • REDO CLRs on crash recovery
    • Use REDO rules to check if updates in CLRs have already been done
    • After processing CLR, update lastLSN field in dirtyPgTable to point to prevLSN of CLR
      • Allows UNDO to start from the right place