IP Library Granted Patent US 9,424,145
Granted Patent B2
US 9,424,145 · App. 14/315,138 · Granted Aug 23, 2016

Ensuring the same completion status for transactions after recovery in a synchronous replication environment

Inventors: Heping Shang (Walnut Creek, CA); Ming-Chen Lo (Fremont, CA); Fei Zhou (Northfield, IL); Tom Campbell (Lakewood, CO); Frank de Lange (Woerden, NL); Guo Gang Ye (Shanghai, CN); Xia-ge Dai (Shanghai, CN)
Assignee: Sybase, Inc.
G06F11/1658G06F11/1474G06F11/2094G06F2201/80
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,424,145
App. No.
14/315,138
Granted
Aug 23, 2016
Kind
B2
Abstract

Disclosed in some examples is a method, the method including detecting that an RDMS is recovering from a failure; sending a request for a last committed transaction on a replication component to the replication component; receiving, from the replication component, the last committed transaction which identifies a transaction that was the last committed transaction at a replication component at a time of RDMS failure; determining that a transaction log on the RDMS includes a transaction that had not yet been replicated at the time of RDMS failure which was committed on the transaction log subsequent to the last committed transaction received from the replication component; and based on that determination rolling back the transaction that had not yet been replicated at the time of RDMS failure.

Claims (65)

1. A method performed by a Relational Database Management System (RDMS), the method comprising:

detecting that the RDMS is recovering from a failure;

receiving, over the network, a request from a replication component to obtain a last committed transaction of a transaction log of the RDMS;

responsive to receiving the request, sending the last committed transaction of the transaction log of the RDMS to the replication component;

receiving, from the replication component, a last committed transaction of the replication component, the last committed transaction of the replication component identifying a transaction that was the last committed transaction at the replication component at a time of RDMS failure;

determining, using one or more processors, that a transaction log on the RDMS includes a transaction that had not yet been replicated at the time of RDMS failure, the transaction that had not yet been replicated at the time of RDMS failure being committed on the transaction log subsequent to the last committed transaction of the replication component received from the replication component; and

based on the determining that the transaction log includes the transaction that had not yet been replicated at the time of RDMS failure, rolling back the transaction that had not yet been replicated at the time of RDMS failure.

2. The method of claim 1 , comprising:

receiving, from the replication component, a transaction that was committed on the replication component but was not committed on the transaction log prior to the time of RDMS failure; and

writing the transaction to the transaction log.

3. The method of claim 1 , wherein rolling back the transaction that had not yet been replicated at the time of RDMS failure comprises:

inserting at least one log record into the transaction log to reverse the work of the transaction that had not yet been replicated at the time of failure.

4. A Relational Database Management System (RDMS) comprising:

a processor configured to include:

a replication agent module configured to:

detect that the RDMS is recovering from a failure;

receive, over the network, a request from a replication component to obtain a last committed transaction of a transaction log of the RDMS;

responsive to receiving the request, send the last committed transaction of the transaction log of the RDMS to the replication component:

receive, from the replication component, a last committed transaction on the replication component, the last committed transaction the replication component identifying a transaction that was the last committed transaction at the replication component at a time of RDMS failure;

determine, using one or more processors, that the RDMS includes a transaction that had not yet been replicated at the time of RDMS failure, the transaction that had not yet been replicated at the time of RDMS failure being committed on the RDMS subsequent to the last committed transaction on the replication component received from the replication component; and

cause the transaction that had not yet been replicated at the time of RDMS failure to be rolled back based on the determining that the transaction log includes the transaction that had not yet been replicated at the time of RDMS failure.

5. The RDMS of claim 4 , wherein the replication agent module is configured to:

receive, from the replication component, a transaction that was committed on the replication component but was not committed on the RDMS prior to the time of RDMS failure; and

cause the transaction to be committed on the RDMS.

6. The RDMS of claim 4 , wherein the RDMS is configured to transition to a standby mode and wherein the replication agent module is configured to receive, from the replication component, a transaction committed by a newly active RDMS.

7. A machine-readable medium that stores instructions, which when performed by a machine, causes the machine to perform the operations comprising:

receiving, over the network, a request from a replication component to obtain a last committed transaction of a transaction log of a Relational Database Management System (RDMS);

responsive to receiving the request, sending the last committed transaction of the transaction log of the RDMS to the replication component;

