IP Library Granted Patent US 9,430,551
Granted Patent B1
US 9,430,551 · App. 14/323,802 · Granted Aug 30, 2016

Mirror resynchronization of bulk load and append-only tables during online transactions for better repair time to high availability in databases

Inventors: Matthew C. McCline (Foster City, CA); Milena Bergant (San Mateo, CA)
Assignee: Pivotal Software, Inc.
G06F17/30592G06F17/30575
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,430,551
App. No.
14/323,802
Granted
Aug 30, 2016
Kind
B1
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.

Claims (63)

1. 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.

2. The method of claim 1 , wherein locking the mirror database comprises storing the mirroring state and a sequence number in a mirror lock in an exclusive mode in which values of the mirroring state and the sequence number cannot change.

3. The method of claim 2 , wherein the sequence number is a number that is incremented each time the primary database and the mirror database enter a state indicating that the mirror database is offline.

4. The method of claim 3 , comprising determining the sequence number while the mirror database is in a locked state and prior to creating the bulk load target file.

5. The method of claim 1 , wherein sending the transaction data to the mirror database comprises bulk loading the transaction data to the mirror database.

6. The method of claim 1 , wherein the primary database and the mirror database are stored on different segment nodes of a computer network including a plurality of segment nodes and a master node.

7. 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.

8. The system of claim 7 , wherein locking the mirror database comprises storing the mirroring state and a sequence number in a mirror lock in an exclusive mode in which values of the mirroring state and the sequence number cannot change.

9. The system of claim 8 , wherein the sequence number is a number that is incremented each time the primary database and the mirror database enter a state indicating that the mirror database is offline.

10. The system of claim 9 , the operations comprising determining the sequence number while the mirror database is in a locked state and prior to creating the bulk load target file.

11. The system of claim 7 , wherein sending the transaction data to the mirror database comprises bulk loading the transaction data to the mirror database.

12. The system of claim 7 , wherein the primary database and the mirror database are stored on different segment nodes of the system.

13. 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.

14. The non-transitory computer-readable medium of claim 13 , wherein locking the mirror database comprises storing the mirroring state and a sequence number in a mirror lock in an exclusive mode in which values of the mirroring state and the sequence number cannot change.

15. The non-transitory computer-readable medium of claim 14 , wherein the sequence number is a number that is incremented each time the primary database and the mirror database enter a state indicating that the mirror database is offline.

16. The non-transitory computer-readable medium of claim 15 , the operations comprising determining the sequence number while the mirror database is in a locked state and prior to creating the bulk load target file.

17. The non-transitory computer-readable medium of claim 13 , wherein sending the transaction data to the mirror database comprises bulk loading the transaction data to the mirror database.

18. The non-transitory computer-readable medium of claim 13 , wherein the primary database and the mirror database are stored on different segment nodes of a computer network including a plurality of segment nodes and a master node.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 22, 2016
From: MCCLINE, MATTHEW C.; BERGANT, MILENA
To: EMC CORPORATION
Reel/Frame 037790/0024 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 22, 2016
From: EMC CORPORATION
To: GOPIVOTAL, INC.
Reel/Frame 037790/0078 →
CHANGE OF NAME Recorded Feb 22, 2016
From: GOPIVOTAL, INC.
To: PIVOTAL SOFTWARE, INC.
Reel/Frame 037880/0097 →
Continuity (1)
Continuation 13107902 · May 14, 2011