Multi-Replica Data Restoration in Distributed Databases

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed databases, data restoration from multi-replica data is time-consuming and inefficient, leading to prolonged downtime and increased storage pressure due to the accumulation of large transaction logs.

Innovation Solution

A method where a faulty node in a distributed database identifies the latest replica data from a non-faulty node based on log sequence numbers (LSNs) to perform data restoration, eliminating the need for retaining transaction logs and reducing storage pressure.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If log replay is performed from the fault source according to accumulated data transaction logs to restore faulty replica data, then data restoration can be achieved, but data restoration time becomes very long and data restoration efficiency is low

Engineering Contradiction:
Improvedata restoration capabilityVSAvoiddata restoration time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-generating and storing incremental difference data (shadow data) that captures changes between replica data versions. When a fault occurs, this pre-computed shadow data can be directly applied to restore the faulty replica without performing time-consuming log replay operations, thus significantly reducing data restoration time while maintaining restoration capability

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts only the essential restoration information (shadow data representing data changes) from the complete transaction log sequence. Instead of replaying all transaction logs from the fault source, the system extracts and stores incremental difference data that can be directly applied to restore faulty replicas, eliminating the need for lengthy log replay processes

Inventive Principle:
Principle #2Taking out (Extraction)

2Reliability

If a large quantity of data transaction logs are retained to enable fault recovery, then data restoration can be performed, but storage space of the database system is heavily occupied and storage pressure increases

Engineering Contradiction:
Improvefault recovery capabilityVSAvoidstorage space occupied by transaction logs
Core Design Contradiction:
ReliabilityVSVolume of stationary object

Solution Approach 1:

The patent extracts only the essential restoration information (shadow data) from complete transaction logs. Instead of retaining all transaction logs, the system extracts incremental difference data representing changes between replica versions, stores this compressed shadow data, and uses it for restoration. This dramatically reduces the storage volume required for fault recovery while maintaining full recovery capability

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes the parameter representation from storing complete transaction logs (large volume) to storing incremental shadow data (small volume). By transforming the restoration mechanism to use compact difference data instead of full transaction logs, the system achieves the same fault recovery function with significantly reduced storage requirements

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11132265B2Multi-replica data restoration method and apparatus
Publication Date: 2021.09.28 HUAWEI TECH CO LTD
  • US11132265B2 patent drawing
  • US11132265B2 patent drawing
  • US11132265B2 patent drawing

AI summary

Embodiments of this application provide a method and an apparatus for multi-replica data restoration. The method is applied to a distributed database and includes: when a first page in replica data of a first node has a fault, obtain N latest LSNs in data log information of a second node that corresponds to a first page identifier. The first page is any page that is in the replica data of the first node and that has a fault. The first node further determines a node corresponding to a largest LSN in the N latest LSNs in the data log information of the second node that corresponds to the first page identifier is a third node. Then the first node performs data restoration on the first page in the replica data of the first node according to replica data of the third node.