Database Sequence Cache Failover via Segmented Mastership

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing techniques for implementing failover and resume in multi-instance database environments using ordered sequences often result in performance degradation and fail to ensure graceful failover and resume operations, particularly due to the use of heavy-weight semaphores that lead to sequence cache collisions.

Innovation Solution

The approach involves instantiating an active and passive database instance, where the active instance manages a sequence cache guarded by a lightweight semaphore, allowing the passive instance to take over upon failure and maintain sequential access using a semaphore, ensuring ordered sequence values are delivered even during and after a failover.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If heavy-weight semaphores are used to guard sequence cache access in multi-instance database environment, then sequence cache collision is avoided, but performance degradation occurs

Engineering Contradiction:
Improvesequence cache collision avoidanceVSAvoidperformance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the sequence cache into multiple instances (first sequence cache in active database instance, second sequence cache in passive database instance) to eliminate the need for heavy-weight semaphores. Each instance has its own sequence cache, allowing parallel access without contention, thus resolving the contradiction between reliability and performance.

Inventive Principle:
Principle #1Segmentation

2Reliability

If entire checkpoints are taken periodically for failover, then database state is restored, but graceful failover and resume operations cannot be performed

Engineering Contradiction:
Improvedatabase state restorationVSAvoidgraceful failover and resume capability
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent implements preliminary action by maintaining a standby passive database instance with a pre-configured second sequence cache before failure occurs. This passive instance is ready to immediately take over as active upon failure, enabling graceful failover without needing to restore from periodic checkpoints, thus achieving both reliability and ease of operation.

Inventive Principle:
Principle #10Preliminary action

3Manufacturing precision

If a single active database instance manages the sequence cache, then ordered sequences are maintained, but failover capability is limited

Engineering Contradiction:
Improveordered sequence integrityVSAvoidfailover capability
Core Design Contradiction:
Manufacturing precisionVSReliability

Solution Approach 1:

The patent applies local quality by giving different roles to different database instances: the active instance manages the first sequence cache for ordered sequences, while the passive instance maintains a second sequence cache ready for failover. This differentiation allows the system to maintain ordered sequence integrity locally at the active instance while providing failover capability through the passive instance.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS9910893B2Failover and resume when using ordered sequences in a multi-instance database environment
Publication Date: 2018.03.06 ORACLE INT CORP
  • US9910893B2 patent drawing
  • US9910893B2 patent drawing
  • US9910893B2 patent drawing

AI summary

An approach is disclosed for implementing failover and resume when using ordered sequences in a multi-instance database environment. The approach commences by instantiating a first database instance initially to serve as an active instance, then instantiating a second database instance to serve as an instance of one or more passive instances. The active database establishes mastership over a sequence and then processes requests for the ‘next’ symbol by accessing a shared sequence cache only after accessing a first instance semaphore. The active instance and the passive instance perform a protocol such that upon passive database detection of a failure of the active database, one of the passive database instances takes over mastership of the sequence cache, and then proceeds to satisfy sequence value requests. The particular order is observed in spite of the failure.