Database Data Synchronization with Mediated Process Wake-Ups
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing data synchronization methods in database systems face inefficiencies due to high transaction processing latency and increased load when waking up multiple transaction processes, particularly in systems with multiple CPU cores and NUMA nodes, leading to prolonged processing times and inefficient memory access.
Innovation Solution
A data synchronization method that wakes up a second process upon completion of data synchronization at the secondary server, which then wakes up the first process, reducing the need to wake up transaction processes directly, and uses completion queues to maintain the original sequence of processes, thereby optimizing the synchronization process.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the data synchronization process wakes up transaction processes directly after synchronization completion, then data synchronization reliability is improved, but transaction processing latency increases significantly
Solution Approach 1:
The patent introduces a second process as an intermediary between the data synchronization process and transaction processes. The data synchronization process wakes up the second process, which then wakes up the transaction processes. This intermediary mechanism reduces the direct load on the data synchronization process while ensuring reliable wake-up of transaction processes, thereby reducing transaction processing latency without compromising synchronization reliability.
2Reliability
If the data synchronization process wakes up all transaction processes sequentially, then data synchronization completeness is improved, but processing time increases significantly
Solution Approach 1:
The patent segments the wake-up process into two stages: first waking up the second process, which then wakes up the transaction processes. This segmentation allows the data synchronization process to focus only on triggering synchronization and receiving completion notifications, while the second process handles the sequential wake-up of transaction processes. This division of labor maintains synchronization completeness while significantly reducing the processing time for the data synchronization process.
3Reliability
If synchronous replication is used to ensure high reliability, then data availability is improved, but transaction submission latency increases significantly
Solution Approach 1:
The patent applies the intermediary principle by introducing a second process that mediates between the data synchronization process and transaction processes. This allows the synchronous replication mechanism to maintain data availability reliability while the intermediary handles the wake-up operations efficiently, reducing the impact on transaction submission latency.
Data Source
AI summary
Embodiments of this application provide a data synchronization method, and this method may be applied to a database-related field. The data synchronization method provided in this application includes: a primary server sending, by using a data synchronization process, first data generated by a first process to a secondary server, wherein the secondary server synchronizes the first data; and the data synchronization process waking up a second process based on completion of synchronization of the first data by the secondary server, and the second process further waking up the first process to perform a subsequent operation. The data synchronization process disclosed herein does not need to wake up the first process that has completed data synchronization, but only needs to wake up the second process, and the second process wakes up the first process that has completed data synchronization.


