IP Library Granted Patent US 11,550,818
Granted Patent B2
US 11,550,818 · App. 17/198,322 · Granted Jan 10, 2023

Retaining committed transactions during database cluster replication

Inventors: Xiao Yi Tian (Beijing, CN); Guoxiang Zhang (Beijing, CN); Xian Wei Zhang (Beijing, CN); XiangXing Shi (Beijing, CN); Peng Hui Jiang (Beijing, CN); Zhang Li (Hai Dian district, CN)
Assignee: International Business Machines Corporation
G06F16/273G06F11/1425G06F11/3414G06F16/2379G06F16/285
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 11,550,818
App. No.
17/198,322
Granted
Jan 10, 2023
Kind
B2
Abstract

In an approach to improve asynchronous replication in database clusters embodiments retain committed transactions during database cluster replication. Embodiments build and run asynchronous replication logic using database nodes running as one or more standalone nodes, wherein the asynchronous replication logic is responsible for data replication from a primary database node to one or more secondary database nodes. Embodiments register a replication reader to a sender node to replicate journal logs and replay the journal logs on the one or more secondary database nodes. Further, embodiments monitor replication lag metrics from the sender node and notify a replication source and a replication target of a generated replication plan, wherein the cluster controller instructs the replication source and the replication target to be ready to initiate the replication plan. Additionally, embodiments adjust a replication plan to allow the asynchronous replication logic to catch up and complete uncommitted transactions.

Claims (57)

1. A computer-implemented method for retaining committed transactions during database cluster replication, the computer-implemented method comprising:

building and running asynchronous replication logic using database nodes running as one or more standalone nodes, wherein the asynchronous replication logic is responsible for data replication from a primary database node to one or more secondary database nodes;

registering a replication reader to a sender node to replicate journal logs and replay the journal logs on the one or more secondary database nodes;

monitoring, by a cluster controller, replication lag metrics from the sender node;

notifying, by the cluster controller, a replication source and a replication target of a generated replication plan, wherein the cluster controller instructs the replication source and the replication target to be ready to initiate the replication plan; and

adjusting, by the cluster controller, a replication plan to allow the asynchronous replication logic to catch up and complete uncommitted transactions.

2. The method of claim 1 , further comprising:

reading, by the cluster controller, status and metrics of nodes from a cluster and states metrics database.

3. The method of claim 1 , further comprising:

determining the replication source or target source is undergoing an issue; and

considering a replication reader as a single process running in secondary/standby node.

4. The method of claim 1 , wherein the standalone nodes in the database cluster have their own status and register, and report status to the cluster controller, and wherein the one or more standalone nodes assist primary database node election, and wherein the one or more standalone nodes in the cluster analyzes replication lags on a primary node journal log, reports metrics to the cluster controller, and are deployed by a collector with a deployment profile.

5. The method of claim 1 , further comprising:

generating, by a controller, the replication plan based on the database nodes;

notifying, by the controller, the replication source and the replication target of the generated replication plan, wherein the controller instructs the replication source and the replication target to be ready to initiate the replication plan.

6. The method of claim 5 , further comprising:

determining the replication source or target source is undergoing an issue.

7. The method of claim 1 , wherein the cluster controller is responsible to bring up the sender nodes according to a deployment profile, and attach to a re-primary database node, wherein the cluster controller scales up or down a number of sender nodes with a policy on a replication lag to achieve self-adaptation with a replication workload.

8. A computer system for retaining committed transactions during database cluster replication, the computer system comprising:

one or more computer processors;

one or more computer readable storage devices;

program instructions stored on the one or more computer readable storage devices for execution by at least one of the one or more computer processors, the stored program instructions comprising:

program instructions to build and run asynchronous replication logic using database nodes running as one or more standalone nodes, wherein the asynchronous replication logic is responsible for data replication from a primary database node to one or more secondary database nodes;

program instructions register a replication reader to a sender node to replicate journal logs and replay the journal logs on the one or more secondary database nodes;

