Techniques for maintaining consistency for different requestors of files in a database management system
First Claim
1. A machine-implemented method, comprising:
- receiving a request to perform a file system operation, wherein performance of said file system operation requires performance of a plurality of database operations involving one or more resources;
performing said file system operation,wherein performing said file system operation comprises the steps of;
obtaining a first set of locks that apply to said one or more resources, wherein each lock in said first set of locks is a first type of lock;
wherein the first type of lock is a file-based lock;
performing said plurality of database operations in a plurality of database transactions;
for each database transaction of said plurality of transactions, obtaining a second set of locks on the resources, of said one or more resources, that are involved in database operations that are performed during said database transaction, wherein each lock in said second set of locks is a second type of lock;
wherein the second type of lock is database lock;
releasing locks of said second type of lock in response to successful completion of the corresponding database transaction;
wherein releasing locks of said second type includes releasing a lock on a particular resource involved in a particular database transaction upon successful completion of the database transaction prior to successful completion of said file system operation; and
releasing locks of said first type of lock in response to successful completion of said file system operation.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for providing file system operation locks at a database server is provided. A database server may employ database locks and file system operation locks in servicing requests from consistent requestors and inconsistent requesters. A database lock is a lock that is obtained in response to performing a database operation, and the database lock is released when the database operation has successfully completed. A file system operation lock is a lock that is obtained in response to performing an OPEN file system operation, and the file system operation lock is released when a CLOSE file system operation is performed. The database server may use a temporary copy of the resource, which reflects all the current changes that have been made to the resource by database operations, in servicing consistent requestors, and may use the original version of the resource in servicing inconsistent requesters.
83 Citations
34 Claims
-
1. A machine-implemented method, comprising:
-
receiving a request to perform a file system operation, wherein performance of said file system operation requires performance of a plurality of database operations involving one or more resources; performing said file system operation, wherein performing said file system operation comprises the steps of; obtaining a first set of locks that apply to said one or more resources, wherein each lock in said first set of locks is a first type of lock; wherein the first type of lock is a file-based lock; performing said plurality of database operations in a plurality of database transactions; for each database transaction of said plurality of transactions, obtaining a second set of locks on the resources, of said one or more resources, that are involved in database operations that are performed during said database transaction, wherein each lock in said second set of locks is a second type of lock; wherein the second type of lock is database lock; releasing locks of said second type of lock in response to successful completion of the corresponding database transaction; wherein releasing locks of said second type includes releasing a lock on a particular resource involved in a particular database transaction upon successful completion of the database transaction prior to successful completion of said file system operation; and releasing locks of said first type of lock in response to successful completion of said file system operation. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. A computer-readable storage medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the steps of:
-
receiving a request to perform a file system operation, wherein performance of said file system operation requires performance of a plurality of database operations involving one or more resources; performing said file system operation, wherein performing said file system operation comprises the steps of; obtaining a first set of locks that apply to said one or more resources, wherein each lock in said first set of locks is a first type of lock; wherein the first type of lock is a file-based lock; performing said plurality of database operations in a plurality of database transactions; for each database transaction of said plurality of transactions, obtaining a second set of locks on the resources, of said one or more resources, that are involved in database operations that are performed during said database transaction, wherein each lock in said second set of locks is a second type of lock; wherein the second type of lock is database lock; releasing locks of said second type of lock in response to successful completion of the corresponding database transaction; wherein releasing locks of said second type includes releasing a lock on a particular resource involved in a particular database transaction upon successful completion of the database transaction prior to successful completion of said file system operation; and releasing locks of said first type of lock in response to successful completion of said file system operation. - View Dependent Claims (19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34)
-
Specification