IP Library Granted Patent US 10,169,439
Granted Patent B2
US 10,169,439 · App. 14/871,717 · Granted Jan 1, 2019

Multi-source asynchronous table replication

Inventors: Juchang Lee (Seoul, KR); Chang Gyoo Park (Seoul, KR); Hyoung Jun Na (Seoul, KR)
Assignee: SAP SE
G06F17/30578G06F17/30362G06F17/30377G06F17/30545G06F17/30598G06F17/30864G06F11/1451
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 10,169,439
App. No.
14/871,717
Granted
Jan 1, 2019
Kind
B2
Abstract

Technologies are described for performing replication within a database environment. Where database operations are carried out at multiple source nodes, the operations can be ordered by the source node on which they were executable prior to being replayed at a replica node. In addition, the operations can be precommitted, so that the operations can be reviewed by a replayer at the replica node before the transaction containing the operations has been fully committed.

Claims (48)

1. A method, implemented at least in part by a first source node comprising a processing unit and memory, for facilitating asynchronous replication within a database environment using data manipulation language (DML) statements, the method comprising:

receiving a multi-node source transaction, the multi-node source transaction comprising one or more first source node operations executable at the first source node, including at least a first DML statement, and one or more second source node operations executable at a second source node, including at least a second DML statement

executing the at least the first DML statement at the first source node;

precommitting the multi-node source transaction, as to the at least the first DML statement, at the first source node;

outputting first replayer statements for a first single-node replayer transaction that corresponds to the one or more first source node operations, including the at least the first DML statement, and a first precommitting indicator of the precommitting the first DML statement;

executing the at least the second DML statement at the second source node;

precommitting the multi-node source transaction, as to the at least the second DML statement, at the second source node;

outputting second replayer statements for a second single-node replayer transaction that corresponds to the one or more second source node operations, including the at least the second DML statement, and a second precommitting indicator of the precommitting the second DML statement; and

sending the first replayer statements and the second replayer statements to at least a first replica node.

2. The method of claim 1 , further comprising, at the first source node, ordering the statements for the single-node replayer transaction according to an order in which the at least the first DML statement was executable.

3. The method of claim 1 , further comprising outputting a transaction commit statement for the multi-node source transaction.

4. The method of claim 1 , further comprising, at the first source node, receiving a precommit notification from the second source node corresponding to the at least a second DML statement.

5. The method of claim 4 , further comprising, at the first source node, committing the multi-node source transaction and outputting a write log entry to a replica node, the write log entry comprising a transaction commit entry corresponding to the committing of the multi-node source transaction.

6. A server comprising a processing unit and memory, wherein the memory stores instructions that, when executed by the processing unit, cause the server to perform a method to operate a replica node of a database system, wherein the method facilitates asynchronous replication within a database environment using data manipulation (DML) statements, the method comprising:

receiving from a source node and buffering, as entries in a write log, at least a first DML statement for a first single-node replayer transaction associated with a first node participating in a first multi-node source transaction, wherein a single-node replayer transaction corresponds to operations occurring at a particular node of a multi-node source transaction that includes operations occurring at each of a plurality of nodes;

receiving from the source node and buffering, as entries in the write log, a precommit operation for the first multi-node source transaction and the first node;

receiving and buffering, as entries in the write log, at least a second DML statement for a second single-node replayer transaction that corresponds to a second part of the first multi-node source transaction associated with a second node participating in the first multi-node source transaction;

receiving and buffering, as entries in the write log, a precommit operation for the first multi-node source transaction and the second node; and

replaying the buffered entries in the write log on the replica node, wherein replaying the buffered precommit operations facilitates replay of operations for at least a second transaction by avoiding deadlocks.

7. The server of claim 6 , wherein replaying the buffered entries includes replaying the DML statements and replaying the at least the first and the at least the second precommit statements.

8. The server of claim 6 , wherein the write log further comprises a precommit log entry for each of the DML statements, respectively, in the multi-node source transaction.

9. The server of claim 6 , wherein the write log includes a DML replayer log and a transaction log, the method further comprising:

receiving and buffering, as an entry in the transaction log, a transaction commit statement for the multi-node source transaction.

10. The server of claim 6 , wherein replaying the buffered entries in the write log on the replica node comprises:

replaying write entries and precommit entries with a parallelized DML replayer to control access to changes by the DML replayer; and

replaying transaction commit entries with a transaction log replayer to control access to the changes by external readers.

11. The server of claim 6 , wherein the method further comprises ordering the DML statements by source node on which the DML statements were executable such that relative ordering of DML statements from a given source node is maintained but ordering of DML statements between different source nodes need not be maintained.

12. The server of claim 6 , wherein changes are visible to a DML replayer at the replica node but not an external reader after buffered entries are replayed for DML statements and precommit statements that indicate the changes, and wherein the changes are visible to the external reader after the multi-node source transaction is committed.

13. The server of claim 6 , wherein the write log entry for the at least a first DML statement is received from a first source node and the write log entry for the at least a second DML statement is received from a second source node.

14. The server of claim 13 , the method further comprising receiving a write log entry from the first source node corresponding to the committing of the multi-node source transaction.

15. The server of claim 14 , wherein the replica node does not receive a write log entry from the second source node corresponding to the committing of the multi-node source transaction.

16. The server of claim 6 , wherein the replica node is a first replica node of a plurality of replica nodes and the DML statements for the first single node replayer transaction and the DML statements for the second single-node replayer transaction are executable at the first replica node and a second replica node of the plurality of replica nodes.

17. The server of claim 16 , wherein the method further comprises designating the first replica node as transaction coordinator.

18. The server of claim 17 , wherein the method further comprises:

receiving a precommit notification for the first single-node replayer transaction from the second replica node;

precommitting the first single-node replayer transaction;

receiving a first precommit notification for the second single-node replayer transaction from the second replica node;

precommitting the second single-node replayer transaction;

committing the multi-node source transaction; and

transmitting a second postcommit notification to the second replica node.

19. The server of claim 6 , wherein the write log comprises one or more DML statements, precommit operations, or a combination thereof for a second transaction and located in the write log between the entry for the at least a first DML statement and the entry for the at least a second DML statement.

20. One or more non-transitory, tangible computer-readable storage media storing computer-executable instructions for causing a server programmed thereby to perform a method for facilitating asynchronous replication within a database environment using data manipulation language (DML) statements and implementing a replica node of a database system, the method comprising:

receiving from a first source node and buffering, as entries in a write log, at least a first DML statement for a first single-node transaction executed at a first node that corresponds to a first part of a multi-node source transaction;

receiving from the first source node and buffering, as entries in the write log, a precommit operation for the first part of the multi-node source transaction and the first node;

receiving and buffering, as entries in the write log, at least a second DML statement for a second single-node transaction executed at the second node that corresponds to a second part of the multi-node source transaction;

receiving and buffering, as entries in the write log, a precommit operation for the second part of the multi-node source transaction and the second node;

replaying the buffered entries in the write log on the replica node; and

replaying a transaction commit write log entry corresponding to the multi-node source transaction on determining that the at least a first and the at least a second DML statements have been replayed, wherein replaying the buffered precommit operations facilitates replay of operations for at least a second transaction by avoiding deadlocks.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 1, 2015
From: LEE, JUCHANG; PARK, CHANG GYOO; NA, HYOUNG JUN
To: SAP SE
Reel/Frame 036708/0006 →
Continuity (4)
Provisional Application 62182409 · Jun 19, 2015
Provisional Application 62182405 · Jun 19, 2015
Provisional Application 62182408 · Jun 19, 2015
Related Publication 20160371358A1 · Dec 22, 2016