Unlock instant, AI-driven research and patent intelligence for your innovation.

A query method, distributed system, equipment and storage medium

A query method and distributed technology, applied in the direction of database distribution/replication, instrumentation, response error generation, etc., can solve problems such as the inability to guarantee the ACID consistency of distributed transactions, reduce load, improve performance, and reduce interaction Effect

Active Publication Date: 2021-08-24
TRANSWARP INFORMATION TECH SHANGHAI
View PDF12 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

ACID consistency of distributed transactions cannot be guaranteed

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A query method, distributed system, equipment and storage medium
  • A query method, distributed system, equipment and storage medium
  • A query method, distributed system, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0051] Figure 1a It is a flow chart of a query method provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation of realizing distributed transaction consistency reading through GTM. The method can be executed by a query device, which can be implemented by software, and / or implemented in hardware, the device can be integrated in a stand-alone database, such as Figure 1a As shown, the method specifically includes:

[0052] Step 110: Identify the type of the currently received query transaction, and if the type is determined to be a distributed query transaction, acquire distributed query data matching the distributed query transaction.

[0053] In the embodiment of the present invention, the data storage method of the stand-alone database is row storage, and the stand-alone database is based on MVCC, and the visibility of the data row is judged by using the ID of the local transaction and the snapshot of the local transaction as an exam...

Embodiment 2

[0072] Figure 2a It is a flowchart of a query method provided in Embodiment 2 of the present invention, and the technical solution of this embodiment can be combined with one or more of the foregoing implementation manners. Such as Figure 2a As shown, the method includes:

[0073] Step 210 , judging whether the second GXID value can be extracted in the query transaction; if not, execute step 220 ; if yes, execute step 260 .

[0074] Wherein, if the stand-alone database can extract the second GXID value from the query transaction, it indicates that the query transaction is a distributed query transaction; if the second GXID value cannot be extracted, it indicates that the query transaction is a stand-alone query transaction.

[0075] Step 220: Determine the type as a stand-alone query transaction, and obtain stand-alone query data matching the stand-alone query transaction.

[0076] Step 230, obtain locally stored transaction ID and local transaction snapshot c...

Embodiment 3

[0107] image 3 It is a schematic structural diagram of a distributed system provided by Embodiment 3 of the present invention, such as image 3 As shown, the system includes: at least one stand-alone database 310 , GTM 320 , at least one backup agent 330 , backup coordinator 340 and backup storage 350 .

[0108] The backup coordinator 340 is connected to the GTM 320 , the backup coordinator 340 is connected to each backup agent 330 , the stand-alone database 310 is connected to each backup agent 330 , and the backup storage 350 is connected to each backup agent 330 .

[0109] The stand-alone database 310 is used to implement the query method provided by any embodiment of the present invention.

[0110] The backup coordinator 340 is configured to create a distributed transaction through the GTM 320 , obtain a global transaction snapshot, and send the global transaction snapshot to each backup agent 330 .

[0111] The backup agent 330 is configured to access the c...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a query method, a distributed system, a device and a storage medium. The method includes: identifying the type of the currently received query transaction, and if it is determined that the type is a distributed query transaction, obtaining distributed query data matching the distributed query transaction; when it is determined that the distributed query data satisfies local visibility, The database acquires the first GXID value in the GXID item corresponding to the distributed query data; if it is determined according to the first GXID value that the distributed query data is generated by a distributed update method, then verify whether the distributed query data meets global visibility; if so, The distributed query data is used as the feedback result of the distributed query transaction. By identifying the type of query transaction to determine the transaction processing method, the load of GTM can be reduced, the interaction with GTM can be reduced, its performance can be improved, and the consistent reading of distributed query transaction can be realized.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of data processing, and in particular, to a query method, a distributed system, a device, and a storage medium. Background technique [0002] The distributed database is to decompose the structured query language (Structured Query Language, SQL) request of the business into multiple stand-alone data for execution. Stand-alone databases can usually guarantee ACID (atomicity, consistency, isolation, and durability) characteristics, but only decomposing business SQL requests into multiple requests for execution on a stand-alone database cannot guarantee the isolation of distributed transactions as a whole. [0003] Dirty reads may occur between transactions operating on the same data table. For example, suppose a distributed database has stand-alone databases A and B. Distributed transaction 1 updates data on both stand-alone databases A and B. Entering the submission stage, the sub...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/2458G06F16/23G06F16/27G06F11/14
CPCG06F11/1464G06F16/2308G06F16/2471G06F16/27
Inventor 丛阳李昕辉刘汪根
Owner TRANSWARP INFORMATION TECH SHANGHAI