IP Library › Granted Patent US 9,740,582
Granted Patent B2
US 9,740,582 · App. 14/984,567 · Granted Aug 22, 2017

System and method of failover recovery

Inventors: Amarnadh Sai Eluri (Pleasanton, CA); Nikhil Jamadagni (Fremont, CA); Sarika Iyer (Fremont, CA)
Assignee: SYBASE, INC.
G06F11/2033G06F17/30362G06F17/30587G06F2201/80G06F2201/805
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,740,582
App. No.
14/984,567
Granted
Aug 22, 2017
Kind
B2
Abstract

In some example embodiments, a method comprises: receiving, by a first node of a plurality of nodes in a distributed database system on a shared disk cluster infrastructure, a transaction request to perform a user database transaction a data item in a user database on a shared disk; acquiring, by the first node, a transaction lock for the data item; storing a lock file for the user database transaction in a lock information database on the shared disk, the lock file comprising lock information for the transaction lock and an indication of a status of the user database transaction, and the lock information comprising an identification of a location of the data item; and storing a transaction record of the user database transaction in the user database on the shared disk subsequent to the storing of the lock file in the lock information database on the shared disk.

Claims (55)

1. A computer-implemented method comprising:

receiving, by a first node of a plurality of nodes in a distributed database system on a shared disk cluster infrastructure, a transaction request to perform a user database transaction on one or more data items in a user database on a shared disk on the shared disk cluster infrastructure, the user database transaction comprising one or more database write operations for the one or more data items in the user database, and the shared disk being accessible by the plurality of nodes;

acquiring, by the first node, a corresponding transaction lock for each one of the one or more data items of the user database transaction;

storing, by at least one processor, a lock file for the user database transaction in a lock information database on the shared disk, the lock information database being a node-local database of the first node, the first node being the only node in the plurality of nodes able to write to the lock information database, the plurality of nodes other than the first node being able to read from the lock information database during a failover event for the first node, the lock file comprising corresponding lock information for each transaction lock of the user database transaction and an indication of a status of the user database transaction, and the corresponding lock information comprising an identification of a location of the corresponding data item for each corresponding transaction lock; and

storing, by the at least one processor, a transaction record of the user database transaction in a transaction log in the user database on the shared disk subsequent to the storing of the lock file in the lock information database on the shared disk.

2. The method of claim 1 , further comprising:

detecting a failover event for the first node;

accessing, by a second node of the plurality of nodes, the lock file in the lock information database of the first node on the shared disk based on the detecting the failover event;

determining, by the second node, that the user database transaction is incomplete based on the indication of the status in the accessed lock file;

acquiring, by the second node, each corresponding transaction lock for the one or more data items of the user database transaction based on the determination that the user database transaction is incomplete, causing the second node to be the only node in the plurality of nodes able to access the one or more data items in the user database; and

performing, by the second node, a database recovery of the user database subsequent to the transaction lock being acquired by the second node, the database recovery restoring the user database up to a point of the failover event.

3. The method of claim 1 , further comprising:

completing, by the first node, the user database transaction on the user database on the shared disk concurrent with the first node having the transaction lock, the completing of the user database transaction comprising committing to the user database transaction or rolling back the user database transaction; and

queuing the file for garbage collection based on the completing the user database transaction.

4. The method of claim 1 , wherein the one or more database write operations comprise one or more data manipulation language (DML) write operations.

5. The method of claim 1 , wherein the indication of the location of the data item comprises at least one of a database identification, a page identification, and a row identification.

6. The method of claim 1 , wherein the lock information further comprises an identification of a type of the transaction lock.

7. The method of claim 1 , wherein the lock file further comprises an identification of the user database transaction.

8. A system comprising:

at least one processor; and

a non-transitory computer-readable medium storing executable instructions that, when executed, cause the at least one processor to perform operations comprising:

receiving, by a first node of a plurality of nodes in a distributed database system on a shared disk cluster infrastructure, a transaction request to perform a user database transaction on one or more data items in a user database on a shared disk on the shared disk cluster infrastructure, the user database transaction comprising one or more database write operations for the one or more data items in the user database, and the shared disk being accessible by the plurality of nodes;

acquiring, by the first node, a corresponding transaction lock for each one of the one or more data items of the user database transaction;

storing a lock file for the user database transaction in a lock information database on the shared disk, the lock information database being a node-local database of the first node, the first node being the only node in the plurality of nodes able to write to the lock information database, the plurality of nodes other than the first node being able to read from the lock information database during a failover event for the first node, the lock file comprising corresponding lock information for each transaction lock of the user database transaction and an indication of a status of the user database transaction, and the corresponding lock information comprising an identification of a location of the corresponding data item for each corresponding transaction lock; and

