Database Replication via Asynchronous Precommit Segmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database replication methods face challenges in maintaining consistency and efficiency, particularly with synchronous replication protocols that delay transaction visibility and add complexity, while asynchronous replication may lead to outdated data and increased complexity.

Innovation Solution

The proposed solution involves asynchronous replication with synchronous communications for precommitting transactions, allowing the source node to commit transactions without waiting for acknowledgement from the replica node, and using write logs to efficiently replicate database operations across multiple nodes, thereby reducing replication overhead and improving response times.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If synchronous replication protocol is used to maintain consistency between source and replica tables, then data consistency is improved, but system performance deteriorates due to multiple communications between source and replica hosts within the same transaction boundary

Engineering Contradiction:
Improvedata consistencyVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the replication process into two distinct phases: an asynchronous phase where database operations are replicated to the replica table without blocking, and a synchronous precommit phase where only a confirmation message is exchanged. This segmentation allows the bulk of replication traffic to occur outside the transaction boundary, reducing the number of communications that impact transaction performance while still ensuring data consistency through the precommit confirmation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs the database operation replication in advance, before the transaction commit is finalized. By asynchronously replicating the operation to the replica table during the transaction execution phase rather than waiting until commit time, the system ensures that the replica is prepared in advance, reducing the communication overhead during the critical commit phase.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If asynchronous replication is used to improve system performance, then transaction visibility is improved, but data consistency deteriorates and system complexity increases

Engineering Contradiction:
Improvesystem performanceVSAvoiddata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces a feedback mechanism where the replica host sends a confirmation message back to the source host after successfully receiving and executing the database operation. This feedback loop ensures that the source host can verify the replica has been updated before committing the transaction, maintaining data consistency while still allowing asynchronous replication to improve overall system performance.

Inventive Principle:
Principle #23Feedback

3Reliability

If synchronous replication is used within the same transaction boundary, then data consistency is improved, but transaction visibility deteriorates due to delayed visibility at both source and replica hosts

Engineering Contradiction:
Improvedata consistencyVSAvoidtransaction visibility delay
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs the database operation replication in advance, before the transaction commit is finalized. By asynchronously replicating the operation to the replica table during the transaction execution phase rather than waiting until commit time, the system ensures that the replica is prepared in advance, reducing the communication overhead during the critical commit phase and enabling earlier transaction visibility.

Inventive Principle:
Principle #10Preliminary action

4Productivity

If fully asynchronous replication is used to improve system performance, then replication overhead is reduced, but system complexity increases

Engineering Contradiction:
Improvesystem performanceVSAvoidreplication protocol complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the replication protocol into a simple asynchronous operation phase and a minimal synchronous confirmation phase. This segmentation allows the system to use lightweight asynchronous messaging for the bulk of replication traffic, reducing protocol complexity compared to fully synchronous approaches, while still incorporating necessary consistency checks through the precommit confirmation exchange.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11327958B2Table replication in a database environment
Publication Date: 2022.05.10 SAP SE
  • US11327958B2 patent drawing
  • US11327958B2 patent drawing
  • US11327958B2 patent drawing

AI summary

Technologies are described for performing replication of data within a database environment having a source node and a replica node. The source node executes a database operation on at least one database table stored by the source node. The source node asynchronously sends the database operation to the replica node. A prepare commit request is synchronously sent from the source node to the replica node. The source node receives a synchronous precommit acknowledgement from the replica node. The precommit acknowledgement indicates that the database operation was executed at the replica node. The source node commits a transaction associated with the database operation.