IP Library Granted Patent US 7,334,004
Granted Patent B2
US 7,334,004 · App. 10/119,672 · Granted Feb 19, 2008

Consistent read in a distributed database environment

Assignee: Oracle International Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,334,004
App. No.
10/119,672
Granted
Feb 19, 2008
Kind
B2
Abstract

Techniques are provided for determining which data item version to supply to a query. According to the techniques, the determination is made by associating a new field, which indicates the time a data item version was current, with each data item version; associating a new field with each query, which indicates the last change that the query must see made by the transaction to which the query belongs; and determining which data item version to use to answer the query based, in part, on a comparison between the values of the two new fields.

Claims (90)

1. A method comprising:

maintaining a LAST-TO-SEE-TIMESTAMP, associated with a 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 a clone branch to which the data item version belongs was cloned from a current version of the data item;

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;

supplying the data item version to the session; and

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.

2. A method comprising:

maintaining a LAST-TO-SEE-TIMESTAMP, associated with a 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 a clone branch to which the data item version belongs was cloned from a current version of the data item;

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;

supplying the data item version to the session;

performing at least one of: (a) presenting information that is based at least in part on the data item version that is supplied to the session, and (b) storing information that is based at least in part on the data item version that is supplied to the session;

wherein a plurality of nodes in a cluster have data item versions for said data item;

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.

3. The method of claim 2 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.

4. The method of claim 2 , 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 information that must be seen was made to the current version of the data item after creation of the data item version.

5. A method comprising:

maintaining a LAST-TO-SEE-TIMESTAMP, associated with a 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 a clone branch to which the data item version belongs was cloned from a current version of the data item;

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;

supplying the data item version to the session; and

performing at least one of: (a) presenting information that is based at least in part on the data item version that is supplied to the session, and (b)storing information that is based at least in part on the data item version that is supplied to the session;

wherein a transaction that includes a query is executing in the session;

wherein 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

wherein 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.

6. The method of claim 5 , further comprising setting said CLONE-TIME based on a global clock when said data item version is cloned.

selecting which node to send a request for said data item to based on said CLONE-TIME information.

7. The method of claim 5 , 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.

8. A method comprising:

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;

wherein, for each data item version of the plurality of data item versions, the CLONE-TIME information for that data item version indicates a time at which a clone branch to which that data item version belongs was cloned from a current version of a particular data item;

determining, based at least in part on said CLONE-TIME information, which data item versions of said plurality of data items versions contain all changes that must be seen by a query;

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;

supplying the data item version to said query; and

performing at least one of: (a) presenting information that is based at least in part on the data item version that is supplied to the query, and (b) storing information that is based at least in part on the data item version that is supplied to the query;

wherein the step of determining includes:

determining, based on a CLONE-TIME associated with said data item version, whether changes that must be seen by said query have been made to said particular 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 have been removed from said data item version.

9. The method of claim 8 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.

10. A computer-readable storage medium comprising instructions executable by one or more processors to instruct the one or more processors to perform steps comprising:

maintaining a LAST-TO-SEE-TIMESTAMP, associated with a 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 a clone branch to which the data item version belongs was cloned from a current version of the data item;

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; supplying the data item version to the session;

supplying the data item version to the session; and

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.

11. A computer-readable storage medium comprising instructions executable by one or more processors to instruct the one or more processors to perform steps comprising:

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;

wherein, for each data item version of the plurality of data item versions, the CLONE-TIME information for that data item version indicates a time at which a clone branch to which that data item version belongs was cloned from a current version of a particular data item;

determining, based at least in part on said CLONE-TIME information, which data item versions of said plurality of data items versions contain all changes that must be seen by a query;

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;

supplying the data item version to said query; and

performing at least one of: (a) presenting information that is based at least in part on the data item version that is supplied to the query, and (b) storing information that is based at least in part on the data item version that is supplied to the query;

determining, based on a CLONE-TIME associated with said data item version, whether changes that must be seen by said query have been made to said particular 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 have been removed from said data item version.

12. A computer-readable storage medium comprising instructions executable by one or more processors to instruct the one or more processors to perform steps comprising:

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;

wherein, for each data item version of the plurality of data item versions, the CLONE-TIME information for that data item version indicates a time at which a clone branch to which that data item version belongs was cloned from a current version of a particular data item;

determining, based at least in part on said CLONE-TIME information, which data item versions of said plurality of data items versions contain all changes that must be seen by a query;

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;

supplying the data item version to said query; and

performing at least one of: (a) presenting information that is based at least in part on the data item version that is supplied to the query, and (b) storing information that is based at least in part on the data item version that is supplied to the query;

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.

13. A computer-readable storage medium comprising instructions executable by one or more processors to instruct the one or more processors to perform steps comprising:

maintaining a LAST-TO-SEE-TIMESTAMP, associated with a 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 a clone branch to which the data item version belongs was cloned from a current version of the data item;

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;

supplying the data item version to the session; and

performing at least one of: (a) presenting information that is based at least in part on the data item version that is supplied to the session, and (b) storing information that is based at least in part on the data item version that is supplied to the session;

wherein a transaction that includes a query is executing in the session;

wherein 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

wherein 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.

14. The computer-readable storage medium of claim 13 ,

wherein the steps further comprise setting said CLONE-TIME based on a global clock when said data item version is cloned.

15. The computer-readable storage medium of claim 13 , 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.

16. A computer-readable storage medium comprising instructions executable by one or more processors to instruct the one or more processors to perform steps comprising:

maintaining a LAST-TO-SEE-TIMESTAMP, associated with a 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 a clone branch to which the data item version belongs was cloned from a current version of the data item;

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;

supplying the data item version to the session; and

performing at least one of: (a) presenting information that is based at least in part on the data item version that is supplied to the session, and (b) storing information that is based at least in part on the data item version that is supplied to the session;

wherein a plurality of nodes in a cluster have data item versions for said data item;

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.

17. The computer-readable storage medium of claim 16 , 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.

18. The computer-readable storage medium of claim 16 , 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 information that must be seen was made to the current version of the data item after creation of the data item version.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 21, 2003
From: ORACLE CORPORATION
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 013944/0938 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 9, 2002
From: GANESH, AMIT; BAMFORD, ROGER J.
To: ORACLE CORPORATION
Reel/Frame 012787/0295 →
Continuity (2)
Provisional Application 6029510400 · Jun 1, 2001
Related Publication 20020194206A1 · Dec 19, 2002