Recoverable execution
AssigneeOracle International Corporation
InventorsAnand Lakshminath, Lik Wong, James Stamos, Alan Downing
Life of this patent
Estimating the term…
Abstract
Systems and methods for providing a one-step API that executes a series of atomic transactions in a database system. In one implementation, each atomic transaction is associated with a forward block of code that effects changes, an undo block of code that reverses the changes made by the forward block, and a state block of code that mimics successful execution of the forward block by setting internal states. In the event of a failure, the forward blocks, undo blocks, and state blocks can be used to roll forward or roll back changes as a whole. In one implementation, a one-step API for replicating data in a database is provided.
Claims31
A computer implemented method for creating an operation to perform on data, the method including:
- identifying a first atomic database transaction and a second atomic database transaction, wherein the first atomic database transaction is associated with a first set of one or more logs which comprise one or more first entries that are a result of an execution of the first transaction, and the second atomic database transaction is associated with a second set of one or more logs which comprise one or more second entries that are a result of an execution of the second atomic database transaction;
- creating the operation by grouping the first atomic database transaction and the second atomic database transaction for the operation to form an atomic transaction group, wherein the act of creating the operation is performed by at least one processor;
- grouping the first set and the second set to form a grouping of logs based at least in part upon the atomic transaction group, wherein
- the action of grouping the first set and the second set to form the grouping of logs comprises:
- identifying or generating one or more state blocks of code that is used to set one or more states to mimic the operation;
- and
- associating the first set of one or more logs and the second set of one or more logs into the grouping of logs by using at least a first set of references to the first set of one or more logs and a second set of references to the second set of one or more logs, in which
- the operation comprises the first set of references and the second set of references, and
- the grouping of logs is atomic in that an execution or application of any entry in the one or more logs in the grouping of logs causes an execution or application of all remaining entries in the one or more logs in the grouping of logs.
A computer implemented method for executing an operation on data in a database system, the method comprising:
- identifying a first atomic database transaction and a second atomic database transaction, wherein the first atomic database transaction is associated with a first set of one or more logs which comprise one or more first entries that are a result of an execution of the first atomic database transaction, and the second atomic database transaction is associated with a second set of one or more logs which comprise one or more second entries that are a result of an execution of the second atomic database transaction;
- grouping the first set and the second set to form a grouping of logs based at least in part upon grouping the first atomic database transaction and the second atomic database transaction into an atomic group of transactions for the operation, wherein
- the action of grouping the first set and the second set to form the grouping of logs comprises:
- identifying or generating one or more state blocks of code that is used to set one or more states to mimic the operation;
- associating the first set of one or more logs and the second set of one or more logs into the grouping of logs by using at least a first set of references to the first set of one or more logs and a second set of references to the second set of one or more logs, in which
- the operation comprises the first set of references and the second set of references;
- executing the operation by executing at least one forward block, the at least one forward block corresponding to the first or the second atomic database transaction, wherein the act of executing the operation is performed by a processor;
- determining whether a failure has occurred during execution;
- and
- the grouping of logs is atomic in that an execution or application of one entry in any of the one or more logs in the grouping of logs causes execution or application of remaining entries in the one or more logs in the grouping of logs.
A computer implemented method for generating a recoverable script for an operation, the method comprising:
- providing a forward block executable to perform a first action;
- generating an undo block based on the forward block, the undo block executable to reverse one or more changes made by the forward block;
- grouping a first set of one or more logs of the first atomic database transaction and the second set of one or more logs of the second atomic database transaction into an atomic grouping of one or more transaction logs based at least in part upon an action of grouping the first atomic database transaction and the second atomic database transaction to form a one-step operation, wherein
- the action of grouping the first set and the second set to form the grouping of logs comprises:
- generating a state block of code based on the forward block, the state block executable to set at least one state to mimic execution of the forward block;
- and
- associating the first set of one or more logs and the second set of one or more logs into the grouping of one or more transaction logs by using at least a first number of references to the first set of one or more logs and a second number of references to the second set of one or more logs;
- creating the recoverable script for performing the one-step operation on data based at least in part upon the action of grouping the first atomic database transaction and the second atomic database transaction, wherein
- the first atomic database transaction is associated with the first set of one or more logs which comprise one or more first entries that are a result of an execution of the first atomic database transaction, and the second atomic database transaction is associated with the second set of one or more logs which comprise one or more second entries that are a result of an execution of the second atomic database transaction;
- the recoverable script comprises the first set of references and the second set of references,
- the recoverable script comprises the redo block, the undo block, and the state block, and
- the atomic grouping of one or more transaction logs is atomic in that an execution or application of one entry in any one of the one or more transaction logs of the atomic grouping causes remaining entries in the atomic groping to be executed.
A computer program product for an Application Program Interface (API), the computer program product comprising a non-transitory computer usable storage medium storing thereupon a computer software program for execution by at least one processor to perform a process for executing an operation for replicating a subset of data in a database system, the process comprising:
- identifying a first atomic database transaction and a second atomic database transaction, wherein the first atomic database transaction is associated with a first set of one or more logs which comprise one or more first entries that are a result of an execution of the first atomic database transaction, and the second atomic database transaction is associated with a second set of one or more logs which comprise one or more second entries that are a result of an execution of the second atomic database transaction;
- grouping the first set and the second set to form a grouping of logs based at least in part upon creating the operation by grouping the first atomic database transaction and the second atomic database transaction for the operation, wherein
- the action of grouping the first set and the second set to form the grouping of logs comprises:
- identifying or generating one or more state blocks of code that is used to set one or more states to mimic the operation;
- associating the first set of one or more logs and the second set of one or more logs into the grouping of logs by using at least a first set of references to the first set of one or more logs and a second set of references to the second set of one or more logs, in which
- the operation comprises the first set of references and the second set of references;
- the grouping of logs is atomic in that an execution or application of one entry in any of the one or more logs in the grouping of logs causes execution or application of remaining entries in the one or more logs in the grouping of logs;
- performing, by using the at least the processor, at least one atomic database transaction selected from a list comprising:
- executing a first atomic database transaction from the group of atomic database transactions for initiating a streams queue,
- executing a second atomic database transaction from the group of atomic database transactions for initiating a propagation process,
- executing a third atomic database transaction from the group of atomic database transactions for specifying one or more propagation rules,
- executing a fourth atomic database transaction from the group of atomic database transactions for initiating a capture process,
- executing a fifth atomic database transaction from the group of atomic database transactions for specifying one or more capture rules,
- executing a sixth atomic database transaction from the group of atomic database transactions for initiating an apply queue,
- executing a seventh atomic database transaction from the group of atomic database transactions for initiating an apply process,
- executing an eighth atomic database transaction from the group of atomic database transactions for specifying one or more apply rules,
- executing a ninth atomic database transaction from the group of atomic database transactions for capturing and propagating redo records, and
- executing a tenth atomic database transaction from the group of atomic database transactions for applying changes to a database;
- and
- upon execution the grouping of transaction logs, storing execution results in a computer readable storage medium or display the execution results on a display apparatus.
A computer program product comprising a volatile or non-volatile computer usable storage medium having executable code to execute a process for executing an operation on data in a database system, the process comprising:
- identifying a first atomic database transaction and a second atomic database transaction, wherein the first atomic database transaction is associated with a first set of one or more logs which comprise one or more first entries that are a result of an execution of the first atomic database transaction, and the second atomic database transaction is associated with a second set of one or more logs which comprise one or more second entries that are a result of an execution of the second atomic database transaction;
- grouping the first set and the second set to form a grouping of logs based at least in part upon creating the operation by grouping the first atomic database transaction and the second atomic database transaction into an atomic group of database transactions for the operation, wherein
- the action of grouping the first set and the second set to form the grouping of logs comprises:
- identifying or generating one or more state blocks of code that is used to set one or more states to mimic the operation;
- associating the first set of one or more logs and the second set of one or more logs into the grouping of logs by using at least a first set of references to the first set of one or more logs and a second set of references to the second set of one or more logs, in which
- the operation comprises the first set of references and the second set of references;
- executing the operation by executing at least one forward block, each forward block corresponding to an atomic database transaction, wherein the act of executing the operation is performed by a processor;
- determining whether a failure has occurred during execution;
- and
- the grouping of logs is atomic in that an execution or application of one entry in any of the one or more logs in the grouping of logs causes execution or application of remaining entries in the one or more logs in the grouping of logs.
A system for executing an operation associated with a series of atomic database transactions, comprising:
- one or more processors configured for performing a process comprising:
- identifying a first atomic database transaction and a second atomic database transaction, wherein the first atomic database transaction is associated with a first set of one or more logs which comprise one or more first entries that are a result of an execution of the first atomic database transaction, and the second atomic database transaction is associated with a second set of one or more logs which comprise one or more second entries that are a result of an execution of the second atomic database transaction;
- grouping the first set and the second set to form a grouping of logs based at least in part upon creating the operation by grouping the first atomic database transaction and the second atomic database transaction into an atomic group of database transactions for the operation, wherein;
- the action of grouping the first set and the second set to form the grouping of logs comprises:
- identifying or generating one or more state blocks of code that is used to set one or more states to mimic the operation;
- associating the first set of one or more logs and the second set of one or more logs into the grouping of logs by using at least a first set of references to the first set of one or more logs and a second set of references to the second set of one or more logs, in which
- the operation comprises the first set of references and the second set of references;
- executing the operation by executing at least one forward block, each forward block corresponding to an atomic database transaction, wherein the act of executing the operation is performed by a processor;
- determining whether a failure has occurred during execution;
- and
- the grouping of logs is atomic in that an execution or application of one entry in any of the one or more logs in the grouping of logs causes execution or application of remaining entries in the one or more logs in the grouping of logs.
A computer program product comprising a volatile or non-volatile computer usable storage medium having a sequence of instructions which, when executed by a processor, cause the processor to execute a process for creating an operation on data in a database system, the process comprising:
- identifying a first atomic database transaction and a second atomic database transaction, wherein the first atomic database transaction is associated with a first set of one or more logs which comprise one or more first entries that are a result of an execution of the first atomic database transaction, and the second atomic database transaction is associated with a second set of one or more logs which comprise one or more second entries that are a result of an execution of the second atomic database transaction;
- creating the operation by grouping the first atomic database transaction and the second atomic database transaction for the operation to form a transaction group, wherein the act of creating the operation is performed by a processor;
- grouping the first set and the second set to form a grouping of logs based at least in part upon the transaction group, wherein
- the action of grouping the first set and the second set to form a grouping of logs comprises:
- identifying or generating one or more state blocks of code that is used to set one or more states to mimic the operation;
- associating the first set of one or more logs and the second set of one or more logs into the grouping of logs by using at least a first set of references to the first set of one or more logs and a second set of references to the second set of one or more logs, in which
- the operation comprises the first set of references and the second set of references, and
- the grouping of logs is atomic in that an execution or application of any entry in the one or more logs in the grouping of logs causes an execution or application of all remaining entries in the one or more logs in the grouping of logs.
A system for creating an operation on data in a database system, comprising:
- means for identifying a first atomic database transaction and a second atomic database transaction, wherein the first atomic database transaction is associated with a first set of one or more logs which comprise one or more first entries that are a result of an execution of the first atomic database transaction, and the second atomic database transaction is associated with a second set of one or more logs which comprise one or more second entries that are a result of an execution of the second atomic database transaction;
- a processor configured for creating the operation by grouping the first atomic database transaction and the second atomic database transaction for the operation to form a transaction group;
- means for grouping the first set and the second set to form a grouping of logs based at least in part upon the transaction group, wherein the means for grouping the first set and the second set to form the grouping of logs comprises:
- means for identifying or generating one or more state blocks of code that is used to set one or more states to mimic the operation;
- and
- means for associating the first set of one or more logs and the second set of one or more logs into the grouping of logs by using at least a first set of references to the first set of one or more logs and a second set of references to the second set of one or more logs, in which
- the operation comprises the first set of references and the second set of references, and
- the grouping of logs is atomic in that an execution or application of any entry in the one or more logs in the grouping of logs causes an execution or application of all remaining entries in the one or more logs in the grouping of logs.
Dependencies are inferred from the claim text.