System for database integrity with multiple logs assigned to client subsets
First Claim
1. A method of distributing log entries of transactions initiated by a plurality of clients commonly accessing at least one database, said method comprising the steps of:
- dividing said plurality of clients into a plurality of subsets of clients, each of said plurality of clients commonly accessing said at least one database, each of said plurality of clients initiating transactions with said at least one database, each of said subsets including at least one of said plurality of clients;
providing in a first memory means a different transaction log buffer associated with each one of said plurality of subsets of clients; and
for each transaction of one of said plurality of clients, storing a transaction log entry in said different transaction log buffer associated with the subset of clients that includes the client that initiated said transaction.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention provides a distributed log system where the logs are distributed on a per client basis. That is, the clients are partitioned into subsets. Each subset of clients is assigned a log, and the the redo records of those clients are maintained in that log. This reduces contention bottlenecks, because the number of clients writing to any one log is limited. Also, all of a client'"'"'s changes are stored in a single log. During a recovery process, the changes for a block of data may be stored in different logs. For proper recovery, the changes must be applied to the database in the order in which they were originally made. The present invention provides a system for ordering the log entries in the correct order by using a "sequence number". Each page of data in the database has an associated sequence number. When a change is made to that page, the sequence number is incremented. The new sequence number is written to the log along with the change information. To minimize overhead, the sequence number is structured as a two part value. The first part of the value is an "incarnation number" that is increased whenever the associated change assigns a new value to the entire data block that is independent of its prior value, such as the change that initiates a block.
-
Citations
66 Claims
-
1. A method of distributing log entries of transactions initiated by a plurality of clients commonly accessing at least one database, said method comprising the steps of:
-
dividing said plurality of clients into a plurality of subsets of clients, each of said plurality of clients commonly accessing said at least one database, each of said plurality of clients initiating transactions with said at least one database, each of said subsets including at least one of said plurality of clients; providing in a first memory means a different transaction log buffer associated with each one of said plurality of subsets of clients; and for each transaction of one of said plurality of clients, storing a transaction log entry in said different transaction log buffer associated with the subset of clients that includes the client that initiated said transaction. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A database system comprising:
-
first storage means for storing data blocks, said data blocks being subdivisions of a database; a plurality of clients, each client of said plurality of clients commonly accessing said database, each client of said plurality of clients initiating transactions with said database; first and second subsets of said plurality of clients each of said subsets of clients having at least one client of said plurality of clients, clients of said first subset not being clients of said second subset; cache buffer means coupled to said first storage means and to said first and second subset of clients, said cache buffer means for storing copies of said areas of data from said first storage means; first and second transaction log buffer means coupled to said first and second subsets of clients respectively, said first and second transaction log buffer means for temporarily storing a log entry for each transaction initiated by a client of said first and second subset of clients respectively. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A method of providing a log of transactions of a plurality of clients accessing a database, said method comprising the steps of:
-
dividing said plurality of clients into a plurality of subsets of clients all accessing a single data abase, each of said subsets including at least one of said plurality of clients, each of said subsets having an associated log; initiating a transaction on an original data block of said database by a client of one of said subsets of clients; providing a copy of said data block to a cache buffer; executing said transaction on said copy of said block data; storing a transaction log entry of said transaction in a temporary memory means. - View Dependent Claims (20, 21, 22, 23, 24, 25)
-
-
26. A database system comprising:
-
first storage means for storing data blocks, each of said data blocks having a sequence number first and second subsets of clients accessing a single database, each of said subsets of clients having at least one client; cache buffer means coupled to said first storage means and to said first and second subset of clients respectively, said first and second cache buffer means for storing copies of said data blocks from said first storage means; first and second transaction log buffer means coupled to said first and second subsets of clients respectively, said first and second transaction log buffer means for temporarily storing a log entry for each transaction of said first and second subset of clients respectively; first and second log storage means coupled to said first and second log buffer means respectively for permanently storing a log entry for each transaction of said first and second subset of clients respectively; sequence number incrementing means coupled to said first storage means for incrementing a sequence number associated with a data block for each transaction changing said data block. - View Dependent Claims (27, 28, 29, 30, 31, 32)
-
-
33. A method of distributing log entries of transactions of a plurality of clients accessing a database, said method comprising the steps of:
-
dividing said plurality of clients into a plurality of subsets of clients, each of said subsets including at least one of said plurality of clients; providing in a first memory means a transaction log buffer for each subset of clients; for each transaction of a client, storing a transaction log entry in a transaction log buffer associated with the subset of clients that includes the client; providing in a second memory means a transaction log for each transaction log buffer; storing said transaction log entry in said transaction log.
-
-
34. A method of distributing log entries of transactions of a plurality of clients accessing a database, said method comprising the steps of:
-
dividing said plurality of clients into a plurality of subsets of clients all accessing a single database, each of said subsets including at least one of said plurality of clients; providing in a first memory means a transaction log buffer for each subset of clients; for each transaction of a client, storing a transaction log entry in a transaction log buffer associated with the subset of clients that includes the client; providing in a second memory means a transaction log for each transaction log buffer; storing said transaction log entry in said transaction log; providing, in a third memory means, a cache buffer;
said cache buffer for storing a copy of a data block from said database upon which a transaction is executed.
-
-
35. A method of distributing log entries of transactions of a plurality of clients accessing a database, said method comprising the steps of:
-
dividing said plurality of clients into a plurality of subsets of clients all accessing a single database, each of said subsets including at least one of said plurality of clients; providing in a first memory means a transaction log buffer for each subset of clients, said first memory means comprising a random access memory (RAM); for each transaction of a client, storing a transaction log entry in a transaction log buffer associated with the subset of clients that includes the client; providing in a second memory means a transaction log for each transaction log buffer; storing said transaction log entry in said transaction log; providing, in a third memory means, a cache buffer;
said cache buffer for storing a copy of a data block from said database upon which a transaction is executed.
-
-
36. A method of distributing log entries of transactions of a plurality of clients accessing a database, said method comprising the steps of:
-
dividing said plurality of clients into a plurality of subsets of clients all accessing a single database, each of said subsets including at least one of said plurality of clients; providing in a first memory means a transaction log buffer for each subset of clients, said first memory means comprising a random access memory (RAM); for each transaction of a client, storing a transaction log entry in a transaction log buffer associated with the subset of clients that includes the client; providing in a second memory means a transaction log for each transaction log buffer, said second memory means comprising a disk drive; storing said transaction log entry in said transaction log; providing, in a third memory means, a cache buffer;
said cache buffer for storing a copy of a data block from said database upon which a transaction is executed.
-
-
37. A method of distributing log entries of transactions of a plurality of clients accessing a database, said method comprising the steps of:
-
dividing said plurality of clients into a plurality of subsets of clients all accessing a single database, each of said subsets including at least one of said plurality of clients; providing in a first memory means a transaction log buffer for each subset of clients, said first memory means comprising a random access memory (RAM); for each transaction of a client, storing a transaction log entry in a transaction log buffer associated with the subset of clients that includes the client; providing in a second memory means a transaction log for each transaction log buffer, said second memory means comprising a disk drive; storing said transaction log entry in said transaction log, each transaction associated with a data block; providing, in a third memory means, a cache buffer;
said cache buffer for storing a copy of a data block from said database upon which a transaction is executed.
-
-
38. A database system comprising:
-
first storage means for storing data blocks, said data blocks being subdivisions of a database, each of said data blocks having a sequence number contained therein; at least one client coupled to said first storage means, said client for initiating transactions with said data blocks; cache buffer means coupled to said first storage means and to said client, said cache buffer means for storing copies of said data blocks from said first storage means; sequence number increasing means coupled to said first storage means for increasing a sequence number of a data block for each transaction changing said data block. - View Dependent Claims (39, 40, 41, 42, 43)
-
-
44. A method of restoring a database comprising the steps of:
-
(a) providing a plurality of transaction logs, each of said transaction logs comprising a plurality of transactions, each of said transactions having a sequence number, each of said transaction logs associated with one of a plurality of subsets of clients of said database, each of said subsets of clients comprising at least one client; (b) selecting one of said plurality of transaction logs; (c) selecting a current transaction in said selected transaction log; (d) reading said sequence number of said current transaction; (e) comparing said sequence number of said current transaction with a current sequence number; (f) performing said current transaction when said sequence number of said current transaction is one more than said current sequence number and applying current transaction to said database; (g) setting said current sequence number equal to said sequence number of said current transaction; (h) returning to step (c) when said sequence number of said current transaction is less than or equal to said current sequence number and when said sequence number of said current transaction is greater than one more than said current sequence number. - View Dependent Claims (45, 46, 47)
-
-
48. A method of distributing log entries of transactions initiated by a plurality of clients commonly accessing at least one database, said method comprising the steps of:
-
dividing said plurality of clients into a plurality of subsets of clients, each of said plurality of clients commonly accessing said at least one database, each of said plurality of clients initiating transactions with said at least one database, each of said subsets including at least one of said plurality of clients, each said transaction being associated with a data block, said data block being a subdivision of said at least one database; providing in a first memory means a different transaction log buffer associated with each one of said plurality of subsets of clients; for each transaction of one of said plurality of clients, storing a transaction log entry in said different transaction log buffer associated with the subset of clients that includes the client that initiated said transaction; providing a sequence number for each said data block associated with each said transaction; incrementing the sequence number associated with said data block for each transaction changing said data block; providing an incarnation number for each said data block; increasing said incarnation number associated with said data block for each transaction initializing said data block; setting said sequence number for said data block to an initial value when said incarnation number is increased; wherein said method maintains and distributes log entries of transactions initiated by said plurality of clients prior to a recovery process of said at least one database. - View Dependent Claims (49, 50, 51, 52, 53, 54)
-
-
55. A database system for distributing log entries of transactions initiated by a plurality of clients accessing a single database, said database system comprising:
-
first storage means for storing data blocks, said data blocks being subdivisions of a database, each of said data blocks including a sequence number and an incarnation number; a plurality of clients, each client of said plurality of clients commonly accessing said database, each client of said plurality of clients initiating transactions with said database; first and second subsets of said plurality of clients accessing said at least one database, each of said subsets of clients having at least one client belonging to said plurality of clients, clients of said first subset not being clients of said second subset; cache buffer means coupled to said first storage means and to said first and second subset of clients, said cache buffer means for storing copies of said data blocks from said first storage means; first and second transaction log buffer means coupled to said first and second subsets of clients respectively, said first and second transaction log buffer means for temporarily storing a log entry for each transaction initiated by a client of said first and second subset of clients respectively; sequence number incrementing means for incrementing, for each transaction changing one of said data blocks, said sequence number included in each of said data blocks; incarnation number increasing means for increasing, for each transaction initializing said data block, said incarnation number included in each of said data blocks; said sequence number incrementing means setting said sequence number of a respective one of said data blocks to a first value when said incarnation number of said respective one of said data blocks is increased; wherein said database system maintains and distributes log entries of transactions initiated by said plurality of clients prior to a recovery process of said at least one database.
-
-
56. A method of distributing log entries of transactions initiated by a plurality of clients commonly accessing at least one database, said method comprising the steps of:
-
dividing said plurality of clients into a plurality of subsets of clients, each of said plurality of clients commonly accessing said at least one database, each of said plurality of clients initiating transactions with said at least one database, each of said subsets including at least one of the said plurality of clients; providing in a first memory means a different transaction log buffer associated with each one of said plurality of subsets of clients; for each transaction of one of said plurality of clients, storing a transaction log entry in said different transaction log buffer associated with the subset of clients that includes the client that initiated the transaction, each transaction being associated with a data block, said data block being a subdivision of said at least one database; for each said transaction log entry, providing a length of log entry field, an operation code field, a page address field, and incarnation number field, a sequence number field, and a variable length change data field. - View Dependent Claims (57, 58, 59, 60, 61, 62, 63, 64, 65, 66)
-
Specification