IP Library Granted Patent US 9,146,944
Granted Patent B2
US 9,146,944 · App. 13/828,590 · Granted Sep 29, 2015

Systems and methods for supporting transaction recovery based on a strict ordering of two-phase commit calls

Inventor: Paul Parkinson (Orlando, FL)
Assignee: ORACLE INTERNATIONAL CORPORATION
G06F17/30289G06F9/466G06F11/0709G06F11/1474
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,146,944
App. No.
13/828,590
Granted
Sep 29, 2015
Kind
B2
Abstract

Systems and methods are provided for supporting transaction recovery based on a strict ordering of two-phase commit calls. At least one resource manager in a mid-tier transactional environment can be designated as the “determiner resource,” in order to support eliminating mid-tier transaction logs (TLOG) in processing a two-phase transaction. A transaction manager can prepare all other resource managers in the mid-tier transactional system before the determiner resource. Furthermore, the transaction manager can rely on the list of outstanding transactions to be committed that is provided by the determiner resource for recovering the transaction. The transaction manager can commit an in-doubt transaction returned from a resource manager that matches the list of in-doubt transactions returned from the determiner resource. Otherwise, the transaction manager can roll back the in-doubt transaction.

Claims (77)

1. A method for supporting recovery of transactions on a plurality of resource managers, the method comprising:

designating a resource manager in the plurality of resource managers to be a determiner resource manager;

providing a transaction manager configured to process said transactions by,

sending a prepare message to the determiner resource manager only after receiving acknowledgement of successful prepare actions on all other resource managers in the plurality of resource managers for each said transaction, and

sending a commit message to the determiner resource manager only after receiving acknowledgement of successful commit actions on all other resource managers in the plurality of resource managers for each said transaction; and

in the event of failure,

retrieving a list of in-doubt transactions from each resource manager in the plurality of resource managers including the determiner resource manager, and

recovering all in-doubt transactions without using a transaction log by comparing the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager with the list of in-doubt transactions retrieved from the determiner resource manager.

2. The method of claim 1 , wherein recovering all in-doubt transactions without using a transaction log comprises:

comparing the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager with the list of in-doubt transactions retrieved from the determiner resource manager; and

rolling back one or more in-doubt transactions which appear in the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager but do not appear in the list of in-doubt transactions retrieved from the determiner resource manager.

3. The method of claim 1 , wherein recovering all in-doubt transactions without using a transaction log comprises:

comparing the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager with the list of in-doubt transactions retrieved from the determiner resource manager; and

committing one or more in-doubt transactions which appear in the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager and which also appear in the list of in-doubt transactions retrieved from the determiner resource manager.

4. The method of claim 3 , further comprising:

persisting the designation of the determiner resource manager in a configuration for a transactional mid-tier system.

5. The method of claim 1 , wherein recovering all in-doubt transactions without using a transaction log comprises:

comparing the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager with the list of in-doubt transactions retrieved from the determiner resource manager;

committing all in-doubt transactions which appear in the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager and which also appear in the list of in-doubt transactions retrieved from the determiner resource manager; and

rolling back all in-doubt transactions which appear in the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager but do not appear in the list of in-doubt transactions retrieved from the determiner resource manager.

6. The method of claim 1 , further comprising:

allowing at least one resource manager in the plurality of resource managers to be a non-participant of the transactions.

7. The method of claim 1 , further comprising:

committing a transactions which appear in the list of in-doubt transactions retrieved from the determiner resource manager after recovering all other resource managers in the plurality of resource managers.

8. The method of claim 1 , further comprising:

building/rebuilding a global transaction table (GTT) from the list of in-doubt transactions retrieved from the determiner resource manager.

9. The method of claim 1 , further comprising:

passing, to the determiner resource manager, a list of participant resource managers in the plurality of resource managers.

10. The method of claim 9 , further comprising:

configuring the determiner resource manager to wait, before recovering, until the list of participant resource managers are recovered.

11. A non-transitory machine readable storage medium having instructions stored thereon for supporting recovery of transactions on a plurality of resource managers, which instructions, when executed, cause a computer system to perform steps comprising:

designating a resource manager in the plurality of resource managers to be a determiner resource manager;

providing a transaction manager configured to process said transactions by,

sending a prepare message to the determiner resource manager only after receiving acknowledgement of successful prepare actions on all other resource managers in the plurality of resource managers for each said transaction, and

sending a commit message to the determiner resource manager only after receiving acknowledgement of successful commit actions on all other resource managers in the plurality of resource managers for each said transaction; and

in the event of failure,

