Lock Reordering for Optimistic Data Grid Deadlock Avoidance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional data storage systems face transaction deadlocks when multiple transactions attempt to write to the same data concurrently, leading to costly CPU and network usage due to the need for dependency graph construction and termination of deadlocked transactions.

Innovation Solution

Implementing a method where an enlisted node in a data grid ranks keys based on identifiers to define a consistent order for acquiring locks, ensuring that all transactions use the same order to avoid deadlocks by using a consistent hash function to determine the lock order for data shared by multiple transactions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional deadlock detection and resolution methods are used, then transaction consistency is maintained, but CPU and network usage increases significantly

Engineering Contradiction:
Improvetransaction consistencyVSAvoidCPU and network usage
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent applies preliminary action by establishing a predetermined lock ordering scheme based on data identifiers before deadlocks occur. Transactions are instructed to acquire locks in a specific order determined by hashing the data identifier, preventing deadlocks proactively rather than detecting and resolving them after they occur, thereby avoiding the high CPU and network overhead of traditional deadlock handling mechanisms

Inventive Principle:
Principle #10Preliminary action

2Reliability

If lock ordering based on data identifiers is implemented, then transaction deadlock is prevented, but system complexity increases

Engineering Contradiction:
Improvedeadlock preventionVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent changes the parameter of lock acquisition order from being transaction-specific to being data-identifier-specific. By transforming the lock ordering criterion into a function of the data identifier itself (through hashing), the system achieves deterministic lock ordering without requiring complex transaction dependency analysis, thus preventing deadlocks while maintaining relatively simple system architecture

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS9208190B2Lock reordering for optimistic locking of data on a single node to avoid transaction deadlock
Publication Date: 2015.12.08 RED HAT INC
  • US9208190B2 patent drawing
  • US9208190B2 patent drawing
  • US9208190B2 patent drawing

AI summary

A node a data grid receives a prepare request identifying data to lock for a first transaction. The prepare request indicates a locking order that is different from a locking order indicated by a prior prepare request of a second transaction using the same data. The node identifies keys that correspond to the data. The keys are co-located on the node. The node ranks the keys to define an order for acquiring locks for the data based on key identifiers that correspond to the keys. The defined order matches a locking order used by the second transaction. The node acquires locks for the data using the defined order.