Distributed transaction management using two-phase commit optimization

US10452640B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10452640-B2
Application numberUS-201313869263-A
CountryUS
Kind codeB2
Filing dateApr 24, 2013
Priority dateDec 28, 2010
Publication dateOct 22, 2019
Grant dateOct 22, 2019

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 computer-implemented method, a computer-readable medium and a system are provided. A transaction master for each of a plurality of transactions of a database is provided. Each transaction master is configured to communicate with at least one transaction slave to manage execution of a transaction in the plurality of transactions. Each transaction master configured to perform generating a transaction token to specify data to be visible for a transaction on the database, the transaction token including a transaction identifier for identifying whether the transaction is a committed transaction or an uncommitted transaction, receiving a request to commit the transaction, initiating, based on the request, a two-phase commit operation to commit the transaction. The two-phase commit operation includes preparing for committing the transaction, writing a committed transaction to a memory, optimizing the two-phase commit operation by omitting a phase of the two-phase commit operation, generating an acknowledgement of the committed transaction. The plurality of transactions of the database are executed with each transaction master.

First claim

Opening claim text (preview).

What is claimed: 1. A computer-implemented method, the method comprising: receiving, from a client, a request to commit a transaction, the request received at a transaction master configured to communicate with a plurality of transaction slaves to manage an execution of a transaction at a database in response to the request from the client, initiating, by the transaction master, a first phase of a two-phase commit operation, the initiation of the first phase including sending, to each of the plurality of transaction slaves, instructions to prepare for committing the transaction, the instructions triggering, at each of the plurality of transaction slaves, a creation of a corresponding write prepare log entry by ensuring that log queue entries are flushed to disk, each of the plurality of transaction slaves further sending, to the transaction master, a first acknowledgment upon having successfully created the corresponding write prepare log entry of the transaction; sending, from the transaction master to the client, an early commit acknowledgement for the transaction after creating a write commit log entry and prior to initiating a second phase of the two-phase commit operation, the early commit acknowledgment informing the client of the transaction as having being committed, and the transaction master generates a transaction token including a transaction identifier that specifies changes made as part of the transaction are visible on the database, the early commit acknowledgement being sent upon having received the first acknowledgement from each of the plurality of transaction slaves but before having received, from each of the plurality of transaction slaves, a second acknowledgment that each of the plurality of transaction slaves have created a corresponding write commit log entry, the corresponding write commit log entry being created in response to every one of the plurality of transaction slaves successfully completing the first phase of the two-phase commit operation; and in response to sending the early commit acknowledgment to the client, initiating the second phase of the two-phase commit operation by at least sending, from the transaction master to each of the plurality of transaction slaves, a notification of the commit acknowledgment having being sent to the client, and send asynchronous commit notification to each of the plurality of transaction slaves, each of the plurality of transaction slaves release all locks associated with the transaction and the creation of the corresponding write commit log entry at each of the plurality of transaction slaves, the second phase of the two-phase commit operation being complete upon release of the locks associated with the transaction and receiving asynchronously acknowledgement of the creation of the corresponding write commit log entry at each of the plurality of transaction slaves. 2. The computer-implemented method according to claim 1 , further comprising: omitting the first phase of the two-phase commit operation, the omission of the first phase of the two-phase commit operation comprising: determining a first log sequence number corresponding to the transaction; comparing the first log sequence number corresponding to the transaction to a second log sequence number stored at the database; and omitting, in response to the first log sequence number being less than the second log sequence number stored at the data base, the creation of the write prepare log entry corresponding to the transaction. 3. The computer-implemented method according to claim 1 , further comprising: obtaining, based on a commit identifier corresponding to the transaction, the transaction token, the transaction identifier included in the transaction token further identifying whether the transaction is the committed transaction and or an uncommitted transaction. 4. The computer-implemented method according to claim 1 , further comprising: executing the plurality of transactions of the database with each transaction master. 5. A computer program product comprising a non-transitory machine-readable medium storing instructions that, when executed by at least one programmable processor, causes the at least one programmable processor to perform operations comprising: receiving, from a client, a request to commit a transaction, the request received at a transaction master configured to communicate with a plurality of transaction slaves to manage an execution of a transaction at a database in response to the request from the client, initiating, by the transaction master, a first phase of a two-phase commit operation, the initiation of the first phase including sending, to each of the plurality of transaction slaves, instructions to prepare for committing the transaction, the instructions triggering, at each of the plurality of transaction slaves, a creation of a corresponding write prepare log entry by ensuring that log queue entries are flushed to disk, each of the plurality of transaction slaves further sending, to the transaction master, a first acknowledgment upon having successfully created the corresponding write prepare log entry of the transaction; sending, from the transaction master to the client, an early commit acknowledgement for the transaction after creating a write commit log entry and prior to initiating a second phase of the two-phase commit operation, the early commit acknowledgment informing the client of the transaction as having being committed, and the transaction master generates a transaction token including a transaction identifier that specifies changes made as part of the transaction are visible on the database, the early commit acknowledgement being sent upon having received the first acknowledgement from each of the plurality of transaction slaves but before having received, from each of the plurality of transaction slaves, a second acknowledgment that each of the plurality of transaction slaves have created a corresponding write commit log entry, the corresponding write commit log entry being created in response to every one of the plurality of transaction slaves successfully completing the first phase of the two-phase commit operation; and in response to sending the early commit acknowledgment to the client, initiating the second phase of the two-phase commit operation by at least sending, from the transaction master to each of the plurality of transaction slaves, a notification of the commit acknowledgment having being sent to the client, and send asynchronous commit notification to each of the plurality of transaction slaves, each of the plurality of transaction slaves release all locks associated with the transaction and the creation of the corresponding write commit log entry at each of the plurality of transaction slaves, the second phase of the two-phase commit operation being complete upon release of the locks associated with the transaction and receiving asynchronously acknowledgement of the creation of the corresponding write commit log entry at each of the plurality of transaction slaves. 6. The computer program product according to claim 5 , further comprising: omitting the first phase of the two-phase commit operation, the omission of the first phase of the two-phase commit operation comprising: determining a first log sequence number corresponding to the transaction; comparing the first log sequence number corresponding to the transaction to a second log sequence number stored at the database; and omitting, in response to the first log sequence number being less than the second log sequence number stored at the data base, the creation of the write prepare log entry corresponding to the transaction. 7. The computer program product according to claim 5 , further comprising: obtaining, based at least on a commi

Assignees

Inventors

Classifications

  • Ensuring data consistency and integrity · CPC title

  • G06F9/466Primary

    Transaction 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 US10452640B2 cover?
A computer-implemented method, a computer-readable medium and a system are provided. A transaction master for each of a plurality of transactions of a database is provided. Each transaction master is configured to communicate with at least one transaction slave to manage execution of a transaction in the plurality of transactions. Each transaction master configured to perform generating a trans…
Who is the assignee on this patent?
Lee Juchang, Muehle Michael, Sap Se
What technology area does this patent fall under?
Primary CPC classification G06F16/2365. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Oct 22 2019 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 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).