Optimistic Concurrency Control in Distributed Data Store

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed data stores employing single-master replication, the locking mechanism during data modification introduces latency and reduces update transaction throughput due to the time-consuming replication process to secondary data stores.

Innovation Solution

The implementation of a data cache that allows for optimistic concurrency control using cached versions of data items, where the lock is released before replication, enabling faster propagation of changes and reducing the need for waiting on lock release, thereby increasing modification throughput.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a locking mechanism is used during data modification in a distributed data store, then data consistency is maintained, but update transaction throughput is reduced due to replication time

Engineering Contradiction:
Improvedata consistencyVSAvoidupdate transaction throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by obtaining a version of the data item before acquiring the lock, and using this pre-obtained version for validation purposes. This allows the system to perform optimistic concurrency control where the lock is released quickly after validation, rather than being held during the entire replication process. The key steps are: (1) obtain data item version before locking, (2) acquire lock, (3) validate using pre-obtained version, (4) release lock immediately after validation, (5) replicate changes asynchronously. This resolves the contradiction by maintaining data consistency through validation while minimizing lock duration to preserve throughput.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent segments the data modification process into distinct phases: validation phase (with lock) and replication phase (without lock). By separating these operations in time, the lock is only held for the brief validation period rather than during the entire modification and replication process. This segmentation allows the replication to proceed asynchronously after the lock is released, thereby maintaining data consistency during validation while improving throughput by eliminating the need to hold locks during replication.

Inventive Principle:
Principle #1Segmentation

2Reliability

If the lock is held during the replication process, then data consistency is ensured, but latency is increased

Engineering Contradiction:
Improvedata consistencyVSAvoidmodification latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent obtains the data item version before acquiring the lock and uses this pre-obtained version for validation. This preliminary action enables the system to validate changes quickly without waiting for replication to complete, thereby reducing modification latency while maintaining consistency through the validation mechanism.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent rushes through the lock acquisition and release process by obtaining the data version beforehand and releasing the lock immediately after validation, skipping the traditional approach of holding the lock during the entire replication process. This allows the replication to proceed asynchronously in the background, significantly reducing the time the transaction waits for lock release and thereby reducing overall modification latency.

Inventive Principle:
Principle #21Skipping (Rushing through)

3Productivity

If optimistic concurrency control is implemented using cached versions, then modification throughput increases, but complexity of the data modification process increases

Engineering Contradiction:
Improvemodification throughputVSAvoiddata modification process complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent obtains the data item version before acquiring the lock and stores it for validation purposes. This preliminary action simplifies the concurrency control logic by having the version readily available for comparison, eliminating the need for complex locking protocols during replication. The validation process becomes a simple comparison between the pre-obtained version and the current version, improving throughput while keeping the complexity manageable.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates a copy of the data item version before locking and uses this copy for validation purposes. This copying approach allows the system to perform validation without modifying the original data item or requiring complex lock management during replication. The copy serves as a reference for optimistic concurrency control, simplifying the overall process while enabling parallel replication operations that improve throughput.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS10599629B2Reduced locking in a distributed data store
Publication Date: 2020.03.24 AMAZON TECH INC
  • US10599629B2 patent drawing
  • US10599629B2 patent drawing
  • US10599629B2 patent drawing

AI summary

Disclosed are various embodiments for reducing locking in a distributed data store that includes a primary data store and one or more secondary data stores. An update to a data item that is to be applied to the distributed data store is obtained in one or more computing devices. The update is applied to a cached version of the data item when a lock is held. The update is replicated to the one or more data stores after the lock is released. A replication confirmation is obtained from each of at least a predetermined number of the secondary data stores.