storing a transaction record of the user database transaction in a transaction log in the user database on the shared disk subsequent to the storing of the lock file in the lock information database on the shared disk.

9. The system of claim 8 , wherein the operations further comprise:

detecting a failover event for the first node;

accessing, by a second node of the plurality of nodes, the lock file in the lock information database of the first node on the shared disk based on the detecting the failover event;

determining, by the second node, that the user database transaction is incomplete based on the indication of the status in the accessed lock file;

acquiring, by the second node, each corresponding transaction lock for the one or more data items of the user database transaction based on the determination that the user database transaction is incomplete, causing the second node to be the only node in the plurality of nodes able to access the one or more data items in the user database; and

performing, by the second node, a database recovery of the user database subsequent to the transaction lock being acquired by the second node, the database recovery restoring the user database up to a point of the failover event.

10. The system of claim 8 , wherein the operations further comprise:

completing, by the first node, the user database transaction on the user database on the shared disk concurrent with the first node having the transaction lock, the completing of the user database transaction comprising committing to the user database transaction or rolling back the user database transaction; and

queuing the file for garbage collection based on the completing the user database transaction.

11. The system of claim 8 , wherein the one or more database write operations comprise one or more data manipulation language (DML) write operations.

12. The system of claim 8 , wherein the indication of the location of the data item comprises at least one of a database identification, a page identification, and a row identification.

13. The system of claim 8 , wherein the lock information further comprises an identification of a type of the transaction lock.

14. The system of claim 8 , wherein the lock file further comprises an identification of the user database transaction.

15. A non-transitory machine-readable storage medium, tangibly embodying a set of instructions that, when executed by at least one processor, causes the at least one processor to perform operations comprising:

receiving, by a first node of a plurality of nodes in a distributed database system on a shared disk cluster infrastructure, a transaction request to perform a user database transaction on one or more data items in a user database on a shared disk on the shared disk cluster infrastructure, the user database transaction comprising one or more database write operations for the one or more data items in the user database, and the shared disk being accessible by the plurality of nodes;

acquiring, by the first node, a corresponding transaction lock for each one of the one or more data items of the user database transaction;

storing, by at least one processor, a lock file for the user database transaction in a lock information database on the shared disk, the lock information database being a node-local database of the first node, the first node being the only node in the plurality of nodes able to write to the lock information database, the plurality of nodes other than the first node being able to read from the lock information database during a failover event for the first node, the lock file comprising corresponding lock information for each transaction lock of the user database transaction and an indication of a status of the user database transaction, and the corresponding lock information comprising an identification of a location of the corresponding data item for each corresponding transaction lock; and

storing, by the at least one processor, a transaction record of the user database transaction in a transaction log in the user database on the shared disk subsequent to the storing of the lock file in the lock information database on the shared disk.

16. The storage medium of claim 15 , wherein the operations further comprise:

detecting a failover event for the first node;

accessing, by a second node of the plurality of nodes, the lock file in the lock information database of the first node on the shared disk based on the detecting the failover event;

determining, by the second node, that the user database transaction is incomplete based on the indication of the status in the accessed lock file;

acquiring, by the second node, each corresponding transaction lock for the one or more data items of the user database transaction based on the determination that the user database transaction is incomplete, causing the second node to be the only node in the plurality of nodes able to access the one or more data items in the user database; and

performing, by the second node, a database recovery of the user database subsequent to the transaction lock being acquired by the second node, the database recovery restoring the user database up to a point of the failover event.

17. The storage medium of claim 15 , wherein the operations further comprise:

completing, by the first node, the user database transaction on the user database on the shared disk concurrent with the first node having the transaction lock, the completing of the user database transaction comprising committing to the user database transaction or rolling back the user database transaction; and

queuing the file for garbage collection based on the completing the user database transaction.

18. The storage medium of claim 15 , wherein the one or more database write operations comprise one or more data manipulation language (DML) write operations.

19. The storage medium of claim 15 , wherein the indication of the location of the data item comprises at least one of a database identification, a page identification, and a row identification.

20. The storage medium of claim 15 , wherein the lock information further comprises an identification of a type of the transaction lock.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 14, 2016
From: ELURI, AMARNADH SAI; JAMADAGNI, NIKHIL; IYER, SARIKA
To: SYBASE, INC.
Reel/Frame 037493/0399 →
Continuity (1)
Related Publication 20170192863A1 · Jul 6, 2017