Presentation is loading. Please wait.

Presentation is loading. Please wait.

Exploring the relations between STM and DB consistency conditions Sandeep Hans Technion Joint work with Hagit Attiya.

Similar presentations


Presentation on theme: "Exploring the relations between STM and DB consistency conditions Sandeep Hans Technion Joint work with Hagit Attiya."— Presentation transcript:

1 Exploring the relations between STM and DB consistency conditions Sandeep Hans TransForm @ Technion Joint work with Hagit Attiya

2 Database vs. STM DatabaseSTM

3 Beyond Serializability Recoverability Avoiding Cascading Aborts Strictness Rigorousness [Transactional Information Systems. Gerhard Weikum, Gottfried Vossen.] [Concurrency Control and Recovery in Database Systems. Philip A. Bernstein, Vassos Hadzilacos, Nathan Goodman] RG ST ACA RC

4 Problem with Aborts T 1 writes x. T 2 reads x written by T 1. T 2 commits, T 1 aborts. c2c2 w 1 (x,1) a1a1 T1T1 r 2 (x,1) T2T2 RG ST ACA RC

5 Recoverability T 1 writes x. T 2 reads x written by T 1. T 1 should commit before T 2 commits. c2c2 c1c1 T1T1 w 1 (x,1) r 2 (x,1) T2T2 RG ST ACA RC [Hadzilacos 83]

6 Problem: Cascading Aborts c1c1 r 2 (x,1)c2c2 a1a1 T1T1 w 1 (x,1) T2T2 a2a2 RG ST ACA RC

7 Avoiding Cascading Aborts T 1 should commit before T 2 commits reads x. T1T1 T2T2 w 1 (x,1) r 2 (x,1) c1c1 c2c2 RG ST ACA RC

8 Problem: Undo T 1 writes x=1. T 2 writes x=2 and commits. T 1 aborts. w 1 (x,1) T1T1 T2T2 w 2 (x,2) a1a1 c2c2 RG ST ACA RC

9 Strictness No data item is read or overwritten unless the transaction that wrote it has ended. T1T1 w 1 (x,1)c 1 /a 1 r 2 (x,1) T2T2 w 3 (x,2) T3T3 RG ST ACA RC

10 Rigorousness No data item is read or overwritten unless the transaction that read/wrote it has ended. T1T1 w 1 (x,1)c 1 /a 1 r 2 (x,1) T2T2 w 3 (x,2) T3T3 c 2 /a 2 RG ST ACA RC [Breitbart, Georgakopoulos, Rusinkiewicz & Silberschatz, 1991]

11 STM Conditions Opacity – Guerraoui and Kapalka [ PPoPP’08] – Sequential specification of shared objects. Virtual World Consistency – Imbs and Raynal [SIROCCO’09] – Causal past of a transaction. Weakest Reasonable Condition – Doherty, Groves, Luchangco, Moir [REFINE’09] VWC Opacity VWC

12 Bridging the Gap ? ? RG ST ACA RC VWC Opacity VWC

13 T1T1 T3T3 T2T2 Opacity Graph (OPG) w 1 (x,1) c1c1 r 2 (x,1) r 3 (x,0) a3a3 w 3 (x,3) T0T0 T3T3 T1T1 T2T2 vis loc ww rf rw rf rt Theorem: A history is opaque  its opacity graph is ACYCLIC Vertices – Visible (vis) – Local (loc) Edges Real Time (rt) Read From (rf) Write Before (ww) Read Before (rw) [Principles of Transactional Memory. Rachid Guerraoui, Michal Kapalka ]

14 Opacity Graph for Rigorousness T1T1 TnTn T2T2 T3T3 Suppose there is a cycle {T 1, T 2, T 3,…T n } Four types of edges: rt edge: T i completes before T j rf, ww, rw edges, then either a)T j reads from T i b)T j overwrites value written by T i c)T i reads a value over written by T j and T i must complete before T j. T 1 must complete before T 2, which should complete before T 3 etc.  T n must complete before T 1, which is not possible. Opacity graph of a rigorous TM history is ACYCLIC.

15 Opacity and Rigorousness Opacity graph of a rigorous TM history is ACYCLIC. Rigorousness ⊆ Opacity Rigorousness ≠ Opacity T1T1 w 1 (x,1) c1c1 T2T2 w 2 (x,2) r 1 (x,1) c2c2

16 T1T1 What about Strictness? w 1 (x,1) c1c1 T2T2 r 1 (x,1) c2c2 T1T1 w1(x,1) c1c1 T2T2 r 2 (x,1) T3T3 w 3 (x,2) c3c3 w 3 (y,3) r 2 (y,3) c2c2 Strictness  Opacity Strictness Opacity  Strictness ⊅ Opacity Strictness ⊄ Opacity

17 A Revised Landscape… Recoverability ACA Strictness Rigorousness VWC Opacity

18 Wrap Up Motivation for database and STM consistency conditions is similar yet perspectives differ. Inclusion relations might change when additional properties are introduced, e.g., – Update on commit – Liveness properties

19 Thank You


Download ppt "Exploring the relations between STM and DB consistency conditions Sandeep Hans Technion Joint work with Hagit Attiya."

Similar presentations


Ads by Google