Read Consistency in Distributed Database Based on DMVCC
Jie Shao,Boxue Yin,Bujiao Chen,Guangshu Wang,Lin Yang,Jianliang Yan,Jianying Wang,Weidong Liu
DOI: https://doi.org/10.1109/HiPC.2016.025
2016-01-01
Abstract:In a traditional distributed database system, the partitions use two-phase locking (2PL) as the concurrency control protocol to ensure distributed read consistency. But the read-lock acquired by a read operation is incompatible with a write-lock, which undermines the performance of the system. While in a system at the snapshot isolation level, where partitions use Multi-Version Concurrent Control (MVCC) as the concurrent control protocol, distributed read inconsistency may occur. To achieve read consistency and guarantee the performance at the same time, we propose Distributed Multi-Version Concurrent Control (DMVCC). With DMVCC, the system can support snapshot reads, which do not block write operations, and ensure distributed read consistency. In this protocol, a transaction obtains a set of consistent snapshot version numbers at the startup time. The transaction then uses those numbers to read the corresponding data stored on each partition. The correctness of the protocol is strictly proved. We conduct a series of experiments to compare the performance of the system when using and not using DMVCC with a scaled TPC-C benchmark. We observe that our DMVCC based system outperforms the system using 2PL at both medium (up to 1.53x speed up) and high contention (up to 2.0x speed up) levels. Furthermore, when read/write ratio goes up to 1:1, the throughput of the DMVCC based system is 290% higher than that of the system using 2PL. The scalability of the system is also presented.