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

Transaction operation merging execution method and device based on log analysis synchronization

A transaction operation and execution method technology, applied in the computer field, can solve the problems of low target execution efficiency, low operation merging efficiency, low operation merging rate, inability to effectively improve synchronization performance, etc., so as to improve synchronization performance, improve merger efficiency, and improve The effect of the merger rate

Active Publication Date: 2020-12-04
WUHAN DAMENG DATABASE
View PDF7 Cites 0 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, the efficiency of merging operations between transactions and the rate of merging operations after transaction merging are not high, and the execution efficiency of the target end is still low, which cannot effectively improve the synchronization 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 operation merging execution method and device based on log analysis synchronization
  • Transaction operation merging execution method and device based on log analysis synchronization
  • Transaction operation merging execution method and device based on log analysis synchronization

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0054] 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.

[0055] 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

[0072] The above-mentioned embodiment 1 introduces the main steps of a transaction merge 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 merge execution method in embodiment 1 in detail.

[0073] combine figure 2 According to an embodiment of the present invention, a method for merging execution of transaction operations based on log parsing and synchronization specifically includes the following steps:

[0074] 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.

[0075] In order to facilitate subsequent operations, after the database sy...

Embodiment 3

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

[0109] In this specific embodiment, it is assumed that both the source database and the destination database have table T1 (IDVARCHAR).

[0110] The source application has two transactions TRX1 and TRX2, and performs the following operations on table T1:

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

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

[0113] TRX1:UPDATE T1 SET ID='TRX1_T1_2' WHERE ID='TRX1_T1_2';

[0114] TRX1: COMMIT;

[0115] TRX2: INSERT INTO T1(ID) VALUES('TRX2_T1_20');

[0116] TRX2: COMMIT;

[0117] After the sequence of the above operations is received by the log receiving thread, the situation shown in Table 1 will be formed.

[0118] Table 1...

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, in particular to a transaction operation merging execution method and device based on log analysis synchronization, and the method comprisesthe steps: taking a plurality of to-be-merged transactions, and storing the to-be-merged transactions in a to-be-merged transaction chain table according to a submission sequence; extracting the operation information of the reference operation of the reference transaction and the submission LSN of the reference transaction from the transaction linked list to be merged; wherein the reference affairs are sequentially taken as existing first affairs in the to-be-merged affair linked list, and the reference operations are sequentially taken as existing first operations in the reference affairs; and sequentially judging whether the current operation of each subsequent transaction meets a merging condition or not by taking the reference transaction and the reference operation as references, andif so, adding the current operation into a to-be-executed operation linked list. The submission LSN of the first submission transaction is used as a segmentation boundary, the same operation is foundfrom the later submission transaction to be merged, merging and execution can be carried out simultaneously in the merging process, the merging efficiency of the operations between the transactions isimproved, and the 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 merging execution of transaction operations 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 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): G06F9/46G06F9/50G06F16/23G06F16/27
CPCG06F16/2365G06F16/27G06F9/466G06F9/5061
Inventor 孙峰付铨彭青松刘启春
Owner WUHAN DAMENG DATABASE