between STM and DB consistency conditions Sandeep Hans TransForm Technion Joint work with Hagit Attiya Database vs STM Database STM Beyond Serializability Recoverability Avoiding Cascading Aborts ID: 198792
Download Presentation The PPT/PDF document "Exploring the relations" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Exploring the relations between STM and DB consistency conditions
Sandeep
Hans
TransForm
@ Technion
Joint work with
Hagit
AttiyaSlide2
Database vs. STM
Database
STMSlide3
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
RCSlide4
Problem with AbortsT1
writes
x
.T
2 reads x written by T1
.T2 commits, T1 aborts.
c
2
w
1
(x,1)a1
T1
r
2
(x,1)T
2
RG
ST
ACA
RCSlide5
RecoverabilityT1
writes
x
.T
2 reads x written by T1
.T1 should commit before T2 commits.
c
2
c
1
T1
w
1(x,1)
r
2(x,1)
T2
RG
ST
ACA
RC
[
Hadzilacos
83]Slide6
Problem: Cascading Aborts
c
1
r
2
(x,1)
c
2
a
1
T
1
w
1
(x,1)
T
2
a
2
RG
ST
ACA
RCSlide7
Avoiding Cascading Aborts
T
1
should commit before
T2 commits reads
x.
T1
T
2
w
1(x,1)
r
2(x,1)
c
1
c
2
RG
ST
ACA
RCSlide8
Problem: Undo
T
1
writes x=1
.T2 writes
x=2 and commits.T1 aborts.
w1(x,1)
T
1
T
2
w
2(x,2)
a
1
c
2
RG
ST
ACA
RCSlide9
Strictness No data item is read or
overwritten unless the
transaction that wrote
it has ended.
T
1
w
1
(x,1)
c
1/a1
r2(x,1)
T2
w
3(x,2)
T
3
RG
ST
ACA
RCSlide10
RigorousnessNo data item is read or
overwritten unless the
transaction that
read/wrote it has ended.
T
1
w
1
(x,1)
c
1/a1
r2(x,1)
T2
w
3
(x,2)
T3
c
2
/a
2
RG
ST
ACA
RC
[
Breitbart
,
Georgakopoulos
,
Rusinkiewicz
&
Silberschatz
, 1991]Slide11
STM ConditionsOpacity
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 ConditionDoherty , Groves,
Luchangco, Moir [REFINE’09]
VWC
Opacity
VWCSlide12
Bridging the Gap
?
RG
ST
ACA
RC
VWC
Opacity
VWCSlide13
T1
T
3
T
2
Opacity Graph (OPG)
w
1
(x,1)
c
1
r
2
(x,1)
r
3
(x,0
)
a
3
w
3
(x,3)
T
0
T
3
T
1
T
2
vis
vis
loc
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
]Slide14
Opacity Graph for Rigorousness
T
1
T
n
T
2
T
3
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
T
j
reads from T
i
T
j
overwrites value written by T
i
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
.Slide15
Opacity and Rigorousness
Opacity graph of a rigorous TM history is ACYCLIC.
Rigorousness ⊆ Opacity
Rigorousness
≠
Opacity
T
1
w
1
(x,1)
c
1
T
2
w
2
(x,2)
r
1
(x,1)
c
2Slide16
T1
What about Strictness?
w
1
(x,1)
c
1
T
2
r
1
(x,1)
c2
T
1
w1(x,1)
c
1
T
2
r
2
(x,1)
T
3
w
3
(x,2)
c
3
w
3
(y,3)
r
2
(y,3)
c
2
Strictness
Opacity
Strictness
Opacity
Strictness ⊅ Opacity
Strictness ⊄ OpacitySlide17
A Revised Landscape…
Recoverability
ACA
Strictness
Rigorousness
VWC
OpacitySlide18
Wrap UpMotivation 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
propertiesSlide19
Thank You