Tracking dependencies between transactions in a database
First Claim
1. A method for tracking dependencies between transactions, the method comprising the steps of:
- storing data that indicates which transactions have updated a data item, said data including commit times for those transactions that have committed after updating the data item;
storing a depends-on time associated with an active transaction;
accessing a version of the data item in response to executing said active transaction;
reading said data to determine a time value that represents a time that is at least as recent as a commit time of a committed transaction that most recently updated said version of the data item;
updating the depends-on time associated with the active transaction to said time value if said time value represents a time more recent than said depends-on time; and
approximating a determination of whether said active transaction depends on another transaction based on a comparison between a commit time for said other transaction and the depends-on time associated with the active transaction.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and an apparatus for tracking of the dependencies between transactions is provided. Every time a data item is updated, a record is made of the transaction that updated the data item. Before another transaction locks a data item previously locked by the transaction, the entry is updated to indicate that the transaction committed and the commit time of the transaction. These entries are contained in a list head that is maintained on the same block as the data item, and a list tail that is stored separate from the data block that contains the data item. A depends-on time is maintained for each transaction. Whenever the transaction updates a data item, the depends-on time is set to the greater of the current depends-on time and the commit time of the most recently committed transaction that updated the version of the data item. Whether a transaction depends on a committed transaction is then determined based on a simple comparison between the depends-on time associated with the transaction and the commit time of the committed transaction.
-
Citations
17 Claims
-
1. A method for tracking dependencies between transactions, the method comprising the steps of:
-
storing data that indicates which transactions have updated a data item, said data including commit times for those transactions that have committed after updating the data item; storing a depends-on time associated with an active transaction; accessing a version of the data item in response to executing said active transaction; reading said data to determine a time value that represents a time that is at least as recent as a commit time of a committed transaction that most recently updated said version of the data item; updating the depends-on time associated with the active transaction to said time value if said time value represents a time more recent than said depends-on time; and approximating a determination of whether said active transaction depends on another transaction based on a comparison between a commit time for said other transaction and the depends-on time associated with the active transaction. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method for tracking dependencies between transactions, the method comprising the steps of:
-
when a version of a data item is supplied to a transaction, determining an include-time value that represents a time at least as recent as a commit time of a transaction that most recently updated said version of said data item; resetting depends-on time value associated with said transaction to said include time value if said include time value represents a time that is more recent that said depends-on time value; and approximating a determination of whether said transaction depends on a committed transaction based on a comparison between a commit time for the committed transaction and the depends-on time of said transaction. - View Dependent Claims (7, 8, 9, 10, 11)
-
-
12. A computer readable medium having stored thereon sequences of instructions, said sequences of instructions including sequences of instructions which, when executed by a processor, cause the processor to perform the steps of:
-
when a version of a data item is supplied to a transaction, determining an include-time value that represents a time at least as recent as a commit time of a transaction that most recently updated said version of said data item; resetting a depends-on time value associated with said transaction to said include time value if said include time value represents a time that is more recent that said depends-on time value; and approximating a determination of whether said transaction depends on a committed transaction based on a comparison between a commit time for the committed transaction and the depends-on time of said transaction. - View Dependent Claims (13, 14, 15, 16, 17)
-
Specification