Concurrency control for transactions in database systems

US11899648B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11899648-B2
Application numberUS-202217821581-A
CountryUS
Kind codeB2
Filing dateAug 23, 2022
Priority dateSep 22, 2020
Publication dateFeb 13, 2024
Grant dateFeb 13, 2024

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

The subject technology inserts, by a first transaction, a new version of an object, the first transaction including a first statement to perform an update operation to a row in a first table, the object corresponding to data in the row to be updated, the first statement including information comprising an object key associated with the object. The subject technology performs, by a second transaction, a range read, the range read including information indicating the object key. The subject technology receives a set of conflicting transactions from the range read. The subject technology determines that a conflict occurred between the first transaction and a third transaction from the set of conflicting transactions. The subject technology performs a restart of the first transaction in response to determining that the conflict occurred.

First claim

Opening claim text (preview).

What is claimed is: 1. A system comprising: at least one hardware processor; and a memory storing instructions that cause the at least one hardware processor to perform operations comprising: inserting, by a first transaction, a new version of an object, the first transaction including a first statement to perform an update operation to a row in a first table, the object corresponding to data in the row to be updated, the first statement including information comprising an object key associated with the object, the object key comprising additional information being appended as a suffix to the object key, the additional information comprising a first transaction identifier associated with the first transaction and a first statement number associated with the first statement; performing, by a second transaction, a range read, the range read including information indicating the object key; receiving a set of conflicting transactions from the range read; determining that a conflict occurred between the first transaction and a third transaction from the set of conflicting transactions; and performing a restart of the first transaction in response to determining that the conflict occurred. 2. The system of claim 1 , wherein the operations further comprise: storing, in a transaction status table, a first set of committed transactions and a second set of aborted transactions, wherein a particular transaction that is currently in progress is not included in the transaction status table. 3. The system of claim 1 , wherein the update operation corresponds to the new version of the object, and the additional information further comprises a first restart count indicating a number of times that the first statement has been attempted. 4. The system of claim 1 , wherein the operations further comprise: determining that a fourth transaction from the set of conflicting transactions has committed before a read timestamp of the first transaction, and determining that the first transaction and the fourth transaction do not have a write-write conflict. 5. The system of claim 1 , wherein determining that the conflict occurred between the first transaction and the third transaction comprises: determining that the third transaction from the set of conflicting transactions has committed after a read timestamp of the first transaction. 6. The system of claim 1 , wherein determining that the conflict occurred between the first transaction and the third transaction comprises: determining that the third transaction is still active. 7. The system of claim 1 , wherein performing the restart of the first transaction comprises: re-executing a statement from the first transaction as a subsequent execution of the statement from a previous execution of the statement that did not result in a transaction commit. 8. The system of claim 7 , wherein the operations further comprise: prior to re-executing the statement, waiting for a particular conflicting transaction, from the set of conflicting transactions, to complete a commit operation. 9. The system of claim 7 , wherein re-executing the statement from the first transaction occurs without waiting for a particular conflicting transaction, from the set of conflicting transactions, to complete a commit operation. 10. The system of claim 1 , wherein the set of conflicting transactions comprises a list of committed or active transactions that performed an update operation in a row of a source table prior to the first transaction. 11. A machine-implemented method comprising: inserting, using one or more hardware processors, by a first transaction, a new version of an object, the first transaction including a first statement to perform an update operation to a row in a first table, the object corresponding to data in the row to be updated, the first statement including information comprising an object key associated with the object, the object key comprising additional information being appended as a suffix to the object key, the additional information comprising a first transaction identifier associated with the first transaction and a first statement number associated with the first statement; performing, using the one or more hardware processors, by a second transaction, a range read, the range read including information indicating the object key; receiving, using the one or more hardware processors, a set of conflicting transactions from the range read; determining, using the one or more hardware processors, that a conflict occurred between the first transaction and a third transaction from the set of conflicting transactions; and performing, using the one or more hardware processors, a restart of the first transaction in response to determining that the conflict occurred. 12. The machine-implemented method of claim 11 , further comprising: storing, in a transaction status table, a first set of committed transactions and a second set of aborted transactions, wherein a particular transaction that is currently in progress is not included in the transaction status table. 13. The machine-implemented method of claim 11 , wherein the update operation corresponds to the new version of the object, and the additional information further comprises a first restart count indicating a number of times that the first statement has been attempted. 14. The machine-implemented method of claim 11 , further comprising: determining that a fourth transaction from the set of conflicting transactions has committed before a read timestamp of the first transaction, and determining that the first transaction and the fourth transaction do not have a write-write conflict. 15. The machine-implemented method of claim 11 , wherein determining that the conflict occurred between the first transaction and the third transaction comprises: determining that the third transaction from the set of conflicting transactions has committed after a read timestamp of the first transaction. 16. The machine-implemented method of claim 11 , wherein determining that the conflict occurred between the first transaction and the third transaction comprises: determining that the third transaction is still active. 17. The machine-implemented method of claim 11 , wherein performing the restart of the first transaction comprises: re-executing a statement from the first transaction as a subsequent execution of the statement from a previous execution of the statement that did not result in a transaction commit. 18. The machine-implemented method of claim 17 , further comprising: prior to re-executing the statement, waiting for a particular conflicting transaction, from the set of conflicting transactions, to complete a commit operation. 19. The machine-implemented method of claim 17 , wherein re-executing the statement from the first transaction occurs without waiting for a particular conflicting transaction, from the set of conflicting transactions, to complete a commit operation. 20. A non-transitory computer-storage medium comprising instructions that, when executed by one or more processors of a machine, configure the machine to perform operations comprising: inserting, by a first transaction, a new version of an object, the first transaction including a first statement to perform an update operation to a row in a first table, the object corresponding to data in the row to be updated, the first statement including information comprising an object key associated with the object, the object key comprising additional information

Assignees

Inventors

Classifications

  • using timestamps · CPC title

  • Ensuring data consistency and integrity · CPC title

  • Updates performed during online database operations; commit processing · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11899648B2 cover?
The subject technology inserts, by a first transaction, a new version of an object, the first transaction including a first statement to perform an update operation to a row in a first table, the object corresponding to data in the row to be updated, the first statement including information comprising an object key associated with the object. The subject technology performs, by a second transa…
Who is the assignee on this patent?
Snowflake Inc
What technology area does this patent fall under?
Primary CPC classification G06F16/2322. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Feb 13 2024 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 12 related publications on this page (citations in our corpus or others sharing the same primary CPC).