Distributed Database Timestamp Synchronization for Global Consistency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Distributed database management systems face challenges in maintaining global consistency and recency due to latency issues and inconsistencies when executing distributed queries across multiple DBMS nodes, leading to partial or outdated results.
Innovation Solution
Implementing a synchronization phase where the QC node synchronizes the logical clocks of DBMS nodes to a common timestamp, using a history log to maintain and update logical timestamps, and applying statistical functions to estimate the synchronization timestamp, thereby ensuring global consistency and reducing latency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If distributed queries are executed across multiple DBMS nodes without synchronization, then query processing speed is improved, but global consistency and recency of results deteriorate
Solution Approach 1:
The system performs a synchronization phase before executing the distributed query, where the QC node obtains logical timestamps from all target DBMS nodes and determines a synchronization timestamp. This preliminary action ensures that all nodes have a common reference point for temporal consistency, allowing the subsequent query execution to maintain global consistency while proceeding in parallel across nodes.
2Reliability
If logical clocks of all DBMS nodes are synchronized to a common timestamp, then global consistency is improved, but synchronization latency increases
Solution Approach 1:
Instead of fully synchronizing all DBMS nodes to the same logical timestamp, the system determines a synchronization timestamp that is greater than or equal to the logical timestamps of all target nodes. This partial synchronization approach achieves the necessary global consistency for the distributed query while minimizing the time required, as nodes don't need to wait for complete synchronization of all clocks.
3Reliability
If a synchronization phase is implemented before distributed query execution, then global consistency with recency is improved, but system complexity increases
Solution Approach 1:
The system divides the distributed query processing into two distinct phases: a synchronization phase and an execution phase. In the synchronization phase, the QC node obtains logical timestamps and determines a synchronization timestamp. In the execution phase, the query is executed using this synchronization timestamp. This segmentation allows each phase to be optimized independently and simplifies the overall system architecture by clearly separating the consistency-establishment steps from the query-processing steps.
Data Source
AI summary
Techniques are described that are performed by one or more database management system (DBMS) of the plurality of DBMS nodes comprising one or more database servers performing database operations on one or more databases of the DBMS nodes. The techniques describe receiving, at a QC node, a distributed query that specifying a database of a target DBMS node. Without requesting from the target DBMS node a current logical timestamp of the DBMS node, calculating a synchronization timestamp for the distributed query. In one embodiment, the calculation of the synchronization timestamp for the distributed query is based on a current logical timestamp of the QC node and one or more previous logical timestamps of the target DBMS node that were received prior to the receiving the distributed query. The QC node sends a request to the target DBMS node to execute an operation of the query at the target DBMS node based on the synchronization timestamp. The QC node may receive result set(s) from all the target DBMS nodes based on the synchronization timestamp, and aggregate the final result set to return to the client application.


