Mirror resynchronization of bulk load and append-only tables during online transactions for better repair time to high availability in databases
AssigneePivotal Software, Inc.
InventorsMatthew C. McCline, Milena Bergant
Life of this patent
Estimating the term…
Abstract
In a mirrored database system, mirror resynchronization of bulk load and append-only tables during ongoing transactions is optimized for quick repair and high availability by catching up any changes to primary database tables that have not been made to mirror database tables during the transaction itself, and making changes due to ongoing transactions when the databases are synchronized to the resynchronization process.
Claims18
A method of mirror resynchronization of bulk load tables written to by online transactions in a mirrored pair of databases comprising a primary database and a mirror database, comprising:
- creating a bulk load target file;
- writing transaction data from an online transaction into said target file;
- determining whether said primary database and said mirror database remained in a synchronized state during said writing;
- upon determining that said primary database and said mirror database remained in said synchronized state during said writing, concurrently bulk loading said target file directly to both a primary page table in said primary database and to a mirrored page table corresponding to said primary page table in said mirror database;
- otherwise, upon determining said primary database and said mirror database were in an unsynchronized state during at least part of said writing, bulk loading said target file only to said primary page table and catching up said mirror database as part of said transaction during mirror resynchronization;
- checking the synchronization state of said mirror database during transaction commit preparation;
- and
- upon determining that said primary database and said mirror database were in said unsynchronized state, said catching up further comprises copying changes to said primary database page table data to the mirror database and flushing the mirror to disk.
A non-transitory computer readable storage medium comprising executable instructions for controlling the operation of a computer to perform mirror resynchronization of tables written by online transactions in a mirrored pair of databases comprising a primary database and a mirror database, comprising instructions for:
- creating a bulk load target file;
- writing transaction data from an online transaction into said target file;
- determining whether said primary database and said mirror database remained in a synchronized state during said writing;
- upon determining that said primary database and said mirror database remained in said synchronized state during said writing, concurrently bulk loading said target file directly to both a primary page table in said primary database and to a mirrored page table corresponding to said primary page table in said mirror database;
- otherwise, upon determining said primary database and said mirror database were in an unsynchronized state during at least part of said writing, bulk loading said target file only to said primary page table and catching up said mirror database as part of said transaction during mirror resynchronization;
- checking the synchronization state of said mirror database during transaction commit preparation;
- and
- upon determining that said primary database and said mirror database were in said unsynchronized state, said catching up further comprises copying changes to said primary database page table data to the mirror database and flushing the mirror to disk.
A method of mirror resynchronization of append-only tables in a mirrored pair of databases comprising a primary database and a mirror database, comprising:
- opening a target file;
- writing said target file at the end of previously committed data in a primary append-only table in the primary database;
- determining whether the primary database and the mirror database are in a synchronized state;
- and
- writing said transaction data from an online transaction into the target file in the primary append-only table in the primary database and, if said primary database and said mirror database are determined to be in said synchronized state, mirror writing said transaction data in the target file to another end of previously committed data in a mirror append-only table corresponding to said primary append-only table in the mirror database;
- otherwise, if the primary database and the mirror database are not in a synchronized state, writing said transaction data in the target file only in the primary append-only table and catching up said mirror database during mirror resynchronization.
A non-transitory computer readable storage medium comprising executable instructions for controlling the operation of a computer to perform mirror resynchronization of append-only tables in a mirrored pair of databases comprising a primary database and a mirror database, comprising instructions for:
- opening a target file;
- writing said target file at the end of previously committed data in a primary append-only table in the primary database;
- determining whether the primary database and the mirror database are in a synchronized state;
- and
- writing said transaction data from an online transaction into the target file in the primary append-only table in the primary database and, if said primary database and said mirror database are determined to be in said synchronized state, mirror writing said transaction data in the target file to another end of previously committed data in a mirror append-only table corresponding to said primary append-only table in the mirror database;
- otherwise, if the primary database and the mirror database are not in a synchronized state, writing said transaction data in the target file only in the primary append-only table and catching up said mirror database during mirror resynchronization.
Dependencies are inferred from the claim text.