Database log replay parallelization
AssigneeSap SE
InventorIvan Schreter
Life of this patent
Estimating the term…
Abstract
A plurality of transactions are executed in a data storage application. As a result, log entries according to the plurality of transactions are stored in at least one log. During a data recovery operation, log entries from the log are dispatched into a plurality of worker queues. Each worker queue corresponds to a different one of a plurality of logical central processing units. The log entries are replayed using the plurality of worker queues such that log entries associated with a same object are executed serially by a single worker queue and at least a portion of the log entries associated with different objects are executed in parallel by different worker queues. Related apparatus, systems, techniques and articles are also described.
Claims11
A non-transitory computer program product storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising:
- executing a plurality of transactions in a data storage application;
- storing log entries according to the plurality of transactions in at least one log;
- dispatching, during a data recovery operation, log entries from the at least one log into a plurality of worker queues, each worker queue corresponding to a different one of a plurality of logical central processing units;
- sending a synthetic log record to at least a portion of the worker queues that enables point-in-time recovery by synchronizing such worker queues and calling code after reaching a specified point-in-time;
- and
- replaying the log entries using the plurality of worker queues such that log entries associated with a same object are executed serially by a single worker queue and at least a portion of the log entries associated with different objects are executed in parallel by different worker queues;
- wherein each synthetic log record specifies replay operations to be performed by the corresponding worker queue;
- wherein the synthetic log records comprise log records inserted in response to a commit or rollback of a transaction and wherein such log records are processed asynchronously by respective worker queue for transactions started during log replay and synchronously for transactions already active when the replay of the log started.
A method comprising:
- executing a plurality of transactions in a data storage application;
- storing log entries according to the plurality of transactions in at least one log;
- dispatching, during a data recovery operation, log entries from the at least one log into a plurality of worker queues, each worker queue corresponding to a different one of a plurality of logical central processing units;
- sending a synthetic log record at least a portion of the worker queues that enables point-in-time recovery by synchronizing such worker queues and calling code after reaching a specified point-in-time;
- and
- replaying the log entries using the plurality of worker queues such that log entries associated with a same object are executed serially by a single worker queue and at least a portion of the log entries associated with different objects are executed in parallel by different worker queues;
- wherein each synthetic log record specifies replay operations to be performed by the corresponding worker queue;
- wherein the synthetic log records comprise log records inserted in response to a commit or rollback of a transaction and wherein such log records are processed asynchronously by respective worker queue for transactions started during log replay and synchronously for transactions already active when the replay of the log started.
A system comprising:
- at least one programmable processor;
- memory coupled to the at least one programmable processor for storing instructions to cause the at least one programmable processor to perform operations comprising:
- executing a plurality of transactions in a data storage application;
- storing log entries according to the plurality of transactions in at least one log;
- dispatching, during a data recovery operation by a log replay dispatcher, log entries from the at least one log into a plurality of worker queues, each worker queue corresponding to a different one of a plurality of logical central processing units;
- sending a synthetic log record to at least a portion of the worker queues that enables point-in-time recovery by synchronizing such worker queues and calling code after reaching a specified point-in-time;
- and
- replaying the log entries using the plurality of worker queues such that log entries associated with a same object are executed serially by a single worker queue and at least a portion of the log entries associated with different objects are executed in parallel by different worker queues;
- wherein each synthetic log record specifies replay operations to be performed by the corresponding worker queue;
- wherein the synthetic log records comprise log records inserted in response to a commit or rollback of a transaction and wherein such log records are processed asynchronously by respective worker queue for transactions started during log replay and synchronously for transactions already active when the replay of the log started.
Dependencies are inferred from the claim text.