US 11,934,424 B1
Method and apparatus for resolving target database constraint violations in a database replication system where target database transactions are automatically aborted due to constraints violations
Paul J. Holenstein, Downingtown, PA (US); John R. Hoffmann, Kennett Square, PA (US); Bruce D. Holenstein, Media, PA (US); and Wilbur H. Highleyman, Blairstown, NJ (US)
Assigned to GRAVIC, INC., Malvern, PA (US)
Filed by Gravic, Inc., Malvern, PA (US)
Filed on Jan. 31, 2023, as Appl. No. 18/103,856.
Application 18/103,856 is a continuation of application No. 17/556,220, filed on Dec. 20, 2021, granted, now 11,580,134.
Application 17/556,220 is a continuation of application No. 17/065,793, filed on Oct. 8, 2020, granted, now 11,210,320, issued on Dec. 28, 2021.
Application 17/065,793 is a continuation of application No. 16/282,691, filed on Feb. 22, 2019, granted, now 10,817,535, issued on Oct. 27, 2020.
Application 16/282,691 is a continuation of application No. 15/839,029, filed on Dec. 12, 2017, granted, now 10,216,820, issued on Feb. 26, 2019.
Claims priority of provisional application 62/434,124, filed on Dec. 14, 2016.
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 7/00 (2006.01); G06F 3/06 (2006.01); G06F 11/20 (2006.01); G06F 16/18 (2019.01); G06F 16/23 (2019.01); G06F 16/27 (2019.01)
CPC G06F 16/27 (2019.01) [G06F 3/0605 (2013.01); G06F 3/065 (2013.01); G06F 11/2023 (2013.01); G06F 11/2097 (2013.01); G06F 16/1865 (2019.01); G06F 16/2358 (2019.01); G06F 16/2365 (2019.01); G06F 16/2379 (2019.01)] 22 Claims
OG exemplary drawing
 
1. A method for avoiding target database constraint violations in a database replication system, the database replication system including a source database and a target database, wherein target database transactions automatically abort due to constraint violations, each database having one or more tables, at least one of the target database tables having one or more constraints, the database replication system replicating source database transactions, the method comprising for each target database transaction corresponding to a replicated source database transaction:
(a) replicating changes made at the source database to the target database using the database replication system;
(b) detecting when a replicated change causes a constraint violation as a result of one or more of the target database tables having one or more constraints;
(c) deferring the applying of the database change to the target database of the database change detected in step (b) and posting the database change detected in step (b) to an electronic list;
(d) immediately applying the replicated changes to the target database that do not cause a constraint violation;
(e) repeating steps (a)-(d) for all of the changes within the replicated source database transaction;
(f) iterating through the database changes on the electronic list by:
(i) applying the database changes on the electronic list that no longer cause a constraint violation to the target database and removing the applied database changes from the electronic list, and
(ii) deferring again the applying of the database changes on the electronic list that still cause a constraint violation and maintaining the deferred database changes on the electronic list; and
(g) performing a commit for the target database transaction corresponding to the replicated source database transaction when a commit operation is detected in the replicated source database transaction, and when no database changes remain on the electronic list for the replicated source database transaction,
wherein the deferring in steps (c) and (f) avoids the target database transactions automatically aborting due to constraint violations.