Fuzzy Snapshot Database Recovery Without Locking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Main memory database systems face challenges in taking snapshots without hindering locks, leading to increased recovery time and latency due to the need for global or regional locks, which become impractical as database size grows.
Innovation Solution
Implementing a fuzzy snapshot method that serializes database updates without applying hindering locks, using a transaction log to apply idempotent transactions to a snapshot, allowing for dynamic database processing and efficient recovery.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional snapshot methods using global or regional locks are used, then data consistency is ensured, but system latency increases and performance deteriorates as database size grows
Solution Approach 1:
The patent divides the database into multiple regions or partitions that can be independently snapshotted. Instead of locking the entire database globally, the system creates snapshots of individual regions separately, allowing other regions to continue processing transactions without interruption. This segmentation enables parallel snapshot creation and reduces the impact on overall system performance.
Solution Approach 2:
The system performs preliminary actions by pre-allocating snapshot storage space and preparing snapshot metadata structures before actual snapshot creation begins. Transaction logs are continuously written to predetermined locations in advance, and the snapshot mechanism is pre-configured with necessary data structures, reducing the critical path duration during snapshot execution.
2Reliability
If global locks are applied during snapshot creation, then complete database consistency is achieved, but recovery time increases due to extended lock duration
Solution Approach 1:
The patent implements dynamic snapshot creation where the snapshot process adapts to changing database conditions. Rather than using static global locks for the entire duration, the system dynamically adjusts locking granularity and timing based on transaction patterns and database state, allowing snapshots to be created more quickly while maintaining consistency through region-level coordination.
Solution Approach 2:
The system introduces an intermediary snapshot coordinator that manages the snapshot process without requiring prolonged global locks. This coordinator orchestrates region-level snapshot operations, manages transaction log buffering, and coordinates the application of logged transactions to snapshot copies, enabling faster snapshot creation and recovery.
3Reliability
If the database is locked to take a snapshot, then a complete consistent snapshot is obtained, but request latency increases making it impractical for large databases
Solution Approach 1:
The database is divided into multiple independent regions that can be snapshotted separately without requiring global locks. Each region can be snapshotted independently while other regions continue to accept and process requests, dramatically reducing request latency during snapshot operations while still obtaining consistent snapshots of each region.
Solution Approach 2:
The snapshot mechanism maintains continuity of useful action by allowing transaction processing to continue uninterrupted during snapshot creation. The system continuously writes transaction logs to disk and continuously processes incoming requests while the snapshot is being created, ensuring that the database remains fully operational without increased latency.
Data Source
AI summary
A method and device are provided for taking a database snapshot using a fuzzy snapshot. In one example, the method includes starting and maintaining a transaction log of the database, starting and maintaining a fuzzy snapshot of the database without applying any hindering locks to the database, and restoring the database by applying the transaction log to the fuzzy snapshot.


