Transaction Log Buffering for Database Data Restoration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Asynchronous submission of transaction logs in database systems leads to poor durability and safety, causing permanent data loss and unreliability, especially in cluster databases where data crashes can result in incomplete log writes.

Innovation Solution

A method where transaction logs are saved to a buffer on the current node and backed up to a buffer on at least one backup node, with the logs being written to a disk transaction log file for restoration, ensuring data integrity and reliability by maintaining a consistent recording location across nodes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If asynchronous submission solution is used for transaction log, then concurrent conflict is reduced and productivity is improved, but data durability and reliability deteriorate causing permanent data loss

Engineering Contradiction:
Improvetransaction processing throughputVSAvoiddata durability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by recording the transaction log to the disk before allowing the transaction to be committed. The system writes the transaction log to a safe location on the disk, obtains a recording location, and only after this preliminary writing is complete does it allow the transaction to be marked as committed. This ensures that even with high concurrency, the data durability is maintained because the log is safely stored before the transaction becomes permanent.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If synchronous submission solution is used for transaction log, then data durability is improved, but concurrent conflict increases reducing productivity

Engineering Contradiction:
Improvedata durabilityVSAvoidtransaction processing throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent uses copying by creating a backup copy of the transaction log on the disk at a predetermined location before the transaction is fully committed. The system writes the transaction log content to the disk, obtains a recording location for this copy, and uses this copied log as the basis for data restoration. This copying mechanism allows multiple transactions to proceed concurrently while ensuring each has its log safely stored, thus improving both productivity and durability.

Inventive Principle:
Principle #26Copying

3Productivity

If transaction log is not completely written to disk before transaction submission, then productivity is improved, but data safety deteriorates causing permanent data loss

Engineering Contradiction:
Improvetransaction submission speedVSAvoiddata loss risk
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

The patent applies preliminary anti-action by preemptively writing the transaction log to the disk and obtaining a recording location before the transaction submission is considered complete. This preliminary action counteracts the potential harm of data loss by ensuring the log is persisted to a reliable storage medium before the transaction is marked as committed, thus preventing permanent data loss while maintaining efficient transaction processing.

Inventive Principle:
Principle #9Preliminary anti-action

Data Source

PatentUS9778998B2Data restoration method and system
Publication Date: 2017.10.03 HUAWEI TECH CO LTD
  • US9778998B2 patent drawing
  • US9778998B2 patent drawing
  • US9778998B2 patent drawing

AI summary

Embodiments of the present invention disclose a data restoration method, including: after a transaction is submitted, saving a generated transaction log to a buffer of a current node, and backing up the transaction log to a buffer of at least one backup node except the current node; writing the transaction log saved in the buffer of the current node or the transaction log backed up in the buffer of the backup node into a transaction log file in a disk, where the transaction log file in the disk is used for restoring data of the current node; and restoring, based on the transaction log file in the disk, lost data of the current node when a data loss event occurs in the current node. By means of the present invention, a risk of system data can be reduced, and durability, safety, and reliability of the system data can be improved.