Log forwarding to avoid deadlocks during parallel log replay in asynchronous table replication
First Claim
1. A computer implemented method for removing a deadlock during replication from distributed source tables to a replica node, comprising:
- detecting, by at least one processor, a deadlock at a parallel log replayer at a replica node;
selecting, by the at least one processor, a first replication log entry from a queue of a plurality of queues of the parallel log replayer based on whether removing the first replication log entry from the queue removes the deadlock, wherein the first replication log entry comprises an operation type, a table identifier, and a transaction identifier for a changed row;
inserting, by the at least one processor, the first replication log entry into a waiting queue;
removing, by the at least one processor, the first replication log entry from the queue of the plurality of queues of the parallel log replayer;
replaying, by the at least one processor, a second replication log entry from the queue of the plurality of queues at the parallel log replayer after removing the first replication log entry from the queue of the plurality of queues of the parallel log replayer; and
replaying, by the at least one processor, the first replication log entry from the waiting queue at the parallel log replayer after replaying the second replication log entry;
wherein at least one of the detecting, selecting, inserting, removing, replaying the second replication log entry, and replaying the first replication log entry 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 removing a deadlock during replication from distributed source tables to a replica node. An embodiment operates by detecting a deadlock at a parallel log replayer at a replica node. A first replication log entry from a queue at the parallel log replayer is then selected based on whether removing the first replication log entry from the queue removes the deadlock. The first replication log entry is then forwarded to a waiting queue. A second replication log entry is then replayed at the parallel log replayer. After replaying the second replication log entry, the first replication log entry is replayed at the parallel log replayer.
78 Citations
21 Claims
-
1. A computer implemented method for removing a deadlock during replication from distributed source tables to a replica node, comprising:
-
detecting, by at least one processor, a deadlock at a parallel log replayer at a replica node; selecting, by the at least one processor, a first replication log entry from a queue of a plurality of queues of the parallel log replayer based on whether removing the first replication log entry from the queue removes the deadlock, wherein the first replication log entry comprises an operation type, a table identifier, and a transaction identifier for a changed row; inserting, by the at least one processor, the first replication log entry into a waiting queue; removing, by the at least one processor, the first replication log entry from the queue of the plurality of queues of the parallel log replayer; replaying, by the at least one processor, a second replication log entry from the queue of the plurality of queues at the parallel log replayer after removing the first replication log entry from the queue of the plurality of queues of the parallel log replayer; and replaying, by the at least one processor, the first replication log entry from the waiting queue at the parallel log replayer after replaying the second replication log entry; wherein at least one of the detecting, selecting, inserting, removing, replaying the second replication log entry, and replaying the first replication log entry are performed by one or more computers. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A system, comprising:
-
a memory; and at least one processor coupled to the memory and configured to; detect a deadlock at a parallel log replayer at a replica node; select first replication log entry from a queue of a plurality of queues of the parallel log replayer based on whether removing the first replication log entry from the queue removes the deadlock, wherein the first replication log entry comprises an operation type, a table identifier, and a transaction identifier for a changed row; insert, the first replication log entry into a waiting queue; remove the first replication log entry from the queue of the plurality of queues of the parallel log replayer; replay a second replication log entry from the queue of the plurality of queues at the parallel log replayer after removing the first replication log entry from the queue of the plurality of queues of the parallel log replayer; and replay the first replication log entry from the waiting queue at the parallel log replayer after replaying the second replication log entry. - View Dependent Claims (11, 12, 13, 14, 15)
-
-
16. A non-transitory 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 deadlock at a parallel log replayer at a replica node; selecting a first replication log entry from a queue of a plurality of queues of the parallel log replayer based on whether removing the first replication log entry from the queue removes the deadlock, wherein the first replication log entry comprises an operation type, a table identifier, and a transaction identifier for a changed row; inserting the first replication log entry into a waiting queue; removing the first replication log entry from the queue of the plurality of queues of the parallel log replayer; replaying a second replication log entry from the queue of the plurality of queues at the parallel log replayer after removing the first replication log entry from the queue of the plurality of queues of the parallel log replayer; and replaying the first replication log entry from the waiting queue at the parallel log replayer after replaying the second replication log entry. - View Dependent Claims (17, 18, 19, 20, 21)
-
Specification