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

A method and device for merging and executing transaction operations based on log parsing and synchronization

A technology of transaction operation and execution method, which is applied in the computer field, can solve the problems of low execution efficiency of the target end, inability to effectively improve synchronization performance, and low efficiency of operation merging, so as to improve synchronization performance, increase merging rate, and improve merging efficiency effect

Active Publication Date: 2022-04-19
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
  • A method and device for merging and executing transaction operations based on log parsing and synchronization
  • A method and device for merging and executing transaction operations based on log parsing and synchronization
  • A method and device for merging and executing transaction operations based on log parsing and 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 present invention relates to the field of computer technology, in particular to a transaction operation merge execution method and device based on log parsing and synchronization, wherein the method includes: taking a plurality of transactions to be merged and storing them in the transaction list to be merged in order of submission; The operation information of the benchmark operation of the benchmark transaction and the submission LSN of the benchmark transaction are extracted from the transaction list; the benchmark transaction is taken as the first existing transaction in the transaction list to be merged, and the benchmark operation is taken as the first existing operation in the benchmark transaction ;Based on the benchmark transaction and benchmark operation, judge in turn whether the current operations of subsequent transactions meet the merge conditions, and if so, add them to the linked list of pending operations. The invention uses the submission LSN of the first submitted transaction as the division boundary, finds the same operation from the later submitted transaction and merges, and can execute while merging during the merging process, improves the merging efficiency of operations between transactions, and can effectively improve the synchronization performance.

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/46G06F9/50G06F16/23G06F16/27
CPCG06F16/2365G06F16/27G06F9/466G06F9/5061
Inventor 孙峰彭青松刘启春
Owner WUHAN DAMENG DATABASE