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

Database synchronization method and database system

A database and master database technology, applied in the database field, can solve the problems of low system resource occupancy, data lag of slave nodes, data loss, etc., and achieve the effect of avoiding data loss

Active Publication Date: 2014-01-08
BEIJING QIHOO TECH CO LTD
View PDF4 Cites 41 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Moreover, in the process of database synchronization, the slave node usually uses a single thread to synchronize the binlog, and the master node sends much faster than the slave node, and the processing speed is slower, which will cause the data lag of the slave node, and the single thread cannot make full use of system resources, which often occurs When the slave node data is seriously lagging behind, the system resource usage is low
When the slave node data lags behind, if the master node is abnormal, the data that the master node has not sent to the slave node will be lost, resulting in the failure of data synchronization

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
  • Database synchronization method and database system
  • Database synchronization method and database system
  • Database synchronization method and database system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] The present invention will be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the invention are illustrated. The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0023] The invention divides the database, divides a database into several partitions, and each partition corresponds to a binary log file binlog to perform data synchronization. The partitioning of the database can be set as required, for example, the table can be partitioned horizontally....

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 database synchronization method and system. The method comprises the steps that a main database and a sub-database are divided into a plurality of zones, and each main data zone and each sub data zone are respectively provided with a main binary system journal file and a sub binary system journal file. When data changing happens in the main data zones, data changing is recorded in the main binary system journal files, the data changing record is transmitted to the sub-database, data changing is recorded in the sub binary system journal files, and data changing is carried out in the sub data zones of the sub-database. According to the method and the database system, the database is divided into the zones, the binary system journal files are arranged corresponding to the database zones, multithreading concurrent processing binary system journal file synchronization is used, and the problem that during a binary system journal file synchronization process, database end playback is slow, and database end system resource using rate is low is solved. In addition, data of the main database is transmitted to the sub-database end in a batch mode, and data lost from the sub-database end are reduced as much as possible.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a database synchronization method and a database system. Background technique [0002] In the application of the database, the master-slave-slave mode is generally adopted for the system with a huge amount of visits. This method can reduce the pressure on the database. The binary log Binlog is often used in the database system to record the DDL and DML (except data query statements) statements that the system has currently executed. These statements are backed up to the binlog in real time in the form of events, reflecting the changes of data in the database. Binlog has two main functions in the database system: as a real-time backup of database system data, binlog can be used for data recovery when an exception occurs in the database system; binlog is also used for master-slave data replication of the database system cluster, and the master node Its binlog is passed to the s...

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/30
CPCG06F16/27G06F16/278
Inventor 王超陈磊陈营陈宗志
Owner BEIJING QIHOO 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