CakeMask: Enabling Fresh-Data HTAP Databases with High Performance and Low Memory Overhead

Baoyue Yan, Jianying Wang, Hao Chen, Xinjun Yang, and Feifei Li, Alibaba Cloud Computing

HTAP systems increasingly need to support analytics over fresh transactional data. In row-columnar HTAP architectures, this raises a visibility-management problem: analytical queries must observe the latest updates. Addressing this, existing designs struggle with a three-way tradeoff among transactional update throughput, analytical scan efficiency, and memory overhead.

This paper presents CakeMask, a visibility-management design for fresh-data HTAP. To balance performance and memory overhead, CakeMask preserves bitmap as the compact, scan-efficient base visibility representation, while moving recent visibility changes into a delta visibility layer to avoid concurrent update overhead on the bitmap. It further combines an LSM-inspired delta structure, an optimized concurrent B+ tree with non-blocking scans, optimized bitmap–delta merging via vectorization, parallelism, and caching, and dynamic consolidation to bound long-term scan overhead. We implement CakeMask in a commercial cloud HTAP database and evaluate it on diverse workloads. The results show that CakeMask delivers scan performance comparable to in-memory version array at 1.6% of its memory usage, and outperforms existing on-disk visibility-management solutions up to 79× in write throughput. CakeMask has been deployed in production in a commercial HTAP system and has been validated on real-world workloads over three years.

Open Access Media

USENIX is committed to Open Access to the research presented at our events. Papers and proceedings are freely available to everyone once the event begins. Any video, audio, and/or slides that are posted after the event are also free and open to everyone. Support USENIX and our commitment to Open Access.