Eiciently Supporting Adaptive Multi-Level Serializability
Models in Distributed Database Systems
Zhanhao Zhao
∗
Renmin Univerisity of China
zhanhaozhao@ruc.edu.cn
ABSTRACT
Informally, serializability means that transactions appear to have
occurred in some total order. In this paper, we show that only the se-
rializability guarantee with some total order is not enough for many
real applications. As a complement, extra partial orders of transac-
tions, like real-time order and program order, need to be introduced.
Motivated by this observation, we present a framework that mod-
els serializable transactions by adding extra partial orders, namely
multi-level serializability models. Following this framework, we pro-
pose a novel concurrency control algorithm, called bi-directionally
timestamp adjustment (BDTA), to supporting multi-level serializ-
ability models in distributed database systems. We integrate the
framework and BDTA into Greenplum and Deneva to show the
benets of our work. Our experiments show the performance gaps
among serializability levels and conrm BDTA achieves up to 1.7
×
better than state-of-the-art concurrency control algorithms.
ACM Reference Format:
Zhanhao Zhao. 2021. Eciently Supporting Adaptive Multi-Level Serial-
izability Models in Distributed Database Systems. In Proceedings of the
2021 International Conference on Management of Data (SIGMOD ’21), June
20–25, 2021, Virtual Event , China. ACM, New York, NY, USA, 3 pages.
https://doi.org/10.1145/3448016.3450579
1 INTRODUCTION
Thus far, almost every major RDBMS is multi-version concurrency
control based to achieve serializability. However, recent studies en-
gendered by decentralized database systems under multi-version
concurrency control show that serializability guarantee could still
lead to stale reads. Take transactions shown in the top part of Fig-
ure 1 as an example. Transaction
T
3
starts after
T
1
commits, and
T
1
creates a new version
x
1
of tuple
x
. A stale read happens since the
read of
T
3
returns
x
0
but not
x
1
. This is possible, due to a lack of a
globally synchronized clock, for a database system to execute
T
3
over a state of the database before
T
1
exists (e.g.,
T
1
’s write cannot
be seen by
T
3
since the snapshot of
T
3
is less than the commit times-
tamp of
T
1
). Strict serializability, in essence, adds a simple additional
constraint, i.e., linearizable consistency [
15
], which preserves the
real-time order,
≺
, of non-concurrent operations (i.e.,
op
1
≺ op
2
∗
I would like to thank Wei Lu, Haixiang Li and Xiaoyong Du for advising this work
and the following grants: National Natural Science Foundation of China 61972403, and
Tencent Rhino-Bird Joint Research Program.
Permission to make digital or hard copies of part or all of this work for personal or
classroom use is granted without fee provided that copies are not made or distributed
for prot or commercial advantage and that copies bear this notice and the full citation
on the rst page. Copyrights for third-party components of this work must be honored.
For all other uses, contact the owner/author(s).
SIGMOD ’21, June 20–25, 2021, Virtual Event , China
© 2021 Copyright held by the owner/author(s).
ACM ISBN 978-1-4503-8343-1/21/06.
https://doi.org/10.1145/3448016.3450579
T3
Process P
1
Process P
2
R
3
(x
0
)
C
3
Time
T1
W
1
(x
1
)
C
1
T0
W
0
(x
0
)
C
0
History
T2
R
2
(x
0
)
C
2
Projection
H | T0
W
0
(x
0
)
C
0
H | T1
W
1
(x
1
)
C
1
H | T2
R
2
(x
0
)
C
2
H | T3
R
3
(x
0
)
C
3
Equivalent
Sequential History
T0
W
0
(x
0
)
C
0
T1
W
1
(x
1
)
C
1
T2
R
2
(x
0
)
C
2
T3
R
3
(x
0
)
C
3
Figure 1: Formulation of Multi-level Serializability
if operation
op
2
starts after operation
op
1
completes), on top of
serializability to prevent stale reads. That is, strict serializability
guarantees the properties of both serializability and linearizable
consistency hold during the entire execution of transactions.
Except Spanner [
2
,
9
], the majority of NewSQL systems, includ-
ing CockroachDB [
25
], TiDB [
16
] and MongoDB [
27
], do not sup-
port strict serializability. The reason behind this is not the diculty
of the implementation, but the costly overhead to request glob-
ally ordered timestamps to preserve real-time order. Consider that
linearizable consistency is the strongest consistency model in dis-
tributed systems, while a weaker consistency model yields higher
performance. We are therefore motivated to provide a framework to
optimize between the performance and consistency in distributed
database systems based on the requirements of applications.
In this paper, we aim to address the issue of serializability with
multi-level consistency models, which include linearizable consis-
tency (LC), sequential consistency (SC) [
18
], and causal consistency
(CC) [
17
], etc. Based on the observation that the consistency model
is dened by selectively preserving certain kind of partial orders
among operations and serializability is dened by preserving certain
kind of total orders among transactions, We rst propose a framework
by re-dening the consistency models in terms of the transaction
granularity rather than the operation granularity. We theoretically
analyze that all possible combinations are limited to serializability
& LC (namely strict serializability), and serializability & SC (namely
sequential serializability), while the other combinations are reduced
to sequential serializability.
Based on the framework, we propose a unied concurrency con-
trol algorithm with various optimizations. We attach each transac-
tion with a timestamp interval (denoted as [LB, UB]), and propose
the bi-directionally timestamp adjustment (BDTA) algorithm to
dynamically tracking the order of transactions by comparing and
coordinating timestamp intervals of transactions. We then integrate
the framework and BDTA into Greenplum [
13
] to study the system
performance under multi-level serializability models. Besides, we
implement BDTA and state-of-the-art concurrency control algo-
rithms in Deneva [
14
] to compare BDTA with other algorithms.
The results show BDTA achieves up to 1.7× performance gain.
Graduate Student Research Competition Track Abstract
SIGMOD ’21, June 20–25, 2021, Virtual Event, China
评论