Skip to main content
QUICK REVIEW

[论文解读] Repairing Conflicts among MVCC Transactions

Mohammad Dashti, Sachin Basil John|arXiv (Cornell University)|Mar 2, 2016
Distributed systems and fault tolerance参考文献 19被引用 3
一句话总结

本文提出 MV3C,一种新颖的多版本并发控制(MVCC)并发控制算法,通过仅部分重执行冲突的代码块而非中止并重启整个事务来解决事务冲突。通过使用轻量级依赖注解和基于闭包的修复机制,MV3C 降低了开销,并在高竞争环境下提升了吞吐量,在无冲突场景下实现近乎零的性能损耗,且在冲突频繁时显著提升性能。

ABSTRACT

The optimistic variants of MVCC (Multi-Version Concurrency Control) avoid blocking concurrent transactions at the cost of having a validation phase. Upon failure in the validation phase, the transaction is usually aborted and restarted from scratch. The "abort and restart" approach becomes a performance bottleneck for the use cases with high contention objects or long running transactions. In addition, restarting from scratch creates a negative feedback loop in the system, because the system incurs additional overhead that may create even further conflicts. In this paper, we propose a novel approach for conflict resolution in MVCC for in-memory databases. This low overhead approach summarizes the transaction programs in the form of a dependency graph. The dependency graph also contains the constructs used in the validation phase of the MVCC algorithm. Then, in the case of encountering conflicts among transactions, the conflict locations in the program are quickly detected, and the conflicting transactions are partially re-executed. This approach maximizes the reuse of the computations done in the initial execution round, and increases the transaction processing throughput.

研究动机与目标

  • 为解决乐观多版本并发控制(MVCC)中因采用“中止并重启”策略而产生的性能瓶颈,尤其是在高竞争或长事务场景下。
  • 消除因中止导致竞争加剧并引发更多冲突的负面反馈循环。
  • 设计一种低开销的冲突解决机制,通过重用先前计算结果而非从头开始重启。
  • 通过依赖注解识别并仅重执行受影响的代码块,实现对冲突事务的高效修复。

提出的方法

  • MV3C 算法利用轻量级注解从事务程序构建依赖图,以追踪数据依赖和控制依赖。
  • 冲突通过检查读操作是否访问了过时的数据版本,在验证阶段被检测到。
  • 当发生冲突时,仅重执行通过闭包边界识别出的依赖代码块,从而最小化重新计算量。
  • 系统使用谓词图和编译器优化的闭包,以保持低运行时开销。
  • 写-写冲突通过将冲突解决推迟到提交时刻来解决,避免过早中止。
  • 提供可选的结果集修复机制,用于长事务查询,以进一步提升恢复效率。

实验结果

研究问题

  • RQ1是否可以通过仅部分重执行事务中冲突的部分,而非中止并重启,来改进 MVCC 中的冲突解决?
  • RQ2在无冲突执行场景下,维护依赖注解和修复机制的性能开销是多少?
  • RQ3在事务竞争不断增加的情况下,MV3C 相较于传统乐观 MVCC(OMVCC)的性能表现如何?
  • RQ4MV3C 是否能有效处理写-写冲突而无需过早中止?
  • RQ5部分修复在多大程度上减少了冲突对后续事务的级联影响?

主要发现

  • 在无冲突场景下,MV3C 相较于 OMVCC 的开销低于 1%,无论在串行还是并发执行中均成立。
  • 对于高竞争工作负载(如 Zipf 参数 α 递增的 Trading 基准测试),MV3C 显著减少了 500 万笔事务的处理时间,优于 OMVCC。
  • 级联影响实验表明,MV3C 的修复机制降低了整体系统负载,并防止了冲突级联,而 OMVCC 则因竞争加剧而性能持续下降。
  • 在 TPC-C 基准测试中(单仓库配置),MV3C 的性能与 OMVCC 几乎完全一致,证实即使在高事务复杂度下也无显著性能开销。
  • MV3C 的修复机制在长查询和高竞争场景下尤为有效,此时完全中止并重启将带来不可接受的代价。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。