Asynchronous Cache Coherency for MVCC Database Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional distributed database systems face network overhead bottlenecks due to synchronous messaging for maintaining cache coherency across multiple database instances, which can lead to data inconsistency and reduced throughput.

Innovation Solution

Implementing an asynchronous cache coherence protocol that delays cache invalidation and page registration operations until needed, allowing incremental and on-demand registration and invalidation, and retrieving the latest page versions from persistent storage as required.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If synchronous messaging is used to maintain cache coherency across database instances, then data consistency is maintained, but network overhead increases and system throughput decreases

Engineering Contradiction:
Improvedata consistencyVSAvoidsystem throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs page registration and invalidation operations asynchronously in the background before they are strictly needed, rather than synchronously blocking transaction processing. This allows the main transaction path to proceed without waiting for coherency maintenance operations, thereby improving throughput while still maintaining data consistency through eventual propagation of coherency information across all database instances.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If global broadcasting is used to invalidate cache pages across all database instances, then cache coherency is maintained, but network bandwidth is consumed and bottlenecks occur

Engineering Contradiction:
Improvecache coherencyVSAvoidnetwork bandwidth consumption
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The patent extracts the coherency maintenance operations (page registration and invalidation) from the critical transaction path and moves them to asynchronous background processing. This separation removes the network overhead from the main transaction flow, allowing transactions to commit without waiting for global broadcasting operations, thereby reducing network bandwidth consumption while still maintaining cache coherency through eventual propagation.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If synchronous cache invalidation is performed before page access, then data correctness is ensured, but transaction latency increases

Engineering Contradiction:
Improvedata correctnessVSAvoidtransaction latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs cache invalidation and registration operations asynchronously in advance of when they are strictly needed for correctness, allowing transactions to proceed without waiting for these coherency operations to complete. The asynchronous mechanism ensures data correctness is eventually maintained while eliminating the latency penalty of synchronous waiting.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP3818454B1Asynchronous cache coherency for mvcc based database systems
Publication Date: 2024.06.19 HUAWEI TECH CO LTD
  • EP3818454B1 patent drawingFigure 1
  • EP3818454B1 patent drawingFigure 2
  • EP3818454B1 patent drawingFigure 3

AI summary

A database system comprises a persistent storage device, a log node including a memory and a processor, and a plurality of database nodes. A database node includes a cache memory configured to store a database instance, and a processor configured to initiate a database transaction by sending a snapshot request to the log node, the snapshot request including a list of pages that were either replaced or newly loaded in the cache memory. The log node processor is configured to send a snapshot response to the database node, wherein the snapshot response includes a snapshot of the database and a list of changed pages of the database instances. The database node processor is configured to update the status of the pages in cached memory according to the snapshot response and perform the database transaction.