paperbot · PL 论文追踪

全部论文 待读 收藏

P2 DBStorm: Generating Various Effective Workloads for Testing Isolation Levels

DBStorm:为隔离级别测试生成多样化且有效的工作负载
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 1/10 · 该论文研究数据库隔离级别的黑盒负载生成与测试,属于数据库并发测试方向,而用户画像关注的是静态分析、LLM/Agent 与程序分析的交叉、浮点程序分析和贝叶斯程序分析,二者几乎没有交集。引用 5 inbox
Keqiang Li, Siyang Weng, Lyu Ni, Chengcheng Yang, Rong Zhang, Xuan Zhou, Aoying Zhou
crossref: 2026-09-12

AI 速览

一句话:提出 DBStorm,以冲突图为核心黑盒生成多样有效负载测试数据库隔离级别,发现 33 个真实缺陷。

隔离级别是应用与数据库之间的正确性契约,实现有误会导致错误的事务执行结果与数据库状态。现有工作难以高效生成多样且有效的工作负载来测试隔离级别,核心挑战包括:(a) 黑盒测试,需触发闭源 DBMS 的隔离级别代码;(b) 有效测试,需规避冗余无效测试;(c) 异常敏感测试,需以可区分方式测试各隔离级别。作者调研 15 个流行 DBMS 的隔离级别实现,发现它们遵循通用框架:用冲突图管理负载中的所有冲突,并执行验证策略预防不可串行化异常。据此提出轻量的数据状态镜像方法,生成精确访问预期记录并参与特定冲突图形成的 SQL 操作;提出与历史无关的高效冲突图生成方法,保证图生成开销与历史图规模无关;并提出基于植入的方法,按异常定义编排冲突记录访问并注入不同事务。实验表明该方法在测试有效性、效率与覆盖率上优于已有方法,并在流行 DBMS 中成功发现 33 个缺陷。

问题
现有研究无法高效生成多样化且有效的工作负载来测试 DBMS 的隔离级别实现,面临黑盒触发、规避冗余测试以及区分不同隔离级别异常的三大挑战。
方法
通过调研 15 个流行 DBMS 归纳出基于冲突图与验证策略的隔离级别通用实现框架,进而提出数据状态镜像以生成精确 SQL 操作、与历史无关的冲突图生成方法,以及按异常定义编排并注入冲突记录访问的植入式方法。
评估
与现有方法在测试有效性、效率和覆盖率上进行对比,并在多个流行 DBMS 上开展实践测试,共发现 33 个真实缺陷。
原文摘要(Abstract)

Isolation level (IL) acts as a correctness contract between applications and DBMSs. Problematic IL implementations would cause incorrect transaction execution results and erroneous database states. However, existing studies could not efficiently generate various effective workloads for IL test. The core challenges come from the requirements of (a) black-box testing (trigger the IL code of a closed source DBMS), (b) effective testing (evade redundant and ineffective testing), and (c) anomaly-sensitive testing (test various ILs in a distinguishable way). For black-box testing, we investigate the IL implementations of 15 popular DBMSs and discover that they follow a generic framework that utilizes conflict graphs to manage all conflicts of a workload, and performs a verification policy to prevent non-serializable anomalies. For effective testing, we propose a lightweight data state mirroring method, which helps generate SQL operations that precisely access its expected records and participate the formation of specific conflict graphs. We also propose an efficient history-independent approach to generate dissimilar conflict graphs. It guarantees the graph generation overhead is irrelevant to the scale of historical graphs. For anomaly-sensitive testing, we propose an implantation-based approach to orchestrate conflict record accesses and inject them into different transactions according to the anomaly definition. Our approach outperforms existing approaches in testing effectiveness, efficiency, and coverage. Practically, we have successfully found 33 bugs in popular DBMSs.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot8611,
  title = {DBStorm: Generating Various Effective Workloads for Testing Isolation Levels},
  author = {Keqiang Li and Siyang Weng and Lyu Ni and Chengcheng Yang and Rong Zhang and Xuan Zhou and Aoying Zhou},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3680318}
}