IP Library Granted Patent US 9,892,153
Granted Patent B2
US 9,892,153 · App. 14/578,093 · Granted Feb 13, 2018

Detecting lost writes

Inventors: Yunrui Li (Fremont, CA); Mahesh Baburao Girkar (Cupertino, CA); Hongyi Yao (Jercy City, NJ)
Assignee: Oracle International Corporation
G06F17/30368G06F11/0751G06F11/1435G06F11/1451G06F11/1471G06F17/30356G06F17/30575G06F11/2094G06F2201/80G06F2201/84
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,892,153
App. No.
14/578,093
Granted
Feb 13, 2018
Kind
B2
Abstract

Techniques are described that determine occurrences of lost write by comparing version identifiers of corresponding replica data blocks and checkpoints of data files that include the data blocks. A method determines lost writes that may have occurred among a first set of data blocks and a second set of data blocks. Each data block in the first set of data blocks corresponds to a respective data block in the second set that is a version of data blocks in the first set. The data blocks in the first set and the second set are associated with version identifiers. The second set of data blocks is associated with a second checkpoint for which any version of a data block in the second set associated a version identifier below the second checkpoint has been acknowledged to a database server as having been written to persistent storage. The method proceed to determining the lost writes by determining that a data block in the first set and a data block in the second set satisfy criteria, such as the version identifier of the first data block is between the version identifier of the second data block and the second checkpoint.

Claims (49)

1. A method comprising:

determining lost writes that may have occurred among a first set of data blocks of a first database and a second set of data blocks of a second database;

wherein each data block in said first set of data blocks corresponds to a respective data block in the second set, and

is associated with a version identifier of a version of the respective data block in said second set;

wherein each data block in said second set is associated with a version identifier of a version of said each data block in said second set;

wherein said second set of data blocks is associated with a second checkpoint, for which any version of a data block in the second set that is associated with a particular version identifier below the second checkpoint, has been acknowledged to a database server as having been written to persistent storage of the second database;

wherein determining lost writes comprises:

selecting a first data block from the first set of data blocks,

selecting, from the second set of data blocks, a second data block that corresponds to the first data block, and

determining that the first data block in the first set and the second data block in the second set satisfy one or more criteria, wherein the one or more criteria include that a version identifier of the first data block is between a version identifier of the second data block and the second checkpoint; and

wherein the method is performed by one or more computing devices.

2. The method of claim 1 , wherein a version identifier is a monotonically increasing system change number indicating a relative order in which a change that created a particular version of a particular data block was made by the database server relative to other changes made by said database server to one or more data blocks.

3. The method of claim 1 , wherein the one or more criteria include that a checksum of data in the first data block is not equal to a checksum of data in the second data block.

4. The method of claim 3 , wherein the data of the first data block is user data of the first data block and the data of the second data block is user data of the second data block.

5. The method of claim 1 , wherein the one or more criteria include whether a version of the first data block, corresponding to the version identifier of the first data block, is created by a change in metadata of the first data block.

6. The method of claim 1 , further comprising:

determining writes are successful among the first set of data blocks and the second set of blocks, wherein determining writes are successful comprises:

selecting a third data block from the first set of data blocks;

selecting, from the second set of data blocks, a respective fourth data block that corresponds to the third data block;

determining that a version identifier of the third data block in the first set is same as a version identifier of the fourth data block in the second set; and

determining that a checksum of data in the third data block in the first set is equal to a checksum of data in the fourth data block.

7. The method of claim 6 , wherein the data of the third data block is user data of the third data block and the data of the fourth data block is user data of the fourth data block.

8. The method of claim 1 , wherein the first set of data blocks is replicated from the second set of data blocks.

9. The method of claim 8 , wherein a change to the second data block corresponding to a version of the second data block is applied to the first data block to create a corresponding version of the first data block with the version identifier of the second data block.

10. The method of claim 1 , wherein the second set of data blocks is from a primary database and the first set of data blocks is from a standby database.

11. One or more non-transitory storage media storing instructions, wherein the instructions include instructions, which, when executed by one or more hardware processors, cause:

determining lost writes that may have occurred among a first set of data blocks of a first database and a second set of data blocks of a second database;

wherein each data block in said first set of data blocks corresponds to a respective data block in the second set, and

is associated with a version identifier of a version of the respective data block in said second set;

wherein each data block in said second set is associated with a version identifier of a version of said each data block in said second set;

wherein said second set of data blocks is associated with a second checkpoint, for which any version of a data block in the second set that is associated with a particular version identifier below the second checkpoint, has been acknowledged to a database server as having been written to persistent storage of the second database;

wherein determining lost writes comprises:

selecting a first data block from the first set of data blocks,

selecting, from the second set of data blocks, a second data block that corresponds to the first data block, and

determining that the first data block in the first set and the second data block in the second set satisfy one or more criteria, wherein the one or more criteria include that a version identifier of the first data block is between a version identifier of the second data block and the second checkpoint.

12. The non-transitory storage media of claim 11 , wherein a version identifier is a monotonically increasing system change number indicating a relative order in which a change that created a particular version of a particular data block was made by the database server relative to other changes made by said database server to one or more data blocks.

13. The non-transitory storage media of claim 11 , wherein the one or more criteria include that a checksum of data in the first data block is not equal to a checksum of data in the second data block.

14. The non-transitory storage media of claim 13 , wherein the data of the first data block is user data of the first data block and the data of the second data block is user data of the second data block.

15. The non-transitory storage media of claim 11 , wherein the one or more criteria include whether a version of the first data block, corresponding to the version identifier of the first data block, is created by a change in metadata of the first data block.

16. The non-transitory storage media of claim 11 , wherein the instructions further include instructions, which when executed by said one or more hardware processors, cause:

determining writes are successful among the first set of data blocks and the second set of blocks, wherein determining writes are successful comprises:

selecting a third data block from the first set of data blocks;

selecting, from the second set of data blocks, a respective fourth data block that corresponds to the third data block;

determining that a version identifier of the third data block in the first set is same as a version identifier of the fourth data block in the second set; and

determining that a checksum of data in the third data block in the first set is equal to a checksum of data in the fourth data block.

17. The non-transitory storage media of claim 16 , wherein the data of the third data block is user data of the third data block and the data of the fourth data block is user data of the fourth data block.

18. The non-transitory storage media of claim 11 , wherein the first set of data blocks is replicated from the second set of data blocks.

19. The non-transitory storage media of claim 18 , wherein a change to the second data block corresponding to a version of the second data block is applied to the first data block to create a corresponding version of the first data block with the version identifier of the second data block.

20. The non-transitory storage media of claim 11 , wherein the second set of data blocks is from a primary database and the first set of data blocks is from a standby database.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 22, 2014
From: LI, YUNRUI; GIRKAR, MAHESH BABURAO; YAO, HONGYI
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 034567/0663 →
Continuity (1)
Related Publication 20160179867A1 · Jun 23, 2016