IP Library › Granted Patent US 12,056,153
Granted Patent B2
US 12,056,153 · App. 17/674,914 · Granted Aug 6, 2024

Replicating large statements with low latency

Inventors: Serge Bourbonnais (Palo Alto, CA); Austin D'Costa (Beaverton, OR); Roger Zheng (Richmond Hill, CA); Christian Zentgraf (Columbus, OH); David Mooney (Toronto, CA)
Assignee: International Business Machines Corporation
G06F16/27G06F16/2379G06F16/24532G06F16/24568
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 12,056,153
App. No.
17/674,914
Granted
Aug 6, 2024
Kind
B2
Abstract

A method, system and computer program product is provided. The method includes identifying a large statement, writing rows that are changed by the large statement into a set of files outside a database management system recovery log, and writing log records for the set of files to the database management system recovery log, such that the log records provide ordering of row changes made by the large statement. The log records include a log sequence number corresponding to a first row changed and a format and encoding used for the row changes. The method further includes streaming, by the one or more processors of the computer system, the set of files out-of-band by a replication capture process to a target database management system.

Claims (62)

1. A computer-implemented method comprising:

identifying, by one or more processors of a source database management computer system at a first site, a large statement when the large statement is a single statement that is larger than a threshold of at least 10 megabytes in size;

writing, by the one or more processors of the source database management computer system at the first site, rows that are changed by the large statement into a set of files outside a database management system recovery log;

writing, by the one or more processors of the source database management computer system at the first site, log records for the set of files to the database management system recovery log, such that the log records provide ordering of row changes made by the large statement, wherein the log records include a log sequence number corresponding to a first row changed and a format and encoding used for the row changes;

streaming, by the one or more processors of the source database management computer system at the first site, the set of files out-of-band by a replication capture process to a target database management system at a second site located a physical disaster recovery distance apart from the first site; and

transmitting, by the one or more processors of the source database management computer system at the first site, transactions through an inline transmission interface, wherein the transactions include coordination messages from the source database management computer system at the first site to the target database management system at a second site, wherein the coordinated messages are associated with the set of files streamed out-of-band for preserving commit order, wherein the coordination messages include log sequence numbers (LSNs) for preserving the commit order.

2. The method of claim 1 , further comprising:

optimizing, by the one or more processors of the source database management computer system at the first site, the set of files in a format that provides for fast replay by an apply process at the target database management system.

3. The method of claim 1 , wherein the identifying further includes:

determining, by the one or more processors of the source database management computer system at the first site, that the large statement is larger than a configurable threshold.

4. The method of claim 1 , wherein the writing the log records further comprises:

generating, by the one or more processors of the source database management computer system at the first site, multiple written log records, each containing a subset of log data pertaining to the large statement.

5. The method of claim 1 , further comprising:

transmitting, by the one or more processors of the source database management computer system at the first site, the large statement to the target database management system at the second site and applying the large statement at the target database management system at the second site in parallel to execution at the source database management computer system at the first site without impacting the parallelism of applying other transactions between the source database management computer system at the first site and the target database management system at the second site; and

achieving a replication latency of less than a few seconds while preserving transaction integrity and ensuring that dependent transactions are applied in the correct order.

6. The method of claim 1 , further comprising:

receiving, by the one or more processors of the source database management computer system at the first site, a notification from the target database management system at the second site via a file transfer control queue when files from the set of files are applied; and

deleting, by the one or more processors of the source database management computer system at the first site, files from the set of files after receiving the notification.

7. The method of claim 1 , further comprising:

separately grouping, by the one or more processors of the source database management computer system at the first site, the written set of files based on the type of operation.

8. A computer system, comprising:

one or more processors of a source database management computer system at a first site;

one or more memory devices coupled to the one or more processors of the source database management computer system at the first site; and

one or more computer readable storage devices coupled to the one or more processors of the source database management computer system at the first site, wherein the one or more storage devices contain program code executable by the one or more processors of the source database management computer system at the first site via the one or more memory devices to implement a method of replication, the method comprising:

identifying, by the one or more processors of the source database management computer system at a first site, a large statement when the large statement is a single statement that is larger than a threshold of at least 10 megabytes in size;

writing, by the one or more processors of the source database management computer system at the first site, rows that are changed by the large statement into a set of files outside a database management system recovery log;

writing, by the one or more processors of the source database management computer system at the first site, log records for the set of files to the database management system recovery log, such that the log records provide ordering of row changes made by the large statement, wherein the log records include a log sequence number corresponding to a first row changed and a format and encoding used for the row changes;

streaming, by the one or more processors of the source database management computer system at the first site, the set of files out-of-band by a replication capture process to a target database management system at a second site located a physical disaster recovery distance apart from the first site;

