Database Replica Log Cache On-Demand Redo Application
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for synchronizing data between cloud-based database masters and replicas face challenges such as increased data visibility lag and reduced query throughput, particularly during heavy write workloads, due to inefficiencies in applying redo log records, including sequential and proactive parallel approaches that consume resources and lead to high buffer pressure and input/output loads.
Innovation Solution
Applying redo log records only when the current version of a page is requested, using a log cache to track recent records and update pages on-demand, thereby focusing processing resources on frequently requested pages and reducing unnecessary updates and storage pressure.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If proactive parallel approach is used to apply redo log records, then query throughput is improved, but memory consumption and buffer pressure increase
Solution Approach 1:
The patent applies proactive parallel approach by pre-fetching and applying redo log records to pages before they are actually requested by queries. This preliminary action ensures that when queries need data, the pages are already updated in the buffer pool, improving query throughput while managing memory usage through selective pre-fetching based on access patterns
2Quantity of substance
If sequential approach is used to apply redo log records, then memory consumption is reduced, but data visibility lag increases
Solution Approach 1:
The patent implements a dynamic approach that adapts between sequential and parallel processing based on system conditions. When buffer pool pressure is high, it uses sequential application to save memory; when conditions permit, it switches to parallel proactive application to reduce data visibility lag, making the system flexible in managing the trade-off
3Reliability
If all pages are updated proactively, then data visibility is improved, but processing resource consumption increases
Solution Approach 1:
Instead of uniformly updating all pages, the patent applies local quality by selectively updating only those pages that are likely to be requested based on access patterns and query workloads. This targeted approach maintains data visibility for relevant pages while avoiding unnecessary processing resource consumption on pages that won't be accessed
4Manufacturing precision
If redo log records are applied continuously, then synchronization accuracy is improved, but input/output load increases
Solution Approach 1:
The patent uses periodic action by applying redo log records in batches or intervals rather than continuously for every transaction. This periodic application maintains sufficient synchronization accuracy for most queries while reducing the input/output load on the buffer pool and storage systems by consolidating update operations
Data Source
AI summary
Methods, processing units, and computer-readable media in a cloud-based database are described. Redo log records are applied to a page at a database replica only when an updated version of the page is requested at the database replica. A log cache may be used by a replica node of the database to track recent redo log records applicable to a given page. The recent redo log records stored in the log cache may be applied to update the page on-demand when an updated version of the page is requested. By applying only the redo log records applicable to pages that are currently being requested, processing resources may be used only to generate pages that are currently required. Methods for registering redo log records into the log cache by the master or replica server are also described.


