Distributed database testing tool finds new query processing bugs
Distribution-Aware Distributed Database Testing (Extended Version)
Databases
Summary
Distributed databases split data across many machines, making it harder to test if they work correctly. Existing tests often miss problems because they don’t cover how data is spread out and handled. The authors created DAT, a new method that understands how data is distributed and changes queries to explore more cases. Their tool, DistRanger, tested four popular distributed databases and found 31 unknown bugs, mostly involving how queries are processed and optimized across machines.
What this means in practice
- •For database engineers: Detect subtle bugs in distributed query processing to improve system reliability and performance.
- •For cloud platform teams: Enhance testing pipelines for distributed database services to uncover errors related to data distribution and optimizations.
Authors
Zhou Zhou, Si Liu, Hengfeng Wei, Min Zhang
Abstract
Distributed database management systems (DDBMSs) introduce new challenges for assessing their reliability due to distribution-specific characteristics that affect query execution and optimization. Existing testing approaches, largely designed for centralized DBMSs, often fail to explore diverse distributed execution behaviors and suffer from low executability of generated test queries, thereby limiting their effectiveness in bug detection. We propose DAT (Distribution-Aware Testing), a novel automated approach for detecting query-processing bugs related to distribution strategies and distributed optimizations in DDBMSs, by systematically leveraging distribution-aware information throughout the testing pipeline. DAT builds on a set of techniques that capture diverse combinations of logical schemas and data distribution strategies, and performs guided query mutation to trigger a wide range of distributed query execution behaviors and optimizations, while improving query executability via historical feedback. We implement our approach in a tool, DistRanger, and evaluate it on four widely used production DDBMSs. It uncovers 31 previously unknown bugs, including 28 related to distributed query processing and optimization, and outperforms state-of-the-art testers.