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

Transaction merging execution method and device based on log analysis synchronization

An execution method and transaction technology, applied in the computer field, can solve problems such as low execution efficiency of the target end, low operation merge rate, and inability to effectively improve synchronization performance, so as to achieve the effects of improving synchronization performance, improving execution efficiency, and increasing merge rate

Active Publication Date: 2020-11-13
WUHAN DAMENG DATABASE
View PDF8 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the existing data synchronization system usually synchronizes in units of transactions, and is assigned to the execution thread for execution after the transaction is confirmed to be committed; under this mechanism, the method of transaction merging often adopts the method of transaction appending for merging , although this merging strategy can solve the problem of synchronization efficiency in some application scenarios, but in some special application scenarios after transaction merging, the operation merging rate between transactions is not high, and the execution efficiency of the target end is still low, which cannot be effectively implemented. Improve sync performance

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
  • Transaction merging execution method and device based on log analysis synchronization
  • Transaction merging execution method and device based on log analysis synchronization
  • Transaction merging execution method and device based on log analysis synchronization

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0044] Data synchronization When synchronizing transactions with the target database, the operation should be performed in order to minimize the number of interactions with the database, because each interaction with the database will bring additional overhead, and it takes much time to perform an insert operation with a batch of 1,000 rows It takes less time than inserting one row a thousand times, so operation merging is a very important technique in data synchronization. Log-based parsing and synchronization is based on transactions, so merging multiple small transactions into one large transaction, and then merging and executing the operations in the large transaction can effectively improve synchronization performance.

[0045] The database log uses a serial method when writing the operations in the database to the log, that is to say, the logs generated by the transaction operations executed in parallel in the database will be written into the log file alternately. In vi...

Embodiment 2

[0056] The above-mentioned embodiment 1 introduces the main steps of a transaction consolidation execution method based on log parsing and synchronization. On this basis, the embodiment of the present invention further introduces the complete steps of the transaction consolidation execution method in embodiment 1 in detail.

[0057] combine figure 2 According to an embodiment of the present invention, a log parsing and synchronization-based transaction merge execution method specifically includes the following steps:

[0058] Step 101, deploying a synchronization system on the source database and the destination database. Among them, the source-end database synchronization system is used to read logs from the source-end database, and the destination-end database synchronization system is responsible for applying the synchronization operation sent by the source to the destination-end database.

[0059] In order to facilitate subsequent operations, after the database synchroni...

Embodiment 3

[0088] On the basis of the above-mentioned embodiment 1 and embodiment 2, the embodiment of the present invention provides a specific example of a transaction consolidation execution method based on log parsing and synchronization, so as to better understand the entire transaction consolidation execution process.

[0089] In this specific embodiment, it is assumed that both the source database and the destination database have tables T1 (ID VARCHAR) and T2 (ID VARCHAR).

[0090] The source application has three transactions, and performs the following operations on tables T1 and T2:

[0091] TRX1: INSERT INTO T1(ID) VALUES('TRX1_T1_1');

[0092] TRX2:INSERT INTO T1(ID)VALUES('TRX2_T1_10');

[0093] TRX1:INSERT INTO T1(ID)VALUES('TRX1_T1_2');

[0094] TRX1:UPDATE T1SET ID='TRX1_T1_2' WHERE ID='TRX1_T1_2';

[0095]TRX3:INSERT INTO T2(ID)VALUES('TRX3_T2_300');

[0096] TRX3:INSERT INTO T1(ID)VALUES('TRX3_T1_30');

[0097] TRX1: COMMIT;

[0098] TRX2: INSERT INTO T1(ID) VALU...

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 relates to the technical field of computers and relates to a transaction merging execution method and device based on log analysis synchronization. The method comprises steps that transactions are taken out from a to-be-merged transaction linked list in sequence to be merged, and when the ith transaction is taken out, i-1 submission LSNs in the merged transaction linked list are usedas segmentation boundaries, and i-1 operation intervals are marked out in an operation container; the operation is taken out from the ith transaction, a corresponding interval in the operation container is positioned through the LSN of the current operation, the same operation position in the corresponding interval is found, and the current operation is inserted; after affair merging is completed, operations are extracted from the operation container in sequence to be executed, and the same operations are executed in batches after being merged. According to the method, during merging, the submission LSN of the first submission transaction is used as a segmentation boundary, part of operations of the second submission transaction are moved upwards to find the same operation, batch execution can be achieved during execution, the merging rate of the operations between the transactions is increased, and synchronization performance can be effectively improved.

Description

【Technical field】 [0001] The present invention relates to the field of computer technology, in particular to a method and device for executing transaction merging based on log parsing and synchronization. 【Background technique】 [0002] The traditional master-backup mechanism based on the database itself realizes real-time replication of database data, which is an important solution for data disaster recovery backup and data security. At present, such as Oracle's DataGuard and Dameng Database's DM7 master and backup products are all mature commercial products that realize this solution. Under the database master-backup mechanism, the standby machine is generally used as the backup node and only provides read-only access. You can do some read-only access applications such as report analysis and data mining on the standby machine, but cannot provide read-write access like the main machine. In addition, the database master-backup mechanism requires the database system of 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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/17G06F16/27G06F9/46
CPCG06F16/1734G06F16/27G06F9/466
Inventor 孙峰付铨黄海明余院兰
Owner WUHAN DAMENG DATABASE