Method and apparatus for increasing transaction concurrency by early release of locks in groups
First Claim
1. A database management system, comprising:
- a processor configured to;
associate multiple different activities with a same transaction, each of the multiple different activities each consisting of a separate different associated subgroup of program instructions for the same transaction,for each of the different subgroups of program instructions, initiate a different associated subgroup of multiple different read and/or write actions that access an associated group of multiple different data items;
use and assign, for each of the different activities, only one single separate lock duration for all of the multiple different data items associated with the different associated subgroup of program instructions;
maintain, for each of the different activities, multiple different locks on all of the multiple different data items associated with the activity, and then release all of the multiple different locks for all of the multiple different data items associated with the activity together only when all of the subgroup of program instructions associated with the activity are completed so that all of the multiple different locks on all of the multiple different data items associated with the activity have a same lock duration;
release all of the locks on a first one of the groups of the multiple different data items associated with a first one of the different activities of the same transaction while a second set of data items that include at least some of the first group of data items from the first activity, but that are associated with a second one of the different activities for the same transaction, remain locked for a second one of the separate lock durations associated with the second activity.
5 Assignments
0 Petitions
Accused Products
Abstract
Activity Duration Locking (ADL) provides an efficient simple solution to manage a potentially large number of concurrently active lock groups. The ADL scheme allows a transaction fine control over creation of lock groups and classification of locks into lock groups enabling faster releasing of locks in groups. The life time that the lock group is active defines a new lock duration. This allows a large number of lock durations to be defined with the creation of each new lock group and any number of lock durations can be active for a given transaction. A very general concept of lock duration is supported without using any a priori semantics to individual lock durations and the duration of a lock group may be determined by the transaction as desired.
-
Citations
12 Claims
-
1. A database management system, comprising:
-
a processor configured to; associate multiple different activities with a same transaction, each of the multiple different activities each consisting of a separate different associated subgroup of program instructions for the same transaction, for each of the different subgroups of program instructions, initiate a different associated subgroup of multiple different read and/or write actions that access an associated group of multiple different data items; use and assign, for each of the different activities, only one single separate lock duration for all of the multiple different data items associated with the different associated subgroup of program instructions; maintain, for each of the different activities, multiple different locks on all of the multiple different data items associated with the activity, and then release all of the multiple different locks for all of the multiple different data items associated with the activity together only when all of the subgroup of program instructions associated with the activity are completed so that all of the multiple different locks on all of the multiple different data items associated with the activity have a same lock duration; release all of the locks on a first one of the groups of the multiple different data items associated with a first one of the different activities of the same transaction while a second set of data items that include at least some of the first group of data items from the first activity, but that are associated with a second one of the different activities for the same transaction, remain locked for a second one of the separate lock durations associated with the second activity. - View Dependent Claims (2, 3, 4)
-
-
5. A method for locking data items in a database management system, comprising:
-
associating multiple different activities with a same transaction, each of the multiple different activities each consisting of a different associated subgroup of program instructions for the same transaction and each different subgroup of program instructions initiating a different associated subgroup of multiple different read and/or write actions accessing an associated group of multiple different data items; associating and using, for each of the different activities, only a single separate individual lock duration for each different subgroup of program instructions and the accessed multiple different data items associated with the same activities in the same transaction; maintaining, for each of the different activities, multiple different locks on all of the multiple different data items for each different subgroup of program instructions associated with the same activities; and releasing all of the multiple different locks for all of the multiple different data items associated with the same activities together only when the entire subgroup of program instructions associated with the same activities are all completed so that all of the multiple different locks on all of the multiple different data items associated with the activity have a same lock duration; and releasing all of the locks on a first one of the groups of the multiple different data items associated with a first one of the different activities of the same transaction while a second set of data items that include at least some of the first group of data items from the first activity, but that are associated with a second one of the different activities for the same transaction, remain locked for a second one of the separate lock durations associated with the second activity. - View Dependent Claims (6, 7, 8)
-
-
9. Computer readable media containing instructions that when executed by a computer, comprise:
-
assigning activity identifiers to different individual subgroups of database access instructions within a same transaction that perform multiple different operations on multiple different data items in a database, the activity identifiers assignable to the database access instructions independently of any relationship that may exist between the multiple data items in the database accessed by the database access instructions; assigning multiple locks to the multiple different data items corresponding with the operations performed on the multiple data items by the different subgroups of database access instructions; assigning only one single separate lock duration for all of the multiple different data items associated with a same subgroup of database access instructions; for each of the different subgroups of database access instructions, assigning the same one of the activity identifiers to the locks that are associated with the subgroup of database access instructions; releasing, for each of the assigned activity identifiers, all of the multiple locks on all of the multiple different data items assigned to the assigned activity identifier at the same time when all of the multiple operations are completed for the subgroup of database access instructions assigned to the assigned activity identifier, and wherein the releasing of all of the multiple locks is in response to a single request via the assigned activity identifier; and
,releasing all of the locks on a first one of the subgroups of the multiple different data items associated with a first one of the activity identifiers of the same transaction while a second set of data items that include at least some of the first group of data items associated with the first one of the activity identifiers, but that are associated with a second one of the activity identifiers for the same transaction, remain locked for a second separate lock duration associated with the second activity identifier. - View Dependent Claims (10, 11, 12)
-
Specification