Hybrid concurrency control

US11080261B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11080261-B2
Application numberUS-201616072055-A
CountryUS
Kind codeB2
Filing dateJan 29, 2016
Priority dateJan 29, 2016
Publication dateAug 3, 2021
Grant dateAug 3, 2021

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.

Hybrid concurrency control in a database transaction is disclosed. A contention value associated with a database object is read. The contention value is dynamically updated based on access patterns of the database object. If the contention value indicates the database object is under high contention, a pessimistic concurrency control mechanism is applied to the database object. An optimistic concurrency control mechanism is applied to the database object if the contention value does not indicate the database object is under high contention.

First claim

Opening claim text (preview).

The invention claimed is: 1. A computer-implemented method of hybrid concurrency control for database transactions, the method comprising: accessing a database object stored in a database, wherein the database comprises a plurality of database objects including the database object and a contention value, and wherein the contention value is dynamically updated based on at least one database transaction of the database transactions; initiating an attempted transaction to read the contention value associated with the database object stored in the database; when the contention value indicates the database object is under high contention, applying a pessimistic concurrency control mechanism to the database object, wherein the pessimistic concurrency control mechanism initially applies a lock to the database object to prevent a concurrent update with the attempted transaction to the database object and releases the lock to the database object upon committing the database transaction, and wherein the pessimistic concurrency control mechanism includes a two-phase locking protocol, the two-phase locking protocol comprising an expanding phase and a shrinking phase; and when the contention value indicates the database object is not under high contention, applying an optimistic concurrency control mechanism to the database object. 2. The computer-implemented method of claim 1 wherein the database object is initialized with a contention value to indicate the database object is not under high contention. 3. The computer-implemented method of claim 1 wherein the contention value is dynamically updated based on aborts of transactions accessing the database object under the optimistic concurrency control mechanism. 4. The computer-implemented method of claim 3 wherein the contention value is dynamically updated based on frequency of aborts of transactions. 5. The computer-implemented method of claim 1 where the contention value is dynamically updated based on an amount of time under the pessimistic concurrency control mechanism. 6. The computer-implemented method of claim 5 wherein the contention value is reset to indicate the database object is not under high contention after a selected amount of time under high contention. 7. The computer-implemented method of claim 1 wherein the pessimistic concurrency control mechanism include acquiring locks prior to the database transaction performing operations on the database object. 8. The computer-implemented method of claim 7 wherein the pessimistic concurrency control mechanism includes a two-phase locking protocol. 9. The computer-implemented method of claim 1 wherein the expanding phase acquires locks without releasing the locks, and wherein the shrinking phase releases the locks without acquiring the locks. 10. The computer-implemented method of claim 1 wherein the lock to the database object is configured to block the attempted transaction from acquiring a conflicting lock on the database object. 11. The computer-implemented method of claim 1 , further comprising: upon exceeding an elapsed period of time, reevaluating the contention value for the database object; and when a frequency of the database transactions have exceeded a contention threshold amount, update the contention value for the database object from not under high contention to under high contention. 12. The computer-implemented method of claim 1 , further comprising: identifying the database transaction corresponding with an abort operation for the database object; and dynamically incrementing a counter associated with the database object. 13. A non-transitory computer readable medium for storing computer executable instructions for controlling a computing device to perform a method of hybrid concurrency control for database transactions, the method comprising: accessing a database object stored in a database, wherein the database comprises a plurality of database objects including the database object and a contention value, and wherein the contention value is dynamically updated based on at least one database transaction of the database transactions; initiating an attempted transaction to read the contention value associated with the database object stored in the database; when the contention value indicates the database object is under high contention, applying a pessimistic concurrency control mechanism to the database object, wherein the pessimistic concurrency control mechanism initially applies a lock to the database object to prevent a concurrent update with the attempted transaction to the database object and releases the lock to the database object upon committing the database transaction, and wherein the pessimistic concurrency control mechanism includes a two-phase locking protocol, the two-phase locking protocol comprising an expanding phase and a shrinking phase; and when the contention value indicates the database object is not under high contention, applying an optimistic concurrency control mechanism to the database object. 14. The non-transitory computer readable medium of claim 13 wherein the contention value is an integer. 15. The non-transitory computer readable medium of claim 14 wherein the contention value is incremented based on an access patterns of the database object including an amount of abort transactions accessing the database object. 16. The non-transitory computer readable medium of claim 13 wherein the contention value is dynamically updated based on a probability. 17. A system to apply hybrid concurrency control for database transactions, the system comprising: a processor; and a memory comprising instructions executable by the processor to: access a database object stored in a database, wherein the database comprises a plurality of database objects including the database object and a contention value, and wherein the contention value is dynamically updated based on at least one database transaction of the database transactions; initiate an attempted transaction to read the contention value stored with the database object stored in the database; when the contention value indicates the database object is under high contention, apply a pessimistic concurrency control mechanism to the database object, wherein the pessimistic concurrency control mechanism initially applies a lock to the database object to prevent a concurrent update with the attempted transaction to the database object and releases the lock to the database object upon committing the database transaction, and wherein the pessimistic concurrency control mechanism includes a two-phase locking protocol, the two-phase locking protocol comprising an expanding phase and a shrinking phase; and when the contention value indicates the database object is not under high contention, apply an optimistic concurrency control mechanism to the database object. 18. The system of claim 17 including an updater to dynamically track access patterns based on an amount of aborts of transactions accessing the database object. 19. The system of claim 18 wherein the contention value is dynamically updated based on a probability determined with the updater.

Assignees

Inventors

Classifications

  • Concurrency control (transaction processing G06F9/466) · CPC title

  • Information retrieval; Database structures therefor; File system structures therefor · CPC title

  • Optimistic concurrency control · CPC title

  • Transaction processing · CPC title

  • Change logging, detection, and notification (replication G06F16/27) · 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 US11080261B2 cover?
Hybrid concurrency control in a database transaction is disclosed. A contention value associated with a database object is read. The contention value is dynamically updated based on access patterns of the database object. If the contention value indicates the database object is under high contention, a pessimistic concurrency control mechanism is applied to the database object. An optimistic co…
Who is the assignee on this patent?
Hewlett Packard Entpr Dev Lp
What technology area does this patent fall under?
Primary CPC classification G06F16/2308. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Aug 03 2021 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 2 related publications on this page (citations in our corpus or others sharing the same primary CPC).