IP Library › Granted Patent US 9,959,178
Granted Patent B2
US 9,959,178 · App. 14/657,948 · Granted May 1, 2018

Transactional and parallel log replay for asynchronous table replication

Inventors: Juchang Lee (Seoul, KR); Chang-Gyoo Park (Seoul, KR); Hyoung-Jun Na (Seoul, KR); Kyu-Hwan Kim (Anyang, KR)
Assignee: SAP SE
G06F11/1469G06F11/1464G06F17/30368G06F17/30371G06F17/30377G06F17/30575G06F17/30578G06F17/30876G06F2201/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,959,178
App. No.
14/657,948
Granted
May 1, 2018
Kind
B2
Abstract

Disclosed herein are system, method, and computer program product embodiments for replicating a database transaction to a replica table. An embodiment operates by receiving a replication log entry and an associated transaction commit log entry for a database transaction to be replayed to a row at a replica table. A row-ID value of the replication log entry is compared to a row-ID column value of the row at the replica table. The replication log entry is then replayed at a parallel log replayer based on the comparison. The database transaction is then committed to the replica table by replaying the associated transaction commit log entry at a transaction log replayer.

Claims (47)

1. A computer implemented method for replicating a database transaction to a replica table, comprising:

receiving, by at least one processor, a replication log entry and an associated transaction commit log entry, the replication log entry and the associated transaction commit log entry together representing a database transaction to be replayed to a row at a replica table, the row at the replica table having a row-ID value and the replication log entry having a row-ID value that identifies a data state of the row at the replica table;

dispatching, by the at least one processor, the replication log entry to a parallel log replayer and the associated transaction commit log entry to a transaction commit log replayer;

comparing, by the at least one processor, the row-ID value of the replication log entry to the row-ID value of the row at the replica table;

replaying, by the at least one processor, the replication log entry at the parallel log replayer based on the comparison; and

committing, by the at least one processor, the database transaction to the replica table by replaying the associated transaction commit log entry at the transaction log replayer;

wherein at least one of the receiving, dispatching, comparing, replaying, and committing are performed by one or more computers.

2. The method of claim 1 , wherein the database transaction to be replayed to the row at the replica table is an update row operation or delete row operation.

3. The method of claim 1 , wherein the parallel log replayer simultaneously replays a plurality of replication log entries at the replica table.

4. The method of claim 1 , wherein the transaction log replayer serially replays a plurality of transaction commit log entries at the replica table.

5. The method of claim 1 , the comparing further comprising:

comparing whether the row-ID value of the row at the replica table has the immediate preceding value of the row-ID value of the replication log entry.

6. The method of claim 1 , the replaying the replication log entry at the parallel log replayer further comprising:

updating the row-ID value of the row at the replica table with the row-ID value of the replication log entry.

7. The method of claim 1 , the replaying the replication log entry at the parallel log replayer further comprising:

replaying the replication log entry asynchronously at the parallel log replayer based on the comparison.

8. The method of claim 1 , wherein a source node generates the replication log entry for a changed row of a source table at the source node, and wherein the source node creates the transaction commit log entry in response to committing the database transaction to the source table.

9. The method of claim 1 , wherein the row-ID value of the row at the replica table comprises a monotonically increasing integer.

10. The method of claim 1 , wherein the row-ID value of the row at the replica table is associated with a single database transaction.

11. A system, comprising:

a memory; and

at least one processor coupled to the memory and configured to:

receive a replication log entry and an associated transaction commit log entry, the replication log entry and the associated transaction commit log entry together representing a database transaction to be replayed to a row at a replica table, the row at the replica table having a row-ID value and the replication log entry having a row-ID value that identifies a data state of the row at the replica table;

dispatch the replication log entry to a parallel log replayer and the associated transaction commit log entry to a transaction commit log replayer;

compare the row-ID value of the replication log entry to the row-ID value of the row at the replica table;

replay the replication log entry at the parallel log replayer based on the comparison; and

commit the database transaction to the replica table by replaying the associated transaction commit log entry at the transaction log replayer.

12. The system of claim 11 , wherein the database transaction to be replayed to the row at the replica table is an update row operation or delete row operation.

13. The system of claim 11 , wherein the parallel log replayer simultaneously replays a plurality of replication log entries at the replica table.

14. The system of claim 11 , wherein the transaction log replayer serially replays a plurality of transaction commit log entries at the replica table.

15. The system of claim 11 , the at least one processor further configured to:

compare whether the row-ID value of the row at the replica table has the immediate preceding value of the row-ID value of the replication log entry.

16. The system of claim 11 , the at least one processor further configured to:

update the row-ID value of the row at the replica table with the row-ID value of the replication log entry.

17. A tangible computer-readable device having instructions stored thereon that, when executed by at least one computing device, causes the at least one computing device to perform operations comprising:

receiving a replication log entry and an associated transaction commit log entry, the replication log entry and the associated transaction commit log entry together representing a database transaction to be replayed to a row at a replica table, the row at the replica table having a row-ID value and the replication log entry having a row-ID value that identifies a data state of the row at the replica table;

dispatching the replication log entry to a parallel log replayer and the associated transaction commit log entry to a transaction commit log replayer;

comparing the row-ID value of the replication log entry to the row-ID value of the row at the replica table;

replaying the replication log entry at the parallel log replayer based on the comparison; and

committing the database transaction to the replica table by replaying the associated transaction commit log entry at the transaction log replayer.

18. The computer-readable device of claim 17 , wherein the database transaction to be replayed to the row at the replica table is an update row operation or delete row operation.

19. The computer-readable device of claim 17 , wherein the parallel log replayer simultaneously replays a plurality of replication log entries at the replica table.

20. The computer-readable device of claim 17 , wherein the transaction log replayer serially replays a plurality of transaction commit log entries at the replica table.

21. The computer-readable device of claim 17 , the comparing comprising:

comparing whether the row-ID value of the row at the replica table has the immediate preceding value of the row-ID value of the replication log entry.

22. The computer-readable device of claim 17 , the replaying comprising:

updating the row-ID value of the row at the replica table with the row-ID value of the replication log entry.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 18, 2015
From: LEE, JUCHANG; PARK, CHANG-GYOO; NA, HYOUNG-JUN; KIM, KYU-HWAN
To: SAP SE
Reel/Frame 035191/0409 →
Continuity (2)
Provisional Application 62084065 · Nov 25, 2014
Related Publication 20160147859A1 · May 26, 2016