Data Synchronization Using Snapshot Flags to Reduce Un-writable Time
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional data synchronization methods require complex log redoing operations, leading to prolonged un-writable times for users during data migration or machine errors, negatively impacting user experience and increasing operation and maintenance costs.
Innovation Solution
A data synchronization method and system that involves configuring flags on servers to switch between master and slave roles, allowing for incremental data synchronization and reducing the need for extensive log redoing by inhibiting writes only briefly, thus minimizing downtime.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional log redoing operations are performed for data synchronization, then data consistency is ensured, but un-writable time for users is prolonged
Solution Approach 1:
The system performs preliminary actions by creating data snapshots before migration or error recovery operations. The snapshot contains a sequence number (Seq) that marks the starting point for log redoing, allowing the system to resume from this point rather than starting from Seq=0. This preliminary snapshot creation enables faster recovery while maintaining data consistency.
Solution Approach 2:
The patent extracts the essential information needed for recovery (snapshot data and sequence number) from the complex log redoing process. By exporting snapshots to magnetic disks and recording the Seq of the export moment, the system separates the critical recovery state information from the full log replay process, enabling more efficient operations.
2Reliability
If snapshot duplication and log redoing are performed in sequence with master device write inhibition, then data consistency is maintained, but operation complexity increases
Solution Approach 1:
The system dynamically adjusts the write inhibition state based on the migration phase. The master device transitions between writable and non-writable states automatically during the migration process. The system configures flags (master flag, write flag, synchronizing flag) that dynamically control the state of different servers, allowing flexible management of data consistency without complex manual intervention.
Solution Approach 2:
The patent introduces a configuration center as an intermediary that automatically manages the complex coordination between snapshot duplication, write inhibition, and log redoing operations. The configuration center issues commands to set or clear flags on master and slave devices, centralizing the control logic and simplifying the overall system operation while maintaining data consistency.
3Reliability
If full log replay from Seq=0 is performed for data recovery, then complete data consistency is achieved, but recovery time increases significantly
Solution Approach 1:
The system performs preliminary actions by creating data snapshots before migration or error recovery operations. The snapshot contains a sequence number (Seq) that marks the starting point for log redoing, allowing the system to resume from this point rather than starting from Seq=0. This preliminary snapshot creation enables faster recovery while maintaining data consistency.
Solution Approach 2:
The patent changes the starting parameter (sequence number) for log redoing operations based on the snapshot point. Instead of always replaying from Seq=0, the system uses the recorded Seq from the snapshot export moment as the new starting point. This parameter change dramatically reduces the number of log entries that need to be replayed, accelerating recovery while ensuring data consistency from the correct checkpoint.
Data Source
AI summary
A data synchronization method is provided. The data synchronization method includes providing a first server with a master flag and a write flag for a data block; providing a second server; and importing a snapshot of the data block to the second server. The method further includes configuring a synchronizing flag for the data block on the second server; synchronizing, by a synchronizing component, data of the data block on the first server to the second server; and removing the write flag of the data block on the first server when the data block is to be migrated out of the first server. The method also includes synchronizing, by the synchronizing component, latest data of the data block on the first server to the second server; removing the master flag of the data block on the first server and removing the synchronizing flag of the data block on the second server after data of the data block on the second server and the data of the data block on the first server are completely synchronized; and configuring a master flag and a write flag for the data block on the second server.


