Transaction Manager Recovery After XA End Failure

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current two-phase commit transaction protocols, such as the XA Specification, do not provide adequate recovery mechanisms for transactions where a resource manager received an XA End command but did not complete an XA Prepare command and did not log the transaction identifier, leading to locked resources and incomplete transaction fragments after a failure and restart.

Innovation Solution

A method is introduced where the transaction manager stores a copy of the transaction identifier before issuing an XA Start command, allowing for a rollback command to be sent to resource managers if the identifier is not recoverable from their logs, ensuring that incomplete transactions are properly rolled back and resources are released.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the XA Specification protocol is strictly followed without additional recovery mechanisms, then the system maintains compliance with the standard, but incomplete transactions cannot be recovered after failure leading to resource lockup

Engineering Contradiction:
Improvetransaction recovery capabilityVSAvoidrecovery mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The transaction manager stores a copy of the transaction identifier in a data store before issuing the XA Start command. This preliminary action ensures that even if the resource manager fails to log the transaction identifier, the transaction manager can retrieve it from the data store for recovery purposes, thereby enabling reliable transaction recovery without requiring complex additional mechanisms at the resource manager level.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the transaction manager stores a copy of the transaction identifier in a data store, then recovery capability is improved, but system complexity and storage requirements increase

Engineering Contradiction:
Improvetransaction identifier recoverabilityVSAvoiddata storage infrastructure
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The transaction manager creates a copy of the transaction identifier and stores it in a data store. This copying approach allows the system to recover the transaction identifier from the data store if it is not available in the resource manager's logs, thereby improving reliability while keeping the implementation relatively simple through the use of standard data storage technologies.

Inventive Principle:
Principle #26Copying

3Loss of time

If the system waits for resource managers to log transaction identifiers, then the XA Specification is followed, but recovery is delayed after failure

Engineering Contradiction:
Improverecovery timeVSAvoidtransaction completeness
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The transaction manager performs the action of storing the transaction identifier in advance, before the transaction is initiated at the resource manager. This eliminates the delay that would occur if the system had to wait for the resource manager to log the identifier, as the identifier is already available in the data store immediately upon transaction initiation, thereby reducing recovery time while maintaining transaction completeness.

Inventive Principle:
Principle #10Preliminary action

4Reliability

If resource managers are customized to implement recovery logic, then recovery capability improves, but ease of operation and deployment deteriorates

Engineering Contradiction:
Improvetransaction recoveryVSAvoidresource manager customization
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The transaction manager acts as an intermediary that handles the recovery logic by retrieving transaction identifiers from the data store and sending rollback commands to resource managers. This approach improves ease of operation because resource managers do not need to be customized or modified - they simply receive standard rollback commands from the transaction manager, which has already performed the necessary recovery preparation.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS9898376B2Recovery of a transaction after XA end
Publication Date: 2018.02.20 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9898376B2 patent drawing
  • US9898376B2 patent drawing
  • US9898376B2 patent drawing

AI summary

Embodiments of the present invention disclose a method for recovery of a two-phase commit transaction. A computer receives an end command prior to completing execution of a prepare command for a transaction identifier. The computer determines if a failure and restart occurred within a distributed data processing environment after a resource manager receives an end command. The computer responds to a determination that the failure and restart did occur within the distributed data processing environment by retrieving the first transaction identifier from a data store. The computer transmits a rollback command for the retrieved first transaction identifier to the resource manager.