Database Log Synchronization Using Shared Differential Logs

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The semi-synchronous log replication mode in database systems is prone to data inconsistency and loss due to network jitter or stress, affecting stability and reliability.

Innovation Solution

A log synchronization method where the active node stores logs in a storage system, generating and sending differential logs to the standby node, avoiding direct replication and reducing network dependency, with relay logs stored in the storage system or standby node to enhance reliability and efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If semi-synchronous log replication mode is used, then data consistency between active node and standby node can be maintained, but network dependency increases and system reliability decreases under network jitter or stress

Engineering Contradiction:
Improvedata consistencyVSAvoidnetwork jitter impact
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The patent introduces a storage system as an intermediary component that centrally manages log storage for both the active node and standby node. This mediator eliminates direct log replication over the network, allowing both nodes to access logs from the same storage location without requiring continuous network communication for log synchronization, thereby resolving the contradiction between maintaining data consistency and reducing network dependency.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Speed

If active node directly replicates logs to standby node, then log synchronization can be achieved, but network transmission delays and data loss risk increase

Engineering Contradiction:
Improvelog synchronization speedVSAvoiddata loss risk
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent implements preliminary action by having the storage system pre-store logs in a centralized location before they are needed by either the active node or standby node. This eliminates the need for real-time log replication during failover scenarios, as both nodes can independently access the pre-stored logs from the storage system, thereby improving both synchronization speed and reliability.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If active node waits for standby node confirmation, then data consistency is ensured, but system response time and productivity decrease

Engineering Contradiction:
Improvedata consistencyVSAvoidsystem response time
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent enables self-service by allowing the standby node to independently access and retrieve logs directly from the storage system without requiring confirmation or coordination with the active node. This autonomous access mechanism eliminates waiting time for synchronization confirmation while ensuring data consistency through centralized storage, thereby improving system response time without sacrificing reliability.

Inventive Principle:
Principle #25Self-service

Data Source

PatentEP4664316A1Log synchronization method and apparatus, electronic device, and storage medium
Publication Date: 2025.12.17 HUAWEI TECH CO LTD
  • EP4664316A1 patent drawingFigure 1~2
  • EP4664316A1 patent drawingFigure 3~4
  • EP4664316A1 patent drawingFigure 5

AI summary

This application provides a log synchronization method and apparatus, an electronic device, and a storage medium, and pertains to the field of database technologies. The method includes: A storage system stores a log of an active node. The storage system receives a log synchronization request from a standby node, generates a differential log based on the log synchronization request and the log, and sends the differential log to the standby node. In the foregoing method, because the storage system stores the log written by the active node, and the active node and the standby node access a same log, the active node does not need to replicate or transmit the log. In this way, inconsistency that occurs in a log replication process can be avoided, and replication mode degradation caused by a network jitter between the active node and the standby node can be avoided, to reduce a data loss risk.