Method for quickly maintaining data consistency between slave and host in master-slave replication mode of OpenGauss database
A technology of copying mode and host data, applied in database model, database update, structured data retrieval, etc., can solve problems such as database performance degradation and playback speed slowdown, so as to improve external service capabilities, overcome data inconsistency, and reduce WAL. cumulative effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0038] Embodiment 1: A kind of method (referring to figure 1), this method splits the work of the backup playback thread from a single thread playback into multi-thread parallel playback by transforming the existing WAL playback thread, and distinguishes the WAL type into a transaction log and a non-transaction log; the transaction log includes transaction operation related Logs, such as CSN (COMMIT SEQUENCE NUM) logs and transaction commit logs; non-transactional logs include data operation-related logs, such as insert operation logs and update operation logs; for transaction logs, this method still uses a separate thread playback to avoid out-of-order events For non-transactional logs, this method uses multi-threaded parallel playback to speed up WAL playback.
[0039] Specifically, this method includes the following steps:
[0040] Step 1: The log receiving thread writes the WAL sent by the main library to the disk;
[0041] Step 2: The Startup thread reads the WAL from t...
Embodiment 2
[0047] Embodiment 2: When using multi-threaded parallel playback processing for non-transactional logs in this method, if there is a dependency relationship between non-transactional logs, then the dependencies are divided into intra-transaction dependencies and inter-transaction dependencies, and for different types of dependencies Relationships are handled differently as follows:
[0048] (1) For intra-transaction dependencies, when there is WAL that operates multiple times on the same operation object (such as the same table) in a transaction (for example, do INSERT first, then do DELETE), parallel playback is based on the information obtained from WAL The numerical label that identifies the physical location of the operation object (the relfilenode of the table can be obtained according to the WAL information) calculates the number of the worker thread that plays back this log. Since the digital label that identifies the physical location of the operation object is unique, ...
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