Concurrent accesses to databases are typically encapsulated in transactions in order to enable isolation from other concurrent computations and resilience to failures. Modern databases provide transactions with various semantics corresponding to different trade-offs between consistency and availability. Since a weaker consistency model provides better performance, an important issue is investigating the weakest level of consistency needed by a given program (to satisfy its specification). As a way of dealing with this issue, we investigate the problem of checking whether a given program has the same set of behaviors when replacing a consistency model with a weaker one. This property known as robustness generally implies that any specification of the program is preserved when weakening the consistency. We focus on the robustness problem for consistency models which are weaker than standard serializability, namely, causal consistency, prefix consistency, and snapshot isolation. We show that checking robustness between these models is polynomial time reducible to a state reachability problem under serializability. We use this reduction to also derive a pragmatic proof technique based on Lipton's reduction theory that allows to prove programs robust. We have applied our techniques to several challenging applications drawn from the literature of distributed systems and databases.
翻译:数据库的同步存取通常包含在交易中,以便与其它同时的计算和对失败的抵御能力相隔离。现代数据库提供与一致性和可用性之间不同取舍相对应的各种语义交易。由于一致性模式较弱可以提供更好的性能,一个重要问题是调查某一程序所需的最薄弱的一致性水平(以满足其规格)。作为处理这一问题的一种方法,我们调查在用较弱的模型取代一致性模型时,某一程序是否有相同的一套行为问题。这种被称为稳健性的属性通常意味着在削弱一致性时,程序的任何规格都会得到维护。我们侧重于一致性模型的稳健性问题,这些模型比标准的序列性弱,即因因果关系、前置一致性和快照隔离。我们表明,检查这些模型之间的稳健性是可重复到序列性国家可达性问题的多数值时间。我们利用这一缩减来获得基于利普顿的减少理论的实用证据技术,以证明程序是否稳健。我们运用了我们的技术,对从分布式系统和数据库文献中提取的若干具有挑战性的应用提出了挑战。