id (PK) author like
1 alice 4
2 alice 8
3 bob 5
/posts/2/author
/posts/2/like
/posts/3/id
/posts/3/author
/posts/3/like
/posts/1/id
/posts/1/author
/posts/1/like
/posts/2/id
key
alice
8
_
bob
5
_
alice
4
_
value
● CockroachDB のアーキテクチャ
○ Range ごとに Raft Group を構成し合意
● 分散トランザクションの必要性
○ SQL に伴う Raft Group をまたいだ操作
● Transaction Record による実装
○ データ + Transaction Record で 2 回の合意
Slide 50
Slide 50 text
As a database that prides itself on
geo-distributed use cases, we must strive
to reduce the latency incurred by common
OLTP transactions to near the theoretical
minimum: the sum of all read latencies plus
one consensus latency.
CockroachDB RFC: Parallel Commits
Slide 51
Slide 51 text
No content
Slide 52
Slide 52 text
How Do Formal Methods Handle the Complexity?
Slide 53
Slide 53 text
No content
Slide 54
Slide 54 text
1. DB から現在の Like の個数を取得
2. ローカルでその値を + 1 する
3. DB に新しい値を書き戻す
We found that the process of writing this
specification gave us more confidence in
the Parallel Commit protocol itself and in
its integration into CockroachDB.
Parallel Commits: An Atomic Commit Protocol For
Globally Distributed Transactions