Hybrid Concurrency Control for Distributed Database Transactions

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveread performanceVSAvoidwrite operation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #3Local quality

2Reliability

If locking is used for write operations, then write consistency is ensured, but concurrent write throughput decreases

Engineering Contradiction:
Improvewrite consistencyVSAvoidconcurrent write throughput
Core Design Contradiction:
ReliabilityVSProductivity

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.

Inventive Principle:
Principle #5Merging (Combining)

3Reliability

If a two-level transaction hierarchy is implemented, then transaction isolation is improved, but system complexity increases

Engineering Contradiction:
Improvetransaction isolationVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

4Reliability

If targeted isolation level is applied, then data integrity is improved, but query flexibility decreases

Engineering Contradiction:
Improvedata integrityVSAvoidquery flexibility
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

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.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS12007990B1Deferred constraints support in distributed database systems
Publication Date: 2024.06.11 SNOWFLAKE INC
  • US12007990B1 patent drawing
  • US12007990B1 patent drawing
  • US12007990B1 patent drawing

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.