Method for maximizing throughput and minimizing transactions response times on the primary system in the presence of a zero data loss standby replica
First Claim
1. A method for synchronizing a commit of a same transaction at both a primary database server and a secondary database server that replicates transactions made at the primary database server, comprising steps of:
- via a forward channel to said secondary database server, said primary database server transmitting, to said secondary database server for replication, log records recording changes made by said transactions;
said primary database server persistently storing in a first persistent log a commit record recording a commitment of a transaction of said transactions;
via said forward channel to said secondary database server, a first process executing at said primary database server transmitting said commit record to said secondary database server;
via a back channel that is different than said forward channel, a second process that is different than the first process and that is executing at said primary database server receiving, from the secondary database server, an indication that said secondary database server has persistently stored said commit record in a second persistent log;
in response to (1) receiving said indication that said secondary database server has persistently stored said commit record in said second persistent log and (2) said primary database server persistently storing said commit record in the first persistent log, said primary database server determining that said transaction has been committed;
wherein the steps are performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and system is provided for reducing delay to applications connected to a database server that guarantees no data loss during failure or disaster. After storing a log record persistently in a local primary log, the log writer returns control to the application which continues running concurrently with the database server sending the session'"'"'s log records to a standby database. A separate back channel is used by the standby to communicate, out-of-band to the primary, the location of the last log record stored persistently to the standby log. An application waiting for a transaction to commit may wait until the transaction'"'"'s commit record has been persisted. Also described is a technique for reducing application delay when there is contention between nodes of a multi-node cluster for updating the same block. The technique provides for an asynchronous ping protocol that guarantees zero data loss during failure or disaster.
-
Citations
24 Claims
-
1. A method for synchronizing a commit of a same transaction at both a primary database server and a secondary database server that replicates transactions made at the primary database server, comprising steps of:
-
via a forward channel to said secondary database server, said primary database server transmitting, to said secondary database server for replication, log records recording changes made by said transactions; said primary database server persistently storing in a first persistent log a commit record recording a commitment of a transaction of said transactions; via said forward channel to said secondary database server, a first process executing at said primary database server transmitting said commit record to said secondary database server; via a back channel that is different than said forward channel, a second process that is different than the first process and that is executing at said primary database server receiving, from the secondary database server, an indication that said secondary database server has persistently stored said commit record in a second persistent log; in response to (1) receiving said indication that said secondary database server has persistently stored said commit record in said second persistent log and (2) said primary database server persistently storing said commit record in the first persistent log, said primary database server determining that said transaction has been committed; wherein the steps are performed by one or more computing devices. - View Dependent Claims (2)
-
-
3. A method for synchronizing a commit of a same transaction at both a primary database server and a secondary database server that replicates transactions made at the primary database server, comprising steps of:
-
after storing log records recording changes made by said transactions persistently to a first persistent log of the primary database server, said primary database server transmitting said log records to said secondary database server for replication; said primary database server transmitting a commit record to said secondary database server; said primary database server receiving data from said secondary database server, the data identifying (a) a certain location, in a second persistent log of the secondary database server, where a last log record has been persistently stored by said secondary database server or (b) the last log record; determining that multiple transactions of said transactions has been committed based at least on the data; wherein the steps are performed by one or more computing devices. - View Dependent Claims (4, 5)
-
-
6. A method for synchronizing updates to a same data block received at a secondary database server from instances of a primary database server running on two distinct nodes comprising:
-
the secondary database server receiving from a first primary database instance one or more first log records recording a change to a particular data block including a synchronizing log record, and storing the one or more first log records to a first persistent log; wherein the synchronizing log record records dependency information representing a dependency of the one or more first log records stored in the first persistent log on a second log record recording a second change stored in a second persistent log; said secondary database server receiving a third log record recording a transaction commit to said particular data block; based at least in part on the dependency information recorded in the synchronizing log record stored in the first persistent log, determining that the dependency has not been met; in response to determining that the dependency has not been met, the secondary database server delaying notification that the transaction commit recorded in the third log record has committed; wherein the steps are performed by one or more computing devices. - View Dependent Claims (7, 8, 9, 10, 11)
-
-
12. A method for synchronizing updates to a same data block made by two instances of a primary database server running on distinct nodes comprising:
-
a first primary database server instance; sending change log records to a secondary database server, the change log records representing changes made by the first primary database server instance to a particular data block; wherein the secondary database server stores the changes persistently to a first persistent log; sending, to a second primary database server instance, the particular data block and a synchronizing log record; wherein the synchronizing log record contains at least information that is used to identify the first persistent log; in response to receiving the particular data block and the synchronizing log record, the second primary database server instance sending the synchronizing log record to the secondary database server to be stored persistently in a second persistent log; sending, to the secondary database server, change records that record changes made to the particular data block by the second primary database server instance; wherein the steps are performed by one or more computing devices.
-
-
13. One or more non-transitory storage media storing instructions for synchronizing a commit of a same transaction at both a primary database server and a secondary database server that replicates transactions made at the primary database server, wherein the instructions, when executed by one or more processors, cause:
-
via a forward channel to said secondary database server, said primary database server transmitting, to said secondary database server for replication, log records recording changes made by said transactions; said primary database server persistently storing in a first persistent log a commit record recording a commitment of a transaction of said transactions; via said forward channel to said secondary database server, a first process executing at said primary database server transmitting said commit record to said secondary database server; via a back channel that is different than said forward channel, a second process that is different than the first process and that is executing at said primary database server receiving, from the secondary database server, an indication that said secondary database server has persistently stored said commit record in a second persistent log; in response to (1) receiving said indication that said secondary database server has persistently stored said commit record in said second persistent log and (2) said primary database server persistently storing said commit record in the first persistent log, said primary database server determining that said transaction has been committed. - View Dependent Claims (14)
-
-
15. One or more non-transitory storage media storing instructions for synchronizing a commit of a same transaction at both a primary database server and a secondary database server that replicates transactions made at the primary database server, wherein the instructions, when executed by one or more processors, cause:
-
after storing log records recording changes made by said transactions persistently to a first persistent log of the primary database server, said primary database server transmitting said log records to said secondary database server for replication; said primary database server transmitting a commit record to said secondary database server; said primary database server receiving data from said secondary database server, the data identifying (a) a certain location, in a second persistent log of the secondary database server, where a last log record has been persistently stored by said secondary database server or (b) the last log record; determining that multiple transactions of said transactions has been committed based at least on the data. - View Dependent Claims (16, 17)
-
-
18. One or more non-transitory storage media storing instructions for synchronizing updates to a same data block received at a secondary database server from instances of a primary database server running on two distinct nodes, wherein the instructions, when executed by the one or more processors, cause:
-
the secondary database server receiving from a first primary database instance one or more first log records recording a change to a particular data block including a synchronizing log record, and storing the one or more first log records to a first persistent log; wherein the synchronizing log record records dependency information representing a dependency of the one or more first log records stored in the first persistent log on a second log record recording a second change stored in a second persistent log; said secondary database server receiving a third log record recording a transaction commit to said particular data block; based at least in part on the dependency information recorded in the synchronizing log record stored in the first persistent log, determining that the dependency has not been met; in response to determining that the dependency has not been met, the secondary database server delaying notification that the transaction commit recorded in the third log record has committed. - View Dependent Claims (19, 20, 21, 22, 23)
-
-
24. One or more non-transitory storage media storing instructions for synchronizing updates to a same data block made by two instances of a primary database server running on distinct nodes, wherein the instructions, when executed by one or more processors, cause:
-
a first primary database server instance; sending change log records to a secondary database server, the change log records representing changes made by the first primary database server instance to a particular data block; wherein the secondary database server stores the changes persistently to a first persistent log; sending, to a second primary database server instance, the particular data block and a synchronizing log record; wherein the synchronizing log record contains at least information that is used to identify the first persistent log; in response to receiving the particular data block and the synchronizing log record, the second primary database server instance sending the synchronizing log record to the secondary database server to be stored persistently in a second persistent log; sending, to the secondary database server, change records that record changes made to the particular data block by the second primary database server instance.
-
Specification