Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A system and method for achieving strong transaction consistency across different database engines

A database and consistency technology, applied in the database field

Active Publication Date: 2021-07-06
SEQUOIADB CORP
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] In order to overcome the deficiencies in the prior art above, the purpose of the present invention is to provide a system and method for achieving strong transaction consistency across different database engines. By sharing distributed transactions, it solves the problems of transaction consistency and question of reliability

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 system and method for achieving strong transaction consistency across different database engines
  • A system and method for achieving strong transaction consistency across different database engines
  • A system and method for achieving strong transaction consistency across different database engines

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0049] Embodiment one , read uncommitted data from other database engines

[0050] In this example, if image 3 As shown, the different database engines are MySQL and PostgreSQL, TransactionProcessor is the transaction processing module, and storage is the storage module.

[0051] 1. Open a transaction t1 on the PostgreSQL side of the engine, and insert a record with the field c and the value 'v' into the table; the transaction t1 writes data, and the new record will be saved in the storage module storage, and there is no record in the transaction t1 In the case of submission, the transaction t1 can access this new record in the storage module; but other transactions cannot access this new record, which is also the characteristic of transaction isolation.

[0052] 2. Open a transaction t2 on the MySQL side of the engine, and read the record with the field c and the value 'v' from the table.

[0053] 3. At this time, since transaction t1 has not been committed, transaction ...

Embodiment 2

[0054] Embodiment two , read data submitted by other database engines

[0055] 1. If Figure 4 As shown, a transaction t1 is opened on the PostgreSQL side of the engine, and a record whose field is c and whose value is 'v' is inserted into the table;

[0056] 2. Submit transaction t1 on the PostgreSQL side of the engine

[0057] 3. Open a transaction t2 on the MySQL side of the engine, and read the record with the field c and the value 'v' from the table.

[0058] 4. At this time, since transaction t1 has been submitted, transaction t2 can see the record {c:'v'} newly inserted by transaction t1, so transaction t2 finally queries and returns the record {c:'v'}.

Embodiment 3

[0059] Embodiment Three , Cross-database engine write-write mutual exclusion

[0060] 1. If Figure 5 As shown, a transaction t1 is opened on the PostgreSQL side of the engine, and the record in the table whose field is c and whose value is 'oldValue' is updated to 'newValue1'

[0061] 2. Start a transaction t2 on the MySQL side of the engine, and update the record in the table whose field is c and whose value is 'oldValue' to 'newValue2'.

[0062] 3. At this time, since the record {c:'oldValue'} has been locked and modified by transaction t1, transaction t2 cannot modify the record at the same time. It needs to wait for transaction t1 to commit the transaction, or roll back the transaction to continue the modification. Otherwise, it will timeout and return failure.

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 invention discloses a system and method for realizing strong transaction consistency across different database engines. The system includes: a SQL protocol conversion module, which is used to standardize SQL protocol requests from different database engines and parse them into unified Standard protocol; transaction processing module, which is responsible for parsing and executing transactions of each database engine, processing requests sent by different database engines, sharing data and transactions between different database engines, and ensuring the consistency of transactions between different database engines ; The storage module is responsible for saving the log during the transaction execution process, so as to be used for the subsequent execution of the transaction rollback operation or the transaction commit operation, and to persist the data after the transaction execution.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a system and method for realizing strong transaction consistency across different database engines. Background technique [0002] In order to support the ACID (Atomic) of the transaction, the traditional database engine must either do all the operations in the transaction or not do it at all; Consistent: the execution of the transaction cannot destroy the integrity and consistency of the database data. , before and after a transaction is executed, the database must be in a consistent state; Isolated: the execution of a transaction cannot be interfered by other transactions, that is, the operations and data used within a transaction are independent of other concurrent transactions Isolated, concurrently executed transactions cannot interfere with each other; Durable (Durable): Once a transaction is committed, its changes to the data in the database are permanent) characteristics...

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/25H04L29/06G06F16/23G06F9/46
CPCG06F16/25H04L69/08G06F16/2365G06F9/466
Inventor 许建辉林友滨
Owner SEQUOIADB CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products