Optimistic Deadlock Handling with Redo Log-Based Speculative Versioning under High Contention
Hyejin Yoo, Seongjae Moon, Jonghyeok Park, Viktor Leis, Sang-Won Lee
原文摘要
Modern OLTP engines rely on multi-versioning to eliminate read-write conflicts, yet their concurrency is severely limited by write-write conflicts. With immediate, in-place updates, only one transaction updates a record at a time, and the others wait for it to commit or abort. Conflicting transactions are thus serialized. We propose RCC, a Redo log-based Concurrency Control scheme for high write contention. A transaction updates a record out of place by creating a speculative write version from its redo log entry. With multiple speculative versions per record, conflicting transactions are pipelined without waiting for predecessors to commit. RCC guarantees serializability using lock-based access-time conflict ordering and dependency graph tracking. Updates are installed lazily at commit, so a transaction aborts by discarding its speculative versions. Based on this, RCC introduces two novel techniques. Optimistic deadlock handling decouples deadlock detection from lock acquisition: it grants locks without checking for deadlocks and detects cycles asynchronously in the dependency graph. Columnar RCC (RCC-C) removes record-level false conflicts with column-level redo logs. We implemented RCC on MySQL, PostgreSQL, and DBx1000. In TPC-C at 128 threads on a 128-core server, RCC improves throughput by up to 3.3x over the state-of-the-art schemes, and RCC-C improves it further by avoiding false deadlocks and aborts. On high-contention YCSB, RCC remains robust up to 128 threads, whereas other schemes degrade beyond 32.
cs.DB