CCaaLF: Concurrency Control as a Learnable Function
Hexiang Pan, Shaofeng Cai, Tien Tuan Anh Dinh, Yuncheng Wu, Yeow Meng Chee, Gang Chen, Beng Chin Ooi
TL;DR
CCaaLF tackles the challenge of achieving high throughput CC across diverse and drifting workloads by modeling concurrency control as a learnable agent function that maps compact, lock-free database states to conflict-handling actions. It unifies and extends existing CC designs by decomposing actions into conflict detection, timeout-based resolution, and pipeline-wait decisions, implemented as an in-database lookup for speed. Optimization is guided by an online Bayesian surrogate model and a graph-reduction search that jointly tune F_T, F_D, and F_P, with a dynamic conflict graph to derive pipeline-wait actions, enabling rapid adaptation to workload drift. Empirical results against five baselines across stored procedure and interactive modes show substantial throughput gains (up to 3.32×, 4.38×, and 4.27×) and significantly faster optimization (up to 11×) while maintaining serializability and robustness to drift.
Abstract
Concurrency control (CC) algorithms are important in modern transactional databases, as they enable high performance by executing transactions concurrently while ensuring correctness. However, state-of-the-art CC algorithms struggle to perform well across diverse workloads, and most do not consider workload drifts. In this paper, we propose CCaaLF (Concurrency Control as a Learnable Function), a novel learned concurrency control algorithm designed to achieve high performance across varying workloads. The algorithm is quick to optimize, making it robust against dynamic workloads. CCaaLF learns an agent function that captures a large number of design choices from existing CC algorithms. The function is implemented as an efficient in-database lookup table that maps database states to concurrency control actions. The learning process is based on a combination of Bayesian optimization and a novel graph reduction algorithm, which converges quickly to a function that achieves high transaction throughput. We compare CCaaLF against five state-of-the-art CC algorithms and show that our algorithm consistently outperforms them in terms of transaction throughput and optimization time.
