ALLOCATION LOCKS AND THEIR USE
First Claim
1. A method that facilitates synchronization of concurrent database transactions in a database management system that manages a database having a database data page that provides sub-page row storage space, the database management system further managing a plurality of concurrent database transactions, each of the concurrent database transactions requiring a modification of the database data page, the method comprising:
- creating a copy of the database data page for each of the concurrent database transactions, each of the concurrent database transactions storing its respective copy of the database data page in a separate reserved space to facilitate modifying the database data page;
assigning an exclusive row level lock on a first row of the database data page to one of the concurrent database transactions when the one of the concurrent database transactions requests to modify the first row, the exclusive lock permits the one of concurrent database transactions to modify a copy of the first row in its respective copy of the database data page while restricting others of the concurrent database transactions from modifying corresponding copies of the first row in their respective copies of the database data page, but allows the others of the concurrent database transactions to modify other rows;
assigning an allocation lock on the database data page to the one of the concurrent database transactions when the one of the concurrent database transactions seeks additional space to modify the database data page, the allocation lock permits the one of the concurrent database transactions to acquire additional space on the database data page and to use the additional space in its respective copy of the database data page and allows the others of the concurrent database transactions that do not require additional space on the database data page to effect modifications to their respective copies of the database data page, but prevents the others of the concurrent database transactions from acquiring additional space on the database data page;
each of the concurrent database transactions modifying its respective copy of the database data page using row level operations to facilitate modifying the database data page;
tracking space availability for the database data page over the concurrent database transactions, the concurrent database transactions operating on respective copies of the database data page;
ensuring that the concurrent database transactions do not consume all of storage space on the database data page based in part on the tracked space availability; and
arranging a top-down lock granularity based on logical or physical granularities of objects stored in the database.
2 Assignments
0 Petitions
Accused Products
Abstract
Systems and methodologies are provided that employ an allocation lock, which permits only a single transaction to acquire space on a particular page at any one time. The allocation lock of the present invention facilitates operations of concurrent transactions at a subpage level (e.g., a row level), and in conjunction with a heap manager can enforce a set of conditions such that prior to a commit stage of a transaction, a space availability for a particular page can be typically assured (e.g., that transactions operating on various copies of the page do not consume all of storage space on that page), and reorganization of data around the page is mitigated (e.g., that a transaction need not move data around the page for purpose of merging various copies.)
13 Citations
18 Claims
-
1. A method that facilitates synchronization of concurrent database transactions in a database management system that manages a database having a database data page that provides sub-page row storage space, the database management system further managing a plurality of concurrent database transactions, each of the concurrent database transactions requiring a modification of the database data page, the method comprising:
-
creating a copy of the database data page for each of the concurrent database transactions, each of the concurrent database transactions storing its respective copy of the database data page in a separate reserved space to facilitate modifying the database data page; assigning an exclusive row level lock on a first row of the database data page to one of the concurrent database transactions when the one of the concurrent database transactions requests to modify the first row, the exclusive lock permits the one of concurrent database transactions to modify a copy of the first row in its respective copy of the database data page while restricting others of the concurrent database transactions from modifying corresponding copies of the first row in their respective copies of the database data page, but allows the others of the concurrent database transactions to modify other rows; assigning an allocation lock on the database data page to the one of the concurrent database transactions when the one of the concurrent database transactions seeks additional space to modify the database data page, the allocation lock permits the one of the concurrent database transactions to acquire additional space on the database data page and to use the additional space in its respective copy of the database data page and allows the others of the concurrent database transactions that do not require additional space on the database data page to effect modifications to their respective copies of the database data page, but prevents the others of the concurrent database transactions from acquiring additional space on the database data page; each of the concurrent database transactions modifying its respective copy of the database data page using row level operations to facilitate modifying the database data page; tracking space availability for the database data page over the concurrent database transactions, the concurrent database transactions operating on respective copies of the database data page; ensuring that the concurrent database transactions do not consume all of storage space on the database data page based in part on the tracked space availability; and arranging a top-down lock granularity based on logical or physical granularities of objects stored in the database. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. One or more physical computer readable storage media having stored thereon computer executable instructions that, when executed by a processor, perform a method comprising:
-
creating a copy of the database data page for each of the concurrent database transactions, each of the concurrent database transactions storing its respective copy of the database data page in a separate reserved space to facilitate modifying the database data page; assigning an exclusive row level lock on a first row of the database data page to one of the concurrent database transactions when the one of the concurrent database transactions requests to modify the first row, the exclusive lock permits the one of concurrent database transactions to modify a copy of the first row in its respective copy of the database data page while restricting others of the concurrent database transactions from modifying corresponding copies of the first row in their respective copies of the database data page, but allows the others of the concurrent database transactions to modify other rows; assigning an allocation lock on the database data page to the one of the concurrent database transactions when the one of the concurrent database transactions seeks additional space to modify the database data page, the allocation lock permits the one of the concurrent database transactions to acquire additional space on the database data page and to use the additional space in its respective copy of the database data page and allows the others of the concurrent database transactions that do not require additional space on the database data page to effect modifications to their respective copies of the database data page, but prevents the others of the concurrent database transactions from acquiring additional space on the database data page; each of the concurrent database transactions modifying its respective copy of the database data page using row level operations to facilitate modifying the database data page; tracking space availability for the database data page over the concurrent database transactions, the concurrent database transactions operating on respective copies of the database data page; ensuring that the concurrent database transactions do not consume all of storage space on the database data page based in part on the tracked space availability; and arranging a top-down lock granularity based on logical or physical granularities of objects stored in the database. - View Dependent Claims (13)
-
-
14. A database management system that manages a database including a database data page, the database data page providing sub-page storage space, the database management system further managing a plurality of concurrent database transactions, each of the concurrent database transactions requiring a modification of the database data page and storing a respective copy of the database data page in a separate reserved space, the database management system comprising:
-
a processor; and one or more physical computer readable storage media operatively coupled to the processor, the computer-readable storage media having stored thereon computer executable instructions that, when executed by the processor, implement a method comprising; creating a copy of the database data page for each of the concurrent database transactions, each of the concurrent database transactions storing its respective copy of the database data page in a separate reserved space to facilitate modifying the database data page; assigning an exclusive row level lock on a first row of the database data page to one of the concurrent database transactions when the one of the concurrent database transactions requests to modify the first row, the exclusive lock permits the one of concurrent database transactions to modify a copy of the first row in its respective copy of the database data page while restricting others of the concurrent database transactions from modifying corresponding copies of the first row in their respective copies of the database data page, but allows the others of the concurrent database transactions to modify other rows; assigning an allocation lock on the database data page to the one of the concurrent database transactions when the one of the concurrent database transactions seeks additional space to modify the database data page, the allocation lock permits the one of the concurrent database transactions to acquire additional space on the database data page and to use the additional space in its respective copy of the database data page and allows the others of the concurrent database transactions that do not require additional space on the database data page to effect modifications to their respective copies of the database data page, but prevents the others of the concurrent database transactions from acquiring additional space on the database data page; each of the concurrent database transactions modifying its respective copy of the database data page using row level operations to facilitate modifying the database data page; tracking space availability for the database data page over the concurrent database transactions, the concurrent database transactions operating on respective copies of the database data page; ensuring that the concurrent database transactions do not consume all of storage space on the database data page based in part on the tracked space availability; and arranging a top-down lock granularity based on logical or physical granularities of objects stored in the database. - View Dependent Claims (15, 16, 17, 18)
-
Specification