Master’s Thesis Presentation • Data Systems • Eventual Durability of ACID Transactions in Database Systems

Thursday, August 3, 2023 3:00 pm - 4:00 pm EDT (GMT -04:00)

Please note: This master’s thesis presentation will take place in DC 2568.

Tejasvi Kashi, Master’s candidate
David R. Cheriton School of Computer Science

Supervisor: Professor Ken Salem

Modern database systems that support ACID transactions, and applications built around these databases, may choose to sacrifice transaction durability for performance when they deem it necessary. While this approach may yield good performance, it comes with three major downsides. Firstly, users are often not provided information about when and if the issued transactions became durable. Secondly, users cannot know if durable and non-durable transactions saw each other’s effects. Finally, this approach pushes durability handling outside the scope of the transactional model, making it difficult for applications to reason about correctness and data consistency.

To address these issues, we present the idea of ”Eventual Durability” (ED) to provide a principled way for applications to manage transaction durability trade-offs. This model enables applications to control which transactions commit quickly and which ones should be durable at commit time, thus making them “durability-aware”. It also helps users and applications make informed decisions when failures occur since, with the ED model, application developers can know what to expect during failures.

Under the ED model, we untether a transaction’s ‘commit’ from its ‘durability’ guarantee to extend the traditional transaction model. We allow transactions to commit and become visible first but become durable eventually. We expose this model through ‘fast’ and ‘safe’ transactions. Fast transactions commit quickly and become durable later, while safe transactions behave like traditional transactions. Furthermore, we redefine serialisability and recoverability under ED to allow applications to ascertain if fast transactions became durable and how they might have interacted with safe ones. With ED, users and applications can know what to expect to lose when there is a failure – thus, bringing back managing durability inside the transaction model while providing a principled way to manage durability trade-offs.

We implement eventual durability in PostgreSQL and evaluate it to show that ED provides an average of 91.25% – 93% reduction in abort rates under a contentious workload and an average of 75% increase in throughput compared to baseline Postgres. We also run the TPC-C benchmark against ED Postgres and discuss the findings. Lastly, we discuss how ED Postgres can be used in realistic settings to obtain latency benefits, throughput improvements, reduced abort rates, and fresher reads.