| CPC G06F 11/1469 (2013.01) [G06F 16/13 (2019.01); G06F 16/148 (2019.01); G06F 16/213 (2019.01); G06F 16/215 (2019.01); G06F 16/2358 (2019.01); G06F 16/24578 (2019.01); G06F 16/254 (2019.01); G06F 16/27 (2019.01); G06F 16/285 (2019.01); G06F 2201/80 (2013.01)] | 8 Claims |

|
1. A computer-implemented method for replaying logs, comprising:
classifying a plurality of logs to be replayed into a plurality of log queues, wherein the plurality of logs each comprises a transaction number and belongs to a log stream, wherein each one of the plurality of log queues comprises logs that belong to a same log stream, and wherein the logs with a same transaction number are classified into a same log queue;
in response to determining that the plurality of logs belong to two or more log streams, sending the plurality of log queues to a global replay queue in an interleaving manner, wherein log queues adjacent to each other in the global replay queue belong to different log streams;
allocating one or more replay threads to the log queues based on rankings of the log queues in the global replay queue, wherein the one or more replay threads are configured to replay one or more current log queues of the log queues;
in response to identifying an error of a current log queue of the one or more current log queues in a replay process, allocating a replay thread of the one or more replay threads allocated to the current log queue to a log queue that immediately follows the current log queue in the global replay queue;
determining whether the error is a temporary error or a permanent error, wherein the temporary error is an error that is automatically eliminated when the replay process is retried, the permanent error is not automatically eliminated when the replay process is retried;
in response to determining that the error is a temporary error, moving the current log queue to a rear of the global replay queue; and
in response to determining that the error is a permanent error, removing the current log queue from the global replay queue.
|