Distributed Database Transaction Metadata Synchronization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed database systems, working nodes often face issues with metadata inconsistency, leading to abnormal transaction processing due to delayed synchronization of metadata modifications, which results in inconsistent user data and metadata visibility during transactions.

Innovation Solution

A database transaction processing method that involves obtaining a transaction timestamp and the current global latest version information before starting a transaction, determining the latest-version metadata, and executing operation statements based on this metadata to ensure timely access to modified metadata across the system.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If working nodes obtain metadata from local cache, then transaction processing speed is improved, but metadata consistency deteriorates due to delayed synchronization

Engineering Contradiction:
Improvetransaction processing speedVSAvoidmetadata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary actions by obtaining the global latest version information before starting the transaction. This allows the working node to proactively check and synchronize metadata version information in advance, ensuring that the metadata used during transaction execution is the latest version, thus resolving the contradiction between fast local cache access and metadata consistency

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements a feedback mechanism by comparing the local metadata version with the global latest version information. When inconsistency is detected, the working node retrieves updated metadata from the global metadata storage and updates its local cache, ensuring continuous synchronization between distributed nodes while maintaining efficient local access

Inventive Principle:
Principle #23Feedback

2Reliability

If working nodes synchronize metadata from global metadata storage, then metadata consistency is improved, but system latency increases

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

Solution Approach 1:

Instead of synchronizing all metadata continuously, the system performs partial synchronization by only updating metadata when version inconsistencies are detected through the version information comparison. This selective update approach minimizes unnecessary synchronization operations and reduces system latency while maintaining metadata consistency

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system changes the parameter of metadata synchronization from continuous to event-driven based on version information changes. By using version timestamps as a parameter, the system only triggers synchronization when the global latest version information changes, reducing unnecessary synchronization operations and lowering system latency

Inventive Principle:
Principle #35Parameter changes

3Productivity

If working nodes use local cached metadata, then access efficiency is improved, but transaction accuracy deteriorates due to outdated metadata

Engineering Contradiction:
Improveaccess efficiencyVSAvoidtransaction accuracy
Core Design Contradiction:
ProductivityVSManufacturing precision

Solution Approach 1:

The system performs preliminary verification by obtaining and comparing version information before executing transactions. This preliminary action ensures that the metadata version in the local cache is current, allowing the working node to use local cached metadata with confidence, thus maintaining both access efficiency and transaction accuracy

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements feedback through version information comparison to verify metadata freshness before transaction execution. When the local version matches the global latest version, the working node proceeds with high-speed local access; when mismatched, it retrieves updated metadata, ensuring transaction accuracy without compromising overall access efficiency

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS12153570B2Database transaction processing method and apparatus, server, and storage medium
Publication Date: 2024.11.26 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • US12153570B2 patent drawing
  • US12153570B2 patent drawing
  • US12153570B2 patent drawing

AI summary

This application discloses a database transaction processing method performed by a computer device. The method includes: in a case of starting a target transaction, obtaining, by a working node in a distributed database system, a transaction timestamp of the target transaction and current global latest version information, the target transaction including at least one operation statement for a target data object, and the global latest version information being version information of latest generated metadata of metadata stored in the distributed database system; determining latest-version metadata of the target data object according to the current global latest version information, and determining to-be-accessed user data of the target transaction according to the transaction timestamp; and executing an operation statement of the target transaction on the to-be-accessed user data based on the latest-version metadata of the target data object.