Master-secondary synchronization method and device

A master-slave and data synchronization technology, applied in the computer field, can solve problems such as synchronization speed lag and synchronization delay, and achieve the effects of efficient master-slave synchronization, faster data synchronization speed, and shorter master-slave synchronization delay

Active Publication Date: 2018-06-19
BEIJING QIHOO TECH CO LTD
View PDF6 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Therefore, when there is a large amount of online write requests, the synchronization speed will be far behind the write speed of the master node, causing synchronization delays

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
  • Master-secondary synchronization method and device
  • Master-secondary synchronization method and device
  • Master-secondary synchronization method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0046] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0047] figure 1 is a schematic flow chart of a master-slave synchronization method according to an embodiment of the present invention, such as figure 1 As shown, according to the embodiment of the present invention, the master-slave synchronization method may include:

[0048] Step S102, the first thread of the slave node receives the data synchronization command sent by the master node, and records the log files sequentially acc...

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 provides a master-secondary synchronization method and device. The method comprises steps that data synchronization commands sent by a master node are received the first thread of secondary nodes, and log files are sequentially recorded according to the order of the data synchronization commands; the data synchronization commands are distributed by the first thread to multiple secondthreads of the secondary nodes and are simultaneously performed by the multiple second threads; if the data synchronization commands are successfully performed by the second threads, the confirmationinformation is sent to third threads of the secondary nodes; the offset amount of the log files is updated by the third threads according to the confirmation information. The master-secondary synchronization method is advantaged in that on the condition that the synchronization command input order of the secondary nodes and the command sending order of the master node are guaranteed to be consistent, the multiple second threads are opened and the data synchronization commands are simultaneously performed, the data synchronization speed is accelerated, master-secondary synchronization delay isshortened, and master-secondary data synchronization is efficiently accomplished.

Description

technical field [0001] The invention relates to the technical field of computers, in particular to a master-slave synchronization method and device. Background technique [0002] In data storage, in order to prevent data loss caused by system operation errors or system failures, data backup is essential. Especially in a distributed data storage system, the same piece of data is usually stored in one master database and multiple slave databases, wherein the data of the slave databases can be obtained by synchronizing with the master database. [0003] In the traditional master-slave synchronization method, after receiving the user's write request, the master node writes the data into the database and records the write operation at the same time, and then sends a data synchronization command to the slave node. After receiving the synchronization command, the slave node executes the synchronization command, writes the data into the database and records the write operation, so ...

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 Applications(China)
IPC IPC(8): H04L29/08
CPCH04L67/1095H04L67/1097
Inventor 宋昭
Owner BEIJING QIHOO 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