Asynchronous Cache Coherency for MVCC Database Systems
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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
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.
3Reliability
If synchronous cache invalidation is performed before page access, then data correctness is ensured, but transaction latency increases
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.
Data Source
Figure 1
Figure 2
Figure 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.