program instructions monitor, by a cluster controller, replication lag metrics from the sender node;

program instructions notify, by the cluster controller, a replication source and a replication target of a generated replication plan, wherein the cluster controller instructs the replication source and the replication target to be ready to initiate the replication plan; and

program instructions adjust, by the cluster controller, a replication plan to allow the asynchronous replication logic to catch up and complete uncommitted transactions.

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

program instructions to read, by the cluster controller, status and metrics of nodes from a cluster and states metrics database.

10. The computer system of claim 8 , further comprising:

program instructions to determine the replication source or target source is undergoing an issue; and

program instructions to consider a replication reader as a single process running in secondary/standby node.

11. The computer system of claim 8 , wherein the standalone nodes in the database cluster have their own status and register, and report status to the cluster controller, and wherein the one or more standalone nodes assist primary database node election, and wherein the one or more standalone nodes in the cluster analyzes replication lags on a primary node journal log, reports metrics to the cluster controller, and are deployed by a collector with a deployment profile.

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

program instructions to generate, by a controller, the replication plan based on the database nodes;

program instructions to notify, by the controller, the replication source and the replication target of the generated replication plan, wherein the controller instructs the replication source and the replication target to be ready to initiate the replication plan.

13. The computer system of claim 12 , further comprising:

program instructions to determine the replication source or target source is undergoing an issue.

14. The computer system of claim 8 , wherein the cluster controller is responsible to bring up the sender nodes according to a deployment profile, and attach to a re-primary database node, wherein the cluster controller scales up or down a number of sender nodes with a policy on a replication lag to achieve self-adaptation with a replication workload.

15. A computer program product for retaining committed transactions during database cluster replication, the computer program product comprising:

one or more computer readable storage devices and program instructions stored on the one or more computer readable storage devices, the stored program instructions comprising:

program instructions to build and run asynchronous replication logic using database nodes running as one or more standalone nodes, wherein the asynchronous replication logic is responsible for data replication from a primary database node to one or more secondary database nodes;

program instructions register a replication reader to a sender node to replicate journal logs and replay the journal logs on the one or more secondary database nodes;

program instructions monitor, by a cluster controller, replication lag metrics from the sender node;

program instructions notify, by the cluster controller, a replication source and a replication target of a generated replication plan, wherein the cluster controller instructs the replication source and the replication target to be ready to initiate the replication plan; and

program instructions adjust, by the cluster controller, a replication plan to allow the asynchronous replication logic to catch up and complete uncommitted transactions.

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

program instructions to read, by the cluster controller, status and metrics of nodes from a cluster and states metrics database.

17. The computer program product of claim 15 , further comprising:

program instructions to determine the replication source or target source is undergoing an issue; and

program instructions to consider a replication reader as a single process running in secondary/standby node.

18. The computer program product of claim 15 , wherein the standalone nodes in the database cluster have their own status and register, and report status to the cluster controller, and wherein the one or more standalone nodes assist primary database node election, and wherein the one or more standalone nodes in the cluster analyzes replication lags on a primary node journal log, reports metrics to the cluster controller, and are deployed by a collector with a deployment profile.

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

program instructions to generate, by a controller, the replication plan based on the database nodes;

program instructions to notify, by the controller, the replication source and the replication target of the generated replication plan, wherein the controller instructs the replication source and the replication target to be ready to initiate the replication plan; and

program instructions to determine the replication source or target source is undergoing an issue.

20. The computer program product of claim 15 , wherein the cluster controller is responsible to bring up the sender nodes according to a deployment profile, and attach to a re-primary database node, wherein the cluster controller scales up or down a number of sender nodes with a policy on a replication lag to achieve self-adaptation with a replication workload.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 11, 2021
From: TIAN, XIAO YI; ZHANG, GUOXIANG; ZHANG, XIAN WEI; SHI, XIANGXING; JIANG, PENG HUI; LI, ZHANG
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 055558/0418 →
Continuity (1)
Related Publication 20220292112A1 · Sep 15, 2022
Cited By (1)
US 12,399,908