Mirrored Database Upgrade State Machine Control

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Upgrading mirrored databases is prone to errors that can leave the database in an inconsistent or unusable state, making it challenging to resume or rollback to a consistent state in case of failures or crashes.

Innovation Solution

A state machine is employed to monitor and control the upgrade process, ensuring idempotent steps can be repeated and non-idempotent steps are rolled back to the initial state, using a persistent memory layer to track the process state and manage the upgrade process, allowing for seamless continuation or rollback.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the upgrade process is made robust to handle crashes and failures, then the reliability of database upgrades is improved, but the device complexity increases due to the need for state tracking and rollback mechanisms

Engineering Contradiction:
Improvereliability of database upgradesVSAvoidcomplexity of upgrade process control
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system performs preliminary actions by creating a state machine that tracks the upgrade process state before failures occur. The state machine records each step's status (success, failure, or crash) in advance, enabling automatic rollback or resumption without complex real-time decision-making during failures.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The upgrade process is segmented into discrete steps with defined states. Each step can be independently tracked and managed by the state machine, allowing selective rollback to specific steps or resumption from crash points without requiring complete process reversion, thus reducing overall complexity.

Inventive Principle:
Principle #1Segmentation

2Reliability

If the upgrade process tracks detailed state information to enable rollback, then the ability to recover from failures is improved, but the loss of time increases due to state tracking and potential rollback operations

Engineering Contradiction:
Improveability to recover from failuresVSAvoidtime for state tracking and rollback
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system creates a simplified copy of the upgrade state in the state machine, which tracks only the essential information needed for recovery (step number, status, crash state). This lightweight state representation enables fast rollback operations without requiring full database state reconstruction, reducing time loss during recovery.

Inventive Principle:
Principle #26Copying

3Productivity

If the upgrade process allows resumption from crash state, then the productivity is improved by avoiding complete restart, but the difficulty of detecting and measuring accurate crash state increases

Engineering Contradiction:
Improveproductivity of upgrade processVSAvoiddifficulty of detecting crash state
Core Design Contradiction:
ProductivityVSDifficulty of detecting and measuring

Solution Approach 1:

The state machine implements feedback mechanisms that continuously monitor upgrade step outcomes and update the recorded state. When a crash occurs, the state machine captures the current state information and updates the crash state record, providing accurate feedback about where the upgrade stopped. This enables reliable detection and measurement of crash states for intelligent resumption decisions.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS9098536B1Mirrored database upgrade using state machine
Publication Date: 2015.08.04 VMWARE INC
  • US9098536B1 patent drawing
  • US9098536B1 patent drawing
  • US9098536B1 patent drawing

AI summary

A process for upgrading a mirrored shared-nothing database system comprises a sequence of short well-defined idempotent steps, and at least one non-idempotent step involving transforming a master catalog. The upgrade process is managed and controlled by a state machine that has a persistent memory running on the master node. In the event of a failure or crash during an idempotent step, the process stops the database in the current state and repeats the step. If a failure or crash occurs during a non-idempotent step, the upgrade process is rolled back to the beginning and repeated.