7. Recovery Flashcards

1
Q

Transaction Failure

  • ___ erros - Ex: Interna errors
  • ___ errors - Ex: Deadlock
A

Logical

System

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

System Failures

  • ___ crash
  • ___ Failure
A

System

Disk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Recovery from failures

  • Transaction needs to be undone if log contains ___, but does not contain ___ or___
  • Transaction needs to be redone if log contains ___, and contains ___ or___
A

Start / commit or abbort

Start / commit or abbort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Undo

Restores values of items updated by transaction to their ___ values and adds ___ to log

A

Older

Abort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Redo

Sets values of items updated by transaction to their ___ values and adds ___ to log

A

New

Nothing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Checkpoints
1- Output log from ___ to ___
2- Output all modified ___ to the ___
3- Write a chackpoint ___ to ___

A

RAM to stable storage
Bugger blocks to the disk
Log to stable storage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Recovery Algorithm

  • ___ and ___ during normal operation
  • Recovery from failure with two phases:
    1. Redo phase: ___ updates of all transactions, whether they committed, aborted, or are incomplete
    2. Undo phase: ___ all incomplete transactions
A

Logging and Transaction rollback
Replay
Undo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Log record buffering

Log records are buffered in ___, instead of being output directly to ___.

A

Main memory

Stable storage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

ARIES

  • Every log record has a ___ (log sequence number
  • Every ___ (block) contains LSN of the most recent log record that ___ the page
  • Each log record contains a ___ to the previous log record of the same ___
A

LSN
Page / changed
Pointer / transaction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Dirty page table
Contains one entry for each dirty ___ in the buffer that has a ___ (points to the first log record that made the page dirty)

A

Page

recLSN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Transaction table

Contains one entry for each ___ that has a ___ (points to the last log record of the transaction)

A

Active transaction

lastLSN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Checkpoints in ARIES

Writte ___ and ___ ( that has the contents of the dirty page table and transaction table)

A

begin_checkpoint

end_checkpoint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Recovery in ARIES

  1. ___: Identifies dirty pages in the buffer pool and active transactions at crash
  2. ___: Repeats all actions
  3. ___: Undoes the actions of transactions that did not commit
A
  1. Analysis
  2. Redo
  3. Undo
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Compensation log record (CLR)

___ to the next action to be ___

A

Pointer

Undone

How well did you know this?
1
Not at all
2
3
4
5
Perfectly