System and method for maintaining and recovering data consistency across multiple instances of a database
First Claim
1. A computer implemented data consistency maintenance method for maintaining consistency through a plurality of multiple instances stored in a page based memory mapped, multiple anonymous reader, multiple writer database, comprising the steps of:
- accessing a mirror pages including a copy instance of indexed data associated with a particular value during a write access request operation;
accessing a primary page associated with said mirror page;
acquiring a genlock on said mirror page;
updating said copy instance of indexed data included in said mirror page;
acquiring a genlock on a primary page associated with said mirror page;
performing an update on an instance of indexed data associated with said particular value on said primary page;
preventing read operations and write operations of other processes from accessing said mirror page and said primary page while locked; and
releasing said genlock on said primary page and said genlock on said mirror page.
10 Assignments
0 Petitions
Accused Products
Abstract
The present invention is a system and method that facilitates consistency maintenance and recovery from a system or process crash with valid data. A data consistency maintenance and recovery system and method of the present invention utilizes a dual page configuration and locking process to store and track data associated with multiple indexes of a database. A primary page is utilized as the primary data storage location and a mirror page operates as copy of the primary page except during certain stages of data manipulation (e.g., a write operation). Read operations access information from unlocked primary pages. Write operations access, lock and update a mirror page, then access, lock and update a primary page. Page accesses are tracked (e.g., counted). Then a write process unlocks and syncs the primary page to disk as well as the mirror page. A page with consistent data is copied to a page with inconsistent data during a process system crash recovery. In one embodiment of the present invention, a primary page is considered consistent if a write operation has not accessed the primary page to begin a write process, otherwise data on a mirror page is considered consistent. In one embodiment of the present invention, a consistency maintenance locking method and an access tracking method are utilized to facilitate consistency maintenance across multiple instances of the MDBM database.
68 Citations
17 Claims
-
1. A computer implemented data consistency maintenance method for maintaining consistency through a plurality of multiple instances stored in a page based memory mapped, multiple anonymous reader, multiple writer database, comprising the steps of:
-
accessing a mirror pages including a copy instance of indexed data associated with a particular value during a write access request operation;
accessing a primary page associated with said mirror page;
acquiring a genlock on said mirror page;
updating said copy instance of indexed data included in said mirror page;
acquiring a genlock on a primary page associated with said mirror page;
performing an update on an instance of indexed data associated with said particular value on said primary page;
preventing read operations and write operations of other processes from accessing said mirror page and said primary page while locked; and
releasing said genlock on said primary page and said genlock on said mirror page. - View Dependent Claims (2, 3, 4)
retrieving said mirror page from a database; and
mapping said mirror page into a local memory if not already stored in said local memory.
-
-
4. A data consistency maintenance method of claim 1 further comprising the steps of:
-
utilizing a lowest order bit of an access counter value to function as said genlock; and
incrementing said access counter value each time a write access is performed.
-
-
5. A computer implemented consistency recovery method for recovering consistency across multiple instances of a page based memory mapped, multiple anonymous reader, multiple writer database after a process crash, comprising the steps of:
-
determining an appropriate primary page for comparison to a mirror page;
resolving the data to be utilized as valid data when recovering from a process or system crash;
evaluating access counter values of the primary page and the mirror page, wherein each access counter value includes a genlock; and
restoring consistency. - View Dependent Claims (6, 7, 8, 9, 10, 11)
-
-
12. A computer implemented consistency recovery method for recovering consistency across multiple instances of a page based memory mapped, multiple anonymous reader, multiple writer database after a process crash, comprising the steps of:
-
determining an appropriate primary page for comparison to a mirror page;
resolving the data to be utilized as valid data when recovering from a process or system crash;
examining an atomic consistency element, wherein a first primary page comprising a bucket of information that is not an initial bucket of information associated with a particular value is said appropriate primary page if said atomic consistency elements is zero and second primary page that is an initial bucket of information associated with a particular value is said appropriate primary page if said atomic consistency is not zero; and
restoring consistency.
-
-
13. A data consistency maintenance and recovery computer system comprising:
-
a bus for providing a communication path between components of computer system;
a central processing unit (CPU) coupled to said bus, said CPU for performing information control and data processing including a first process and a second process that perform a write operation and read operation except when prevented by a genlock; and
a database coupled to said bus, said database stores information in multiple indexes onto the same data including records comprising fields arranged on a plurality primary pages and maintains a plurality of mirror pages that are a copy of the data included in said plurality of primary pages except when a process performs a write operation, wherein said mirror page is written to before said primary page during said write operation, wherein each one of said plurality of primary pages and each one of said plurality of mirror pages include an access counter value, wherein each access counter value includes a genlock. - View Dependent Claims (14, 15, 16, 17)
-
Specification