Multi-phase locking for partition maintenance operations
First Claim
1. A method for performing an operation on a partitioned object, wherein said operation changes a physical attribute of one or more partitions of said partitioned object, the method comprising the steps of:
- acquiring a lock on a body of metadata associated with said one or more partitions;
acquiring a data lock on said one or more partitions;
while holding said data lock on said one or more partitions, releasing said lock on said body of metadata;
changing said physical attribute of said one or more partitions; and
releasing said data lock on said one or more partitions.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for multi-phase locking for partition maintenance operations. In the first phase, a shared data dictionary lock is acquired on a body of metadata in a data dictionary. Next, the data dictionary is read and a list of affected partitions is generated. In the second phase, an intent exclusive data lock is acquired on the affected table. Next, an exclusive data lock is acquired on the affected partitions of the affected table. The shared data dictionary lock on the data dictionary is released and a physical attribute of the data of the affected partitions is changed. In the third phase, an exclusive data dictionary lock is acquired on the data dictionary. The metadata associated with the affected partitions in the data dictionary is updated and the exclusive data locks on the affected partitions and the intent exclusive data lock on the affected table are released. Finally, the exclusive data dictionary lock on the data dictionary is released. As a result of performing multi-phase locking for partition maintenance operations, the scope of resources locked is reduced and the efficiency of the partition maintenance operations, from a concurrency point of view, is increased.
-
Citations
38 Claims
-
1. A method for performing an operation on a partitioned object, wherein said operation changes a physical attribute of one or more partitions of said partitioned object, the method comprising the steps of:
-
acquiring a lock on a body of metadata associated with said one or more partitions; acquiring a data lock on said one or more partitions; while holding said data lock on said one or more partitions, releasing said lock on said body of metadata; changing said physical attribute of said one or more partitions; and releasing said data lock on said one or more partitions. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method for performing an operation on a partitioned object, wherein said operation changes a physical attribute of one or more partitions of said partitioned object, the method comprising the steps of:
-
acquiring a first lock on a body of metadata associated with said one or more partitions; acquiring a data lock on said one or more partitions; while holding said data lock on said one or more partitions, releasing said first lock on said body of metadata; changing said one or more partitions; acquiring a second lock on said body of metadata; updating said body of metadata; releasing said data lock on said one or more partitions; and releasing said second lock on said body of metadata. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A computer readable medium having stored thereon sequences of instructions for performing an operation on a partitioned object, wherein said operation changes a physical attribute of one or more partitions of said partitioned object, said sequences of instructions including instructions for performing the steps of:
-
acquiring a lock on a body of metadata associated with said one or more partitions; acquiring a data lock on said one or more partitions; while holding said data lock on said one or more partitions, releasing said lock on said body of metadata; changing said physical attribute of said one or more partitions; and releasing said data lock on said one or more partitions. - View Dependent Claims (21, 22, 23, 24, 25, 26, 27, 28, 29)
-
-
30. A computer readable medium having stored thereon sequences of instructions for performing an operation on a partitioned object, wherein said operation changes a physical attribute of one or more partitions of said partitioned object, said sequences of instructions including instructions for performing the steps of:
-
acquiring a first lock on a body of metadata associated with said one or more partitions; acquiring a data lock on said one or more partitions; while holding said data lock on said one or more partitions, releasing said first lock on said body of metadata; changing said one or more partitions; acquiring a second lock on said body of metadata; updating said body of metadata; releasing said data lock on said one or more partitions; and releasing said second lock on said body of metadata. - View Dependent Claims (31, 32, 33, 34, 35, 36, 37, 38)
-
Specification