Data synchronization with minimal table lock duration in asynchronous table replication
First Claim
1. A computer implemented method for minimizing table lock duration during lost change resynchronization between a source table and a replica table, comprising:
- detecting, by at least one processor, a restart at a source node or a replica node, the source node having a source table and the replica node having a replica table;
locking, by the at least one processor, the source table based on the detection;
creating, after the locking, by the at least one processor, a first database transaction performing a lost change resynchronization operation, wherein the lost change resynchronization operation is assigned a database transaction identifier and a timestamp representing the creation time of the first database transaction;
unlocking, after the creating, by the at least one processor, the source table;
comparing, by the at least one processor, the first database transaction to a second database transaction based on the timestamp of the first database transaction; and
selecting, by the at least one processor, for execution the first database transaction or the second database transaction based on the comparison;
wherein at least one of the detecting, locking, creating, unlocking, comparing, and selecting are performed by one or more computers.
1 Assignment
0 Petitions
Accused Products
Abstract
Disclosed herein are system, method, and computer program product embodiments for minimizing table lock duration during lost change resynchronization between a source table and a replica table. An embodiment operates by detecting a restart at a source node or a replica node. A source table at the source node is then locked based on the detection. A database transaction is then created for a lost change resynchronization operation and the source table is unlocked. The database transaction is then compared to another database transaction based on its timestamp. Based on the comparison, either the database transaction for the lost change resynchronization operation or the other database transaction is executed.
-
Citations
25 Claims
-
1. A computer implemented method for minimizing table lock duration during lost change resynchronization between a source table and a replica table, comprising:
-
detecting, by at least one processor, a restart at a source node or a replica node, the source node having a source table and the replica node having a replica table; locking, by the at least one processor, the source table based on the detection; creating, after the locking, by the at least one processor, a first database transaction performing a lost change resynchronization operation, wherein the lost change resynchronization operation is assigned a database transaction identifier and a timestamp representing the creation time of the first database transaction; unlocking, after the creating, by the at least one processor, the source table; comparing, by the at least one processor, the first database transaction to a second database transaction based on the timestamp of the first database transaction; and selecting, by the at least one processor, for execution the first database transaction or the second database transaction based on the comparison; wherein at least one of the detecting, locking, creating, unlocking, comparing, and selecting are performed by one or more computers. - View Dependent Claims (2, 3, 4, 5, 6, 7, 21, 22, 23, 24, 25)
-
-
8. A system, comprising:
-
a memory; and at least one processor coupled to the memory and configured to; detect a restart at a source node or a replica node, the source node having a source table and the replica node having a replica table; lock the source table based on the detection; create, after the locking, a first database transaction performing a lost change resynchronization operation, wherein the lost change resynchronization operation is assigned a database transaction identifier and a timestamp representing the creation time of the first database transaction; unlock, after the creating, the source table; compare the first database transaction to a second database transaction based on the timestamp of the first database transaction; and select for execution the first database transaction or the second database transaction based on the comparison. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A tangible computer-readable device having instructions stored thereon that, when executed by at least one computing device, causes the at least one computing device to perform operations comprising:
-
detecting a restart at a source node or a replica node, the source node having a source table and the replica node having a replica table; locking the source table based on the detection; creating, after the locking, a first database transaction performing a lost change resynchronization operation, wherein the lost change resynchronization operation is assigned a database transaction identifier and a timestamp representing the creation time of the first database transaction; unlocking, after the creating, the source table; comparing the first database transaction to a second database transaction based on the timestamp of the first database transaction; and selecting for execution the first database transaction or the second database transaction based on the comparison. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification