Database Deadlock Resolution via Custom Rollback Strategies

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional database systems employ simplistic strategies for resolving deadlocks, which may not adequately address the needs of mixed workload environments, prioritizing transactions based solely on the number of locks held, without considering business interests or flexibility in managing contention.

Innovation Solution

Implementing custom rollback strategies by identifying and prioritizing transactions based on predetermined metadata-associated roll back strategies, allowing for more flexible deadlock resolution that considers business interests and transaction types, such as 'YIELD' and 'NOT YIELD' designations, to determine which transaction should continue processing and which should be rolled back.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If conventional simplistic strategies are used to resolve deadlocks by selecting transactions with fewer locks to roll back, then the resolution process is straightforward and easy to implement, but the system cannot adequately address mixed workload environments and business interests

Engineering Contradiction:
Improveflexibility in managing deadlock contentionVSAvoidcomplexity of deadlock resolution strategy
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by assigning priority levels and rollback strategies to transactions before deadlocks occur. Each transaction is pre-configured with metadata indicating its priority level (e.g., customer-facing transactions have higher priority than batch jobs) and rollback strategy (e.g., YIELD or NOT YIELD). When a deadlock is detected, the system immediately references these pre-assigned attributes to resolve the conflict, eliminating the need for complex real-time analysis of transaction characteristics during deadlock resolution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the parameters used for deadlock resolution from simple lock count metrics to multi-dimensional parameters including priority levels, transaction types, and rollback strategies. By introducing these additional parameters that can be pre-configured in metadata, the system gains flexibility in managing mixed workload environments while maintaining manageable complexity through structured parameter definitions.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If transactions are prioritized based solely on the number of locks held, then the resolution logic is simple, but customer-facing transactions may be unfairly rolled back in favor of batch jobs

Engineering Contradiction:
Improveprotection of business interestsVSAvoidcomplexity of transaction prioritization
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies local quality by assigning different priority levels and characteristics to different types of transactions based on their specific roles in the system. Customer-facing transactions are assigned higher priority levels with NOT YIELD rollback strategies to protect business interests, while batch jobs receive lower priority with YIELD strategies. This localized differentiation ensures that each transaction type is treated according to its specific requirements rather than using a uniform approach.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The system performs preliminary classification and assignment of priority levels to transactions before deadlocks occur. By pre-configuring transaction metadata with priority information and rollback strategies, the system ensures that business-critical transactions are protected without requiring complex real-time evaluation during deadlock resolution.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If the transaction with the least number of locks is always rolled back, then the rollback overhead is minimized, but the system lacks flexibility in mixed workload environments

Engineering Contradiction:
Improverollback efficiencyVSAvoidability to manage mixed workload environments
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent changes the single parameter of lock count to multiple parameters including priority level, transaction type, and rollback strategy. The system evaluates these multiple parameters to determine which transaction to rollback, balancing rollback efficiency with adaptability to mixed workload environments. High-priority transactions with NOT YIELD strategies are protected even if they have fewer locks, while low-priority transactions may be rolled back regardless of lock count.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The system dynamically adjusts deadlock resolution behavior based on transaction characteristics rather than applying a static rule. By referencing pre-configured metadata about each transaction's priority and rollback strategy, the system adapts its resolution approach to the specific circumstances of each deadlock scenario while maintaining operational efficiency.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11281654B2Customized roll back strategy for databases in mixed workload environments
Publication Date: 2022.03.22 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11281654B2 patent drawing
  • US11281654B2 patent drawing
  • US11281654B2 patent drawing

AI summary

Roll back strategies for database deadlock resolution are customized by identifying a first transaction to a database, identifying a second transaction to the database and detecting a deadlock between the first and second transactions with respect to the database. The deadlock is resolved based upon a predetermined roll back strategy associated with at least one of the first or second transactions to identify a select one of the first and second transactions for roll back and a request is conveyed to roll back the selected one of the first and second transactions, wherein the preferred transaction is allowed to continue processing.