A DBMS allows trading consistency for efficiency through the allocation of isolation levels that are strictly weaker than serializability. The robustness problem asks whether, for a given set of transactions and a given allocation of isolation levels, every possible interleaved execution of those transactions that is allowed under the provided allocation, is always safe. In the literature, safe is interpreted as conflict-serializable (to which we refer here as conflict-robustness). In this paper, we study the view-robustness problem, interpreting safe as view-serializable. View-serializability is a more permissive notion that allows for a greater number of schedules to be serializable and aligns more closely with the intuitive understanding of what it means for a database to be consistent. However, view-serializability is more complex to analyze (e.g., conflict-serializability can be decided in polynomial time whereas deciding view-serializability is NP-complete). While conflict-robustness implies view-robustness, the converse does not hold in general. In this paper, we provide a sufficient condition for isolation levels guaranteeing that conflict- and view-robustness coincide and show that this condition is satisfied by the isolation levels occurring in Postgres and Oracle: read committed (RC), snapshot isolation (SI) and serializable snapshot isolation (SSI). It hence follows that for these systems, widening from conflict- to view-serializability does not allow for more sets of transactions to become robust. Interestingly, the complexity of deciding serializability within these isolation levels is still quite different. Indeed, deciding conflict-serializability for schedules allowed under RC and SI remains in polynomial time, while we show that deciding view-serializability within these isolation levels remains NP-complete.
翻译:数据库管理系统通过分配严格弱于可串行化的隔离级别,允许在一致性与效率之间进行权衡。鲁棒性问题研究的是:对于给定的事务集合及已分配的隔离级别,在该分配允许的所有可能交错执行中,是否始终保证安全性。在现有文献中,"安全"被解释为冲突可串行化(本文称为冲突鲁棒性)。本文研究视图鲁棒性问题,将"安全"解释为视图可串行化。视图可串行化是一种更宽松的概念,允许更多调度具有可串行性,且更贴近数据库一致性的直观理解。然而,视图可串行性的分析复杂度更高(例如,冲突可串行性可在多项式时间内判定,而视图可串行性判定属于NP完全问题)。虽然冲突鲁棒性蕴含视图鲁棒性,但反之一般不成立。本文提出了隔离级别满足冲突鲁棒性与视图鲁棒性一致性的充分条件,并证明该条件适用于Postgres和Oracle中的隔离级别:读已提交(RC)、快照隔离(SI)和可串行化快照隔离(SSI)。因此,在这些系统中,将安全性定义从冲突可串行性扩展至视图可串行性并不会增加可鲁棒性的事务集合。有趣的是,这些隔离级别下判定可串行性的复杂度仍存在显著差异:RC和SI允许的调度中判定冲突可串行性保持多项式时间复杂度,而本文证明这些隔离级别下判定视图可串行性仍为NP完全问题。