Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Multiversion concurrency control, snapshot isolation, serialisable snapshot isolation » ?

Aussi appelé : multiversion concurrency control · snapshot isolation · serialisable snapshot isolation

Definition 23.6 University Computer Science — Year 3 · Chapitre 23 — Concurrency Control and Recovery

Under multiversion concurrency control each item keeps several versions, each tagged with the commit timestamp of the transaction that wrote it. Under snapshot isolation a transaction reads, for each item, the newest version committed before it started, together with its own writes; two transactions are concurrent when each starts before the other commits, and of two concurrent transactions that write the same item, the second to commit aborts (first committer wins). Serialisable snapshot isolation adds a check at commit that aborts a transaction in a dangerous structure: one where it has read an item that a concurrent transaction writes, and has written an item that a concurrent transaction read.

Write skew under snapshot isolation. Each transaction reads the snapshot taken at its start, so neither sees the other’s write; the items written are different, so both commit. The dashed arrows are the two read–write antidependencies, from T_1’s read of B to T_2’s write of it and from T_2’s read of A to T_1’s write; one each way, they form the cycle that serialisable snapshot isolation looks for.
Write skew under snapshot isolation. Each transaction reads the snapshot taken at its start, so neither sees the other’s write; the items written are different, so both commit. The dashed arrows are the two read–write antidependencies, from T1T_1’s read of BB to T2T_2’s write of it and from T2T_2’s read of AA to T1T_1’s write; one each way, they form the cycle that serialisable snapshot isolation looks for.
Lire dans le chapitre →