Data-Dependent Read Snapshots to Reduce Transaction Aborts

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional database systems face issues with transactional conflicts, leading to aborts and retries, which waste work, increase latency, and reduce throughput due to isolation and consistency conflicts, particularly in distributed systems.

Innovation Solution

Implement data-dependent read snapshots that dynamically adjust their scope to avoid conflicts, allowing transactions to continue without restarting, by using timestamp-based conflict detection and adjustment.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If strong isolation levels are used to provide high degree of isolation between concurrent transactions, then transaction correctness is improved, but transaction latency increases and throughput decreases

Engineering Contradiction:
Improvetransaction correctnessVSAvoidtransaction latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements dynamic read snapshot scope adjustment, where the system transitions from static isolation levels to dynamic scope management. Transactions can adjust their read snapshot scope during execution based on conflict detection, allowing the system to provide strong isolation when needed while permitting weaker isolation when conflicts are absent, thereby reducing latency while maintaining correctness.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the parameter of read snapshot scope from fixed to variable. By introducing configurable scope parameters (statement-level, transaction-level, or custom scopes), the system can adjust isolation strength dynamically, resolving the contradiction between strong isolation and performance by selecting appropriate scope levels for different transaction types and workloads.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If strong isolation levels are used to eliminate concurrency effects, then transaction correctness is improved, but system throughput decreases

Engineering Contradiction:
Improvetransaction correctnessVSAvoidsystem throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the read snapshot scope into different levels (statement-level, transaction-level, and custom scopes). This segmentation allows the system to apply strong isolation only where necessary while permitting weaker isolation elsewhere, thereby maintaining correctness for critical operations while improving overall throughput through reduced blocking and contention.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

By making read snapshot scope dynamic and configurable, the system can adapt isolation strength to workload characteristics. High-throughput workloads can utilize broader scopes with weaker isolation, while correctness-critical workloads can employ narrower scopes with stronger isolation, optimizing the balance between throughput and correctness.

Inventive Principle:
Principle #15Dynamics

3Reliability

If per-transaction read snapshot scope is used to eliminate concurrency anomalies, then transaction correctness is improved, but transaction complexity increases

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

Solution Approach 1:

The patent creates a universal read snapshot mechanism that serves multiple functions across different isolation levels. The same infrastructure supports statement-level, transaction-level, and custom scopes, eliminating the need for separate complexity-managing mechanisms for each isolation level and simplifying the overall system while maintaining correctness.

Inventive Principle:
Principle #6Universality (Multi-functionality)

4Loss of time

If per-statement read snapshot scope is used to improve performance, then transaction latency is reduced, but concurrency anomalies occur

Engineering Contradiction:
Improvetransaction latencyVSAvoidtransaction correctness
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The patent applies local quality by allowing different read snapshot scopes for different statements within the same transaction based on their specific needs. Critical statements that require strong isolation can use narrower scopes, while non-critical statements can use broader scopes for performance, with the system automatically managing scope transitions to prevent concurrency anomalies while optimizing latency.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS20250315423A1Systems and methods for variably scoped, data-dependent read snapshots
Publication Date: 2025.10.09 COCKROACH LABS INC
  • US20250315423A1 patent drawing
  • US20250315423A1 patent drawing
  • US20250315423A1 patent drawing

AI summary

Systems and methods for controlling execution of conflicting transactional operations are provided. A first transaction comprising (i) a first request directed to first data of a first partition stored by a plurality of computing nodes and (ii) a first timestamp is received from a client device. A refresh span list configured to indicate data read by the first transaction is generated. Based on the first data being associated with a second timestamp greater than the first timestamp, a conflict associated with the first transaction is identified. Based on the conflict, a refresh timestamp greater than or equal to the second timestamp is determined. Based on the refresh span list, the first transaction is committed at the refresh timestamp.