IP Library Granted Patent US 10,698,775
Granted Patent B2
US 10,698,775 · App. 15/605,141 · Granted Jun 30, 2020

Method and apparatus for reading and writing committed data

Inventors: Eliot Horowitz (New York, NY); Andrew Michalski Schwerin (Brooklyn, NY); Mathias Benjamin Stearn (New York, NY); Eric Andrew Milkie (Stamford, CT)
Assignee: MongoDB, Inc.
G06F11/1474G06F3/061G06F3/065G06F3/067G06F3/0619G06F3/0673G06F11/1451G06F16/2358G06F16/2365G06F16/2379G06F2201/80G06F2201/805G06F2201/82G06F2201/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 10,698,775
App. No.
15/605,141
Granted
Jun 30, 2020
Kind
B2
Abstract

According to some aspects, a database system is provided. The database system may include at least one processor configured to execute a plurality of system components. The plurality of system components may include an interface component configured to receive a read commit command and provide a result, a snapshot component configured to generate a plurality of snapshots of data stored in a first data storage node of a plurality of data storage nodes and identify a committed snapshot representative of data that has been replicated on a majority of the plurality of data storage nodes, and a command processing component configured to read the committed snapshot responsive to receipt of the read commit command and generate the result.

Claims (41)

1. A database system comprising:

at least one processor configured to execute a plurality of system components, wherein the plurality of system components comprise:

an interface component configured to receive a read commit command and provide a result;

a snapshot component configured to:

generate a plurality of snapshots of data stored in a first data storage node of a plurality of data storage nodes, wherein the first data storage node includes an operation log and a remainder of the plurality of data storage nodes are configured to retrieve the operation log and replicate operations in the operation log;

determine, based on responses from the plurality of the data storage nodes, a commit point in the operation log indicative of a latest committed operation in the operation log that has been performed by a majority of the plurality of the data storage nodes; and

determine, based on the commit point, a committed snapshot from the plurality of snapshots, wherein the committed snapshot is representative of committed operations that have been replicated on the majority of the plurality of data storage nodes, and the committed snapshot is a most recent snapshot of the plurality of snapshots that is associated with the latest committed operation; and

a command processing component configured to read the committed snapshot responsive to receipt of the read commit command and generate the result using the committed snapshot.

2. The system of claim 1 , wherein each snapshot of the plurality of snapshots corresponds to data stored in the first storage node at a unique point in time.

3. The system of claim 1 , wherein the interface component is further configured to receive at least one confirmation from at least one data storage node of the plurality of data storage nodes that the at least one data storage node has replicated one or more operations in the operation log.

4. The system of claim 3 , wherein the snapshot component is further configured to identify a new committed snapshot responsive to receipt of the at least one confirmation from the at least one data storage node.

5. The system of claim 3 , wherein the snapshot component is further configured to remove at least one snapshot from the plurality of snapshots responsive to receipt of the at least one confirmation from the at least one data storage node.

6. The system of claim 1 , wherein the snapshot component is further configured to generate a new snapshot of the data stored in the first data storage node periodically.

7. The system of claim 1 , wherein the snapshot component is further configured to periodically generate a new snapshot of the data stored in the first data storage node every 10 milliseconds.

8. The system of claim 1 , wherein the interface component is further configured to receive a read command.

9. The system of claim 8 , wherein the command processing component is further configured to read data stored in a second data storage node of the plurality of data storage nodes responsive to receiving the read command.

10. The system of claim 1 , wherein the command processing component is configured to read the committed snapshot at least in part by identifying a data storage node from the plurality of data storage nodes that stores data consistent with committed snapshot and reading from the identified data storage node.

11. The system of claim 1 , further comprising a database including the plurality of data storage nodes and wherein the database follows an eventual consistency model.

12. The system of claim 11 , wherein the first data storage node is a primary data storage node and a remainder of the data storage nodes of the plurality of data storage nodes are secondary data storage nodes.

13. A method of performing operations in a computer database, comprising:

receiving, by an interface component executed by at least one processor, a read commit command;

generating, by a snapshot component executed by the at least one processor, a plurality of snapshots of data stored in a first data storage node of a plurality of data storage nodes, wherein the first data storage node includes an operation log and a remainder of the plurality of data storage nodes are configured to retrieve the operation log and replicate operations in the operation log;

determining, based on responses from the plurality of the data storage nodes, a commit point in the operation log indicative of a latest committed operation in the operation log that has been performed by a majority of the plurality of the data storage nodes;

determining, by the snapshot component executed by the at least one processor, based on the commit point, a committed snapshot from the plurality of snapshots, wherein the committed snapshot is representative of committed operations that have been replicated on the majority of the plurality of data storage nodes, and the committed snapshot is a most recent snapshot of the plurality of snapshots that is associated with the latest committed operation;

reading, by a command processing component executed by the at least one processor, the committed snapshot responsive to receipt of the read commit command;

generating, by the command processing component, a result to the read commit command using the committed snapshot; and

providing, by the interface component, the result.

14. The method of claim 13 , wherein each snapshot of the plurality of snapshots corresponds to the data stored in the first storage node of the plurality of data storage nodes at unique point in time.

15. The method of claim 13 , further comprising receiving at least one confirmation from at least one data storage node of the plurality of data storage nodes that the at least one data storage node has replicated one or more operations in the operation log.

16. The method of claim 15 , further comprising identifying a new committed snapshot from the plurality of snapshots responsive to receipt of the at least one confirmation from the at least one data storage node.

17. The method of claim 15 , further comprising removing at least one snapshot from the plurality of snapshots responsive to receipt of the at least one confirmation from the at least one data storage node.

18. The method of claim 13 , further comprising generating new snapshots of the data stored in the first data storage node periodically.

19. A database system comprising:

a database configured to follow an eventual consistency model and comprising a primary data storage node storing an operation log and a plurality of secondary data storage nodes configured to retrieve the operation log from the primary data storage node and replicate operations in the operation log; and

at least one processor coupled to the database and configured to execute a plurality of system components, wherein the plurality of system components comprise:

an interface component configured to receive a read commit command and provide a result;

a snapshot component configured to:

generate a plurality of snapshots of data stored in the primary data storage node where each snapshot corresponds to data stored in the first storage node at a unique point in time;

determine, based on responses from the plurality of secondary data storage nodes, a commit point in the operation log indicative of a latest committed operation in the operation log that has been performed by a majority of the secondary data storage nodes; and

determine, based on the commit point, a committed snapshot from the plurality of snapshots, wherein the committed snapshot is representative of committed operations that have been replicated on the majority of the plurality of secondary data storage nodes, and the committed snapshot is a most recent snapshot of the plurality of snapshots that is associated with the latest committed operation; and

a command processing component configured to read the committed snapshot responsive to receipt of the read commit command and generate the result using the committed snapshot.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 7, 2020
From: HOROWITZ, ELIOT; SCHWERIN, ANDREW MICHALSKI; STEARN, MATHIAS BENJAMIN; MILKIE, ERIC ANDREW
To: MONGODB, INC.
Reel/Frame 052597/0856 →
Continuity (2)
Provisional Application 62343494 · May 31, 2016
Related Publication 20170344290A1 · Nov 30, 2017
Cited By (1)
US 12,373,456