Database transaction processing method and apparatus, server, and storage medium

US12153570B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-12153570-B2
Application numberUS-202217743293-A
CountryUS
Kind codeB2
Filing dateMay 12, 2022
Priority dateJun 10, 2020
Publication dateNov 26, 2024
Grant dateNov 26, 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.

This application discloses a database transaction processing method performed by a computer device. The method includes: in a case of starting a target transaction, obtaining, by a working node in a distributed database system, a transaction timestamp of the target transaction and current global latest version information, the target transaction including at least one operation statement for a target data object, and the global latest version information being version information of latest generated metadata of metadata stored in the distributed database system; determining latest-version metadata of the target data object according to the current global latest version information, and determining to-be-accessed user data of the target transaction according to the transaction timestamp; and executing an operation statement of the target transaction on the to-be-accessed user data based on the latest-version metadata of the target data object.

First claim

Opening claim text (preview).

What is claimed is: 1. A database transaction processing method performed by a working node in a distributed database system, the method comprising: in a case of starting a target transaction on user data stored in the distributed database system, obtaining a transaction timestamp of the target transaction and current global latest version information of the distributed database system, the target transaction comprising at least one operation statement for a target data object of the user data stored in the database system, and the current global latest version information being version information of latest generated metadata stored in the distributed database system for describing logical structures and features of the user data stored in the database system; determining latest-version metadata of the target data object according to the current global latest version information; determining, among the user data stored in the distributed data system, to-be-accessed user data of the target data object according to the transaction timestamp, wherein the to-be-accessed user data of the target data object is user data associated with the target transaction whose version information is lower than or equal to version information of a user data snapshot obtained at the transaction timestamp; and executing an operation statement of the target transaction on the to-be-accessed user data of the target data object based on the latest-version metadata of the target data object. 2. The method according to claim 1 , wherein the method further comprises: receiving a modification instruction for metadata of a data object, and generating modified metadata of the data object according to the modification instruction; committing the modified metadata to a global metadata storage; and updating the global latest version information to version information of the modified metadata when the modified metadata is successfully committed. 3. The method according to claim 2 , wherein before the committing the modified metadata to a global metadata storage, the method further comprises: transmitting a first timestamp allocation request to a global timestamp manager when the modified metadata is generated; and receiving a timestamp returned by the global timestamp manager based on the first timestamp allocation request, and determining the timestamp as the version information of the modified metadata. 4. The method according to claim 2 , wherein the global latest version information is stored in a global timestamp manager, and the updating the global latest version information to version information of the modified metadata comprises: transmitting a commit success notification to the global timestamp manager, so that the global timestamp manager updates the stored global latest version information to the version information of the modified metadata according to the commit success notification. 5. The method according to claim 2 , wherein a local cache of the working node stores version information of latest local metadata of a data object, and the method further comprises: writing the modified metadata to the local cache when the modified metadata is successfully committed; and updating version information of latest local metadata of a data object whose metadata is modified to the version information of the modified metadata in the local cache. 6. The method according to claim 1 , wherein the determining latest-version metadata of the target data object according to the current global latest version information comprises: determining to-be-accessed metadata in the global metadata storage of the distributed database system according to the current global latest version information, and searching for the latest-version metadata of the target data object from the determined to-be-accessed metadata, wherein the to-be-accessed metadata is metadata whose version information is lower than or equal to the current global latest version information in the global metadata storage. 7. The method according to claim 1 , wherein the determining latest-version metadata of the target data object according to the current global latest version information comprises: obtaining version information of latest local metadata of the target data object from the local cache; comparing to determine whether the version information of the latest local metadata of the target data object is the same as the current global latest version information; and in a case of yes, obtaining the latest local metadata of the target data object as the latest-version metadata of the target data object from metadata stored in the local cache. 8. The method according to claim 7 , wherein the determining latest-version metadata of the target data object according to the current global latest version information further comprises: when the version information of the latest local metadata of the target data object is different from the current global latest version information, searching metadata of various versions of the target data object stored in the local cache and the global metadata storage, to determine whether target metadata exists, wherein version information of the found target metadata is higher than the version information of the latest local metadata of the target data object, and is not higher than the current global latest version information; and determining target metadata having latest version information of the found target metadata as the latest-version metadata of the target data object when the target metadata exists. 9. The method according to claim 8 , wherein after the determining target metadata having latest version information of the found target metadata as the latest-version metadata of the target data object, the method further comprises: updating the target metadata having the latest version information to the local cache; and updating the version information of the latest local metadata of the target data object to version information corresponding to the target metadata having the latest version information. 10. The method according to claim 8 , wherein the determining latest-version metadata of the target data object according to the current global latest version information further comprises: determining the latest local metadata of the target data object as the latest-version metadata of the target data object when the target metadata does not exist. 11. The method according to claim 10 , wherein the method further comprises: updating the version information of the latest local metadata of the target data object as the current global latest version information when the target metadata does not exist. 12. The method according to claim 1 , wherein the global latest version information is stored in a global timestamp manager in the distributed database system, and the obtaining a transaction timestamp of the target transaction and current global latest version information of the distributed database system comprises: transmitting a second timestamp allocation request corresponding to the target transaction to the global timestamp manager; and receiving response information returned by the global timestamp manager based on the second timestamp allocation request, wherein the response information comprises the transaction timestamp of the target transaction and the current global latest version information. 13. The method according to claim 1 , wherein the executing an operation statement of the target transaction on the to-be-accessed user data of the target data object based on the latest-version metadata of the target data object comprises: parsing the operation statemen

Assignees

Inventors

Classifications

  • G06F16/219Primary

    Managing data history or versioning (querying versioned data G06F16/2474; querying temporal data G06F16/2477) · CPC title

  • G06F16/27Primary

    Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor · CPC title

  • Updating · CPC title

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

  • using timestamps · 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 US12153570B2 cover?
This application discloses a database transaction processing method performed by a computer device. The method includes: in a case of starting a target transaction, obtaining, by a working node in a distributed database system, a transaction timestamp of the target transaction and current global latest version information, the target transaction including at least one operation statement for a …
Who is the assignee on this patent?
Tencent Tech Shenzhen Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F16/219. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Nov 26 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 3 related publications on this page (citations in our corpus or others sharing the same primary CPC).