Database transaction consistency processing method and device in cross-link calling

A processing method and processing device technology, applied in the field of database processing, can solve problems such as complicated development process and complex processing methods, and achieve the effects of improving development efficiency, avoiding creation, and simplifying the development process

Pending Publication Date: 2022-04-12
上海甄云信息科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Due to the complex transaction processing methods in cross-link calls, if you use distributed transactions such as Saga, once an error occurs, you may need to call the rollback interface of the template service, which complicates the development process

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
  • Database transaction consistency processing method and device in cross-link calling
  • Database transaction consistency processing method and device in cross-link calling
  • Database transaction consistency processing method and device in cross-link calling

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0034] see figure 1 and figure 2 , Embodiment 1 of the present invention provides a method for processing database transaction consistency in a cross-link call, including the following steps:

[0035] S1. When the business service executes the script container, obtain and store the SqlSession when the current script container is executed;

[0036] S2. If there is a database operation in the script container, call the business service through the script container, and the business service executes the corresponding database operation through the stored SqlSession;

[0037] S3. Return the database execution result of the database operation to the script container, so that the script container continues to perform subsequent database operations;

[0038] S4. The script container returns the script execution result to the business service, and clears the stored SqlSession.

[0039] In this embodiment, when the business service is executing a script container, the business serv...

Embodiment 2

[0058] see image 3 , Embodiment 2 of the present invention also provides a database transaction consistency processing device in a cross-link invocation, including:

[0059] The link acquisition module 1 is used to acquire and store the SqlSession when the current script container is executed when the business service executes the script container;

[0060] The calling execution module 2 is used to call the business service through the script container if there is a database operation in the script container, and the business service executes the corresponding database operation through the stored SqlSession;

[0061] The first result return module 3 is used to return the database execution result of the database operation to the script container, so that the script container continues to perform subsequent database operations;

[0062] The second result returning module 4 is used for the script container to return the script execution result to the business servi...

Embodiment 3

[0070] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, where a program code for a method for processing database transaction consistency in a cross-link call is stored in the computer-readable storage medium, where the program code includes a method for executing The instruction of the method for processing database transaction consistency in the cross-link invocation of Embodiment 1 or any possible implementation manner thereof.

[0071] A computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.

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 discloses a database transaction consistency processing method and device in cross-link calling, and the method comprises the steps: obtaining and storing SqlSession when a business service executes a script container; if the database operation exists in the script container, calling a business service through the script container, and executing the corresponding database operation by the business service through the stored SqlSession; a database execution result of the database operation is returned to the script container, and the script container continues to execute subsequent database operation; and the script container returns a script execution result to the business service, and the stored SqlSession is cleaned. According to the method, the script container can be served, the data consistency in the cross-service calling link is ensured by completely depending on the database transaction, the development process of cross-link calling is simplified, all database operations in the same script are ensured to be under the same transaction, and the development efficiency is improved.

Description

technical field [0001] The invention relates to a method and device for processing database transaction consistency in cross-link invocation, and belongs to the technical field of database processing. Background technique [0002] With the popularity of distributed service architecture, especially the application of design concepts such as microservices in the system, the system architecture has become more and more decentralized. Distributed call tracking technology connects a request call process in a complete series by means of call chain, and then realizes the monitoring of the request call path. [0003] A database transaction is a sequence of database operations that access and possibly manipulate various data items. These operations are either all performed or not performed at all. They are an indivisible unit of work. A transaction consists of all database operations performed between the start of the transaction and the end of the transaction. composition. [0004...

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/46G06F9/54G06F16/25
Inventor 杨行欧志伟吴坚
Owner 上海甄云信息科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products