Distributed Database TSO Sorting for MySQL Binlog Integrity

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing distributed databases face challenges in ensuring global orderliness and integrity of transactions during data replication, particularly in scenarios requiring high data consistency, and lack compatibility with MySQL's data replication standards.

Innovation Solution

A data processing method for distributed databases that sorts transactions using a global timestamp TSO, creates local transaction lists, performs multiplexed merge sorting to generate global sorting queues, and merges local transactions with identical timestamps to produce a global binary log, ensuring transaction integrity and compatibility with MySQL's Binlog format.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If distributed databases perform data replication without global timestamp sorting, then data replication speed is faster, but global orderliness and integrity of transactions cannot be ensured

Engineering Contradiction:
Improveglobal orderliness and integrity of transactionsVSAvoiddata replication speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by sorting transactions using global timestamps TSO before performing data replication. This pre-sorting ensures that transactions are processed in the correct global order, guaranteeing transaction integrity and consistency across distributed nodes. The sorting operation is performed in advance of the replication process, allowing the subsequent replication to proceed efficiently without needing to re-order transactions during the actual data synchronization.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If distributed databases implement global transaction sorting, then transaction consistency is improved, but system complexity increases

Engineering Contradiction:
Improvetransaction consistencyVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary mechanism by using a dedicated global timestamp (TSO) as a mediator for sorting transactions across distributed nodes. Instead of implementing complex multi-node coordination protocols, the system uses TSO as a simple intermediary value that naturally orders transactions globally. This intermediary approach simplifies the sorting logic while ensuring transaction consistency, as each node can independently sort its transactions based on the TSO values without requiring complex inter-node communication for ordering decisions.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If distributed databases merge local transactions with identical timestamps, then MySQL compatibility is achieved, but processing time increases

Engineering Contradiction:
ImproveMySQL compatibilityVSAvoidprocessing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent applies merging by combining local transactions that share identical global timestamps TSO into a single batch operation. This merging strategy achieves MySQL compatibility by producing a unified global binary log that reflects the same ordering semantics as MySQL's Binlog. The processing time overhead is minimized by performing the merge operation efficiently - transactions with the same TSO are grouped together and processed as a unit, rather than individually, which reduces the total number of write operations and improves overall processing throughput.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS12393605B2Data processing method for distributed database, electronic device, and machine readable medium
Publication Date: 2025.08.19 CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
  • US12393605B2 patent drawing
  • US12393605B2 patent drawing
  • US12393605B2 patent drawing

AI summary

A data processing method and system for a distributed database, and a device and a storage medium. The method comprises: sorting transactions in a transQueue by using a global timestamp TSO, creating a local transaction list by means of an XA Event and a waitTrans in the transQueue, and generating first-level sorting queues according to the local transaction list (102); for the first-level sorting queue of each DN, performing multi-path merging and sorting, so as to generate a global sorting queue (104); and for the global sorting queue, merging local transactions that have the same global timestamp TSO, and generating a global binary log Binlog (106).