Two-Phase Commit Protocol Priority-Based Resource Ordering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing two-phase commit protocols in distributed data processing systems face challenges in managing data inconsistency during failures, as existing recovery solutions do not effectively control inconsistency until recovery occurs.

Innovation Solution

The method allows the application program to define a commit priority for each resource manager during the commit phase, enabling control over data inconsistency by prioritizing resource managers and managing the commit order based on predefined rules.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If existing recovery solutions are used to handle failures during commit phase, then failure recovery is achieved, but data inconsistency cannot be controlled until recovery happens

Engineering Contradiction:
Improvefailure recoveryVSAvoiddata inconsistency
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The patent applies preliminary action by establishing a compensation resource queue before failures occur and defining compensation rules in advance. When failures happen during the commit phase, the system can immediately execute pre-planned compensation operations rather than waiting for recovery, thus controlling data inconsistency proactively. The compensation resource queue stores information about resources that need compensation, and the compensation rule determines the order and method of compensation execution.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If commit order is controlled by resource manager availability, then all resources can eventually commit, but data inconsistency persists during the commit phase

Engineering Contradiction:
Improvecommit completionVSAvoiddata inconsistency
Core Design Contradiction:
ProductivityVSLoss of information

Solution Approach 1:

The patent segments the commit phase into two distinct parts: successful commits and failed commits. By identifying which resources committed successfully and which failed, the system can apply different compensation strategies to each segment. The compensation resource queue specifically stores information about failed resources that need compensation, allowing targeted recovery actions rather than treating all resources uniformly.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the parameter of commit order by introducing compensation rules that determine the sequence of compensation operations. Instead of committing resources in a fixed or arbitrary order, the system dynamically adjusts the compensation order based on priority rules, resource dependencies, and failure patterns, thereby optimizing data consistency recovery.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If compensation operations are executed after failure, then data consistency is restored, but data inconsistency exists during the recovery period

Engineering Contradiction:
Improvedata consistencyVSAvoidrecovery time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements self-service by enabling the transaction manager to automatically execute compensation operations without external intervention. When failures are detected during the commit phase, the system autonomously identifies the failed resources, retrieves compensation rules, and executes compensation operations in the determined order. This automated self-service mechanism reduces recovery time and minimizes the period during which data inconsistency exists.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9588800B2Method and a system for performing a two-phase commit protocol
Publication Date: 2017.03.07 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9588800B2 patent drawing
  • US9588800B2 patent drawing
  • US9588800B2 patent drawing

AI summary

The invention provides an enhanced two phase commit process to perform a transaction started by an application program and involving access to one or more resources managed by respective resource managers. The method comprises the steps of: enlisting the resource managers participating in the transaction, said enlisting step including associating a priority rank with each identified resource manager based on predefined priority rules; sending a prepare signal to said enlisted resource managers to begin the process of committing the transaction; and if a ready signal is received from all resource managers in response to the prepare signal, committing the resource managers in the order defined from the priority ranks associated with the resource managers.