Transitioning ownership of data items between ownership groups
First Claim
1. A method for transitioning ownership of a data item, the method comprising the steps of:
- a) disabling access to the data item;
b) waiting for all transactions that have made changes to the data item to either commit or abort;
c) if any transactions that made changes to the data item abort, then removing all changes to the data item that were made before access to the data item was disabled by the transactions that abort;
d) changing data that indicates ownership of the data item from a first owner to a second owner; and
e) enabling access to the data item.
2 Assignments
0 Petitions
Accused Products
Abstract
A database or some portion thereof is partitioned into ownership groups. Each ownership group is assigned one or more database servers as owners of the ownership group. The database servers that are assigned as owners of an ownership group are treated as the owners of all data items that belong to the ownership group. That is, they are allowed to directly access the data items within the ownership group, while other database servers are not allowed to directly access those data items. A mechanism is provided for transitioning ownership of a data item. Ownership is transferred by disabling access to the data item, waiting for all transactions that have made changes to the data item to either commit or abort, changing data that indicates ownership of the data item from a first owner to a second owner, and enabling access to the data item.
-
Citations
24 Claims
-
1. A method for transitioning ownership of a data item, the method comprising the steps of:
-
a) disabling access to the data item;
b) waiting for all transactions that have made changes to the data item to either commit or abort;
c) if any transactions that made changes to the data item abort, then removing all changes to the data item that were made before access to the data item was disabled by the transactions that abort;
d) changing data that indicates ownership of the data item from a first owner to a second owner; and
e) enabling access to the data item. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
the data item belongs to an ownership group initially owned by said first owner; and
the step of changing data that indicates ownership of the data item from a first owner to a second owner includes changing the owner of said ownership group from said first owner to said second owner.
-
-
4. The method of claim 1 wherein:
-
the data item initially belongs to a first ownership group owned by said first owner; and
the step of changing data that indicates ownership of the data item from a first owner to a second owner includes changing data that indicates the ownership group to which said data item belongs to reflect that said data item belongs to a second ownership group owned by said second owner.
-
-
5. The method of claim 3 further including the step of responding to a failure of a process that is performing said ownership transition by performing the steps of:
-
determining whether the process failed before changing the data that indicates ownership of the ownership group;
if the process failed before changing the data that indicates ownership of the ownership group, then restoring the first owner as owner of the ownership group; and
if the process failed after changing the data that indicates ownership of the ownership group, then retaining the second owner as owner of the ownership group.
-
-
6. The method of claim 4 wherein:
-
the step of changing the data that indicates the ownership group to which said data item belongs is performed by changing data in a first file;
the method further includes the step of updating a second file to reflect that the data item belongs to the second ownership group before changing data in said first file.
-
-
7. The method of claim 6 further comprising the step of responding to a failure of a process that is performing said ownership transition by performing the steps of:
-
determining whether the process performing the ownership transition died before the change to the second file;
if the process performing the ownership transition died before the change to the second file, then restoring the data item as a member of said first ownership group;
if the process performing the ownership transition died after the change to the second file but before the change to the first file, then completing the transition to said second ownership group by updating said first file.
-
-
8. The method of claim 6 further comprising the steps of:
-
determining whether the second ownership group is undergoing an ownership change; and
if the second ownership group is undergoing an ownership change, then marking the data item as move delayed.
-
-
9. The method of claim 2 wherein the atomic operation includes the steps of:
-
maintaining a set of related blocks that includes a first block and a second block, the first block that storing data that indicates that the data item is owned by the first owner;
maintaining at least one flag that corresponds to the set of related blocks, said at least one flag indicating that said first block is valid and that said second block is not valid;
updating a second block to indicate that the data item is owned by said second owner; and
updating said at least one flag to indicate that said first block is not valid and that said second block is valid.
-
-
10. A method for transitioning to a second owner set the ownership of a data item that is initially owned by a first owner set, the method comprising the steps of:
-
informing a plurality of database servers that the data item is in the process of being transitioned from the first owner set to the second owner set;
after informing said plurality of database servers, concurrently allowing both members of said first owner set and members of said second owner set to directly access said data item;
detecting when all transactions that are accessing said data item through said first owner set have either committed or aborted;
after detecting that all transactions that are accessing said data item through said first owner set have either committed or aborted, performing the steps of storing data that indicates that the second owner set is the exclusive owner of the data item; and
allowing only members of said second owner set to directly access the data item. - View Dependent Claims (11, 12)
allowing processes executing in members of said first owner set that had accessed the data item before the step of informing to continue to directly access the data item after the step of informing; and
causing all processes that begin after the step of informing to access the data item through members of said second owner set.
-
-
12. The method of claim 11 wherein the step of detecting when all transactions that are accessing said data item through said first owner set have either committed or aborted is performed by detecting when all transactions that began execution prior to the step of informing have either committed or aborted.
-
13. A computer-readable medium carrying instructions for transitioning ownership of a data item, the instructions including instructions for performing the steps of:
-
a) disabling access to the data item;
b) waiting for all transactions that have made changes to the data item to either commit or abort;
c) if any transactions that made changes to the data item abort, then removing all changes to the data item that were made before access to the data item was disabled by the transactions that abort;
d) changing data that indicates ownership of the data item from a first owner to a second owner; and
e) enabling access to the data item. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21)
the data item belongs to an ownership group initially owned by said first owner; and
the step of changing data that indicates ownership of the data item from a first owner to a second owner includes changing the owner of said ownership group from said first owner to said second owner.
-
-
16. The computer-readable medium of claim 13 wherein:
-
the data item initially belongs to a first ownership group owned by said first owner; and
the step of changing data that indicates ownership of the data item from a first owner to a second owner includes changing data that indicates the ownership group to which said data item belongs to reflect that said data item belongs to a second ownership group owned by said second owner.
-
-
17. The computer-readable medium of claim 15 further including instructions for responding to a failure of a process that is performing said ownership transition by performing the steps of:
-
determining whether the process failed before changing the data that indicates ownership of the ownership group;
if the process failed before changing the data that indicates ownership of the ownership group, then restoring the first owner as owner of the ownership group; and
if the process failed after changing the data that indicates ownership of the ownership group, then retaining the second owner as owner of the ownership group.
-
-
18. The computer-readable medium of claim 16 wherein:
-
the step of changing the data that indicates the ownership group to which said data item belongs is performed by changing data in a first file;
the computer-readable medium further includes instructions for performing the step of updating a second file to reflect that the data item belongs to the second ownership group before changing data in said first file.
-
-
19. The computer-readable medium of claim 18 further comprising instructions for performing the step of responding to a failure of a process that is performing said ownership transition by performing the steps of:
-
determining whether the process performing the ownership transition died before the change to the second file;
if the process performing the ownership transition died before the change to the second file, then restoring the data item as a member of said first ownership group;
if the process performing the ownership transition died after the change to the second file but before the change to the first file, then completing the transition to said second ownership group by updating said first file.
-
-
20. The computer-readable medium of claim 18 further comprising instructions for performing the steps of:
-
determining whether the second ownership group is undergoing an ownership change; and
if the second ownership group is undergoing an ownership change, then marking the data item as move delayed.
-
-
21. The computer-readable medium of claim 14 wherein the atomic operation includes the steps of:
-
maintaining a set of related blocks that includes a first block and a second block, the first block that storing data that indicates that the data item is owned by the first owner;
maintaining at least one flag that corresponds to the set of related blocks, said at least one flag indicating that said first block is valid and that said second block is not valid;
updating a second block to indicate that the data item is owned by said second owner; and
updating said at least one flag to indicate that said first block is not valid and that said second block is valid.
-
-
22. A computer-readable medium carrying instructions for transitioning to a second owner set the ownership of a data item that is initially owned by a first owner set, the instructions including instruction for performing the steps of:
-
informing a plurality of database servers that the data item is in the process of being transitioned from the first owner set to the second owner set;
after informing said plurality of database servers, concurrently allowing both members of said first owner set and members of said second owner set to directly access said data item;
detecting when all transactions that are accessing said data item through said first owner set have either committed or aborted;
after detecting that all transactions that are accessing said data item through said first owner set have either committed or aborted, performing the steps of storing data that indicates that the second owner set is the exclusive owner of the data item; and
allowing only members of said second owner set to directly access the data item. - View Dependent Claims (23, 24)
allowing processes executing in members of said first owner set that had accessed the data item before the step of informing to continue to directly access the data item after the step of informing; and
causing all processes that begin after the step of informing to access the data item through members of said second owner set.
-
-
24. The computer-readable medium of claim 23 wherein the step of detecting when all transactions that are accessing said data item through said first owner set have either committed or aborted is performed by detecting when all transactions that began execution prior to the step of informing have either committed or aborted.
Specification