Database Transaction Context Transfer for Primary-Secondary Switching
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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.
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.
3Productivity
If context recording and transfer is implemented before switching, then transaction continuity is improved, but system complexity increases
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.
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.
Data Source
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.


