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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


