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 in a mirrored pair of databases comprising a primary database and a mirror database, the method comprising:
- creating a bulk load target file;
- writing transaction data from an online transaction into the bulk load target file;
- and
- entering a loop of one or more cycles, each cycle comprising:
- locking the mirror database;
- determining a mirroring state of the primary database and the mirror database;
- upon determining that the mirroring state indicates that the primary database and the mirror database are synchronized or that the mirror database is offline, performing first actions comprising:
- indicating, in a persistent file system table, that synchronization of the bulk load tables will be performed later;
- unlocking the mirror database;
- and
- exiting the loop;
- upon determining that the mirroring state indicates otherwise, performing second actions comprising:
- unlocking and then opening the mirror database;
- sending the transaction data that was flushed to the primary database to the mirror database, the transaction data being flushed by bulk loading the target file to the primary database;
- and
- flushing the mirror database;
- and
- entering a next cycle of the loop.
A system comprising:
- a master node including one or more processors;
- a plurality of segment nodes each including one or more processors;
- and
- a non-transitory computer-readable medium storing instructions operable to cause one or more nodes of the system to perform operations of mirror resynchronization of bulk load tables in a mirrored pair of databases comprising a primary database and a mirror database, the operations comprising:
- creating a bulk load target file;
- writing transaction data from an online transaction into the bulk load target file;
- and
- entering a loop of one or more cycles, each cycle comprising:
- locking the mirror database;
- determining a mirroring state of the primary database and the mirror database;
- upon determining that the mirroring state indicates that the primary database and the mirror database are synchronized or that the mirror database is offline, performing first actions comprising:
- indicating, in a persistent file system table, that synchronization of the bulk load tables will be performed later;
- unlocking the mirror database;
- and
- exiting the loop;
- upon determining that the mirroring state indicates otherwise, performing second actions comprising:
- unlocking and then opening the mirror database;
- sending the transaction data that was flushed to the primary database to the mirror database, the transaction data being flushed by bulk loading the target file to the primary database;
- and
- flushing the mirror database;
- and
- entering a next cycle of the loop.
A non-transitory computer-readable medium storing instructions operable to cause one or more processors to perform operations of mirror resynchronization of bulk load tables in a mirrored pair of databases comprising a primary database and a mirror database, the operations comprising:
- creating a bulk load target file;
- writing transaction data from an online transaction into the bulk load target file;
- and
- entering a loop of one or more cycles, each cycle comprising:
- locking the mirror database;
- determining a mirroring state of the primary database and the mirror database;
- upon determining that the mirroring state indicates that the primary database and the mirror database are synchronized or that the mirror database is offline, performing first actions comprising:
- indicating, in a persistent file system table, that synchronization of the bulk load tables will be performed later;
- unlocking the mirror database;
- and
- exiting the loop;
- upon determining that the mirroring state indicates otherwise, performing second actions comprising:
- unlocking and then opening the mirror database;
- sending the transaction data that was flushed to the primary database to the mirror database, the transaction data being flushed by bulk loading the target file to the primary database;
- and
- flushing the mirror database;
- and
- entering a next cycle of the loop.
Dependencies are inferred from the claim text.