Claims
- 1. A method for determining which version of a data item to supply to a session, the method comprising the computer-implemented steps of:
maintaining a LAST-TO-SEE-TIMESTAMP, associated with the session, which indicates a time of a last change made in the session that must be seen by the session; maintaining with a data item version a CLONE-TIME that indicates a time at which the data item version was current; and determining that the data item version is to be supplied to the session based, at least in part, on a comparison between the CLONE-TIME and the LAST-TO-SEE-TIMESTAMP.
- 2. The method of claim 1 wherein the step of determining includes selecting, based on said comparison between the CLONE-TIME and the LAST-TO-SEE-TIMESTAMP, the data item version from a plurality of data item versions that qualify to be supplied to the session.
- 3. The method of claim 1 wherein
a transaction that includes a query is executing in the session; the LAST-TO-SEE-TIMESTAMP is associated with the query and indicates a time of a last change made by the transaction that must be seen by the query; and the step of determining that the data item version is to be supplied to the session is performed by determining that the data item version is to be used to answer the query.
- 4. The method of claim 1 further comprising the step of setting said CLONE-TIME based on a global clock when said data item version is cloned from a current version.
- 5. The method of claim 1 further comprising the step of setting said CLONE-TIME based on a CLONE-TIME of a non-current data item version when said data item version is cloned from said non-current data item version.
- 6. The method of claim 1 wherein:
a plurality of nodes in a cluster have data item versions for said data item; and the method further includes the steps of
maintaining, for each node of said plurality of nodes, CLONE-TIME information for said data item; and selecting which node to send a request for said data item to based on said CLONE-TIME information.
- 7. The method of claim 6 wherein the step of maintaining CLONE-TIME information includes maintaining, for said data item, a vector that associates nodes with CLONE-TIMES, wherein the CLONE-TIMES that are associated with a given node in the vector are CLONE-TIMES associated with data item versions that reside in the given node.
- 8. The method of claim 1 wherein the step of determining includes:
determining, based on removed-data information, whether changes that must be seen have been removed from said data item version; and determining, based on said CLONE-TIME, whether it is possible that information that must be seen was made to a current version of the data item after creation of the data item version.
- 9. A method of supplying a data item to a query that must see a particular snapshot of a database, the method comprising the steps of:
maintaining, for a plurality of data item versions that reside in a plurality of nodes, CLONE-TIME information that indicates when the data item versions were current; determining which data item versions of said plurality of data items versions contain all changes that must be seen by said query based, at least in part, on said CLONE-TIME information; and selecting a data item version to supply to said query from those data item versions that contain all changes that must be seen by said query.
- 10. The method of claim 9 wherein the step of determining includes:
determining, based on a CLONE-TIME associated with a data item version, whether changes that must be seen by said query may have been made to said data item after creation of said data item version; and determining, based on a MOST-RECENT-INCLUSION-TIME associated with said data item version, whether changes that must be seen by said query may have been removed from said data item version.
- 11. The method of claim 10 wherein the step of selecting includes using the CLONE-TIME information to select a candidate that requires fewer changes to be removed than other candidates.
- 12. A computer-readable medium carrying instructions for determining which version of a data item to supply to a session, the instructions comprising instructions for performing the steps of:
maintaining a LAST-TO-SEE-TIMESTAMP, associated with the session, which indicates a time of a last change made in the session that must be seen by the session; maintaining with a data item version a CLONE-TIME that indicates a time at which the data item version was current; and determining that the data item version is to be supplied to the session based, at least in part, on a comparison between the CLONE-TIME and the LAST-TO-SEE-TIMESTAMP.
- 13. The computer-readable medium of claim 12 wherein the step of determining includes selecting, based on said comparison between the CLONE-TIME and the LAST-TO-SEE-TIMESTAMP, the data item version from a plurality of data item versions that qualify to be supplied to the session.
- 14. The computer-readable medium of claim 12 wherein a transaction that includes a query is executing in the session;
the LAST-TO-SEE-TIMESTAMP is associated with the query and indicates a time of a last change made by the transaction that must be seen by the query; and the step of determining that the data item version is to be supplied to the session is performed by determining that the data item version is to be used to answer the query.
- 15. The computer-readable medium of claim 12 further comprising instructions for performing the step of setting said CLONE-TIME based on a global clock when said data item version is cloned from a current version.
- 16. The computer-readable medium of claim 12 further comprising instructions for performing the step of setting said CLONE-TIME based on a CLONE-TIME of a non-current data item version when said data item version is cloned from said non-current data item version.
- 17. The computer-readable medium of claim 12 wherein:
a plurality of nodes in a cluster have data item versions for said data item; and the computer-readable medium further includes instructions for performing the steps of
maintaining, for each node of said plurality of nodes, CLONE-TIME information for said data item; and selecting which node to send a request for said data item to based on said CLONE-TIME information.
- 18. The computer-readable medium of claim 17 wherein the step of maintaining CLONE-TIME information includes maintaining, for said data item, a vector that associates nodes with CLONE-TIMES, wherein the CLONE-TIMES that are associated with a given node in the vector are CLONE-TIMES associated with data item versions that reside in the given node.
- 19. The computer-readable medium of claim 12 wherein the step of determining includes:
determining, based on removed-data information, whether changes that must be seen have been removed from said data item version; and determining, based on said CLONE-TIME, whether it is possible that information that must be seen was made to a current version of the data item after creation of the data item version.
- 20. A computer-readable medium carrying instructions for supplying a data item to a query that must see a particular snapshot of a database, the instructions comprising instructions for performing the steps of:
maintaining, for a plurality of data item versions that reside in a plurality of nodes, CLONE-TIME information that indicates when the data item versions were current; determining which data item versions of said plurality of data items versions contain all changes that must be seen by said query based, at least in part, on said CLONE-TIME information; and selecting a data item version to supply to said query from those data item versions that contain all changes that must be seen by said query.
- 21. The computer-readable medium of claim 20 wherein the step of determining includes:
determining, based on a CLONE-TIME associated with a data item version, whether changes that must be seen by said query may have been made to said data item after creation of said data item version; and determining, based on a MOST-RECENT-INCLUSION-TIME associated with said data item version, whether changes that must be seen by said query may have been removed from said data item version.
- 22. The computer-readable medium of claim 21 wherein the step of selecting includes using the CLONE-TIME information to select a candidate that requires fewer changes to be removed than other candidates.
PRIORITY CLAIM AND CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is related to and claims domestic priority from prior U.S. Provisional Application Serial No. 60/295,104 (attorney docket number 50277-1621), filed on Jun. 1, 2001, entitled “Consistent Read in a Distributed Database Environment”, by Amit Ganesh and Roger J. Bamford, the entire disclosure of which is hereby incorporated by reference for all purposes as if fully set forth herein.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60295104 |
Jun 2001 |
US |