US 7,490,083 B2
Parallel apply processing in data replication with preservation of transaction integrity and source ordering of dependent updates
Serge Bourbonnais, Palo Alto, Calif. (US); Elizabeth B. Hamel, Morgan Hill, Calif. (US); Bruce G. Lindsay, San Jose, Calif. (US); and Stephen J. Todd, Winchester (United Kingdom)
Assigned to International Business Machines Corporation, Armonk, N.Y. (US)
Filed on Feb. 27, 2004, as Appl. No. 10/789,775.
Prior Publication US 2005/0193041 A1, Sep. 01, 2005
Int. Cl. G07F 17/30 (2006.01); G06F 15/16 (2006.01)
U.S. Cl. 707—8  [718/101; 719/313] 11 Claims
OG exemplary drawing
 
1. A method for handling transaction messages in asynchronous data replication in a database system, the database system including a source node and a target node, each transaction message having information concerning a row change to a table copy at the source node, the method comprising:
determining whether a first transaction message has a dependency on a preceding non-completed transaction message, the first transaction message having a dependency on the preceding non-completed transaction when a row change associated with the preceding non-completed transaction requires application to a table copy at the target node prior to a row change associated with the first transaction message;
responsive to the first transaction message having a dependency on the preceding non-completed transaction,
holding the first transaction message;
completing the preceding non-completed transaction message including applying the row change associated with the preceding non-completed transaction message to the table copy at the target node; and
responsive to completing the preceding non-completed transaction message,
releasing the first transaction message and applying the row change associated with the first transaction message to the table copy at the target node; and
responsive to the first transaction message not having a dependency on the preceding non-completed transaction, applying the row change associated with the first transaction message to the table copy at the target node without holding the first transaction message,
wherein determining whether the first transaction message has a dependency on the preceding non-completed transaction message comprises
determining that the row change in the first transaction message is an insert or a key update type of change;
comparing a new replication key value in the row change in the first transaction message to an old replication key value of a row change in the preceding non-completed transaction message, including comparing a hash value of the new replication key value in the row change in the first transaction message to a hash value of the old replication key value in the row change in the preceding non-completed transaction message; and
determining that the first transaction message has a dependency on the preceding non-completed transaction message if the new replication key value in the row change in the first transaction message is the same as the old replication key value in the row change in the preceding non-completed transaction message.