IP Library Granted Patent US 9,734,187
Granted Patent B2
US 9,734,187 · App. 14/217,737 · Granted Aug 15, 2017

Atomic transactions in a NOSQL database

Inventor: Matthew Fuchs (Los Gatos, CA)
Assignee: salesforce.com, inc.
G06F17/30371G06F17/30227G06F17/30377
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,734,187
App. No.
14/217,737
Granted
Aug 15, 2017
Kind
B2
Abstract

Systems and methods are provided for atomic transactions in a NoSQL database. A system writes a pending transaction identifier to write claim data for a first data item in a NoSQL database in response to a determination that the write claim data for the first data item includes a first previous transaction identifier included in last commit data for the first data item. The system writes the pending transaction identifier and a pending commit identifier to the last commit data for the first data item. The system writes a first value associated with a pending transaction to the first data item. The system aborts the pending transaction in response to a determination that the write claim data for the first data item does not include the first previous transaction identifier included in the last commit data for the first data item.

Claims (71)

1. An apparatus for atomic transactions in a NoSQL database, the apparatus comprising:

a processor; and

one or more stored sequences of instructions which, when executed by the processor, cause the processor to implement the steps of:

determining whether write claim data for a first data item in a non-relational database includes a first previous transaction identifier, the write claim data storing a transaction identifier for a transaction that establishes a claim to write a value to the first data item, the first previous transaction identifier being included in last commit data for the first data item;

updating the write claim data for the first data item to include a pending transaction identifier in response to a determination that the write claim data for the first data item includes the first previous transaction identifier;

updating the last commit data for the first data item with the pending transaction identifier and a pending commit identifier in response to the determination that the write claim data for the first data item includes the first previous transaction identifier;

writing a first value associated with a pending transaction to the first data item; and

aborting the pending transaction in response to a determination that the write claim data for the first data item does not include the first previous transaction identifier included in the last commit data for the first data item.

2. The apparatus of claim 1 , further comprising the steps of:

determining whether write claim data for a second data item includes a second previous transaction identifier included in last commit data for the second data item;

writing the pending transaction identifier to the write claim data for the second data item in response to a determination that the write claim data for the second data item includes the second previous transaction identifier included in the last commit data for the second data item;

writing the pending transaction identifier and the pending commit identifier to the last commit data for the second data item;

writing a second value associated with the pending transaction to the second data item; and

aborting the pending transaction in response to a determination that the write claim data for the second data item does not include the second previous transaction identifier included in the last commit data for the second data item.

3. The apparatus of claim 2 , wherein aborting the pending transaction in response to the determination that the write claim data for the second data item does not include the second previous transaction identifier included in the last commit data for the second data item comprises writing the previous transaction identifier to the write claim data for the first data item.

4. The apparatus of claim 1 , further comprising the steps of:

identifying a global commit identifier associated with a most recent fully committed transaction; and

reading a recent value for the first data item by selecting a value for the first data item which corresponds to a highest sequential commit identifier that is either less than or equal to the global commit identifier.

5. The apparatus of claim 4 , further comprising the step of equating the global commit identifier to the pending commit identifier.

6. A computer program product, comprising a non-transitory computer-readable medium having a computer-readable program code embodied therein to be executed by one or more processors, the program code including instructions to:

determine whether write claim data for a first data item in a non-relational database includes a first previous transaction identifier, the write claim data storing a transaction identifier for a transaction that establishes a claim to write a value to the first data item, the first previous transaction identifier being included in last commit data for the first data item;

update the write claim data for the first data item to include a pending transaction identifier in response to a determination that the write claim data for the first data item includes the first previous transaction identifier;

update the last commit data for the first data item with the pending transaction identifier and a pending commit identifier in response to the determination that the write claim data for the first data item includes the first previous transaction identifier;

write a first value associated with a pending transaction to the first data item; and

abort the pending transaction in response to a determination that the write claim data for the first data item does not include the first previous transaction identifier included in the last commit data for the first data item.

7. The computer program product of claim 6 , wherein the program code includes further instructions to:

determine whether write claim data for a second data item includes a second previous transaction identifier included in last commit data for the second data item;

write the pending transaction identifier to the write claim data for the second data item in response to a determination that the write claim data for the second data item includes the second previous transaction identifier included in the last commit data for the second data item;

write the pending transaction identifier and the pending commit identifier to the last commit data for the second data item;

write a second value associated with the pending transaction to the second data item; and

abort the pending transaction in response to a determination that the write claim data for the second data item does not include the second previous transaction identifier included in the last commit data for the second data item.

8. The computer program product of claim 7 , wherein aborting the pending transaction in response to the determination that the write claim data for the second data item does not include the second previous transaction identifier included in the last commit data for the second data item comprises writing the previous transaction identifier to the write claim data for the first data item.

9. The computer program product of claim 6 , wherein the program code includes further instructions to:

