Method and system for controlling concurrent access to data in a database system
Abstract
A method and system for controlling concurrency of access to data in a database system is provided. The method includes receiving a lock request for access to data in the database system, in which the lock request is a request for a page lock or a row lock for a corresponding row or page in the database system containing the data. The method further includes identifying a partition in the database system that contains the row or the page in the database system containing the data; associating the lock request with a partition lock on the partition that contains the row or the page in the database system containing the data; and accessing the data using the partition lock.
Claims
exact text as granted — not AI-modified1 . A method for controlling concurrency of access to data in a database system, the method comprising:
receiving a lock request for access to data in the database system, the lock request being a request for a page lock or a row lock for a corresponding row or page in the database system containing the data; identifying a partition in the database system that contains the row or the page in the database system containing the data; associating the lock request with a partition lock on the partition that contains the row or the page in the database system containing the data; and accessing the data using the partition lock.
2 . The method of claim 1 , further comprising:
responsive to the data being committed at a time of receiving the lock request, accessing the data without using the partition lock.
3 . The method of claim 1 , wherein accessing the data using the partition lock includes serializing access to the partition at a lock state to protect against interference in the form of updates to the partition.
4 . The method of claim 3 , wherein serializing access to the partition includes permitting lock requests access to the partition that are compatible with the lock state.
5 . The method of claim 4 , further comprising:
receiving a lockmax value; accumulating for an application, a number of lock requests for access to the data in the database system by the application; comparing the number of lock requests with the lockmax value; and when the number of lock requests equals the lockmax value, escalating the lock state.
6 . The method of claim 1 , wherein accessing the data using the partition lock comprises an application accessing the data through a single database system.
7 . The method of claim 1 , wherein accessing the data using the partition lock comprises a second database system in a data-sharing environment accessing the data.
8 . The method of claim 1 , wherein the lock request is a request for a shared lock or an exclusive lock.
9 . A computer readable medium encoded with a computer program for controlling concurrency of access to data in a database system, the computer program comprising computer executable instructions for:
receiving a lock request for access to data in the database system, the lock request being a request for a page lock or a row lock for a corresponding row or page in the database system containing the data; identifying a partition in the database system that contains the row or the page in the database system containing the data; associating the lock request with a partition lock on the partition that contains the row or the page in the database system containing the data; and accessing the data using the partition lock.
10 . The computer readable medium of claim 9 , wherein the computer program further comprises computer executable instructions for:
accessing the data without using the partition lock responsive to the data being committed at a time of receiving the lock request.
11 . The computer readable medium of claim 9 , wherein the computer executable instructions for accessing the data using the partition lock include computer executable instructions for serializing access to the partition at a lock state to protect against interference in the form of updates to the partition.
12 . The computer readable medium of claim 11 , wherein the computer executable instructions for serializing access to the partition include computer executable instructions for permitting lock requests access to the partition that are compatible with the lock state.
13 . The computer readable medium of claim 12 , wherein the computer program further comprises computer executable instructions for:
receiving a lockmax value; accumulating for an application, a number of lock requests for access to the data in the database system by the application; comparing the number of lock requests with the lockmax value; and when the number of lock requests equals the lockmax value, escalating the lock state.
14 . The computer readable medium of claim 9 , wherein the computer executable instructions for accessing the data using the partition lock include computer executable instructions for having an application access the data through a single database system.
15 . The computer readable medium of claim 9 , wherein the computer executable instructions for accessing the data using the partition lock c include computer executable instructions for having a second database system in a data-sharing environment accessing the data.
16 . A database management system implemented in a digital computer system, the database management system configured to manage access to data in a database system, the database management system comprising:
a data manager configured to:
receive a lock request for access to data in the database system, the lock request being a request for a page lock or a row lock for a corresponding row or page in the database system containing the data;
identify a partition in the database system that contains the row or the page in the database system containing the data;
associate the lock request with a partition lock on the partition that contains the row or the page in the database system containing the data; and
access the data using the partition lock.
17 . The database management system of claim 16 , wherein the data manager is further configured to access the data without using the partition lock responsive to the data being committed at a time the data manager received the lock request.
18 . The database management system of claim 16 , further comprising a lock manager configured to grant serialized access to the partition at a lock state to protect against interference in the form of updates to the partition.
19 . The database management system of claim 18 , wherein the lock manager serializes access to the partition by granting lock requests on the partition that are compatible with the lock state.
20 . The database management system of claim 18 , wherein the lock manager is coupled to a plurality of database systems of a data-sharing environment.Join the waitlist — get patent alerts
Track US2008010283A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.