Skip to Content
数据库系统内幕
book

数据库系统内幕

by Alex Petrov
May 2020
Beginner to intermediate
319 pages
7h 3m
Chinese
China Machine Press
Content preview from 数据库系统内幕
168
|
第
8
章
将在一段时间后恢复,或者它可能会失控并且产生错误的值。
分布式系统中,进程互相依赖以共同执行算法,因此故障可能导致整个系统的执行错误。
我们将讨论分布式系统中现有的多种故障模型,例如
崩溃
、
遗漏
和
任意
故障。这个列表
并非面面俱到,但它涵盖了在实际中的大多数重要场景。
8.7.1
崩溃故障
通常,我们期望进程正确执行算法的所有步骤。最简单的崩溃方式是进程
停止
执行接下
来的算法步骤,并且不再发送任何消息给其他进程。换句话说,该进程
崩溃
了。大多数
情况下,我们使用
崩溃 – 停止
(crash-stop)进程抽象的假设,它规定一旦进程崩溃就会
保持这种状态。
该模型不假定该进程无法恢复,也不阻拦或试图阻止恢复。这仅仅意味着该算法的正确
性或活动性
不依赖
于恢复过程。实际上,并没有什么东西会去阻止进程恢复、追上系统
状态以及参与
下一次
的算法执行。
失败的进程无法再继续参与当前这一轮的协作。为恢复的进程分配一个新的、不同的 ID
不会使模型等价于崩溃
–
恢复模型(之后会讨论),因为大多数算法使用预定义的进程列
表,并且依据最多可容忍的故障数明确定义了故障的语义 [CACHIN11]。
崩溃 – 恢复
(crash-recovery)是另一种的进程抽象。在这个抽象中,进程停止执行算法
步骤,但会在稍后恢复并尝试执行剩下的步骤。要想让恢复成为可能,需要在系统中引
入持久状态以及恢复协议 [SKEEN83]。允许崩溃
–
恢复的算法需要考虑所有可能的恢复
状态,因为恢复的进程会尝试从最后一个已知的步骤开始继续执行。
想利用恢复的算法必须同时考虑状态和进程 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

解密金融数据

解密金融数据

Justin Pauley

Publisher Resources

ISBN: 9787111655169