Inline Transaction Log Delegation for Database Recovery
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Transactional middleware systems face challenges in efficiently managing and recovering in-doubt transactions, particularly after a system crash, where updates to some data stores may be committed while others are still pending, leading to inconsistent states.
Innovation Solution
The system supports transaction recovery by retrieving and matching in-doubt transactions with transaction recovery information persisted during the prepare phase, allowing for the determination of whether to commit or roll back transactions through inline delegation of transaction logs to a database, enabling consistent and predictable recovery.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If transaction logs are manually managed in traditional middleware systems, then system flexibility is maintained, but transaction recovery efficiency and consistency deteriorate after system crashes
Solution Approach 1:
The patent introduces a database management system as an intermediary to manage transaction logs. The DBMS serves as a mediator between the middleware system and the transaction log storage, providing centralized management of transaction recovery information. This intermediary approach enables automated recovery processes while maintaining system flexibility, resolving the contradiction between recovery consistency and efficiency.
Solution Approach 2:
The system performs preliminary actions by pre-persisting transaction recovery information in the database during the prepare phase of distributed transactions. Before system crashes can occur, the transaction state is already recorded and prepared for potential recovery. This preliminary action ensures that when crashes happen, recovery can proceed efficiently with pre-prepared information, improving both consistency and efficiency.
2Reliability
If transaction recovery information is persisted during prepare phase, then recovery accuracy improves, but system complexity increases
Solution Approach 1:
The patent leverages the existing database management system to perform multiple functions: it serves as both the application data storage and the transaction log repository. By making the DBMS universal and multi-functional, the system avoids adding separate specialized components for transaction logging, thereby improving recovery accuracy without proportionally increasing system complexity.
3Reliability
If in-doubt transactions are recovered by matching with persisted information, then transaction consistency improves, but recovery time increases
Solution Approach 1:
The patent creates copies of transaction recovery information and stores them in the database during the prepare phase. Instead of retrieving and processing original transaction logs from multiple sources during recovery, the system uses these pre-created copies for rapid matching and decision-making. This copying approach maintains consistent recovery decisions while significantly reducing the time required to process in-doubt transactions.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Systems and methods are provided for supporting transaction recovery based on inline delegation of transaction logs to a database. The system can retrieve transaction recovery information of a transaction from a persistence store, wherein the transaction recovery information is persisted on a resource manager that is associated with the persistence store during a prepare phase. Furthermore, the system can retrieve one or more in-doubt transactions from one or more participating resource managers of the transaction. Then, the system can determine whether to commit or roll back the one or more in-doubt transactions by matching the one or more in-doubt transactions to the transaction recovery information.