receiving, from the replication component, a last committed transaction of the replication component, the last committed transaction identifying a transaction that was the last committed transaction at the replication component at a time of RDMS failure;

determining, using one or more processors, that a transaction log on the RDMS includes a transaction that had not yet been replicated at the time of RDMS failure, the transaction that had not yet been replicated at the time of RDMS failure being committed on the transaction log subsequent to the last committed transaction of the replication component received from the replication component; and

based on the determining that the transaction log includes the transaction that had not yet been replicated at the time of RDMS failure, rolling back the transaction that had not yet been replicated at the time of RDMS failure.

8. The machine-readable medium of claim 7 , wherein the operations comprise:

receiving from the replication component, a transaction that was committed on the replication component but was not committed on the transaction log prior to the time of RDMS failure; and

writing the transaction to the transaction log.

9. A method performed by a replication component, the method comprising:

using one or more computer processors configured to perform the operations of:

sending a request for a last committed transaction to a Relational Database Management System (RDMS), the last committed transaction being a last transaction that was committed on a transaction log of the RDMS prior to a failure of the RDMS;

receiving the last committed transaction from the RDMS;

receiving a request from the RDMS for a last committed transaction on the transaction log of the replication component at the time of failure of the RDMS;

sending the last committed transaction on the transaction log of the replication component at the time of failure of the RDMS to the RDMS;

determining that an unconfirmed transaction stored in a transaction log of the replication component is subsequent to the last committed transaction from the RDMS; and

sending the unconfirmed transaction to the RDMS.

10. The method of claim 9 , comprising:

identifying a new transaction, the new transaction being a transaction that was replicated to the replication component from a second RDMS; and

sending the new transaction to the RDMS.

11. The method of claim 9 , wherein the unconfirmed transaction is a transaction replicated from the RDMS which was not indicated as written to disk by the RDMS at a time it was replicated.

12. A system comprising:

one or more computer processors configured to include:

a replication module configured to:

detect that a Relational Database Management System (RDMS) has come back into service after going out of service;

send a request for a last committed transaction on the RDMS, the last committed transaction being a last transaction that was committed on a transaction log of the RDMS prior to a failure of the RDMS;

receive the last committed transaction from the RDMS;

receive a request from the RDMS for a last committed transaction on a transaction log of the replication module at the time of failure of the RDMS;

send the last committed transaction on the transaction log of the replication module at the time of failure of the RDMS to the RDMS;

determine, using the one or more processors, that an unconfirmed transaction stored in the transaction log of the replication module is subsequent to the last committed transaction from the RDMS; and

send the unconfirmed transaction to the RDMS.

13. The replication component of claim 12 , wherein the unconfirmed transaction is a transaction replicated from the RDMS which was not indicated as written to disk by the RDMS at a time it was replicated.

14. The replication component of claim 12 , wherein the replication module is configured to:

synchronously replicate a database from a second RDMS to the RDMS.

15. A machine-readable medium that stores instructions, which when performed by a machine, causes the machine to perform the operations comprising:

receiving a last committed transaction from a Relational Database Management System (RDMS), the last committed transaction being a last transaction that was committed on the RDMS prior to a failure of the RDMS;

receiving a request from the RDMS for a last committed transaction on a transaction log of a replication component at the time of failure of the RDMS;

sending the last committed transaction on the transaction log of the replication component at the time of failure of the RDMS to the RDMS;

determining that an unconfirmed transaction stored in the transaction log of the replication component is subsequent to the last committed transaction from the RDMS; and

sending the unconfirmed transaction to the RDMS, wherein the RDMS applies the unconfirmed transaction.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 16, 2016
From: SHANG, HEPING; LO, MING-CHEN; ZHOU, FEI; CAMPBELL, TOM; LANGE, FRANK DE; YE, GUO GANG; DAI, XIA-GE
To: SYBASE, INC.
Reel/Frame 039440/0916 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 25, 2014
From: SHANG, HEPING; LO, MING-CHEN; ZHOU, FEI; CAMPBELL, TOM; DE LANGE, FRANK; YE, GUO GANG; DAI, XIA-GE
To: SYBASE, INC.
Reel/Frame 033180/0593 →
Continuity (1)
Related Publication 20150378840A1 · Dec 31, 2015