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

Dynamic check method and device for consistency of main and salve databases

A master database and dynamic verification technology, applied in the Internet field, can solve problems such as inaccurate consistency verification results, achieve the effects of realizing processing capacity, shortening verification time, and improving verification accuracy

Active Publication Date: 2014-12-31
ADVANCED NEW TECH CO LTD
View PDF4 Cites 40 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0013] This application provides a dynamic verification method and device for the consistency of master-slave databases, to at least solve the technical problem of inaccurate results of consistency verification caused by synchronization delay in the prior art, and to improve the master-slave database Technical Effects of Verification Accuracy

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
  • Dynamic check method and device for consistency of main and salve databases
  • Dynamic check method and device for consistency of main and salve databases
  • Dynamic check method and device for consistency of main and salve databases

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0047] figure 2 It is a schematic diagram of a preferred structure of the device for dynamically verifying the consistency of the master-slave database according to the embodiment of the present application. Preferably, the system in this embodiment can be located on the server 102 .

[0048] The inventive concept of this preferred embodiment may mainly include: initializing the difference primary key list; performing a predetermined number of update operations on the difference primary key list; after completing the aforementioned predetermined number of update operations, if the difference primary key list is still not empty, it indicates the difference The databases of the primary and secondary databases corresponding to the primary key list are inconsistent. Wherein, the difference primary key list retains the primary key corresponding to the data that is different between the primary database and the secondary database determined after the comparison is completed.

[00...

Embodiment 2

[0087] exist Figure 2-Figure 4 On the basis of the system shown, this application provides a preferred dynamic verification method for the consistency of the master-slave database. Such as Figure 5 As shown, the method may include the following steps:

[0088] Step S502: Repeat the following steps N times, where N is a preset natural number: retrieve from the master database the database records corresponding to the primary keys in the differential primary key list to obtain the primary database record set; The database record corresponding to the primary key in the difference primary key list to obtain the secondary database record set; obtain the primary key corresponding to the database record that has a difference between the primary database record set and the secondary database record set, and list the differential primary key The primary key in is updated to the primary key corresponding to the database record with the difference;

[0089] Step S504: After executin...

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 dynamic check method and device for the consistency of main and salve databases. The method comprises the steps of repeatedly executing the following steps for N times, wherein N is a preset natural number: retrieving a database record corresponding to a main key in a difference main key list from the main database to obtain a main database record set; retrieving a database record corresponding to a main key in the difference main key list from a slave database to obtain a slave database record set; obtaining the main keys corresponding to the database records with difference in the main database record set and the slave database record set, updating the main keys in the difference main key list as the main keys corresponding to the database records with the differences; after the steps are executed for N times, if the main key still exists in the difference main key list, judging the inconsistency of the main database and the salve database, otherwise, judging the consistency of the main database and the slave database. The dynamic check method and device for the consistency of the main and salve databases solves the technical problem of inaccurate consistency check result caused by the synchronous delay in related art is solved.

Description

technical field [0001] The present application relates to the field of the Internet, in particular, to a method and device for dynamically verifying the consistency of master-slave databases. Background technique [0002] MySQL is an open source database software widely used in the Internet industry. Many large websites are using MySQL databases. With the continuous growth of business scale, it is difficult for a MySQL database to support a huge amount of data access. [0003] At present, a more effective solution is to establish a MySQL master-slave cluster, in which the slave database (also known as the standby database or standby database) is a complete mirror image of the master database (also known as the master database). Write requests are only performed on the main database, and read requests are evenly distributed to all databases, so that the entire database cluster can provide larger-capacity read and write services. If the MySQL master database receives new or ...

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): G06F17/30G06F11/00
CPCG06F11/004G06F16/275
Inventor 叶晖俊
Owner ADVANCED NEW TECH CO LTD
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