Database Transaction Context Transfer for Primary-Secondary Switching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed relational database systems, primary-secondary switching during ongoing database transactions leads to inefficiencies as incomplete transactions must be rolled back, reducing execution efficiency.

Innovation Solution

A method where a first server records and sends the context of a database transaction to a second server before switching its primary copy to a secondary copy, allowing the second server to continue the transaction after switching its secondary copy to a primary copy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If primary-secondary switching is performed during database transaction execution, then system availability is improved, but transaction execution efficiency deteriorates due to rollback requirements

Engineering Contradiction:
Improvesystem availabilityVSAvoidtransaction execution efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary actions by recording the context of database transactions before primary-secondary switching occurs. This includes capturing transaction metadata, execution state, and data modifications, enabling the new primary server to resume transactions without rollback after switching.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces a context recording mechanism as an intermediary between the database transaction system and the primary-secondary switching mechanism. This intermediary captures and preserves transaction state information, allowing seamless transition of transaction execution to the new primary server without loss of work.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of manufacture

If primary-secondary switching is performed during ongoing transactions, then system maintenance capability is improved, but transaction completion rate worsens due to forced rollbacks

Engineering Contradiction:
Improvesystem maintenance capabilityVSAvoidtransaction completion rate
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

Before switching primary and secondary servers, the system records the complete context of ongoing transactions including execution state and modifications. This preliminary recording ensures that when maintenance is performed on the old primary server, transactions can be seamlessly continued on the new primary server without rollbacks.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent ensures continuity of useful action by preserving transaction context across the primary-secondary switch. Transactions that were in progress before switching continue execution after switching, maintaining uninterrupted data processing and eliminating the need to restart or rollback transactions.

Inventive Principle:
Principle #20Continuity of useful action

3Productivity

If context recording and transfer is implemented before switching, then transaction continuity is improved, but system complexity increases

Engineering Contradiction:
Improvetransaction continuityVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system segments the transaction management process into distinct components: context recording, context storage, and context retrieval. This segmentation allows each component to be independently implemented and optimized, reducing overall system complexity while enabling transaction continuity across primary-secondary switches.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent uses copying by creating a contextual representation of transaction state rather than duplicating entire database states. This lightweight copying approach captures essential transaction information (metadata, execution state, modifications) without the overhead of full data replication, reducing system complexity while maintaining transaction continuity.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS12314253B2Methods, systems, electronic devices, and storage media for database transaction processing
Publication Date: 2025.05.27 BEIJING OCEANBASE TECHNOLOGY CO LTD
  • US12314253B2 patent drawing
  • US12314253B2 patent drawing
  • US12314253B2 patent drawing

AI summary

Methods, systems, electronic devices and computer-readable media for database transaction processing are provided. In an example, after determining to perform primary-secondary switching of a copy, a first server records a context of a database transaction that is currently being executed, sends the context to a second server, and switches a primary copy stored in the first server to a secondary copy. The second server switches a secondary copy stored in the second server to a primary copy, and continues execution of the database transaction based on the context after completing the switching.