Database Replication Lock Data Transfer for Consistent Query Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Database replication systems face challenges in ensuring consistent transaction processing, particularly during simultaneous query and replication operations, leading to potential inconsistencies and reduced performance due to the need for complex conflict resolution or synchronous replication techniques.
Innovation Solution
The method involves adding lock data to replication data sent from a primary database system to a replication database system, allowing the replication system to process transactions consistently and efficiently, even during replication processing, by using asynchronous replication and minimizing lock data transfer, particularly for exclusive locks and update transactions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If query processing and replication processing are allowed to run simultaneously, then performance is improved, but data consistency cannot be guaranteed due to dirty reads
Solution Approach 1:
The patent introduces an intermediary mechanism (lock information transfer and validation system) between query processing and replication processing. The primary database system sends lock information to the secondary database system, which acts as a mediator to validate queries against current lock states, allowing simultaneous processing while maintaining consistency through controlled access.
Solution Approach 2:
The system dynamically adjusts query processing behavior based on real-time lock states. The secondary database system receives updated lock information and dynamically validates queries against the current replication state, enabling flexible simultaneous processing while preventing inconsistent reads through adaptive validation.
2Reliability
If query processing is postponed until replication processing is finished, then data consistency is guaranteed, but performance is reduced
Solution Approach 1:
The system performs preliminary actions by sending lock information ahead of time to the secondary database system. The lock information is prepared and transmitted in advance, enabling the secondary system to validate queries without waiting for replication to complete, thus eliminating the postponement bottleneck while maintaining consistency.
Solution Approach 2:
The patent adds a new dimension to the system architecture by introducing a separate lock information validation channel. Instead of sequentially processing queries after replication, the system creates a parallel validation dimension where queries are checked against lock states independently, enabling simultaneous processing in different operational dimensions.
3Reliability
If synchronous replication techniques are used to prevent inconsistent data modifications, then data consistency is maintained, but performance is reduced due to overhead
Solution Approach 1:
The patent uses lightweight, disposable lock information structures that are created, transmitted, and discarded efficiently. Instead of heavy synchronous replication protocols, the system uses simple lock state representations that can be rapidly created and validated, reducing overhead while maintaining consistency through inexpensive validation mechanisms.
4Reliability
If complex mechanisms for detecting and resolving inconsistent data are employed, then data consistency is maintained, but device complexity increases
Solution Approach 1:
The patent extracts the complexity of consistency management from the query processing path by separating lock information validation into a distinct mechanism. The lock state tracking and validation logic is extracted and handled independently, simplifying the main query processing path while maintaining consistency through dedicated lock management.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present invention concerns a method for replicating one or more data items of a primary database system (10), the method comprising the following steps performed by the primary database system (10): a. providing replication data (102, 104) to at least one replication database system (20), the replication data (102, 104) being usable for replicating the one or more data items of the primary database system (10) by the at least one replication database system (20); and b. adding lock data (103) to the replication data (102, 104) sent in step a., wherein the lock data (103) relates to at least one lock on the one or more data items.