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

Binlog mining dictionary implementation method

An implementation method and log technology, which is applied in the fields of electrical digital data processing, digital data information retrieval, instruments, etc., can solve the problems of large disk space occupation, mining information matching errors, disk occupation, etc., to reduce occupied space and ensure progress Consistent, guaranteed long-lasting effects

Active Publication Date: 2021-06-15
FOCUS TECH
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For versions prior to mysql8.0, after each data modification operation, the binlog log file will record the data change information, but will not record the dictionary information corresponding to each column of data, such as column name and column type, and mysql8 After .0, even if the parameters for recording dictionary information are configured, the dictionary information will be recorded for each change operation, which will cause excessive disk space usage
[0003] Faced with this problem, you can query in real time to obtain the dictionary of the current table and load it into the cache, but the dictionary data cannot be consistent with the binlog mining progress. If there is a delay or stop of data mining, the mined data And the dictionary information of the real-time acquisition table may be misplaced, resulting in incorrect matching of mining information
[0004] The existing technology "mysqlbinlog performs data recovery (redo) based on a certain offset" https: / / www.cnblogs.com / chuanzhang053 / p / 8874951.html can only realize the recovery and synchronization of mysql data, but cannot Obtaining the dictionary information corresponding to the mining information does not achieve the effect required for log mining analysis and application
In addition, the existing technology "mysql8.0 new parameter binlog_row_metadata_" https: / / www.mytecdb.com / blogDetail.php? id=141, although binlog_row_metadata is set to FULL, dictionary information can be recorded, but it can only be used after mysql8.0, and if the dictionary information is recorded, the binlog log will become huge, occupying disk, affecting the performance of the database, etc.

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
  • Binlog mining dictionary implementation method
  • Binlog mining dictionary implementation method
  • Binlog mining dictionary implementation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] The present invention will be further described below in conjunction with accompanying drawing and exemplary embodiment:

[0031] Such as figure 1 A method for implementing a binlog log mining dictionary that is synchronized with the mining progress includes the following steps:

[0032] Step 1: Before mining, initialize and prepare the dictionary library, the initialization preparation includes deploying the dictionary library, checking the source library and the library table structure of the dictionary library;

[0033] Step 2: Replay the ddl records captured during binlog log mining;

[0034] Step 3: Backtracking mining is performed at the specified location of the library table.

[0035] Such as figure 2 As shown, another exemplary embodiment of the present invention is divided into the following steps:

[0036] Step 101: Export all database tables of the source database to the dictionary database, and perform consistency check. Then record the ddl creation s...

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 binlog mining dictionary implementation method which is characterized by comprising the following steps: step 1, before mining, carrying out initialization preparation action on a dictionary database, the initialization preparation action comprising deploying the dictionary database, checking a source database and a database table structure of the dictionary database; step 2, capturing a ddl record in a replay binlog mining process; and step 3, performing backtracking mining at a specified position of the library table. According to the invention, the dictionary information in the mining process is obtained at extremely low cost, the dictionary database is additionally introduced to serve as a persistent layer, and the ddl operation is replayed to the dictionary database, so that the dictionary state of the database at the mining time point can be restored, and the problem that the dictionary and the mining log progress are consistent is guaranteed. The problems that log mining dictionary information cannot be obtained before the existing mysql8.0 and the overhead of binlog recording dictionary information after the existing mysql8.0 is too large are solved.

Description

technical field [0001] The invention relates to the field of analysis and application of relational database change logs, in particular to a method for realizing binlog log mining dictionaries synchronized with mining progress. Background technique [0002] With the vigorous development of the Internet, more and more companies use mysql database. In the process of using mysql, binlog logs are often captured and analyzed for change data, such as data synchronization between different data centers mysql. For versions prior to mysql8.0, after each data modification operation, the binlog log file will record the data change information, but will not record the dictionary information corresponding to each column of data, such as column name and column type, and mysql8 After .0, even if the parameters for recording dictionary information are configured, the dictionary information will be recorded for each change operation, which will cause excessive disk space usage. [0003] Fa...

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): G06F16/2458G06F16/17G06F16/11G06F16/2455G06F16/27
CPCG06F16/2465G06F16/1734G06F16/128G06F16/24552G06F16/27
Inventor 徐蔡飞梁峰
Owner FOCUS TECH
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