Standby Node Database Reconstruction via Incremental File Comparison
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for reconstructing a standby node database in a two-node cluster hot backup system are time-consuming and consume high network resources, especially when the active node database has a large data amount, as they require a full replication of all data and log files.
Innovation Solution
A method and apparatus that compare file information, such as file size, page quantity, and page version information, between the active and standby node databases to determine differences, allowing for incremental reconstruction by replacing only the differing files, thereby reducing network resource consumption and shortening the reconstruction time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If all data files and log files are replicated to the standby node database, then the standby node database can be fully reconstructed, but the network resource consumption becomes extremely high and the reconstruction time becomes very long
Solution Approach 1:
The patent extracts only the necessary files (data files and online log files) required for standby node database reconstruction, rather than replicating all files. The system identifies and transfers only those files that have changed or are needed to bring the standby node up to date, significantly reducing network resource consumption while maintaining reconstruction completeness.
Solution Approach 2:
The patent implements partial action by selectively replicating only the necessary subset of files (data files and online log files) rather than all files in the active node database. This partial replication approach reduces network resource consumption and reconstruction time while still achieving complete standby node database reconstruction.
2Reliability
If all data files and log files are replicated to the standby node database, then the standby node database can be fully reconstructed, but the reconstruction time becomes excessively long
Solution Approach 1:
The patent extracts only the necessary files (data files and online log files) required for standby node database reconstruction, rather than replicating all files. The system identifies and transfers only those files that have changed or are needed to bring the standby node up to date, significantly reducing network resource consumption while maintaining reconstruction completeness.
Solution Approach 2:
The patent implements partial action by selectively replicating only the necessary subset of files (data files and online log files) rather than all files in the active node database. This partial replication approach reduces network resource consumption and reconstruction time while still achieving complete standby node database reconstruction.
3Speed
If the standby node database uses stream replication mechanism, then real-time data synchronization can be achieved, but when replication speed is slow or network is broken, the standby node cannot replicate required log files and the replication mechanism stops
Solution Approach 1:
The patent applies preliminary action by pre-copying data files and online log files to the standby node database before they are absolutely needed. This advance preparation ensures that when the standby node needs to be reconstructed or when replication interruptions occur, the necessary files are already available locally, maintaining replication continuity without requiring high-speed continuous network transfer.
Solution Approach 2:
The patent uses copying by creating local copies of data files and online log files in the standby node database. Instead of relying solely on continuous stream replication, the system maintains local copies that can be used when network replication is slow or interrupted, ensuring replication continuity and reducing dependency on real-time network speed.
Data Source
AI summary
A method and an apparatus for reconstructing a standby node database. The method includes obtaining file information of a first page-structure file in an active node database and file information of a second page-structure file in a standby node database, where the first page-structure file and the second page-structure file are data files corresponding to each other, comparing the file information of the first page-structure file with the file information of the second page-structure file to obtain a comparison result indicating whether the file information is the same, and reconstructing the standby node database according to the comparison result whether the file information is the same. In the embodiments of the present disclosure, the standby node database is reconstructed in an incremental backup manner which can shorten a time for reconstructing the standby node database.


