Verifying Transactional Consistency of MongoDB

11/29/2021
by   Hongrong Ouyang, et al.
0

MongoDB is a popular general-purpose, document-oriented, distributed NoSQL database. It supports transactions in three different deployments: single-document transactions utilizing the WiredTiger storage engine in a standalone node, multi-document transactions in a replica set which consists of a primary node and several secondary nodes, and distributed transactions in a sharded cluster which is a group of multiple replica sets, among which data is sharded. A natural and fundamental question about MongoDB transactions is: What transactional consistency guarantee do MongoDB Transactions in each deployment provide? However, it lacks both concise pseudocode of MongoDB transactions in each deployment and formal specification of the consistency guarantees which MongoDB claimed to provide. In this work, we formally specify and verify the transactional consistency protocols of MongoDB. Specifically, we provide a concise pseudocode for the transactional consistency protocols in each MongoDB deployment, namely WIREDTIGER, REPLICASET, and SHARDEDCLUSTER, based on the official documents and source code. We then prove that WIREDTIGER, REPLICASET, and SHARDEDCLUSTER satisfy different variants of snapshot isolation, namely Strong-SI, Realtime-SI, and Session-SI, respectively. We also propose and evaluate efficient white-box checking algorithms for MongoDB transaction protocols against their consistency guarantees, effectively circumventing the NP-hard obstacle in theory.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/22/2021

Qanaat: A Scalable Multi-Enterprise Permissioned Blockchain System with Confidentiality Guarantees

Today's large-scale data management systems need to address distributed ...
research
02/12/2020

On Termination of Transactions over Semantic Document Models

We consider the framework of Document Modeling, which lays the formal ba...
research
08/27/2021

NimbleChain: Low-latency consensusless cryptocurrencies in general-purpose permissionless blockchains

Nakamoto's seminal work gave rise to permissionless blockchains – as wel...
research
01/29/2019

Data Consistency in Transactional Storage Systems: a Centralised Approach

Modern distributed databases weaken data consistency guarantees to allow...
research
04/13/2023

Choreographic Programming of Isolated Transactions

Implementing distributed systems is hard; choreographic programming aims...
research
08/02/2021

Skeena: Efficient and Consistent Cross-Engine Transactions

With the growing DRAM capacity and core count in modern servers, databas...

Please sign up or login with your details

Forgot password? Click here to reset