Unlock instant, AI-driven research and patent intelligence for your innovation.

Double-writing-based database extension method and device

A database and data technology, applied in the field of database management, can solve problems such as data inconsistency, inability to guarantee the completion of the plan, and only rollback, etc., to achieve the effect of low risk factor

Pending Publication Date: 2021-03-19
FUJIAN TQ DIGITAL
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The disadvantage is that this is an offline, non-high-availability solution. In addition, this solution has a big disadvantage, that is, the upgrade must be completed within the specified time. Once a problem occurs, such as data inconsistency, it must be completed within the specified time. Solve it, otherwise it can only be rolled back, and there is no guarantee that it will be completed as planned
2. Use the "pt-online-schema-change tool" to expand. This is a relatively mature solution in Internet companies. The disadvantage is that it is only applicable to MySQL databases and table structure changes. For changes in the number of sub-databases etc. are not applicable; at the same time, database triggers are required, because the performance of triggers is relatively low, so this operation must be performed during low-peak periods of traffic

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
  • Double-writing-based database extension method and device
  • Double-writing-based database extension method and device
  • Double-writing-based database extension method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] The present invention will be further described below in conjunction with the accompanying drawings.

[0026] see figure 1 As shown, a method of database expansion based on double writing of the present invention, the method includes the following steps:

[0027] Step S1, upgrade the old service, let the service operate the old and new databases at the same time, and double-write the data modification to the new database;

[0028] Step S2, setting up an offline data migration tool to synchronize the asynchronous data;

[0029] Step S3, data verification is performed at the same time, and database traffic migration is performed after ensuring complete consistency. The traffic of the database is migrated from the old database to the new database, and the new database provides online services instead.

[0030] The present invention will be further described below in conjunction with a specific embodiment:

[0031] see figure 2 As shown, a method of database expansion ...

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 double-writing-based database extension method, which comprises the following steps of: S1, upgrading an old service, enabling the service to simultaneously operate a new library and an old library, and performing double-writing on data modification to the new library; s2, setting an offline data migration tool, and carrying out asynchronous data synchronization; s3, carrying out data verification at the same time, carrying out database traffic migration after complete consistency is guaranteed, and migrating the situation that the traffic of the database from an old database to a new database is changed into the situation that the new database provides online services. According to the invention, online services are not influenced, and data loss is not caused.

Description

technical field [0001] The invention relates to the technical field of database management, in particular to a double-writing-based database expansion method and a device thereof. Background technique [0002] At present, database expansion mainly includes: underlying table structure changes, horizontal expansion, changes in the number of sub-databases, changes in underlying storage media, etc. There are two common solutions to database expansion problems: 1. Stop server expansion. The general procedure is to post an announcement , suspend the service; migrate data offline; finally resume the service. The disadvantage is that this is an offline, non-high-availability solution. In addition, this solution has a big disadvantage, that is, the upgrade must be completed within the specified time. Once a problem occurs, such as data inconsistency, it must be completed within the specified time. Solve it, otherwise it can only be rolled back, and there is no guarantee that it will...

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/21G06F16/215G06F16/23G06F16/27
CPCG06F16/214G06F16/215G06F16/2365G06F16/273
Inventor 刘德建陈宏展岳万恕郑彬
Owner FUJIAN TQ DIGITAL