Data synchronization method and device for master and slave nodes of database

A data synchronization and database technology, applied in the storage field, can solve problems such as unfriendly users, lack of master-slave synchronization function, bandwidth occupation, etc., and achieve the effect of ensuring data integrity

Inactive Publication Date: 2021-02-26
SUZHOU LANGCHAO INTELLIGENT TECH CO LTD
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For example, in the case of a large amount of data, the slow query speed is not user-friendly, and the storage is not optimized to take up a lot of disk space, etc.
As an open source time series data, influxdb focuses on querying and storing time series data with high performance, but it does not have master-slave synchronization function, that is, it does not support clusters
If you need to achieve master-slave data synchronization, basically write data to the master-slave nod...

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
  • Data synchronization method and device for master and slave nodes of database

Examples

Experimental program
Comparison scheme
Effect test

specific Embodiment approach

[0051] (1) Modify the master node influxdb configuration file to support log file output, and set the output log format;

[0052] (2) Configure the influxdb master-slave synchronization tool configuration file;

[0053] (3) Start the influxdb master-slave synchronization tool to continuously monitor the master influxdb database operation log;

[0054] (4) Analyze the operation log, add, delete, and modify operations, and synchronize such operations to the influxdb slave database;

[0055] (5) If the influxdb database is offline, the main influxdb database addition, deletion, and modification operations are stored in the sqlite database;

[0056] (6) After detecting that the influxdb database is online, the data in the sqlite is stored in the influxdb database, and the data stored in the sqlite is deleted;

[0057] (7) If the master-slave structure is switched, the tool also supports dynamic switching, so as to ensure the consistency of master-slave data.

[0058] As can be ...

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 data synchronization method and device for master and slave nodes of a database. The method comprises the following steps: starting an output log function of a time sequencetype database on a master node and determining a format of an output log; configuring and starting a master-slave synchronizer of the time sequence type database to continuously monitor an output logof the master node; analyzing all editing operations aiming at the time sequence type database based on the time sequence from the output log; in response to the offline state of the slave node, caching the editing operation as a to-be-synchronized operation into a lightweight database of the master node; in response to the slave node being online, synchronizing the editing operation and the cached to-be-synchronized operation to the slave node. Master-slave data synchronization and master-slave switching can be normally executed offline in the master-slave database, and data integrity is guaranteed.

Description

technical field [0001] The present invention relates to the field of storage, more specifically, to a method and device for synchronizing data between master and slave nodes of a database. Background technique [0002] Using traditional relational databases to store time series has many disadvantages. For example, in the case of a large amount of data, the slow query speed is not user-friendly, and the storage is not optimized and takes up a lot of disk space. As an open source time-series data, influxdb focuses on querying and storing time-series data with high performance, but it does not have the master-slave synchronization function, that is, it does not support clusters. If you need to achieve master-slave data synchronization, basically write data to the master-slave node at the same time when writing data. Although this method can solve the problem of master-slave synchronization, it is not the optimal way, because the master-slave Storing data in the database at th...

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
IPC IPC(8): G06F16/27G06F16/2455
CPCG06F16/24552G06F16/27
Inventor 李永杰
Owner SUZHOU LANGCHAO INTELLIGENT TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products