Automatically retrying transactions with split procedure execution
First Claim
1. A computer implemented method of running a transaction against a database that allows the transaction to be automatically retried when the transaction fails such that certain transaction failures that cause the transaction to be automatically retried are not visible to an entity that receives data as a result of the execution of the transaction, the method comprising:
- receiving a transaction to be performed on a database, the transaction comprising a plurality of executable statements and the transaction, when completed, resulting in data being sent to the entity;
prior to running the database transaction, dividing the plurality of executable statements into at least two sets of statements by performing each of;
identifying a first set of statements of the transaction, each statement of the first set of statements identified as a statement which, when executed, will cause a change in the database state, will not cause data to be sent to the entity, and which can be automatically and transparently to the entity retried in the event of failure, andidentifying a second set of statements of the transaction, each statement of the second set of statements identified as a statement which, when executed, will result in data being generated to be sent to the entity and which cannot be retried transparently with respect to the entity;
after dividing the plurality of executable statements into the first and second sets of statements, running the database transaction by executing the first and second sets of statements separately in at least two phases, including;
in a first phase, prior to executing at least some statements of the second set of statements, executing the first set of statements to change the database state, performing operations to delay execution of at least a portion of the statements in the second set of statements, and storing non-deterministic results of execution of the first set of statements; and
in a second phase, subsequent to executing one or more statements of the first set of statements, executing again statements in first set of statements necessary to establish flow control and executing the at least a portion of the second set of statements separately from the first set of statements to generate data to be sent to the entity; and
saving a timestamp and a statement identifier with a saved statement.
2 Assignments
0 Petitions
Accused Products
Abstract
Running a transaction against a database that allows the transaction to be automatically retried when the transaction fails such that certain transaction failures that cause the transaction to be automatically retried are not visible to an entity that receives data as a result of the execution of the transaction. A first set of statements of a transaction is identified by identifying statements that will cause a change in the database state. A second set of statements is identified, that result in data being generated to be sent to the entity. The method further includes executing the first set of statements to change the database. The method further includes running the second set of statements separately from the first set of statements to generate data to be sent to the entity.
113 Citations
19 Claims
-
1. A computer implemented method of running a transaction against a database that allows the transaction to be automatically retried when the transaction fails such that certain transaction failures that cause the transaction to be automatically retried are not visible to an entity that receives data as a result of the execution of the transaction, the method comprising:
-
receiving a transaction to be performed on a database, the transaction comprising a plurality of executable statements and the transaction, when completed, resulting in data being sent to the entity; prior to running the database transaction, dividing the plurality of executable statements into at least two sets of statements by performing each of; identifying a first set of statements of the transaction, each statement of the first set of statements identified as a statement which, when executed, will cause a change in the database state, will not cause data to be sent to the entity, and which can be automatically and transparently to the entity retried in the event of failure, and identifying a second set of statements of the transaction, each statement of the second set of statements identified as a statement which, when executed, will result in data being generated to be sent to the entity and which cannot be retried transparently with respect to the entity; after dividing the plurality of executable statements into the first and second sets of statements, running the database transaction by executing the first and second sets of statements separately in at least two phases, including; in a first phase, prior to executing at least some statements of the second set of statements, executing the first set of statements to change the database state, performing operations to delay execution of at least a portion of the statements in the second set of statements, and storing non-deterministic results of execution of the first set of statements; and in a second phase, subsequent to executing one or more statements of the first set of statements, executing again statements in first set of statements necessary to establish flow control and executing the at least a portion of the second set of statements separately from the first set of statements to generate data to be sent to the entity; and saving a timestamp and a statement identifier with a saved statement. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system for running a transaction against a database that allows the transaction to be automatically retried when the transaction fails such that certain transaction failures that cause the transaction to be automatically retried are not visible to an entity that receives data as a result of the execution of the transaction, the system comprising
one or more processors; - and
one or more computer readable media having stored therein computer executable instructions that, when executed by at least one of the one or more processors, cause at least one of the one or more processors to perform the following acts; receiving a transaction to be performed on a database, the transaction comprising a plurality of executable statements and the transaction, when completed, resulting in data being sent to the entity; prior to running the database transaction, dividing the plurality of executable statements into at least two sets of statements by performing each of; identifying a first set of statements of the transaction, each statement of the first set of statements identified as a statement which, when executed, will cause a change in the database state, will not cause data to be sent to the entity, and which can be automatically and transparently to the entity retried in the event of failure, and identifying a second set of statements of the transaction, each statement of the second set of statements identified as a statement which, when executed, will result in data being generated to be sent to the entity and which cannot be retried transparently with respect to the entity; after dividing the plurality of executable statements into the first and second sets of statements, running the database transaction by executing the first and second sets of statements separately in at least two phases, including; in a first phase, prior to executing at least some statements of the second set of statements, executing the first set of statements to change the database state, performing operations to delay execution of at least a portion of the statements in the second set of statements, and storing non-deterministic results of execution of the first set of statements; and in a second phase, subsequent to executing one or more statements of the first set of statements, executing again statements in first set of statements necessary to establish flow control and executing the at least a portion of the second set of statements separately from the first set of statements to generate data to be sent to the entity; and saving a timestamp and a statement identifier with a saved statement. - View Dependent Claims (9, 10, 11, 12, 13, 14)
- and
-
15. One or more physical computer readable storage devices comprising computer executable instructions that when executed by one or more processors cause actions to be performed by one or more processors for running a transaction against a database that allows the transaction to be automatically retried when the transaction fails such that certain transaction failures that cause the transaction to be automatically retried are not visible to an entity that receives data as a result of the execution of the transaction, the computer executable instructions comprising instructions that when executed by one or more processors cause one or more processors to perform the following acts:
-
receiving a transaction to be performed on a database, the transaction comprising a plurality of executable statements and the transaction, when completed, resulting in data being sent to the entity; prior to running the database transaction, dividing the plurality of executable statements into at least two sets of statements by performing each of; identifying a first set of statements of the transaction, each statement of the first set of statements identified as a statement which, when executed, will cause a change in the database state, will not cause data to be sent to the entity, and which can be automatically and transparently to the entity retried in the event of failure, and identifying a second set of statements of the transaction, each statement of the second set of statements identified as a statement which, when executed, will result in data being generated to be sent to the entity and which cannot be retried transparently with respect to the entity; after dividing the plurality of executable statements into the first and second sets of statements, running the database transaction by executing the first and second sets of statements separately in at least two phases, including; in a first phase, prior to executing at least some statements of the second set of statements, executing the first set of statements to change the database state, performing operations to delay execution of at least a portion of the statements in the second set of statements, and storing non-deterministic results of execution of the first set of statements; and in a second phase, subsequent to executing one or more statements of the first set of statements, executing again statements in first set of statements necessary to establish flow control and executing the at least a portion of the second set of statements separately from the first set of statements to generate data to be sent to the entity; and saving a timestamp and a statement identifier with a saved statement. - View Dependent Claims (16, 17, 18)
-
-
19. For one or more transactions performed at a database server, where each transaction is defined by a set of statements defining functions that must all succeed or all fail atomically, a computer-implemented method comprising:
-
performing in a database server by executing computer-executable instructions on one or more processors; separating the execution of each transaction into two different phases; in a first phase; identifying a first set of statements of a transaction by identifying statements that do not require interaction with a client computing system, will not cause data to be sent to the client computing system, and that can be automatically and transparently to the client computing system retried in the event of a failure of the transaction without a client computing system being aware of the failure; identifying a second set of statements of the transaction by identifying statements that, when executed, will result in data being generated to be sent to the client computing system and which cannot be retried transparently with respect to the client computing system; attempting execution of the first set of statements for one or more transactions and, during attempting execution of the first set of statements, delaying execution of the second set of statements; and before executing the second set of statements, storing non-deterministic results of execution of the first set of statements; automatically retrying any failed transaction by re-executing one or more of the statements in the first set of statements of the failed transaction without making the client computer system aware of the failed transaction; and successfully executing the first set of statements for one or more transactions, using, when required, automatic re-execution for a failed transaction, the successful execution of the first set of statements for one or more transactions changing the database state at the database server; and in a second phase; executing again statements in first set of statements necessary to establish flow control; and for each transaction for which the first set of statements is successfully executed, separately executing the second set of statements to generate data that is sent to the client computing system, such that transactions that failed and have been retried are not visible to the client computing system receiving the generated data; and saving a timestamp and a statement identifier with a saved statement.
-
Specification