Skip to Content
数据库系统内幕
book

数据库系统内幕

by Alex Petrov
May 2020
Beginner to intermediate
319 pages
7h 3m
Chinese
China Machine Press
Content preview from 数据库系统内幕
238
|
第
13
章
数据
数据
数据
账户 1
账户 1
账户 1
账户 2
账户 2
账户 2
a
)
从账户 2 向账户 1 转账 $150 之前的初始状态
b
)
加锁并更新账户之后的状态
c
)
事务提交
:
释放锁并更新写入元数据为最新数据时间戳
锁
锁
主锁
锁
写入元数据
写入元数据
写入元数据
最新时间戳为
TS1
最新时间戳为
TS1
最新时间戳为
TS1
最新时间戳为
TS1
最新时间戳为
TS1
最新时间戳为
TS1
最新时间戳为
TS3
最新时间戳为
TS3
主锁位于账户 1
图
13-9
:
Percolator
事务的执行步骤。事务从账户
2
向账户
1
转账
$150
一个基于 Percolator 模型的数据库的例子是 TiDB( Ti 代表钛元素)。TiDB 是一个强
一致、高可用、可水平扩展的开源数据库,兼容 MySQL。
13.8
协调避免
讨论可串行化性的成本并尝试减少协调量,同时仍提供强大的一致性保证的另一个例子
是协调避免 [BAILIS14b]。在保持数据完整性约束的前提下,只要操作满足约束融合性,
协调是可以避免的。约束融合性(Invariant Confluence 或
I
-Confluence)定义为这样一种
属性:两个满足约束但存在分歧的数据库状态一定能够合并为一个有效的最终状态。这
里说的约束对应 ACID 中的一致性。
分布式事务
|
239 ...
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