Adaptive hardware transactional memory based concurrency control

US11947994B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11947994-B2
Application numberUS-201916367910-A
CountryUS
Kind codeB2
Filing dateMar 28, 2019
Priority dateMar 28, 2019
Publication dateApr 2, 2024
Grant dateApr 2, 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.

A method may include determining a threshold quantity of attempts to optimistically perform a first transaction operating data stored in a database. The threshold quantity of attempts may be determined based on an expected workload of the first transaction and/or a workload at the database. The first transaction may be performed optimistically including by tracking cache lines accessed by the first transaction and detecting, based on a second transaction writing to a cache line accessed by the first transaction, a conflict between the first transaction and the second transaction. If the first transaction is not successful performed after the threshold quantity of attempts to optimistically perform the first transaction, the first transaction may be performed in a fallback mode including by acquiring a lock to prevent the second transaction from accessing a same data in the database as the first transaction. Related systems and articles of manufacture are also provided.

First claim

Opening claim text (preview).

What is claimed is: 1. A system, comprising: at least one data processor; and at least one memory storing instructions which, when executed by the at least one data processor, result in operations comprising: determining an expected quantity of cache lines accessed by a first transaction, the expected quantity of cache lines being determined based on a quantity of data of a datatype accessed by the first transaction that can be held in a single cache line, the expected quantity of cache lines further being determined based on a quantity of unique values present in a database being accessed by the first transaction; determining, based at least on the expected quantity of cache lines accessed by the first transaction, an expected workload of the first transaction; determining, based at least on the expected workload of the first transaction, a threshold quantity of attempts to optimistically perform the first transaction, the threshold quantity of attempts being inversely proportional to a likelihood of conflict arising from the first transaction operating on a same memory location as a second transaction, the likelihood of conflict corresponding to the expected workload of the first transaction, and the optimistic performance of the first transaction comprises performing the first transaction without acquiring a lock to prevent a second transaction from accessing the same memory location as the first transaction; optimistically performing the first transaction comprising by tracking one or more cache lines accessed by the first transaction and detecting, based at least on the second transaction writing to a cache line accessed by the first transaction, a conflict between the first transaction and the second transaction; and in response to failing to successfully perform the first transaction after the threshold quantity of attempts to optimistically perform the first transaction, determining, based at least on the first transaction being an illegal operation and/or the database lacking capacity to support the performance of the first transaction, to perform the first transaction in a fallback mode that comprises acquiring the lock to prevent the second transaction from accessing the same memory location as the first transaction, and determining, based at least on the first transaction being a legal operation and the database having capacity to support the performance of the first transaction, to continue to optimistically perform the first transaction for another threshold quantity of attempts. 2. The system of claim 1 , further comprising: in response to determining to perform the first transaction in the fallback mode, aborting an optimistic performance of a plurality of concurrent transactions. 3. The system of claim 1 , further comprising: determining, based at least on a metadata associated with the first transaction, the expected workload of the first transaction, the metadata associated with the first transaction identifying a type of queries associated with the first transaction, a type of data associated with the first transaction, and/or a quantity of data associated with the first transaction. 4. The system of claim 3 , wherein the expected workload of the first transaction is determined to be higher based at least on the first transaction being associated with a scan-type query, a complex datatype, and/or a large quantity of data, and wherein the expected workload of the first transaction is determined to be lower based at least on the first transaction being associated with an equality-type query, a simple datatype, and/or a small quantity of data. 5. The system of claim 1 , further comprising: determining the workload at the database, the workload at the database being determined based at least on an average runtime of transactions in the database, one or more datatypes of the data stored in the database, and/or a size of a dictionary associated with the data stored in the database. 6. The system of claim 1 , wherein the threshold quantity of attempts to optimistically perform the first transaction is further determined based at least on a quantity of available computational resources at the database. 7. The system of claim 1 , wherein the first transaction is optimistically performed for a larger threshold quantity of attempts based at least on the likelihood of conflict being low, and wherein the first transaction is optimistically performed for a smaller threshold quantity of attempts based at least on the likelihood of conflict being high. 8. The system of claim 1 , wherein the optimistic performance of the first transaction further comprises responding to the conflict between the first transaction and the second transaction by at least aborting the first transaction and the second transaction, and rolling back the first transaction and the second transaction by at least reversing one or more changes applied to the data stored in the database as a result of performing the first transaction and the second transaction. 9. A computer-implemented method, comprising: determining an expected quantity of cache lines accessed by a first transaction, the expected quantity of cache lines being determined based on a quantity of data of a datatype accessed by the first transaction that can be held in a single cache line, the expected quantity of cache lines further being determined based on a quantity of unique values present in a database being accessed by the first transaction; determining, based at least on the expected quantity of cache lines accessed by the first transaction, an expected workload of the first transaction; determining, based at least on the expected workload of the first transaction, a threshold quantity of attempts to optimistically perform the first transaction, the threshold quantity of attempts being inversely proportional to a likelihood of conflict arising from the first transaction operating on a same memory location as a second transaction, the likelihood of conflict corresponding to the expected workload of the first transaction, and the optimistic performance of the first transaction comprises performing the first transaction without acquiring a lock to prevent a second transaction from accessing the same memory location as the first transaction; optimistically performing the first transaction comprising by tracking one or more cache lines accessed by the first transaction and detecting, based at least on the second transaction writing to a cache line accessed by the first transaction, a conflict between the first transaction and the second transaction; and in response to failing to successfully perform the first transaction after the threshold quantity of attempts to optimistically perform the first transaction, determining, based at least on the first transaction being an illegal operation and/or the database lacking capacity to support the performance of the first transaction, to perform the first transaction in a fallback mode that comprises acquiring the lock to prevent the second transaction from accessing the same memory location as the first transaction, and determining, based at least on the first transaction being a legal operation and the database having capacity to support the performance of the first transaction, to continue to optimistically perform the first transaction for another threshold quantity of attempts. 10. The method of claim 9 , further comprising: in response to determining to perform the first transaction in the fallback mode, aborting an optimistic performance of a plurality of concurrent transactions. 11. The method of claim 9 , further comprising: determining, based at least on a metadata associated with the first

Assignees

Inventors

Classifications

  • G06F9/467Primary

    Transactional memory (G06F9/528 takes precedence) · CPC title

  • Program synchronisation; Mutual exclusion, e.g. by means of semaphores · CPC title

  • with concurrent directory accessing, i.e. handling multiple concurrent coherency transactions · CPC title

  • Integrating or interfacing systems involving database management systems · CPC title

  • G06F9/528Primary

    by using speculative mechanisms · 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 US11947994B2 cover?
A method may include determining a threshold quantity of attempts to optimistically perform a first transaction operating data stored in a database. The threshold quantity of attempts may be determined based on an expected workload of the first transaction and/or a workload at the database. The first transaction may be performed optimistically including by tracking cache lines accessed by the f…
Who is the assignee on this patent?
Sap Se
What technology area does this patent fall under?
Primary CPC classification G06F9/467. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Apr 02 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 9 related publications on this page (citations in our corpus or others sharing the same primary CPC).