Three-Way Merge Process for Database Contention Windows

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database locking mechanisms, such as pessimistic and optimistic locking, lead to delays and poor user experiences due to excessive contention windows, especially in time-sensitive applications.

Innovation Solution

Implementing a three-way merge process that stores multiple copies of data, allowing updates to be made on a clone copy without locking the original, and then merging changes with the current data state upon commit, reducing the time a record is exclusively locked.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If pessimistic locking is used to prevent concurrent update conflicts, then data consistency is maintained, but user experience deteriorates due to delays and forced restarts

Engineering Contradiction:
Improvedata consistencyVSAvoiduser experience
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The system performs preliminary actions by creating a local copy of the data before the user begins editing. This allows the user to work with the copy without affecting the original data, and the lock is only applied briefly during the commit phase to resolve any conflicts. This preliminary copying action enables optimistic concurrency control while maintaining data consistency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary mechanism (local copy/cache) between the user and the actual data. This intermediary allows users to perform operations without directly locking the source data, and conflicts are resolved through a three-way merge process that acts as a mediator between concurrent modifications. This intermediary approach maintains reliability while improving ease of operation.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If optimistic locking is used to reduce delays, then user experience improves, but data consistency deteriorates due to transaction rollbacks from concurrent updates

Engineering Contradiction:
Improveuser experienceVSAvoiddata consistency
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The system implements feedback through the three-way merge process during commit. When a user attempts to commit changes, the system retrieves the current state of the data, compares it with the user's local copy and the original version, and automatically resolves conflicts by applying both sets of changes. This feedback mechanism ensures data consistency is maintained while allowing optimistic locking to improve user experience during the editing phase.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent performs preliminary actions by maintaining local copies of data and preparing merge strategies before conflicts occur. The three-way merge is pre-configured to handle concurrent modifications, so when conflicts do arise, they can be resolved automatically without transaction rollbacks. This preliminary preparation maintains reliability while enabling optimistic locking benefits.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If locks are held for extended periods to ensure data consistency, then reliability improves, but productivity deteriorates due to reduced concurrency

Engineering Contradiction:
Improvedata consistencyVSAvoidconcurrency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the locking process into two distinct phases: a read phase where no lock is held and users can freely access data, and a brief write phase during commit where a lock is applied only to perform the three-way merge. This segmentation allows data to remain unlocked for most of the time, maintaining high concurrency and productivity while ensuring consistency during the critical merge operation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary actions by creating and maintaining local copies of data before the commit phase. This allows the actual data to remain unlocked during user editing, and the lock is only applied briefly during commit to resolve conflicts. This preliminary copying enables high concurrency while maintaining reliability through controlled locking during the merge operation.

Inventive Principle:
Principle #10Preliminary action

4Reliability

If frequent locks are applied to prevent conflicts, then data consistency is maintained, but loss of time increases due to lock acquisition and release overhead

Engineering Contradiction:
Improvedata consistencyVSAvoidlock overhead time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the operation into a long read phase without locking and a brief commit phase with locking. By segmenting when locks are applied, the system minimizes the total time locks are held, reducing lock overhead while maintaining data consistency through the three-way merge process during the brief locked period.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary actions by preparing local copies and conflict resolution strategies before locks are needed. This allows the lock to be applied only for the minimal time required to execute the three-way merge, rather than being held throughout the entire editing process. This preliminary preparation significantly reduces lock overhead time while maintaining reliability.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10055448B2Techniques to reduce contention windows
Publication Date: 2018.08.21 ORACLE INT CORP
  • US10055448B2 patent drawing
  • US10055448B2 patent drawing
  • US10055448B2 patent drawing

AI summary

Embodiments of the present invention provide improved concurrency by reducing the time period (also referred to herein as a locking window or contention window) during which a record is locked. This provides the benefits of pessimistic locking schemes by preventing transaction due to concurrent updates, while also reducing the time during which a record is exclusively locked. This improves user experience and performance.