A system and method for achieving strong transaction consistency across different database engines
A database and consistency technology, applied in the database field
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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.
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com