Database Session State Tracking via Template Verification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing technologies fail to transparently recover database session states during planned maintenance or interruptions, leading to disruptions and requiring significant client application intervention, which is burdensome and error-prone, especially in cloud-hosted environments where control over both client applications and DBMS is abstracted.

Innovation Solution

The system employs session templates and verification points to automatically restore and verify the session state, using a protocol between the client driver and DBMS to rebuild the session state, classify aspects of session state for restoration, and maintain minimal client intervention by using immutable session templates and replay contexts.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If database sessions are released during planned maintenance or interruptions, then maintenance operations can be performed, but client applications experience disruptions and require significant intervention

Engineering Contradiction:
Improveease of maintenanceVSAvoidapplication disruption
Core Design Contradiction:
Ease of manufactureVSEase of operation

Solution Approach 1:

The system performs preliminary actions by capturing and storing session state information (including transactional and non-transactional data) before maintenance operations begin. This allows sessions to be restored to their pre-maintenance state, enabling maintenance while preventing application disruptions.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates copies of session state information and maintains these copies during maintenance operations. By copying and preserving session state data, the system enables restoration of sessions without requiring client application intervention during maintenance.

Inventive Principle:
Principle #26Copying

2Reliability

If session state is manually restored after interruptions, then applications can resume, but the process is burdensome and error-prone

Engineering Contradiction:
Improvesession recoveryVSAvoidclient intervention
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system implements self-service by automatically capturing, storing, and restoring session state information without requiring client application intervention. The DBMS autonomously manages session state preservation and restoration, eliminating manual recovery processes and reducing errors.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system uses feedback mechanisms to track and verify session state changes. By monitoring session state and providing feedback on restoration status, the system ensures reliable recovery while minimizing the need for complex client-side verification and intervention.

Inventive Principle:
Principle #23Feedback

3Productivity

If session state information is captured and stored, then seamless continuation is enabled, but storage requirements and network latency increase

Engineering Contradiction:
Improvesession continuityVSAvoiddata storage
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The system extracts only the essential session state information needed for restoration, separating critical data from unnecessary details. By taking out only the necessary session state components (transactional and non-transactional data), the system reduces storage requirements while maintaining session continuity capability.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system applies partial action by capturing and storing session state at selective points (such as before maintenance operations) rather than continuously. This partial capture approach reduces the quantity of stored data while still enabling seamless session continuation when needed.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS12007941B2Session state tracking
Publication Date: 2024.06.11 ORACLE INT CORP
  • US12007941B2 patent drawing
  • US12007941B2 patent drawing
  • US12007941B2 patent drawing

AI summary

Techniques are disclosed herein for identifying, recording and restoring the state of a database session and various aspects thereof. A session template data structure is generated that includes session attribute values describing various aspects of the session that is established between a client system and a database management system (DBMS and enables the client system to issue to the DBMS commands for execution. Based on the session attribute values, DBMS may generate a template identifier corresponding to the session template data structure. The template identifier may be stored in an association with the session state that it partially (or in whole) represents. In an embodiment, when another state of a session is captured, if the template identifier for the state is the same, then rather than storing the attribute-value pairs for the other state, the template identifier is further associated with the other state. In an embodiment, a request boundary is detected where the session is known to be at a recoverable point. If recovery of the session is needed, the session state is restored, and replay of commands start from this point. Each command replayed is verified to produce the same session state as it produced by the original execution. If the session is determined to be a safe point, then all the commands recorded for replay prior to the safe point may be deleted. In an embodiment, the template is used to set the initial state when borrowing from a session pool. The state tracking is also used to identify that the session can be failed over safely during planned operation as the session is unlikely to drain by itself even when not used.