Distributed Database Timestamp Synchronization for Global Consistency

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvequery processing speedVSAvoidglobal consistency
Core Design Contradiction:
ProductivityVSReliability

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.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If logical clocks of all DBMS nodes are synchronized to a common timestamp, then global consistency is improved, but synchronization latency increases

Engineering Contradiction:
Improveglobal consistencyVSAvoidsynchronization latency
Core Design Contradiction:
ReliabilityVSLoss of time

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.

Inventive Principle:
Principle #16Partial or excessive action

3Reliability

If a synchronization phase is implemented before distributed query execution, then global consistency with recency is improved, but system complexity increases

Engineering Contradiction:
Improveglobal consistency with recencyVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11314720B2Global consistency with recency in distributed database management systems
Publication Date: 2022.04.26 ORACLE INT CORP
  • US11314720B2 patent drawing
  • US11314720B2 patent drawing
  • US11314720B2 patent drawing

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.