Transaction Master Optimizing Two-Phase Commit for Distributed Databases

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed database transactions, identifying committed and uncommitted transactions across multiple transactional engines is challenging, especially in modern computer architectures where disk access is no longer a bottleneck, leading to difficulties in ensuring data consistency and transactional integrity.

Innovation Solution

Implementing a transaction master that communicates with transaction slaves to manage distributed transactions using a two-phase commit optimization method, which includes generating a transaction token to identify committed transactions, initiating a two-phase commit operation, and optimizing the process by omitting unnecessary phases such as writing to memory or preparing for committing, to ensure efficient transaction management.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a complete two-phase commit operation is used to ensure transaction consistency, then data consistency is improved, but transaction processing time and system overhead increase

Engineering Contradiction:
Improvedata consistencyVSAvoidtransaction processing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies partial action by implementing an optimized two-phase commit that performs only the necessary prepare phase and commit phase when needed, rather than always executing the complete protocol. The system determines whether full two-phase commit is necessary based on transaction characteristics and system state, performing partial commits when possible to reduce overhead while maintaining consistency where required.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system changes the parameter of commit operation completeness dynamically. By introducing transaction tokens with commit identifiers and log sequence numbers, the system can adjust the level of commit verification performed based on the specific transaction context, allowing faster processing for certain transactions while maintaining rigorous consistency checks when necessary.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If transaction verification protocols are implemented to identify committed transactions, then transactional integrity is improved, but system complexity increases

Engineering Contradiction:
Improvetransactional integrityVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces transaction tokens as intermediary objects that carry commit identification information between transactional engines and the transaction master. These tokens simplify the verification process by encapsulating commit status and log sequence numbers, reducing the complexity of direct verification protocols while maintaining transactional integrity through the token-based mediation layer.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system creates copies of transaction metadata in the form of transaction tokens that are distributed to transactional engines. Instead of implementing complex verification protocols across all systems, each engine receives a simplified token copy containing the necessary commit identification information, reducing system complexity while preserving integrity verification capabilities.

Inventive Principle:
Principle #26Copying

3Productivity

If disk access is optimized for traditional architectures, then performance on limited memory systems is improved, but performance on modern memory-rich systems deteriorates

Engineering Contradiction:
Improveperformance on limited memory systemsVSAvoidperformance on modern systems
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent implements dynamic adaptation of transaction management behavior based on system characteristics. The optimized two-phase commit protocol adjusts its operation based on whether the system is memory-constrained or memory-rich, dynamically changing the level of disk I/O verification performed. This allows the system to maintain high performance on modern memory-rich systems while preserving reliability on systems with limited memory.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The transaction master design provides universal functionality that works across different system architectures. By implementing a unified two-phase commit protocol that can operate in both full-verification mode (for traditional systems) and optimized mode (for modern systems), the solution achieves multi-functionality that adapts to different memory and disk configurations without requiring architecture-specific implementations.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS10452640B2Distributed transaction management using two-phase commit optimization
Publication Date: 2019.10.22 SAP SE
  • US10452640B2 patent drawing
  • US10452640B2 patent drawing
  • US10452640B2 patent drawing

AI summary

A computer-implemented method, a computer-readable medium and a system are provided. A transaction master for each of a plurality of transactions of a database is provided. Each transaction master is configured to communicate with at least one transaction slave to manage execution of a transaction in the plurality of transactions. Each transaction master configured to perform generating a transaction token to specify data to be visible for a transaction on the database, the transaction token including a transaction identifier for identifying whether the transaction is a committed transaction or an uncommitted transaction, receiving a request to commit the transaction, initiating, based on the request, a two-phase commit operation to commit the transaction. The two-phase commit operation includes preparing for committing the transaction, writing a committed transaction to a memory, optimizing the two-phase commit operation by omitting a phase of the two-phase commit operation, generating an acknowledgement of the committed transaction. The plurality of transactions of the database are executed with each transaction master.