Constraint-based consistency with snapshot isolation
AssigneeOptumSoft, Inc.
InventorDavid R. Cheriton
Life of this patent
Estimating the term…
Abstract
Efficient processing of concurrent atomic transactions is provided by identifying the constraints that need to be satisfied for correct application behavior. With these constraints identified, commit processing for a transaction can then refer to the constraints to see if committing the current transaction causes a problem with the constraints. If there is a conflict with the constraints, the transaction aborts. If there is no conflict with the constraints, the transaction commits.
Claims25
A system, comprising:
- one or more processors configured to:
- perform a plurality of transactions, including a current transaction and one or more concurrent transactions;
- wherein:
- the current transaction has a current start time and a current target commit time, and the one or more concurrent transactions are committed to a data model at corresponding one or more intermediate times after the current start time and before the current target commit time;
- perform a commit processing check to determine whether the current transaction can be committed consistently with a set of one or more constraints relating to data in the data model, the commit processing check being based at least in part on:
- a snapshot corresponding to the current transaction that is a snapshot of at least a part of the data model as of the current start time, and one or more changes to the data model made by the one or more concurrent transactions;
- in the event that it is determined that the current transaction can be committed consistently with the set of one or more constraints relating to the data in the data model, commit the current transaction;
- and
- in the event that it is determined that the current transaction cannot be committed consistently with the set of one or more constraints relating to the data in the data model, abort the current transaction;
- and
- one or more memories coupled to the one or more processors, configured to provide the one or more processors with instructions.
A method, comprising:
- performing, using one or more processors of a computer, a plurality of transactions, including a current transaction and one or more concurrent transactions;
- wherein:
- the current transaction has a current start time and a current target commit time, and the one or more concurrent transactions are committed to a data model at corresponding one or more intermediate times after the current start time and before the current target commit time;
- performing a commit processing check to determine whether the current transaction can be committed to a memory of the computer consistently with a set of one or more constraints relating to data in the data model, the commit processing check being based at least in part on:
- a snapshot corresponding to the current transaction that is a snapshot of at least a part of the data model as of the current start time, and one or more changes to the data model made by the one or more concurrent transactions;
- in the event that it is determined that the current transaction can be committed consistently with the set of one or more constraints relating to the data in the data model, committing the current transaction;
- and
- in the event that it is determined that the current transaction cannot be committed consistently with the set of one or more constraints relating to the data in the data model, aborting the current transaction.
A computer program product embodied in a tangible computer readable storage medium and comprising computer instructions for:
- performing a plurality of transactions, including a current transaction and one or more concurrent transactions;
- wherein:
- the current transaction has a current start time and a current target commit time, and the one or more concurrent transactions are committed to a data model at corresponding one or more intermediate times after the current start time and before the current target commit time;
- performing a commit processing check to determine whether the current transaction can be committed consistently with a set of one or more constraints relating to data in the data model, the commit processing check being based at least in part on:
- a snapshot corresponding to the current transaction that is a snapshot of at least a part of the data model as of the current start time, and one or more changes to the data model made by the one or more concurrent transactions;
- in the event that it is determined that the current transaction can be committed consistently with the set of one or more constraints relating to the data in the data model, committing the current transaction;
- and
- in the event that it is determined that the current transaction cannot be committed consistently with the set of one or more constraints relating to the data in the data model, aborting the current transaction.
Dependencies are inferred from the claim text.