Testing Graph Database Systems via Graph-Aware Metamorphic Relations
Zeyang Zhuang, Penghui Li, Pingchuan Ma, Wei Meng, Shuai Wang
Abstract
Graph database systems (GDBs) have supported many important real-world applications such as social networks, logistics, and path planning. Meanwhile, logic bugs are also prevalent in GDBs, leading to incorrect results and severe consequences. However, the logic bugs largely cannot be revealed by prior solutions which are unaware of the graph native structures of the graph data. In this paper, we propose Gamera (Graph-aware metamorphic relations), a novel metamorphic testing approach to uncover unknown logic bugs in GDBs. We design three classes of novel graph-aware Metamorphic Relations (MRs) based on the graph native structures. Gamera would generate a set of queries according to the graph-aware MRs to test diverse and complex GDB operations, and check whether the GDB query results conform to the chosen MRs. We thoroughly evaluated the effectiveness of Gamera on seven widely-used GDBs such as Neo4j and OrientDB. Gamera was highly effective in detecting logic bugs in GDBs. In total, it detected 39 logic bugs, of which 15 bugs have been confirmed, and three bugs have been fixed. Our experiments also demonstrated that Gamera significantly outperformed prior solutions including Grand, GD-smith and GDBMeter. Gamera has been well-recognized by GDB developers and we open-source our prototype implementation to contribute to the community.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext a15d3d3b-f9c2-4624-a8d8-e3677ff6be3bCited by top-tier papers10
- Aster: Enhancing LSM-structures for Scalable Graph DatabaseDingheng Mo, Junfeng Liu, Fan Wang, Siqiang LuoSIGMOD 2025 · 10 citations
- Detecting Schema-Related Logic Bugs in Relational DBMSs via Equivalent Database ConstructionJiansen Song, Wensheng Dou, Yingying Zheng, Yu Gao et al.VLDB 2025 · 6 citations
- Testing Gremlin-Based Graph Database Systems via Query DisassemblingYingying Zheng, Wensheng Dou, Lei Tang, Ziyu Cui et al.ISSTA 2024 · 6 citations
- Simple Testing Can Expose Most Critical Transaction Bugs: Understanding and Detecting Write-Specific Serializability Violations in Database SystemsZiyu Cui, Wensheng Dou, Yu Gao, Rui Yang et al.VLDB 2025 · 4 citations
- Proving Cypher Query EquivalenceLei Tang, Wensheng Dou, Yingying Zheng, Lijie Xu et al.ICDE 2025 · 3 citations
Builds on9
- Finding bugs in database systems via query partitioningManuel Rigger, Zhendong SuOOPSLA 2020 · 116 citations
- Detecting optimization bugs in database engines via non-optimizing reference engine constructionManuel Rigger, Zhendong SuFSE 2020 · 104 citations
- APOLLO: Automatic Detection and Diagnosis of Performance Regressions in Database SystemsJinho Jung, Hong Hu, Joy Arulraj, Taesoo Kim et al.VLDB 2020 · 77 citations
- LiveGraph: A Transactional Graph Storage System with Purely Sequential Adjacency List ScansXiaowei Zhu, Marco Serafini, Xiaosong Ma, Ashraf Aboulnaga et al.VLDB 2020 · 53 citations
- MT-Teql: Evaluating and Augmenting Neural NLIDB on Real-world Linguistic and Schema VariationsPingchuan Ma, Shuai WangVLDB 2022 · 38 citations
Related papers
- Finding bugs in Gremlin-based graph database systems via Randomized differential testingYingying Zheng, Wensheng Dou, Yicheng Wang, Zheng Qin et al.ISSTA 2022 · 36 citations
- Testing Graph Database Engines via Query PartitioningMatteo Kamm, Manuel Rigger, Chengyu Zhang, Zhendong SuISSTA 2023 · 29 citations
- Detecting Logic Bugs in Graph Database Management Systems via Injective and Surjective Graph Query TransformationYuancheng Jiang, Jiahao Liu, Jinsheng Ba, Roland H. C. Yap et al.ICSE 2024 · 14 citations
- Testing Graph Database Systems with Graph-State Persistence OracleShuang Liu, Junhao Lan, Xiaoning Du, Jiyuan Li et al.ISSTA 2024 · 5 citations
- Finding Logic Bugs in Graph-processing Systems via Graph-cuttingQiuyang Mang, Jinsheng Ba, Pinjia He, Manuel RiggerSIGMOD 2025 · 4 citations