transmitting, by the one or more processors of the source database management computer system at the first site, transactions through an inline transmission interface, wherein the transactions include coordination messages from the source database management computer system at the first site to the target database management system at a second site, wherein the coordinated messages are associated with the set of files streamed out-of-band for preserving commit order, wherein the coordination messages include log sequence numbers (LSNs) for preserving the commit order.

9. The computer system of claim 8 , the method further comprising:

optimizing, by the one or more processors of the source database management computer system at the first site, the set of files in a format that provides for fast replay by an apply process at the target database management system.

10. The computer system of claim 8 , wherein the identifying further includes:

determining, by the one or more processors of the source database management computer system at the first site, that the large statement is larger than a configurable threshold.

11. The computer system of claim 8 , wherein the writing the log records further comprises:

generating, by the one or more processors of the source database management computer system at the first site, multiple written log records, each containing a subset of log data pertaining to the large statement.

12. The computer system of claim 8 , the method further comprising:

transmitting, by the one or more processors of the source database management computer system at the first site, the large statement to the target database management system at the second site and applying the large statement at the target database management system at the second site in parallel to execution at the source database management computer system at the first site without impacting the parallelism of applying other transactions between the source database management computer system at the first site and the target database management system at the second site; and

achieving a replication latency of less than a few seconds while preserving transaction integrity and ensuring that dependent transactions are applied in the correct order.

13. The computer system of claim 8 , the method further comprising:

receiving, by the one or more processors of the source database management computer system at the first site, a notification from the target database management system at the second site via a file transfer control queue when files from the set of files are applied; and

deleting, by the one or more processors of the source database management computer system at the first site, files from the set of files after receiving the notification.

14. The computer system of claim 8 , the method further comprising:

separately grouping, by the one or more processors of the source database management computer system at the first site, the written set of files based on the type of operation.

15. A computer program product, comprising a non-transitory computer readable hardware storage device storing a computer readable program code, the computer readable program code comprising an algorithm that when executed by one or more processors of a source database management computer system at a first site implements a method of replication, the method comprising:

identifying, by the one or more processors of the source database management computer system at a first site, a large statement when the large statement is a single statement that is larger than a threshold of at least 10 megabytes in size;

writing, by the one or more processors of the source database management computer system at the first site, rows that are changed by the large statement into a set of files outside a database management system recovery log;

writing, by the one or more processors of the source database management computer system at the first site, log records for the set of files to the database management system recovery log, such that the log records provide ordering of row changes made by the large statement, wherein the log records include a log sequence number corresponding to a first row changed and a format and encoding used for the row changes;

streaming, by the one or more processors of the source database management computer system at the first site, the set of files out-of-band by a replication capture process to a target database management system at a second site located a physical disaster recovery distance apart from the first site; and

transmitting, by the one or more processors of the source database management computer system at the first site, transactions through an inline transmission interface, wherein the transactions include coordination messages from the source database management computer system at the first site to the target database management system at a second site, wherein the coordinated messages are associated with the set of files streamed out-of-band for preserving commit order, wherein the coordination messages include log sequence numbers (LSNs) for preserving the commit order.

16. The computer program product of claim 15 , the method further comprising:

optimizing, by the one or more processors of the source database management computer system at the first site, the set of files in a format that provides for fast replay by an apply process at the target database management system.

17. The computer program product of claim 15 , wherein the identifying further includes:

determining, by the one or more processors of the source database management computer system at the first site, that the large statement is larger than a configurable threshold.

18. The computer program product of claim 15 , wherein the writing the log records further comprises:

generating, by the one or more processors of the source database management computer system at the first site, multiple written log records, each containing a subset of log data pertaining to the large statement.

19. The computer program product of claim 15 , the method further comprising:

transmitting, by the one or more processors of the source database management computer system at the first site, the large statement to the target database management system at the second site and applying the large statement at the target database management system at the second site in parallel to execution at the source database management computer system at the first site without impacting the parallelism of applying other transactions between the source database management computer system at the first site and the target database management system at the second site; and

achieving a replication latency of less than a few seconds while preserving transaction integrity and ensuring that dependent transactions are applied in the correct order.

20. The computer program product of claim 15 , the method further comprising:

receiving, by the one or more processors of the source database management computer system at the first site, a notification from the target database management system at the second site via a file transfer control queue when files from the set of files are applied;

deleting, by the one or more processors of the source database management computer system at the first site, files from the set of files after receiving the notification; and

separately grouping, by the one or more processors of the source database management computer system at the first site, the written set of files based on the type of operation.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 18, 2022
From: BOURBONNAIS, SERGE; D'COSTA, AUSTIN; ZHENG, ROGER; ZENTGRAF, CHRISTIAN; MOONEY, DAVID
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 059043/0321 →
Continuity (2)
Continuation 16208538 · Dec 3, 2018
Related Publication 20220171791A1 · Jun 2, 2022