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

Distributed transaction execution method and device

A distributed transaction and execution method technology, applied in the computer field, can solve the problems of reducing distributed transaction concurrency, dirty writing, business data inconsistency, etc., and achieve the effect of avoiding business data loss and inconsistency

Active Publication Date: 2019-07-19
ADVANCED NEW TECH CO LTD
View PDF3 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

That is to say, when multiple different distributed transactions modify the same row of data at the same time, dirty writes will occur, resulting in inconsistencies in business data
[0004] At present, "row lock" is usually used to prevent multiple distributed transactions from modifying the same business data concurrently, which can achieve the purpose of avoiding dirty writing; but "row lock" will prevent parallel execution of distributed transactions, so that distributed transactions must be serialized row execution, which reduces the concurrency of distributed transactions and affects the performance of distributed transactions

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
  • Distributed transaction execution method and device
  • Distributed transaction execution method and device
  • Distributed transaction execution method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0034] The solutions provided in this specification will be described below in conjunction with the accompanying drawings.

[0035] figure 1 It is a schematic diagram of an implementation scenario of an embodiment disclosed in this specification. This implementation scenario involves the execution of distributed transactions, which are usually based on two-phase commit. The two phases refer to: the first phase: the preparation phase (the transaction manager notifies the resource manager to prepare the branch transaction, and the resource manager informs the transaction manager of the preparation result) and the second phase: the commit phase (the transaction manager notifies the resource manager Submit the branch transaction, and the resource manager informs the transaction manager of the result). The algorithm idea of ​​the two-phase submission can be summarized as follows: participants notify the coordinator of the success or failure of the operation, and then the coordina...

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 embodiment of the invention provides a distributed transaction execution method and device, and the method comprises the steps: updating a field value of a target field in a service table from first service data to second service data in a first stage of first distributed transaction execution; correspondingly recording the identifier of the target field and the second service data in a redo log; then, in the second stage of the execution of the first distributed transaction, when it is determined that rollback is needed, judging whether the field value of the target field in the businesstable is consistent with that in the redo log or not; and when the judgment result is that the field values of the target fields in the service table and the redo log are consistent, executing a rollback operation, thereby checking whether dirty writing occurs or not, and avoiding service data loss and inconsistency caused by dirty writing.

Description

technical field [0001] One or more embodiments of this specification relate to the field of computers, and in particular, to methods and devices for executing distributed transactions. Background technique [0002] If there is only one resource for a transaction operation, then this transaction is a local transaction; the transaction on a single database usually seen is a local transaction; if there are multiple resources for a transaction operation, and these resources are distributed on different nodes on the network , then this transaction is a distributed transaction. [0003] A transaction modifies the data from state A to another state B. Before, during, and after the execution of the transaction, the outside world will not see other states except A and B. This consistency is called strong consistency; A transaction modifies the data from state A to another state B. During the execution of the transaction, the outside world will see the state C other than A and B, but...

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): G06F9/46G06F16/22
CPCG06F9/466G06F16/2282
Inventor 张森尹博学王光树
Owner ADVANCED NEW TECH CO LTD
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