arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1806.08416cs.PL
收藏

弱一致性条件下可串行性违规的自动检测

Automated Detection of Serializability Violations under Weak Consistency

Kartik Nagar, Suresh Jagannathan

摘要:

虽然近年来已经开发了许多弱一致性机制来提高性能并确保分布式复制系统的可用性,但确保在此类系统上运行的事务应用程序的正确性仍然是一个困难而重要的问题。可序列化性是事务性程序的一个很好理解的正确性标准;然而,理解应用程序在弱一致性环境中执行时是否可序列化仍然是一项具有挑战性的工作。在这项工作中,我们结合了依赖图为基础的表征的可串行化和抽象执行的框架,开发了一个完全自动化的方法,静态地发现有限的可串行化违反\emph{any}弱一致性模型。我们减少了一阶逻辑公式的可满足性的串行化问题,这使我们能够利用现有的SMT求解器的电源。我们提供了规则来自动构造FOL编码从程序编写的SQL(允许循环和条件)和一致性规范编写为公式在FOL。除了检测有界串行化违规,我们还提供了两个正交计划的原因无界执行提供充分的条件(FOL公式的形式),其满足性将意味着在任何任意执行的异常情况下。我们已经应用所提出的技术TPC-C,一个现实世界的数据库程序,具有复杂的应用逻辑,并能够发现异常并行快照隔离,并验证序列化的无限执行快照隔离,两个一致性机制大大弱于序列化。

英文摘要:

While a number of weak consistency mechanisms have been developed in recent years to improve performance and ensure availability in distributed, replicated systems, ensuring correctness of transactional applications running on top of such systems remains a difficult and important problem. Serializability is a well-understood correctness criterion for transactional programs; understanding whether applications are serializable when executed in a weakly-consistent environment, however remains a challenging exercise. In this work, we combine the dependency graph-based characterization of serializability and the framework of abstract executions to develop a fully automated approach for statically finding bounded serializability violations under \emph{any} weak consistency model. We reduce the problem of serializability to satisfiability of a formula in First-Order Logic, which allows us to harness the power of existing SMT solvers. We provide rules to automatically construct the FOL encoding from programs written in SQL (allowing loops and conditionals) and the consistency specification written as a formula in FOL. In addition to detecting bounded serializability violations, we also provide two orthogonal schemes to reason about unbounded executions by providing sufficient conditions (in the form of FOL formulae) whose satisfiability would imply the absence of anomalies in any arbitrary execution. We have applied the proposed technique on TPC-C, a real world database program with complex application logic, and were able to discover anomalies under Parallel Snapshot Isolation, and verify serializability for unbounded executions under Snapshot Isolation, two consistency mechanisms substantially weaker than serializability.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