暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
lec05-aries-rev.pdf
210
11页
0次
2022-09-23
5墨值下载
ARIES: Logging and
Recovery
Slides derived from Joe Hellerstein;
Updated by A. Fekete
If you are going to be in the
logging business, one of the
things that you have to do is to
learn about heavy equipment.
-
Robert VanNatta,
Logging History of
Columbia County
Review: The ACID properties
A tomicity: All actions in the Xact happen, or none happen.
C onsistency: If each Xact is consistent, and the DB starts
consistent, it ends up consistent.
I solation: Execution of one Xact is isolated from that of other
Xacts.
D urability: If a Xact commits, its effects persist.
The Recovery Manager guarantees Atomicity & Durability.
Motivation
Atomicity:
Transactions may abort (“Rollback”).
Durability:
What if DBMS stops running? (Causes?)
crash!
Desired Behavior after
system restarts:
T1, T2 & T3 should be
durable.
T4 & T5 should be
aborted (effects not seen).
T1
T2
T3
T4
T5
Intended Functionality
At any time, each data item contains the value
produced by the most recent update done by a
transaction that committed
Assumptions
Essential concurrency control is in effect.
For read/write items: Write locks taken and held
till commit
Eg Strict 2PL, but read locks not important for recovery.
For more general types: operations of concurrent
transactions commute
Updates are happening “in place”.
i.e. data is overwritten on (deleted from) its
location.
Unlike multiversion approaches
Buffer in volatile memory; data persists on
disk
Challenge: REDO
Need to restore value 1 to item
Last value written by a committed transaction
Action Buffer Disk
Initially 0
T1 writes 1 1 0
T1 commits 1 0
CRASH 0
Challenge: UNDO
Need to restore value 0 to item
Last value from a committed transaction
Action Buffer Disk
Initially 0
T1 writes 1 1 0
Page flushed 1
CRASH 1
Handling the Buffer Pool
Can you think of a simple scheme
to guarantee Atomicity &
Durability?
Force write to disk at commit?
Poor response time.
But provides durability.
No Steal of buffer-pool frames
from uncommited Xacts (“pin”)?
Poor throughput.
But easily ensure atomicity
Force
No Force
No Steal
Steal
Trivial
Desired
of 11
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