Constraint-Based Snapshot Isolation for Write Skew

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Snapshot isolation (SI) transactions face challenges in ensuring correct application behavior due to the write skew problem, which can lead to inconsistencies and excessive transaction aborts, particularly in distributed systems where data duplication is necessary for efficient processing.

Innovation Solution

The approach involves explicitly specifying constraints on the data model and checking these constraints during transaction commit processing to ensure that they are maintained, allowing transactions to commit only if they do not violate these constraints, thereby addressing the write skew issue and reducing unnecessary aborts.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If snapshot isolation is used to eliminate read-write conflicts and locking overhead, then transaction throughput and concurrency are improved, but write skew problems cause constraint violations and require excessive transaction aborts

Engineering Contradiction:
Improvetransaction throughputVSAvoidconstraint consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary constraint analysis during transaction compilation, identifying all constraints that may be affected by the transaction's read and write sets. This advance preparation allows the constraint checker to efficiently evaluate potential violations without blocking other transactions, thus maintaining high throughput while ensuring constraint consistency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements a feedback mechanism where the constraint checker evaluates concurrent transactions against identified constraints and provides feedback that determines whether to allow commit or abort. This feedback loop ensures that constraint violations are detected and prevented while minimizing unnecessary aborts of valid transactions.

Inventive Principle:
Principle #23Feedback

2Reliability

If constraint checking is performed on all concurrent transactions to ensure serializability, then constraint consistency is improved, but transaction commit overhead increases significantly

Engineering Contradiction:
Improveconstraint consistencyVSAvoidcommit processing overhead
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system applies constraint checking selectively based on local characteristics of each transaction and constraint. The constraint checker identifies which specific constraints are relevant to each transaction's data access patterns and only evaluates those constraints, rather than checking all constraints for all transactions. This localized approach reduces overhead while maintaining consistency for critical constraints.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The system segments constraints into different categories and applies different checking strategies to each segment. Critical constraints that could cause write skew are checked rigorously, while less critical constraints use more efficient checking methods. This segmentation allows the system to focus computational resources on the most important consistency requirements.

Inventive Principle:
Principle #1Segmentation

3Speed

If optimistic concurrency control is used to reduce locking overhead, then transaction speed is improved, but write-write conflicts cause excessive transaction aborts

Engineering Contradiction:
Improvetransaction execution speedVSAvoidtransaction commit success rate
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The constraint checker acts as an intermediary between optimistic transaction execution and final commit decision. During transaction execution, transactions proceed without locks at high speed. At commit time, the constraint checker mediates by evaluating whether the transaction's effects conflict with constraints violated by concurrent transactions, allowing valid commits while preventing only necessary aborts.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS9805088B2Constraint-based consistency with snapshot isolation
Publication Date: 2017.10.31 OPTUMSOFT INC
  • US9805088B2 patent drawing
  • US9805088B2 patent drawing
  • US9805088B2 patent drawing

AI summary

Efficient processing of concurrent atomic transactions is provided by identifying the constraints that need to be satisfied for correct application behavior. With these constraints identified, commit processing for a transaction can then refer to the constraints to see if committing the current transaction causes a problem with the constraints. If there is a conflict with the constraints, the transaction aborts. If there is no conflict with the constraints, the transaction commits.