-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Transaction Recovery for XA Resources #42080
Implement Transaction Recovery for XA Resources #42080
Conversation
7b66b83
to
393d187
Compare
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
…ina-lang into dsplayerX-feature-transaction-recovery
…overy Sync with master
86ae40b
into
ballerina-platform:transaction-recovery
Purpose
Addresses the need to enhance Ballerina's transaction support by introducing native recovery functionality for distributed transactions, aligning with the XA specification. The primary goal is to eliminate dependency on the Atomikos library (which enables recovery for transactions in Ballerina, but only for databases) by implementing a native recovery mechanism and then extend the support to include transactional microservices. This initiative aims to improve the reliability and fault tolerance of Ballerina transactions.
Partially Implements #42031
Approach
The implementation includes a Log Manager with both in-memory and file-based components for dynamic transaction tracking and persistent storage, respectively. The logging process of transaction states ensures effective recovery process after a system crash due to a runtime crash.
The Recovery Manager handles the recovery processes after a system crash. It collaborates with the Log Manager to identify and address incomplete transactions or states, ensuring a smooth recovery after system crashes before returning to normal operating state. This recovery pass, that run upon startup recovers incomplete transactions in XA Resources from system crashes.
Samples
This feature also introduces 4 new configurations to configure transaction logging. These would porivide inthe Config.toml or with CLI commands.
Remarks
Logging for Transaction Recovery in a 2PC Transaction - ballerina-platform/module-ballerinai-transaction#537
Collect XA Resources for transaction recovery feature - ballerina-platform/module-ballerina-sql#722
Check List