Hybrid Concurrency Control for Distributed Database Transactions
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing database systems face challenges in ensuring concurrent transactions are executed safely and performantly, particularly in distributed environments, where deadlocks and starvation can occur, compromising data integrity and consistency.
Innovation Solution
The implementation of a network-based database system that employs a combination of multi-version concurrency control (MVCC) for read operations and locking for write operations, along with a targeted isolation level and a two-level transaction hierarchy, to manage and execute concurrent transactions effectively, ensuring data integrity and consistency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multi-version concurrency control (MVCC) is used for read operations, then read performance is improved, but write operations become more complex
Solution Approach 1:
The patent divides concurrency control into two separate mechanisms: MVCC for read operations and locking for write operations. This segmentation allows each mechanism to be optimized independently, with MVCC providing high read performance through versioning without interfering with write operations, while locking ensures write consistency through traditional lock management.
Solution Approach 2:
The patent applies different concurrency control strategies to different operation types locally: MVCC is applied specifically to read operations where versioning provides benefit, while locking is applied to write operations where mutual exclusion is critical. This local quality approach avoids the overhead of applying a single complex mechanism to all operations.
2Reliability
If locking is used for write operations, then write consistency is ensured, but concurrent write throughput decreases
Solution Approach 1:
The patent merges MVCC and locking mechanisms into a unified hybrid concurrency control system. The MVCC component manages read-write and read-read concurrency through versioning, while the locking component handles write-write concurrency. This combination allows the system to benefit from both non-blocking reads and consistent writes, improving overall concurrent write throughput while maintaining consistency.
3Reliability
If a two-level transaction hierarchy is implemented, then transaction isolation is improved, but system complexity increases
Solution Approach 1:
The patent implements a two-level transaction hierarchy that segments transaction management into statement-level transactions and transaction groups. This segmentation allows fine-grained isolation control at the statement level while providing coordinated management at the group level, improving transaction isolation without requiring a complete redesign of the transaction system.
Solution Approach 2:
The patent adds a temporal dimension to transaction isolation by introducing version timestamps and commit timestamps. This dimensional approach allows the system to track and enforce isolation rules across different time points, providing strong isolation guarantees while managing complexity through structured timestamp-based reasoning.
4Reliability
If targeted isolation level is applied, then data integrity is improved, but query flexibility decreases
Solution Approach 1:
The patent implements dynamic isolation level adjustment that allows the system to adapt the strictness of isolation rules based on the specific query and transaction context. This dynamic approach maintains data integrity for critical operations while providing greater flexibility for queries that can tolerate relaxed isolation, resolving the contradiction between integrity and flexibility.
Data Source
AI summary
The subject technology receives a query, the query including a set of statements, the set of statements including a first statement comprising a first data manipulation language operation. The subject technology determines that the set of statements includes at least one statement defining a first constraint, and a second statement indicating that the first constraint is statement deferrable for performing validation of the first constraint. The subject technology generates a key value constraint check operator as a node in a query plan. The subject technology generates a key value DML operator as a second node in the query plan, the key value DML operator corresponding to the first DML operation. The subject technology performs, using the key value constraint check operator, a validation process of the first constraint based at least in part on a set of violating keys of each DML operation from the set of statements.


