Database Replica Log Cache On-Demand Redo Application

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvequery throughputVSAvoidmemory consumption
Core Design Contradiction:
ProductivityVSQuantity of substance

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

Inventive Principle:
Principle #10Preliminary action

2Quantity of substance

If sequential approach is used to apply redo log records, then memory consumption is reduced, but data visibility lag increases

Engineering Contradiction:
Improvememory consumptionVSAvoiddata visibility lag
Core Design Contradiction:
Quantity of substanceVSLoss of time

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

Inventive Principle:
Principle #15Dynamics

3Reliability

If all pages are updated proactively, then data visibility is improved, but processing resource consumption increases

Engineering Contradiction:
Improvedata visibilityVSAvoidprocessing resource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

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

Inventive Principle:
Principle #3Local quality

4Manufacturing precision

If redo log records are applied continuously, then synchronization accuracy is improved, but input/output load increases

Engineering Contradiction:
Improvesynchronization accuracyVSAvoidinput/output load
Core Design Contradiction:
Manufacturing precisionVSObject-generated harmful factors

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

Inventive Principle:
Principle #19Periodic action

Data Source

PatentUS11657066B2Method, apparatus and medium for data synchronization between cloud database nodes
Publication Date: 2023.05.23 HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
  • US11657066B2 patent drawing
  • US11657066B2 patent drawing
  • US11657066B2 patent drawing

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.