Contents

CS186-L19: Distributed Transactions

distributed == parallel shared nothing architecture

Intro

/databasel19/image.png

Distributed Locking

each nodes has lock table locally, can manage the pages/tuples easily, but when it comes to Table, there should be a global lock table (or distributed lock tables)and a coordinator to manage the access to the table.

Distributed Deadlocks Detection

/databasel19/image-1.png 合并全局waits /databasel19/image-2.png

Distributed Commit

全局投票 /databasel19/image-3.png

2PC

/databasel19/image-4.png /databasel19/image-5.png

The Recovery Processes

crash situations /databasel19/image-7.png /databasel19/image-6.png

2PC, Locking and Availability

2PC + Strict 2PL locking /databasel19/image-8.png

what if a node is down? some locks can still be held by other nodes…… /databasel19/image-9.png

Summary

/databasel19/image-10.png