Immutable LSM Trees for Live Database Corruption Repair

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Multi-tenant database systems face significant challenges in addressing logical or physical corruption, which can lead to catastrophic failures, affecting numerous customers and resulting in substantial financial losses and reputational damage, due to the complexity and cost of rectifying corruption in conventional database systems.

Innovation Solution

The implementation of immutable LSM trees, which store records in a way that allows for the identification and correction of corruption within immutable extents through a log-based system, enabling corruption to be fixed without taking the database offline by replaying transactions and generating compensating transactions, thus maintaining system availability.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional database systems detect data corruption, then data integrity is protected by crashing the database, but system availability and service continuity deteriorate

Engineering Contradiction:
Improvedata integrityVSAvoidsystem availability
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The database is segmented into multiple independent tenants, allowing corruption in one tenant to be isolated and corrected without affecting other tenants or the entire database system. This enables localized repair operations that maintain overall system availability while ensuring data integrity for affected segments.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary actions by maintaining transaction logs and version histories before corruption occurs. When corruption is detected, these pre-recorded transactions are replayed to restore data to a consistent state, avoiding the need to crash the database and enabling continuous operation.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If database corruption is detected in multi-tenant systems, then catastrophic failure affecting multiple customers is prevented, but the complexity and cost of rectifying corruption increases

Engineering Contradiction:
Improvesystem stabilityVSAvoidcorruption rectification complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

By dividing the database into tenant-specific segments with isolated transaction logs, the system reduces rectification complexity. Each tenant's corruption can be addressed using only their own transaction history, rather than requiring complex analysis of the entire multi-tenant database system.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system creates copies of transaction logs and maintains historical versions of data. When corruption is detected, these copies are used to reconstruct the correct state, simplifying the rectification process by providing ready-made restoration sources without requiring complex repair algorithms.

Inventive Principle:
Principle #26Copying

3Ease of repair

If database corruption is addressed by taking the database offline, then thorough corruption repair is enabled, but downtime and financial losses increase

Engineering Contradiction:
Improvecorruption repair capabilityVSAvoiddatabase downtime
Core Design Contradiction:
Ease of repairVSLoss of time

Solution Approach 1:

Transaction logs and data versions are continuously recorded and maintained before corruption occurs. When corruption is detected, these pre-existing records enable immediate repair operations without taking the database offline, as all necessary restoration information is already available in the logs.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The database system performs self-repair by automatically detecting corruption, replaying transactions from logs, and restoring data consistency without requiring external intervention or system shutdown. This autonomous repair capability eliminates downtime while maintaining thorough corruption remediation.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9684570B1Systems, methods, and apparatuses for fixing logical or physical corruption in databases using immutable LSM trees
Publication Date: 2017.06.20 SALESFORCE INC
  • US9684570B1 patent drawing
  • US9684570B1 patent drawing
  • US9684570B1 patent drawing

AI summary

In accordance with disclosed embodiments, there are provided methods, systems, and apparatuses for fixing logical or physical corruption in databases using immutable LSM trees including, for example, means for storing records in a LSM database at the host organization; processing transactions to the LSM database by writing the transactions into immutable extents for subsequent merge into the LSM database; recording a history of the transactions in a log; identifying corruption in at least one of the records of the LSM database represented within the immutable extents prior to merge of the immutable extents to the LSM database; and correcting the identified corruption to the at least one of the records of the LSM database based at least in part on the recorded history of the transactions in the log during live operation of the LSM database. Other related embodiments are disclosed.