identify a global commit identifier associated with a most recent fully committed transaction; and

read a recent value for the first data item by selecting a value for the first data item which corresponds to a highest sequential commit identifier that is either less than or equal to the global commit identifier.

10. The computer program product of claim 9 , wherein the program code includes further instructions to equate the global commit identifier to the pending commit identifier.

11. A method for atomic transactions in a NoSQL database, the method comprising:

determining whether write claim data for a first data item in a non-relational database includes a first previous transaction identifier, the write claim data storing a transaction identifier for a transaction that establishes a claim to write a value to the first data item, the first previous transaction identifier being included in last commit data for the first data item;

updating the write claim data for the first data item to include a pending transaction identifier in response to a determination that the write claim data for the first data item includes the first previous transaction identifier;

updating the last commit data for the first data item with the pending transaction identifier and a pending commit identifier in response to the determination that the write claim data for the first data item includes the first previous transaction identifier;

writing a first value associated with a pending transaction to the first data item; and

aborting the pending transaction in response to a determination that the write claim data for the first data item does not include the first previous transaction identifier included in the last commit data for the first data item.

12. The method of claim 11 , the method further comprising:

determining whether write claim data for a second data item includes a second previous transaction identifier included in last commit data for the second data item;

writing the pending transaction identifier to the write claim data for the second data item in response to a determination that the write claim data for the second data item includes the second previous transaction identifier included in the last commit data for the second data item;

writing the pending transaction identifier and the pending commit identifier to the last commit data for the second data item;

writing a second value associated with the pending transaction to the second data item; and

aborting the pending transaction in response to a determination that the write claim data for the second data item does not include the second previous transaction identifier included in the last commit data for the second data item.

13. The method of claim 12 , wherein aborting the pending transaction in response to the determination that the write claim data for the second data item does not include the second previous transaction identifier included in the last commit data for the second data item comprises writing the previous transaction identifier to the write claim data for the first data item.

14. The method of claim 11 , the method further comprising:

identifying a global commit identifier associated with a most recent fully committed transaction; and

reading a recent value for a first data item by selecting a value for the first data item which corresponds to a highest sequential commit identifier that is either less than or equal to the global commit identifier.

15. The method of claim 14 , the method further comprising equating the global commit identifier to the pending commit identifier.

16. A method for transmitting code for atomic transactions in a NoSQL database, the method comprising:

transmitting code to determine whether write claim data for a first data item in a non-relational database includes a first previous transaction identifier, the write claim data storing a transaction identifier for a transaction that establishes a claim to write a value to the first data item, the first previous transaction identifier being included in last commit data for the first data item;

in response to a determination that the write claim data for the first data item includes the first previous transaction identifier,

transmitting code to update the write claim data for the first data item to include a pending transaction identifier;

transmitting code to update the last commit data for the first data item with the pending transaction identifier and a pending commit identifier, and;

transmitting code to write a first value associated with a pending transaction to the first data item; and

transmitting code to abort the pending transaction in response to a determination that the write claim data for the first data item does not include the first previous transaction identifier included in the last commit data for the first data item.

17. The method for transmitting code of claim 16 , the method further comprising:

transmitting code to determine whether write claim data for a second data item includes a second previous transaction identifier included in last commit data for the second data item;

transmitting code to write the pending transaction identifier to the write claim data for the second data item in response to a determination that the write claim data for the second data item includes the second previous transaction identifier included in the last commit data for the second data item;

transmitting code to write the pending transaction identifier and the pending commit identifier to the last commit data for the second data item;

transmitting code to write a second value associated with the pending transaction to the second data item; and

transmitting code to abort the pending transaction in response to a determination that the write claim data for the second data item does not include the second previous transaction identifier included in the last commit data for the second data item.

18. The method for transmitting code of claim 17 , wherein transmitting code to abort the pending transaction in response to the determination that the write claim data for the second data item does not include the second previous transaction identifier included in the last commit data for the second data item comprises transmitting code to write the previous transaction identifier to the write claim data for the first data item.

19. The method for transmitting code of claim 16 , the method further comprising:

transmitting code to identify a global commit identifier associated with a most recent fully committed transaction; and

transmitting code to read a recent value for the first data item by selecting a value for the first data item which corresponds to a highest sequential commit identifier that is either less than or equal to the global commit identifier.

20. The method for transmitting code of claim 19 , the method further comprising transmitting code to equate the global commit identifier to the pending commit identifier.

Assignments (2)
CHANGE OF NAME Recorded Oct 3, 2023
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 065114/0983 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 18, 2014
From: FUCHS, MATTHEW
To: SALESFORCE.COM, INC.
Reel/Frame 032462/0228 →
Continuity (2)
Provisional Application 61807874 · Apr 3, 2013
Related Publication 20140304245A1 · Oct 9, 2014