Patent ID: 9667475
Date: 2017-05-30
CPC Classifications: H04L

Claim:
1. A method for distributed transaction processing, the method comprising: receiving a distributed transaction comprising a plurality of processes for processing, wherein the processing uses a two-phase commit protocol; preparing, by a main coordinator, at least one participating processing node from the plurality of processes, wherein the at least one participating processing node prepares at least a first sub-coordinator in communication with a first participant prepared by the first sub-coordinator and registered only with the first sub-coordinator, wherein the first participant executes a first process of the plurality of processes, wherein the at least one participating processing node further prepares a second sub-coordinator in communication with a second participant registered only with the second sub-coordinator, and wherein the second participant executes a second process of the plurality of processes; receiving, by one or more hardware processors of the main coordinator from the at least one participating processing node after preparation of the first sub-coordinator and the second sub-coordinator, a first list comprising first information identifying the first participant registered with the first sub-coordinator and a second list comprising second information identifying the second participant registered with the second sub-coordinator, wherein the at least one participating processing node receives the first information identifying the first participant from the first sub-coordinator and the second information identifying the second participant from the second sub-coordinator, and wherein the main coordinator uses the first list to directly provide a first instruction to the first participant to commit or rollback the first process by the first participant when the first sub-coordinator fails and has not recovered and uses the second list to directly provide a second instruction to the second participant to commit or rollback the second process by the second participant when the second sub-coordinator fails and has not recovered; maintaining a transaction log comprising a first state of the first participant and a second state of the second participant, wherein the first state is associated with processing of the first process, and wherein the second state is associated with processing of the second process; determining, by the main coordinator, an event of a system failure within the distributed transaction, wherein the system failure comprises at least failure of the first sub-coordinator; instructing, by the main coordinator, the first participant to commit or rollback the first process based on committed processes of the plurality of processes and the first state in the transaction log using the first list without the at least one participating processing node; generating, by the main coordinator, a heuristic status code for the distributed transaction using at least the instructing, wherein the heuristic status code comprises a completion status of each of the plurality of processes; and communicating, by the main coordinator, the heuristic status code to the first participant for use when the first sub-coordinator recovers, wherein the first participant durably records the heuristic status code at least until the first sub-coordinator recovers and retrieves the heuristic status code.