IP Library › Granted Patent US 11,514,020
Granted Patent B2
US 11,514,020 · App. 17/097,026 · Granted Nov 29, 2022

Tracking change data capture log history

Inventors: Florian Hermann Froese (Zurich, CH); Luis Garces Erice (Rueschlikon, CH); Daniel Nikolaus Bauer (Zurich, CH); John G. Rooney (Zurich, CH)
Assignee: International Business Machines Corporation
G06F16/2358G06F16/219G06F16/273
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,514,020
App. No.
17/097,026
Granted
Nov 29, 2022
Kind
B2
Abstract

A method includes obtaining a first snapshot of a source system and deriving a set of key-value pairs reflecting the first snapshot. A mirror operation of the source system is performed to obtain CDC change operations. The method obtains a first CDC log as a first sequence of key-value pairs. A second snapshot of the source system is obtained and a set of key-value pairs is derived, which reflects the second snapshot. The first sequence of key-value pairs is compared with the set of key-value pairs to derive corrective CDC operations, captured as a set of key-value pairs. The corrective CDC operations represent corrections to be performed with respect to the first sequence of key-value pairs. A second CDC log is obtained as a second sequence of key-value pairs. The corrective CDC operations ensure that the second sequence of key-value pairs are coherent with the set of key-value pairs.

Claims (53)

1. A method of tracking change data capture (CDC) log history, the method comprising:

obtaining a first snapshot of a source system and deriving a set S 1 of key-value pairs reflecting the first snapshot;

performing a mirror operation of the source system by replicating operations captured by the first snapshot, wherein the mirror operation yields one or more outcomes in the source system;

obtaining CDC change operations representing changes to be performed with respect to the set S 1 of key-value pairs which reflect the one or more outcomes of the mirror operation, wherein the CDC change operations are captured as a set S M of key-value pairs;

obtaining a first CDC log as a first sequence S A of key-value pairs including the key-value pairs of the set S 1 and the set S M ;

obtaining a second snapshot of the source system and deriving a set S 2 of key-value pairs reflecting the second snapshot;

comparing the first sequence S A of key-value pairs with the set S 2 of key-value pairs to derive corrective CDC operations as a set S 3 of key-value pairs, the corrective CDC operations representing corrections to be performed with respect to the first sequence S A of key-value pairs; and

obtaining a second CDC log as a second sequence S B of key-value pairs including the key-value pairs of the sequence S A and the set S 3 , wherein the corrective CDC operations ensure that the second sequence S B of key-value pairs are, as a whole, coherent with the set 52 of key-value pairs.

2. The method according to claim 1 , wherein

the method further comprises interpreting the second sequence of key-value pairs to modify a current state of a target system to reach a target state coherent with a state of the source system at a time at which the second snapshot is obtained.

3. The method according to claim 1 , wherein

the second sequence S B of key-value pairs is obtained as an ordered sequence, whereby the key-value pairs of the set S 1 precedes the key-value pairs of the set S M , which themselves precedes the key-value pairs of the set S 3 .

4. The method according to claim 1 , wherein

said corrective CDC operations comprises one or more DELETE operations, each captured as a key-value pair.

5. The method according to claim 1 , wherein

said corrective CDC operations comprises one or more INSERT operations, each captured as a key-value pair.

6. The method according to claim 1 , wherein

said corrective CDC operations comprises one or more UPDATE operations, each captured as a key-value pair.

7. The method according to claim 1 , wherein

said corrective CDC operations comprises at least one of each of the following operations: a DELETE operation, an INSERT operation, and an UPDATE operation, each captured as a key-value pair.

8. The method according to claim 1 , wherein

values of all of said key-value pairs correspond to database rows of the source system.

9. The method according to claim 8 , wherein

a given database row that is indexed in the first CDC log is not reflected in the second snapshot, whereby comparing the first sequence S A with the set S 2 causes to derive one of said corrective CDC operations as a DELETE operation for that given database row.

10. The method according to claim 8 , wherein

a given database row that is indexed in the first CDC log is reflected in the second snapshot, albeit with a non-key field being altered, whereby comparing the first sequence S A with the set S 2 causes to derive one of said corrective CDC operations as a corresponding UPDATE operation for that non-key field.

11. The method according to claim 8 , wherein

a given database row that is reflected in the second snapshot is not indexed in the first CDC log, whereby comparing the first sequence S A with the set S 2 causes to derive one of said corrective CDC operations as a corresponding INSERT operation for that given row.

12. The method according to claim 8 , wherein

a given database row that is indexed in the first CDC log is identically reflected in the second snapshot, whereby comparing the first sequence S A with the set S 2 causes to derive no corrective CDC operation for that given row.

13. The method according to claim 1 , wherein

the method further comprises obtaining a sorted compaction of the first CDC log.

14. The method according to claim 1 , wherein

the method is performed by a CDC system configured to partition data into different partitions.

15. The method according to claim 14 , wherein

the method further comprises mapping the database rows according to said different partitions of the CDC system, based on the key-value pairs.

16. The method according to claim 1 , wherein

comparing the first sequence S A with the set S 2 further comprises evaluating a degree of similarity between the first sequence S A and the set S 2 , whereby said corrective CDC operations are derived based on an algorithm selected according to the degree of similarity evaluated.

17. The method according to claim 1 , wherein

the method further comprises generating a unique key for each of one or more of the key-value pairs of one or more of the set S 1 , the set S 2 , the set S M , the sequence S A , the set S 3 , and the sequence S B .

18. A computer program product for tracking change data (CDC) capture log history:

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

obtain a first snapshot of a source system and deriving a set S 1 of key-value pairs reflecting the first snapshot;

perform a mirror operation of the source system by replicating operations captured by the first snapshot, wherein the mirror operation yields one or more outcomes in the source system;

obtain CDC change operations representing changes to be performed with respect to the set S 1 of key-value pairs which reflect the one or more outcomes of the mirror operation, wherein the CDC change operations are captured as a set S M of key-value pairs;

obtain a first CDC log as a first sequence S A of key-value pairs including the key-value pairs of the set S 1 and the set S M ;

obtain a second snapshot of the source system and deriving a set S 2 of key-value pairs reflecting the second snapshot;

compare the first sequence S A of key-value pairs with the set S 2 of key-value pairs to derive corrective CDC operations as a set S 3 of key-value pairs, the corrective CDC operations representing corrections to be performed with respect to the first sequence S A of key-value pairs; and

obtain a second CDC log as a second sequence S B of key-value pairs including the key-value pairs of the sequence S A and the set S 3 , wherein the corrective CDC operations ensure that the second sequence S B of key-value pairs are, as a whole, coherent with the set S 2 of key-value pairs.

19. The computer program product according to claim 18 , wherein

the program instructions further comprise instructions to interpret the second sequence of key-value pairs and cause a target system to reach a state reflecting the second snapshot.

20. The computer program product according to claim 18 , wherein

the program instructions further comprise instructions to obtain the second sequence S B of key-value pairs as an ordered sequence, whereby the key-value pairs of the set S 1 precedes the key-value pairs of the set S M , which themselves precedes the key-value pairs of the set S 3 .

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 13, 2020
From: FROESE, FLORIAN HERMANN; GARCÉS ERICE, LUIS; BAUER, DANIEL NIKOLAUS; ROONEY, JOHN G.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 054356/0188 →
Continuity (1)
Related Publication 20220156246A1 · May 19, 2022
Cited By (1)
US 12,585,668