Distributed Database Full Backup with Trust Divergence Time Point
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed database systems, full backups often fail to capture branch transactions that are in a prepared state but not committed or rolled back, especially when the backup time falls between a prepare log flush and a commit log flush.
Innovation Solution
A method and apparatus for performing a full backup in a distributed database system that involves acquiring full backup data, determining a trust divergence time point, acquiring incremental logs, replaying pending transactions, and ensuring that all transactions in prepared states are committed or rolled back before the backup time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If full backup is performed at a specific time point on each data node, then backup speed is improved, but data integrity deteriorates because branch transactions in prepared state are not captured
Solution Approach 1:
The system determines a trust divergence time point before performing the full backup, ensuring that all branch transactions in prepared state before this time point are committed or rolled back. This preliminary action captures the transaction state before backup, guaranteeing data integrity while maintaining backup speed.
Solution Approach 2:
The trust divergence time point acts as an intermediary concept that bridges the gap between backup speed and data integrity. By using this time point as a reference, the system can perform fast full backups while ensuring that all relevant transactions are captured through the replay mechanism.
2Loss of information
If incremental logs are acquired and replayed for every full backup, then data completeness is improved, but system complexity increases
Solution Approach 1:
The system extracts only the necessary incremental logs between the trust divergence time point and the full backup time point, rather than processing all logs. This selective extraction maintains data completeness while reducing system complexity by focusing only on relevant transaction logs.
3Reliability
If branch transactions in prepared state are forced to commit before backup, then data consistency is improved, but transaction performance deteriorates
Solution Approach 1:
The system performs a preliminary determination of the trust divergence time point and identifies pending transactions before the full backup executes. This allows the backup process to capture transactions in their natural state without forcing commits, maintaining both data consistency and transaction performance.
Data Source
AI summary
The present invention provides a method and an apparatus for performing a full backup for a distributed database system, and a computer-readable storage medium. Said method comprises: acquiring full backup data of each data node in the distributed database system, with a full-backup time point corresponding to the full backup data being a time point; determining a trust divergence time point for the time point, where all transactions in prepared states prior to the trust divergence time point are enabled to be committed or rolled back before the time point; acquiring a first incremental log set of said each data node between the trust divergence time point and the time point; acquiring from the first incremental log set a pending transaction of said each data node; and replaying the pending transaction of said each data node on the full backup data of said each data node.


