Database Node Restart Segment for Fast Failover Recovery

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database systems face inefficiencies in restarting a database node, particularly when transitioning from a secondary to a primary role, as the process of rebuilding the in-memory cache can take significant time, potentially violating service-level agreements regarding downtime.

Innovation Solution

The system preserves the in-memory cache and database state information by allocating a restart segment during the restart operation, allowing the database node to quickly transition to a primary role by replaying log records from a stored stop position and maintaining database state information.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the database node performs a traditional restart operation to transition from secondary to primary role, then the node can be restarted, but the in-memory cache must be rebuilt which takes significant time and may violate service-level agreements

Engineering Contradiction:
Improveservice-level agreement complianceVSAvoidrestart downtime
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by preserving the in-memory cache data in a persistent storage location (such as a memory-mapped file or disk-based cache) before the restart operation. When the database node needs to restart, the cached data is already available and can be quickly reloaded into memory, eliminating the time-consuming cache rebuild process while ensuring service-level agreement compliance

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates a copy of the in-memory cache data and stores it in a persistent format that can be quickly restored. This copy mechanism allows the database node to recover its cache state without reconstructing it from scratch, significantly reducing restart time while maintaining data integrity and service availability commitments

Inventive Principle:
Principle #26Copying

2Loss of time

If the database node preserves in-memory cache during restart, then restart time is reduced, but additional memory management complexity is introduced

Engineering Contradiction:
Improverestart durationVSAvoidmemory segment management
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The memory management system is segmented into distinct regions: a primary in-memory cache for active data, a persistent storage area for cache preservation, and a restart segment for recovery operations. This segmentation allows each component to be managed independently with specialized algorithms, reducing overall system complexity while enabling fast restart through the dedicated restart segment

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

An intermediary memory-mapped file or disk-based cache structure serves as a bridge between the volatile in-memory cache and persistent storage. This intermediary layer automatically handles the preservation and restoration of cache data during restart operations, simplifying the memory management complexity by providing a standardized interface that abstracts the underlying storage mechanics

Inventive Principle:
Principle #24Intermediary (Mediator)

3Quantity of substance

If the database node deallocates memory segments during restart, then memory is freed for other uses, but the cache must be completely rebuilt losing previous state information

Engineering Contradiction:
Improveavailable memoryVSAvoidcache state information
Core Design Contradiction:
Quantity of substanceVSLoss of information

Solution Approach 1:

The system selectively discards and recovers memory segments during restart operations. Instead of deallocating all cache memory, the system preserves critical cache data in a restart segment or persistent storage, then recovers this data after restart. This approach frees up sufficient memory for other uses while maintaining essential cache state information, balancing memory availability with information preservation

Inventive Principle:
Principle #34Discarding and recovering

Data Source

PatentUS12561207B2Database node soft restart
Publication Date: 2026.02.24 SALESFORCE INC
  • US12561207B2 patent drawing
  • US12561207B2 patent drawing
  • US12561207B2 patent drawing

AI summary

Techniques are disclosed relating to restarting a database node. A database node may allocate memory segments that include a restart segment for storing data records. The database node may spawn processes to read a log and replay log records of the log to update the restart segment to store data records. The database node may determine to perform a restart operation to transition from a first mode to a second mode. Performing the restart operation may include ceasing reading the log at a stop position and storing, based on the stop position, database state information that enables the processes to resume reading the log from the stop position. The database node may further deallocate the memory segments except for the restart segment and terminate the processes. After performing the restart operation, the database node may spawn the processes, which may resume reading the log based on the database state information.