US 9,811,577 B2
Asynchronous data replication using an external buffer table
Daniel Martin, Stuttgart (DE); Christopher R. G. O'Quinn, Mississauga (CA); James D. Spyker, Toronto (CA); and Yongfeng Yao, Foster City, CA (US)
Assigned to International Business Machines Corporation, Armonk, NY (US)
Filed by International Business Machines Corporation, Armonk, NY (US)
Filed on Jun. 2, 2015, as Appl. No. 14/728,245.
Application 14/728,245 is a continuation of application No. 14/574,845, filed on Dec. 18, 2014.
Prior Publication US 2016/0179919 A1, Jun. 23, 2016
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 17/30 (2006.01)
CPC G06F 17/30578 (2013.01) [G06F 17/30389 (2013.01); G06F 17/30477 (2013.01); G06F 17/30563 (2013.01); G06F 17/30864 (2013.01)] 10 Claims
OG exemplary drawing
 
1. A computer-implemented method for asynchronously replicating data, the method comprising:
accessing, by a target computer, one or more statements in an internal buffer table of a capture agent of a source computer, wherein the capture agent is configured to monitor, process, and transmit data changes on one or more source tables of the source computer to the target computer via a network;
responsive to identifying an insert statement in an accessed entry of the internal buffer table, inserting, by the capture agent, a row image and a key image value into an insert map;
responsive to determining, by the capture agent, that the accessed entry does not contain the insert statement, identifying a delete statement;
responsive to the identifying the delete statement, deleting, by the capture agent, preceding entries from the insert map that have a same named target table and key image value of the accessed entry and inserting the key image value into a delete set;
responsive to determining, by the capture agent, that the accessed entry does not contain the delete statement, determining, by the capture agent, whether a specified threshold is met;
receiving, by the target computer, from the source computer, the one or more statements that describe the data changes on the one or more source tables of the source computer to be replicated on one or more target tables of the target computer;
responsive to determining that the specified threshold is met, applying, by the target computer, the one or more statements to an external buffer table of the target computer;
selectively applying, by the target computer, the one or more statements from the external buffer table to the one or more target tables to replicate the data changes on the one or more target tables, wherein the applying the one or more statements comprises:
creating, by the target computer, another insert map including entries for insert statements, wherein each entry in the other insert map references the one or more target tables, data values to be inserted into a row of the named target table, and a row identifier for the row which the data values are to be inserted;
responsive to receiving, at the target computer, a query referencing the one or more target tables, applying the one or more statements corresponding to the referenced one or more target tables from the external buffer table to the one or more referenced target tables; and
creating, by the target computer, a view of the one or more statements referenced by the query to execute the query.