retrieving a list of in-doubt transactions from each resource manager in the plurality of resource managers including the determiner resource manager, and

recovering all in-doubt transactions without using a transaction log by comparing the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager with the list of in-doubt transactions retrieved from the determiner resource manager.

12. The non-transitory machine readable storage medium of claim 11 , wherein recovering all in-doubt transactions without using a transaction log comprises:

comparing the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager with the list of in-doubt transactions retrieved from the determiner resource manager; and

rolling back one or more in-doubt transactions which appear in the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager but do not appear in the list of in-doubt transactions retrieved from the determiner resource manager.

13. The non-transitory machine readable storage medium of claim 11 , wherein recovering all in-doubt transactions without using a transaction log comprises:

comparing the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager with the list of in-doubt transactions retrieved from the determiner resource manager; and

committing one or more in-doubt transactions which appear in the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager and which also appear in the list of in-doubt transactions retrieved from the determiner resource manager.

14. The non-transitory machine readable storage medium of claim 11 , wherein recovering all in-doubt transactions without using a transaction log comprises:

comparing the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager with the list of in-doubt transactions retrieved from the determiner resource manager;

committing all in-doubt transactions which appear in the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager and which also appear in the list of in-doubt transactions retrieved from the determiner resource manager; and

rolling back all in-doubt transactions which appear in the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager but do not appear in the list of in-doubt transactions retrieved from the determiner resource manager.

15. The non-transitory machine readable storage medium of claim 11 , wherein said steps further comprise:

committing transactions which appear in the list of in-doubt transactions retrieved from the determiner resource manager after recovering all other resource managers in the plurality of resource managers.

16. The non-transitory machine readable storage medium of claim 11 , wherein said steps further comprise:

passing, to the determiner resource manager, a list of participant resource managers in the plurality of resource managers; and

configuring the determiner resource manager to wait, before recovering, until the list of participant resource managers are recovered.

17. A system for supporting recovery of transactions, the system comprising:

a computer system comprising a microprocessor and a memory

a transaction manager operating on said computer system;

a plurality of resource managers;

wherein said transaction manager is configured to process said transactions by,

sending a prepare message to the determiner resource manager only after receiving acknowledgement of successful prepare actions on all other resource managers in the plurality of resource managers for each said transaction, and

sending a commit message to the determiner resource manager only after receiving acknowledgement of successful commit actions on all other resource managers in the plurality of resource managers for each said transaction; and

in the event of failure, the system is configured to

retrieve a list of in-doubt transactions from each resource manager in the plurality of resource managers including the determiner resource manager, and

recover all in-doubt transactions without using a transaction log by comparing the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager with the list of in-doubt transactions retrieved from the determiner resource manager.

18. The system of claim 17 wherein, in the event of a failure the system is configured to recover all in-doubt transactions without using a transaction log by:

comparing the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager with the list of in-doubt transactions retrieved from the determiner resource manager; and

rolling back one or more in-doubt transactions which appear in the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager but do not appear in the list of in-doubt transactions retrieved from the determiner resource manager.

19. The system of claim 17 wherein, in the event of a failure the system is configured to recover all in-doubt transactions without using a transaction log by:

comparing the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager with the list of in-doubt transactions retrieved from the determiner resource manager; and

committing one or more in-doubt transactions which appear in the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager and which also appear in the list of in-doubt transactions retrieved from the determiner resource manager.

20. The system of claim 17 wherein, in the event of a failure the system is configured to recover all in-doubt transactions without using a transaction log by:

comparing the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager with the list of in-doubt transactions retrieved from the determiner resource manager;

committing all in-doubt transactions which appear in the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager and which also appear in the list of in-doubt transactions retrieved from the determiner resource manager; and

rolling back all in-doubt transactions which appear in the list of in-doubt transactions retrieved from each resource manager other than the determiner resource manager but do not appear in the list of in-doubt transactions retrieved from the determiner resource manager.

21. The system of claim 17 wherein, in the event of a failure the system is configured to commit transactions which appear in the list of in-doubt transactions retrieved from the determiner resource manager after recovering all other resource managers in the plurality of resource managers.

22. The system of claim 17 wherein:

the determiner resource manager receives a list of participant resource managers; and

the determiner resource manager is configured to wait, before recovering, until the list of participant resource managers are recovered.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 20, 2013
From: PARKINSON, PAUL
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 031638/0327 →
Continuity (3)
Provisional Application 61612144 · Mar 16, 2012
Provisional Application 61774356 · Mar 7, 2013
Related Publication 20130246845A1 · Sep 19, 2013