《Designing Data-Intensive Applications》的笔记-Chapter 7: Transactions - Serializable Snapshot Isolation (SSI)
- 章节名：Chapter 7: Transactions - Serializable Snapshot Isolation (SSI)
- 2018-05-13 10:56:37
SSI is fairly new: it was first described in 2008  and is the subject of Michael Cahill's PhD thesis. ... it has the possibility of being fast enough to become the enw default in the future.Detecting writes that affect prior reads (the write occurs after the read).
SI 只跟踪活跃的写集合，而 SSI 需要跟踪活跃的读集合。commit 时冲突探测，判断事务的写操作是否影响到其他事务的读集合，如果影响到，那些事务的 premise 就认为已经不再成立了，那些事务如果只读便没问题，但是如果有写操作就会 abort。只是这时你仍不知道那些事务是不是只读的。In the context of two-phased locking we discussed index-range locks. .. Wee can use a similar technique here, except that SSI don't block other transactions.When a transaction writes to the database, it must look in the indexes for any other transactions that have recently read the affected data. This process is similar to acquiring a write lock on the affected key range, but rather than blocking until the readers have committed, the lock acts s a tripwire: it simply notifies the transactions that the data they read may no longer be up to date.
冲突探测的原理与 next-key lock 相似。
红色有角F叔对本书的所有笔记 · · · · · ·
Lost update: Two clients concurrently perform a read-modify-write cycle. One overwrites...
Preducate locks It works similarity to the shared/exclusive lock described earlier, but...
Chapter 7: Transactions - Serializable Snapshot Isolation (SSI)
说明 · · · · · ·