Distributed Transaction Rollback Detection After Service Restarts
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In microservices executing distributed transactions, maintaining data consistency is difficult, especially when services restart and transaction recovery information is lost, leading to data inconsistency.
Innovation Solution
A computer system with multiple service execution systems that generate and transmit determination information to detect whether a distributed transaction needs to be rolled back, using mechanisms like call flags, instance IDs, and generation numbers to ensure data consistency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If transaction recovery information is stored in the resource manager, then transaction recovery capability is improved, but the system becomes vulnerable to data loss when the resource manager fails
Solution Approach 1:
The patent introduces a transaction coordinator as an intermediary component that manages transaction recovery information. Instead of storing recovery information directly in the resource manager (which is vulnerable to failure), the coordinator acts as a mediator that collects, stores, and manages the recovery information centrally. This separates the storage function from the resource manager, reducing the risk of information loss while maintaining recovery capability.
Solution Approach 2:
The system performs preliminary actions by pre-generating and storing determination information (including call flags, instance IDs, and generation numbers) before actual transaction execution. This preliminary preparation enables rapid recovery decision-making without requiring complex analysis during failure recovery, thus improving both reliability and reducing information loss risk.
2Measurement precision
If multiple service execution systems are used to detect inconsistency, then data consistency detection capability is improved, but system complexity increases
Solution Approach 1:
The patent segments the data inconsistency detection function into multiple independent service execution systems, each capable of autonomously determining whether rollback is needed. Each system maintains local determination information and can independently make recovery decisions, dividing the complex detection task into manageable segments that reduce overall system complexity while improving detection precision.
Solution Approach 2:
The system implements feedback mechanisms where service execution systems transmit determination information (call flags, instance IDs, generation numbers) to the transaction coordinator and receive feedback on recovery decisions. This structured feedback loop enables precise inconsistency detection while maintaining manageable complexity through standardized information exchange protocols.
Data Source
AI summary
A computer system comprises a plurality of service execution systems each configured to execute a service for implementing an application that executes a distributed transaction. At least one of the plurality of service execution systems is configured to generate determination information for determining whether rollback of the distributed transaction is required and to transmit the determination information to another one of the plurality of service execution systems, and the another one of the plurality of service execution systems that has received the determination information is configured to determine, through use of the determination information, whether the rollback of the distributed transaction is required.


