Transaction Coordinator Atomicity Recovery via Participant Logging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In transaction processing, ensuring atomicity of a unit of work is challenging, especially in long-running transactions where system failures can lead to incomplete commits, and existing methods require time-consuming non-volatile logging to maintain transaction co-ordinator reliability.
Innovation Solution
A method where a prepare request is sent to participants with data for recovery purposes, allowing participants to store and respond with completion status, and upon recovery, the transaction co-ordinator uses this data to ensure atomicity by determining the outcome and sending appropriate commit or rollback requests without the need for extensive logging.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the transaction co-ordinator maintains a non-volatile log to guarantee atomicity after system failure, then reliability is improved, but the time required for transaction processing increases due to time-consuming log writes
Solution Approach 1:
Participants perform preliminary actions by writing their own log records and storing outcome indications in non-volatile storage before the transaction co-ordinator needs to commit. This preliminary logging by participants eliminates the need for the co-ordinator to maintain extensive logs, reducing co-ordinator processing time while ensuring atomicity can be recovered.
Solution Approach 2:
Each participant serves itself by maintaining its own log records and outcome indications in its non-volatile storage. Participants independently record their transaction states and can provide this information to the co-ordinator during recovery, eliminating the burden on the co-ordinator to maintain detailed logs of all participant states.
2Reliability
If the transaction co-ordinator holds the transaction while writing to non-volatile storage to ensure atomicity, then reliability is improved, but the duration of the transaction increases
Solution Approach 1:
Participants perform the time-consuming logging action in advance, before the co-ordinator needs to commit the transaction. By writing their log records and storing outcome indications beforehand, participants eliminate the need for the co-ordinator to hold the transaction during log writes, thus reducing transaction duration while maintaining atomicity guarantees.
3Reliability
If extensive logging is performed to maintain transaction co-ordinator reliability, then reliability is improved, but device complexity increases due to logging infrastructure
Solution Approach 1:
Each participant maintains its own logging infrastructure and writes its own log records in its non-volatile storage. This distributes the logging complexity across multiple independent participants rather than concentrating it in the transaction co-ordinator, reducing the co-ordinator's complexity while maintaining system-wide reliability through collective participant logging.
Solution Approach 2:
The logging function is segmented and distributed to individual participants rather than being centralized in the transaction co-ordinator. Each participant independently manages its own log records and outcome indications, dividing the complex logging infrastructure into smaller, manageable units that reduce overall system complexity.
Data Source
AI summary
A method for providing atomicity for a unit of work involving a plurality of participants, the method comprising the steps of: sending a prepare request to at least one participant, wherein the request comprises data required for recovery prurposes of the unit of work; and on recovery of the unit of work, recovering the unit of work comprising: obtaining the data from the at least one participant; and using the obtained data to recover and preserve the atomicity of the unit of work.