CN114253673A - Transaction processing method and transaction processing device of distributed system - Google Patents

Transaction processing method and transaction processing device of distributed system Download PDF

Info

Publication number
CN114253673A
CN114253673A CN202111550897.1A CN202111550897A CN114253673A CN 114253673 A CN114253673 A CN 114253673A CN 202111550897 A CN202111550897 A CN 202111550897A CN 114253673 A CN114253673 A CN 114253673A
Authority
CN
China
Prior art keywords
micro
service
calling
transaction
called
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111550897.1A
Other languages
Chinese (zh)
Inventor
张明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongdian Jinxin Software Co Ltd
Original Assignee
Zhongdian Jinxin Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongdian Jinxin Software Co Ltd filed Critical Zhongdian Jinxin Software Co Ltd
Priority to CN202111550897.1A priority Critical patent/CN114253673A/en
Publication of CN114253673A publication Critical patent/CN114253673A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/465Distributed object oriented systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Retry When Errors Occur (AREA)

Abstract

The application provides a transaction processing method and a transaction processing device of a distributed system, comprising the following steps: when a first micro service in a plurality of micro services included in a target combined service is called in a calling sequence and fails, determining second micro services positioned before the first micro service; sequentially calling each second microservice according to a reverse sequence by using a preset calling mode to execute the rollback operation of the transaction; the rollback operation is used for compensating a result generated by the commit operation of the transaction; if any second microservice fails to be called in the process of calling each second microservice, responding to a rollback instruction aiming at the second microservice which fails to be called, controlling the second microservice which fails to be called to execute the rollback operation of the corresponding transaction, and calling each second microservice before the second microservice which fails to be called in sequence according to the reverse sequence of the calling sequence by using a preset calling mode. Therefore, the transaction consistency in the distributed system can be ensured, and the transaction processing efficiency can be improved.

Description

Transaction processing method and transaction processing device of distributed system
Technical Field
The present application relates to the field of distributed system technologies, and in particular, to a transaction processing method and a transaction processing apparatus for a distributed system.
Background
Before the advent of distributed systems, all transactions were completed in a single centralized system, with data kept in the same database to ensure transaction consistency. With the advent of distributed systems, a particular task can be divided into multiple sub-tasks to be performed at different nodes of the distributed system, which greatly enhances the processing power of the system. However, the distributed system raises the performance of the system and brings the problem of poor transaction consistency. For example, the composite service provided by the distributed system to the service invoker is composed of a plurality of micro-services, and the plurality of micro-services respectively correspond to different databases. The combined service can be completed only by successfully calling up all the micro-services according to the preset arranging sequence to execute the corresponding transactions. In the calling process, if the calling of any one micro service is not completed successfully, in order to ensure the transaction consistency in the distributed system, the whole combined service cannot be completed.
In the prior art, transaction consistency in a distributed system is often guaranteed based on a TCC mode (Try-Confirm-Cancel, a distributed system transaction framework), but the TCC mode requires pre-locking resources, and has a series of defects of troublesome abnormal condition processing, more communication times, low performance, deadlock and the like. Therefore, the problem that the transaction consistency is difficult to guarantee exists in the current distributed system.
Disclosure of Invention
In view of the above, an object of the present application is to provide a transaction processing method and a transaction processing apparatus for a distributed system, which can sequentially invoke each microservice before the microservice to execute a rollback operation of a corresponding transaction when any microservice in a combined service fails to be invoked, so as to compensate a result generated by a commit operation of the transaction; and when the rollback operation of calling a certain micro-service execution transaction fails, the micro-service execution rollback operation is called again in response to the rollback instruction. Therefore, the transaction consistency in the distributed system can be ensured, and the transaction processing efficiency of the distributed system can be improved.
The embodiment of the application provides a transaction processing method of a distributed system, which comprises the following steps:
in response to a target combined service calling request, determining a plurality of micro services included by the target combined service and a calling sequence of the plurality of micro services;
when calling a first micro service in the plurality of micro services according to the calling sequence fails, determining second micro services positioned before the first micro service;
sequentially calling each second microservice according to the reverse sequence of the calling sequence by using a preset calling mode; the preset calling mode is that rollback operation of the transaction of the micro service is executed when the micro service is called; wherein the rollback operation is to compensate for a result produced by a commit operation of the transaction;
if any one of the second micro services fails to be called in the process of calling the second micro services, responding to a rollback instruction for the second micro service which fails to be called, controlling the second micro service which fails to be called to execute rollback operation of a corresponding transaction, and sequentially calling the second micro services before the second micro service which fails to be called by using the preset calling mode according to the reverse sequence of the calling sequence.
Further, the transaction processing method further includes:
when a first micro service in the plurality of micro services is called according to the calling sequence and is overtime, judging the relation between the accumulated calling times of the first micro service and a preset time threshold;
if the accumulated calling times are smaller than the preset times threshold, the first micro service is called again, and the accumulated calling times are increased by 1;
if the accumulated calling times are equal to the preset times threshold, controlling the first micro service to execute the rollback operation of the corresponding transaction in response to a rollback instruction for the first micro service; or, in response to a commit instruction for the first micro-service, controlling the first micro-service to perform a commit operation of a corresponding transaction.
Further, if the cumulative number of calls is equal to a preset number threshold, the transaction processing method further includes:
determining whether the rollback instruction or the commit instruction is received within a preset time;
if not, the first micro service is called again.
Further, the transaction processing method further includes:
marking the service state of the micro service according to the calling mode and the calling result of the micro service aiming at any micro service in the plurality of micro services;
when the service state of the micro service is calling failure, or when the service state of the micro service is calling overtime and the accumulated calling times of the micro service are equal to a preset time threshold, or when the service states of the micro services are calling successfully, correspondingly marking the service state of the target combined service; wherein the service state of the microservice and the service state of the target composite service comprise at least one of: calling fails, calling overtime and calling succeeds;
and assembling a response message based on the service state of the target combined service and the service state of each micro service in the plurality of micro services.
Further, the using a preset calling mode to sequentially call each second microservice according to the reverse order of the calling order includes:
in the process of calling each second micro service by using the preset calling mode, when any second micro service is successfully called, the previous second micro service of the successfully called second micro service is determined according to the calling sequence, and the previous second micro service is called by using the preset calling mode.
Further, when the target combined service is a current cash deposit, the plurality of micro services comprise a current account deposit check micro service, a cash voucher payment micro service and a cash deposit micro service; the calling sequence of the micro services sequentially deposits check micro services, cash voucher receiving and paying micro services and cash deposit micro services for the current account;
when the calling of the cash deposit micro-services in the plurality of micro-services according to the calling sequence fails, the calling of the second micro-services in sequence according to the reverse sequence of the calling sequence by using a preset calling mode comprises the following steps:
calling the cash voucher payment micro-service by using the preset calling mode so as to enable the cash voucher payment micro-service to execute rollback operation of the transaction; the transaction of the cash voucher payment micro-service is a program execution unit used for updating the cash voucher stored in a voucher database corresponding to the cash voucher payment micro-service; the rollback operation of the transaction is used for deleting the cash voucher stored in the voucher database by the corresponding submission operation;
after the cash voucher receiving and paying micro-service is called successfully by using the preset calling mode, calling the current account deposit check micro-service by using the preset calling mode so that the current account deposit check micro-service executes the rollback operation of the transaction; the transaction of the current account deposit check micro service is a program execution unit used for updating account information stored in an account database corresponding to the current account deposit check micro service; the rollback operation of its transaction is used to restore the changes to the current account information stored in the account database by the corresponding commit operation.
An embodiment of the present application further provides a transaction processing apparatus for a distributed system, where the transaction processing apparatus includes:
the first determination module is used for responding to a target combined service calling request and determining a plurality of micro services included in the target combined service and a calling sequence of the micro services;
the second determining module is used for determining each second micro service before the first micro service when the calling of the first micro service in the plurality of micro services according to the calling sequence fails;
the failure processing module is used for sequentially calling the second microservices in a preset calling mode according to the reverse sequence of the calling sequence; the preset calling mode is that rollback operation of the transaction of the micro service is executed when the micro service is called; wherein the rollback operation is to compensate for a result produced by a commit operation of the transaction;
if the failure processing module fails to call any one of the second microservices in the process of calling the second microservices, the failure processing module responds to a rollback instruction for the second microservices which fail to be called, controls the second microservices which fail to be called to execute rollback operation of corresponding transactions, and uses the preset calling mode to call the second microservices before the second microservices which fail to be called in sequence according to the reverse sequence of the calling sequence.
Further, the transaction processing apparatus further includes: an overtime processing module;
the overtime processing module is used for judging the relation between the accumulated calling times of the first micro-service and a preset time threshold when the first micro-service in the plurality of micro-services is called according to the calling sequence and is overtime;
if the accumulated calling times are smaller than the preset times threshold, the first micro service is called again, and the accumulated calling times are increased by 1;
if the accumulated calling times are equal to the preset times threshold, controlling the first micro service to execute the rollback operation of the corresponding transaction in response to a rollback instruction for the first micro service; or, in response to a commit instruction for the first micro-service, controlling the first micro-service to perform a commit operation of a corresponding transaction.
Further, if the cumulative number of calls is equal to the preset number threshold, the timeout processing module is further configured to:
determining whether the rollback instruction or the commit instruction is received within a preset time;
if not, the first micro service is called again.
Further, the transaction processing apparatus further includes: a status marking module;
the state marking module is used for marking the service state of the micro service according to the calling mode and the calling result of the micro service aiming at any micro service in the plurality of micro services;
when the service state of the micro service is calling failure, or when the service state of the micro service is calling overtime and the accumulated calling times of the micro service are equal to a preset time threshold, or when the service states of the micro services are calling successfully, correspondingly marking the service state of the target combined service; wherein the service state of the microservice and the service state of the target composite service comprise at least one of: calling fails, calling overtime and calling succeeds;
and assembling a response message based on the service state of the target combined service and the service state of each micro service in the plurality of micro services.
Further, when the failure processing module is configured to sequentially call each of the second microservices in a preset call mode according to a reverse order of the call order, the failure processing module is further configured to:
in the process of calling each second micro service by using the preset calling mode, when any second micro service is successfully called, the previous second micro service of the successfully called second micro service is determined according to the calling sequence, and the previous second micro service is called by using the preset calling mode.
Further, when the target combined service is a current cash deposit, the plurality of micro services comprise a current account deposit check micro service, a cash voucher payment micro service and a cash deposit micro service; the calling sequence of the micro services sequentially deposits check micro services, cash voucher receiving and paying micro services and cash deposit micro services for the current account;
when the calling of the cash deposit micro-services in the plurality of micro-services according to the calling sequence fails, the calling of the second micro-services in sequence according to the reverse sequence of the calling sequence by using a preset calling mode comprises the following steps:
calling the cash voucher payment micro-service by using the preset calling mode so as to enable the cash voucher payment micro-service to execute rollback operation of the transaction; the transaction of the cash voucher payment micro-service is a program execution unit used for updating the cash voucher stored in a voucher database corresponding to the cash voucher payment micro-service; the rollback operation of the transaction is used for deleting the cash voucher stored in the voucher database by the corresponding submission operation;
after the cash voucher receiving and paying micro-service is called successfully by using the preset calling mode, calling the current account deposit check micro-service by using the preset calling mode so that the current account deposit check micro-service executes the rollback operation of the transaction; the transaction of the current account deposit check micro service is a program execution unit used for updating account information stored in an account database corresponding to the current account deposit check micro service; the rollback operation of its transaction is used to restore the changes to the current account information stored in the account database by the corresponding commit operation.
An embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the transaction processing method as described above.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the transaction processing method as described above.
In the transaction processing method and the transaction processing apparatus for a distributed system provided by the embodiment of the present application, in response to a target composite service call request, a plurality of micro services included in the target composite service and a call sequence of the plurality of micro services are determined; when calling a first micro service in the plurality of micro services according to the calling sequence fails, determining second micro services positioned before the first micro service; sequentially calling each second microservice according to the reverse sequence of the calling sequence by using a preset calling mode; the preset calling mode is that rollback operation of the transaction of the micro service is executed when the micro service is called; wherein the rollback operation is to compensate for a result produced by a commit operation of the transaction; if any one of the second micro services fails to be called in the process of calling the second micro services, responding to a rollback instruction for the second micro service which fails to be called, controlling the second micro service which fails to be called to execute rollback operation of a corresponding transaction, and sequentially calling the second micro services before the second micro service which fails to be called by using the preset calling mode according to the reverse sequence of the calling sequence.
By the method, when any micro service in the combined service is invoked in failure, the micro services before the micro service are sequentially invoked to execute the rollback operation of the corresponding transaction so as to compensate the result generated by the commit operation of the transaction; and when the rollback operation of calling a certain micro-service execution transaction fails, the micro-service execution rollback operation is called again in response to the rollback instruction. Therefore, the transaction consistency in the distributed system can be ensured, and the transaction processing efficiency of the distributed system can be improved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart illustrating a transaction processing method of a distributed system according to an embodiment of the present application;
fig. 2 illustrates a second flowchart of a transaction processing method of a distributed system according to an embodiment of the present application;
fig. 3 shows a third flowchart of a transaction processing method of a distributed system according to an embodiment of the present application;
fig. 4 shows one of the schematic structural diagrams of a transaction processing apparatus of a distributed system provided in the embodiment of the present application;
fig. 5 is a second schematic structural diagram of a transaction processing apparatus of a distributed system according to an embodiment of the present application;
fig. 6 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. Every other embodiment that can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present application falls within the protection scope of the present application.
First, an application scenario to which the present application is applicable will be described. The application can be applied to distributed systems.
Research has found that how to ensure transaction consistency is an important issue in distributed systems. For example, the composite service provided by the distributed system to the service invoker is composed of a plurality of micro-services, and the plurality of micro-services respectively correspond to different databases. The calling of the combined service can be completed only if all the micro-services are successfully called according to the preset arranging sequence to execute the corresponding transactions. In the calling process, if the calling of any one micro service is not completed successfully, in order to ensure the transaction consistency in the distributed system, the whole combined service cannot be completed.
In the prior art, transaction consistency in a distributed system is often guaranteed based on a TCC mode (Try-Confirm-Cancel, a distributed system transaction framework), but the TCC mode requires pre-locking resources, and has a series of defects of troublesome abnormal condition processing, more communication times, low performance, deadlock and the like. Therefore, the problem that the transaction consistency is difficult to guarantee exists in the current distributed system.
Based on this, embodiments of the present application provide a transaction processing method and a transaction processing apparatus for a distributed system, so as to ensure transaction consistency in the distributed system and improve transaction processing efficiency of the distributed system.
Referring to fig. 1, fig. 1 is a flowchart illustrating a transaction processing method of a distributed system according to an embodiment of the present disclosure. As shown in fig. 1, a transaction processing method provided in an embodiment of the present application includes:
s101, responding to a target combined service calling request, and determining a plurality of micro services included in the target combined service and a calling sequence of the micro services.
First, it should be noted that microservice is an emerging software service architecture, and can divide a large complex application or service into many loosely coupled and independently deployable smaller components or services, each of which runs in an independent process, and different services communicate through some lightweight interaction mechanism. The distributed system needs to sequentially call a plurality of micro services included in the target combined service according to a preset calling sequence after receiving a calling request aiming at the target combined service and sent by a service calling party so as to provide the target combined service for the service calling party. Different microservices may belong to different microservices systems, and different microservices systems have independent databases.
In a possible implementation manner, regarding step S101, the target composite service requested to be called by the service caller may be determined by parsing the call request sent by the service requester; and determining a plurality of micro services and a calling sequence of the micro services included in the target combined service based on the pre-stored relevant information of the combined service in response to the calling request aiming at the target combined service.
After determining a plurality of micro services and a calling sequence of the plurality of micro services in step S101, the plurality of micro services are sequentially called according to the calling sequence.
It should be noted that, in the process of sequentially calling the plurality of micro services according to the calling sequence, that is, in the process of calling the plurality of micro services in the forward direction, only when the calling of a certain micro service is successful, the next micro service of the micro service which has been successfully called can be called; the calling of the whole target combined service can be finished only if the plurality of micro services are all successfully called according to the preset calling sequence; in the process of the forward call, if any micro service cannot be successfully called, the whole target combined service cannot be called and completed, so that the transaction consistency in the distributed system is ensured.
When a micro service is positively called according to the calling sequence, the micro service executes the submission operation of the corresponding transaction; a transaction refers to a unit of program execution that accesses and updates various data items in a database.
S102, judging that calling a first micro service in the plurality of micro services according to the calling sequence fails, overtime or succeeds.
The case of failure to invoke the first microservice will be described below with reference to the call failure processing flow in fig. 1.
S103, when calling a first micro service in the plurality of micro services according to the calling sequence fails, determining second micro services positioned before the first micro service.
In step S103, when the call of the first micro service in the plurality of micro services fails, determining second micro services located before the first micro service according to the call order.
Wherein, the first micro service can be any one of a plurality of micro services; it should be noted that, when the first micro service is the first micro service to be invoked in the target composite service, it is indicated that an invocation failure occurs when the first micro service in the target composite service is being invoked, each subsequent micro service is not yet invoked, and each second micro service does not exist before the first micro service; at this time, the transaction consistency of the distributed system can be ensured only by automatically performing the rollback operation of the transaction in the corresponding database by the first microservice.
And S104, sequentially calling the second micro services according to the reverse sequence of the calling sequence by using a preset calling mode.
Here, the reverse order of the call order refers to an order completely opposite to the direction of the call order. Illustratively, the calling sequence is microservice A-microservice B-microservice C, and the reverse sequence of the calling sequence is microservice C-microservice B-microservice A; the preset calling mode is that rollback operation of the transaction of the micro service is executed when the micro service is called; the rollback operation is to compensate for a result produced by a commit operation of the transaction.
As mentioned above, when a micro service is positively called according to a calling sequence, the micro service performs a commit operation of a corresponding transaction, and the commit operation of the transaction may affect data in a database corresponding to the micro service, for example, add new data, delete data, and the like; when the micro-service is called by using the preset calling mode, the rollback operation of the transaction of the micro-service is executed; the rollback operation may restore the data in the database to a state before the commit operation of the transaction is performed, that is, compensate for a result generated by the commit operation of the transaction, for example, delete data added when the commit operation of the transaction is performed.
For example, in a scenario that the user a transfers 100 yuan to the user B, 100 yuan is first deducted from the deposit information of the user a account database, and then 100 yuan is added to the deposit information of the user B account database. If the deposit information of the user B account database cannot be added with 100 elements successfully, the data in the user A account database needs to be rolled back to compensate the result generated by the submitting operation of deducting the money of the user A account, namely, 100 elements are added into the deposit information of the user A account database.
In one possible implementation, S104 includes the following steps:
s1041, in the process of calling each second micro service by using the preset calling mode, judging whether calling any second micro service by using the preset calling mode succeeds or fails.
S1042, when any one of the second micro services is successfully called, determining the second micro service which is previous to the successfully called second micro service according to the calling sequence, and calling the previous second micro service by using the preset calling mode.
It should be noted that, when it is determined according to the call sequence that the second microservice that is successfully called is the first microservice that should be called in the target composite service, actually, the second microservices are called in the preset call mode to execute corresponding rollback operations successfully, and at this time, the transaction consistency of the distributed system is ensured.
In this step, when it is determined that at least one second microservice exists before the successfully called second microservice according to the calling sequence, the previous second microservice is called by using the preset calling mode, and then the step S1041 is returned to be executed until each second microservice is successfully called.
S1043, if calling any one of the second micro services fails, responding to a rollback instruction for the second micro service with failed calling, controlling the second micro service with failed calling to execute a rollback operation of a corresponding transaction, and calling each second micro service before the second micro service with failed calling in sequence according to a reverse sequence of the calling sequence by using the preset calling mode.
In this step, when any of the second microservices fails to be called, in response to a rollback instruction for the second microservices which failed to be called, the second microservices which failed to be called are controlled to re-execute the rollback operation of the corresponding transaction, and the step S1041 is executed in a return manner until all the second microservices are successfully called.
It should be noted that the rollback instruction may be automatically generated by a program based on a preset control policy, or may be manually triggered by a user, and the present application is not limited herein. Furthermore, it may be set to allow the program to automatically generate a certain number of rollback instructions, and notify the user to wait for manual processing if the transaction of the second microservice that failed to be invoked cannot be successfully rolled back through the rollback instructions.
In some implementations, such as the core system of a bank, the manual intervention is more secure due to the need to maintain the order of the transactions. Similarly, there may be extreme exceptions in the system, for example, when the rollback program itself is abnormal, and the transaction of the second microservice that fails to be invoked is not successfully rolled back no matter how many times the rollback program is re-invoked, the user is required to perform troubleshooting, database maintenance, and other operations to ensure the transaction consistency of the distributed system.
In one possible embodiment, as an example, when the target composite service is a current cash deposit, the plurality of micro-services includes a current account deposit check micro-service, a cash voucher receipt micro-service, and a cash deposit micro-service; the calling sequence of the micro services sequentially deposits check micro services, cash voucher receiving and paying micro services and cash deposit micro services for the current account; and sequentially calling the three micro-services according to the calling sequence to provide the combined service of the current cash deposit for the service calling party.
Wherein, when the cash deposit micro-service of the plurality of micro-services fails to be called according to the calling sequence, the using a preset calling mode sequentially calls each second micro-service according to a reverse sequence of the calling sequence, including:
calling the cash voucher payment micro-service by using the preset calling mode so as to enable the cash voucher payment micro-service to execute rollback operation of the transaction; the transaction of the cash voucher payment micro-service is a program execution unit used for updating the cash voucher stored in a voucher database corresponding to the cash voucher payment micro-service; the rollback operation of the transaction is used for deleting the cash voucher stored in the voucher database by the corresponding submission operation;
after the cash voucher receiving and paying micro-service is called successfully by using the preset calling mode, calling the current account deposit check micro-service by using the preset calling mode so that the current account deposit check micro-service executes the rollback operation of the transaction; the transaction of the current account deposit check micro service is a program execution unit used for updating account information stored in an account database corresponding to the current account deposit check micro service; the rollback operation of its transaction is used to restore the changes to the current account information stored in the account database by the corresponding commit operation.
After the current account deposit check micro service is called successfully by using the preset calling mode, the rollback of the combined service of the current cash deposit is successful; therefore, by calling each micro-service to execute the rollback operation of the transaction, under the condition that a certain micro-service is failed to be called in the combined service, the data in the database corresponding to each micro-service is restored to the state before the commit operation of the transaction occurs, and the consistency of the transaction in the distributed system is ensured.
According to the transaction processing method of the distributed system provided by the exemplary embodiment of the application, when any micro service in the combined service is failed to be called, each micro service before the micro service is called in sequence to execute the rollback operation of the corresponding transaction so as to compensate the result generated by the commit operation of the transaction; and when the rollback operation of calling a certain micro-service execution transaction fails, the micro-service execution rollback operation is called again in response to the rollback instruction. Therefore, the transaction consistency in the distributed system can be ensured, and the transaction processing efficiency of the distributed system can be improved.
The case of calling the first micro-service timeout will be described below with reference to the call timeout processing flow in fig. 2.
Referring to fig. 2, fig. 2 is a second flowchart of a transaction processing method of a distributed system according to an embodiment of the present application. As shown in fig. 2, a transaction processing method provided in an embodiment of the present application includes:
s101, responding to a target combined service calling request, and determining a plurality of micro services included in the target combined service and a calling sequence of the micro services.
S102, judging that calling a first micro service in the plurality of micro services according to the calling sequence fails, overtime or succeeds.
The descriptions of S101 to S102 may refer to the contents in the foregoing embodiments, and the same technical effects can be achieved, which is not described in detail herein.
And S105, when a first micro service in the plurality of micro services is called according to the calling sequence and is overtime, judging the relation between the accumulated calling times of the first micro service and a preset time threshold.
And S106, if the accumulated calling times are smaller than the preset times threshold, re-calling the first micro service, and increasing the accumulated calling times by 1.
S107, if the accumulated calling times are equal to the preset times threshold, responding to a rollback instruction aiming at the first micro service, and controlling the first micro service to execute rollback operation of a corresponding transaction; or, in response to a commit instruction for the first micro-service, controlling the first micro-service to perform a commit operation of a corresponding transaction.
The overtime refers to that a response result indicating success or failure of calling the first micro service returned by the first micro service is not received after the preset time threshold value is exceeded; the preset time threshold and the preset time threshold may be set by a user according to the needs of a service scenario, for example, the preset time threshold may be 1 second, and the preset time threshold may be three times.
In one possible implementation, when the cumulative number of calls of the first microservice is less than three, the call of the first microservice may be retried and increased by 1 until the cumulative number of calls of the first microservice equals three. At this time, the time length of trying to call the first micro service is too long, and the service caller cannot wait without limit and cannot obtain a response; in addition, attempting to invoke a microservice may tie up computing resources of the system, and therefore, may not repeat attempting to invoke the first microservice indefinitely; when the cumulative number of calls is equal to three times, the call to the first microservice is considered to be finally overtime, a rollback instruction or a commit instruction needs to be waited for subsequent processing, and the data of the cumulative number of calls of the first microservice stored in the system cache is emptied.
Optionally, when the cumulative number of calls is equal to the preset number threshold, in response to a rollback instruction for the first microservice, controlling the first microservice to execute a rollback operation of a corresponding transaction; or, in response to a commit instruction for the first micro-service, controlling the first micro-service to perform a commit operation of a corresponding transaction.
It should be noted that the rollback instruction or the commit instruction for the first microservice may be automatically generated by a program based on a preset control policy, or may be manually triggered by a user, and the application is not limited herein.
In a possible implementation manner, if the cumulative number of calls is equal to a preset number threshold, the transaction processing method further includes:
step 1, determining whether the rollback instruction or the commit instruction is received within a preset time.
And 2, if the first micro service is not received, re-calling the first micro service.
In this step, if the rollback instruction or the commit instruction is not received within a preset time, a re-invocation of the first microservice to execute the commit operation of the corresponding transaction may be automatically attempted; if the calling is successful, the micro-services after the first micro-service can be continuously called to execute the submission operation of the corresponding transaction until all the micro-services are successfully called according to the preset sequence. The preset time may be set by a user according to the needs of a service scenario, and for example, the preset time may be 3 seconds.
Therefore, the transaction processing method of the distributed system provided by the embodiment of the application can execute the rollback operation of the transaction of the micro-service according to the instruction when the commit operation of any micro-service executing transaction in the calling target combined service is overtime, and sequentially continue to rollback the micro-service which is successfully called; or continuing to call the submission operation of the micro-service execution transaction and sequentially continuing to call the submission operation of the subsequent micro-service execution transaction, thereby enriching the transaction processing method under the condition of overtime micro-service call and meeting different transaction processing requirements in the distributed system.
The following describes a case where the first microservice is successfully invoked in conjunction with the invocation timeout processing flow in fig. 3.
Referring to fig. 3, fig. 3 is a third flowchart of a transaction processing method of a distributed system according to an embodiment of the present application. As shown in fig. 3, a transaction processing method provided in an embodiment of the present application includes:
s101, responding to a target combined service calling request, and determining a plurality of micro services included in the target combined service and a calling sequence of the micro services.
S102, judging that calling a first micro service in the plurality of micro services according to the calling sequence fails, overtime or succeeds.
The descriptions of S101 to S102 may refer to the contents in the foregoing embodiments, and the same technical effects can be achieved, which is not described in detail herein.
S108, when the first micro service in the micro services is called successfully according to the calling sequence, determining each third micro service behind the first micro service.
And S109, sequentially calling the third micro services according to the calling sequence so that the third micro services execute the submission operation of the corresponding transaction.
If a call failure or call timeout occurs in the process of sequentially calling any one of the third microservices according to the call sequence, the subsequent transaction processing method can correspondingly refer to the transaction processing method in the failure or timeout state.
Here, if it is determined according to the calling order that the first microservice is the last microservice to be called, the microservices in the target composite service are all successfully called at this time, and the target composite service is successfully called at this time.
Through the method, when the first micro service is successfully called by using the first calling mode, the micro services after the first micro service are continuously and sequentially called according to the calling sequence to execute the submission operation of the corresponding transaction, so that when any micro service is called to execute the submission operation of the corresponding transaction, other micro services which are already called are successfully called before the micro service, thereby ensuring the transaction consistency in the distributed system and ensuring that the calling of a plurality of micro services in the target combined service conforms to the calling sequence.
In a possible implementation manner, the transaction processing method provided in this embodiment of the present application may be executed by a server in a distributed system, where the server is integrated with a transaction state machine, and the transaction processing method of the distributed system provided in this embodiment of the present application further includes:
step 1, aiming at any one of the micro services, marking the service state of the micro service according to the calling mode and the calling result of the micro service.
The calling mode comprises the step of calling the micro-service according to a calling sequence to execute the submission operation of the corresponding transaction, or the step of executing the rollback operation of the corresponding transaction when the micro-service is called by using a preset calling mode.
Step 2, when the service state of the micro service is calling failure, or when the service state of the micro service is calling overtime and the accumulated calling times of the micro service is equal to a preset time threshold, or when the service states of the micro services are all calling successfully, correspondingly marking the service state of the target combined service; wherein the service state of the microservice and the service state of the target composite service comprise at least one of: call failure, call timeout, and call success.
Specifically, when the service state of the micro service is a call failure, marking the service state of the target combined service as a call failure; when the service state of the micro service is calling overtime and the accumulated calling times of the micro service are equal to a preset time threshold value, marking the service state of the target combined service as calling overtime; and when the service states of the micro services are all successfully called, marking the service state of the target combined service as successfully called.
And 3, assembling a response message based on the service state of the target combined service and the service state of each micro service in the plurality of micro services.
In one possible implementation, the assembled response message is returned to the service caller who requests to invoke the target composite service to indicate the invocation result of the target composite service.
In the transaction processing method of the distributed system provided by the embodiment of the application, in response to a target composite service calling request, a plurality of micro services included in the target composite service and a calling sequence of the plurality of micro services are determined; when calling a first micro service in the plurality of micro services according to the calling sequence fails, determining second micro services positioned before the first micro service; sequentially calling each second microservice according to the reverse sequence of the calling sequence by using a preset calling mode; the preset calling mode is that rollback operation of the transaction of the micro service is executed when the micro service is called; wherein the rollback operation is to compensate for a result produced by a commit operation of the transaction; if any one of the second micro services fails to be called in the process of calling the second micro services, responding to a rollback instruction for the second micro service which fails to be called, controlling the second micro service which fails to be called to execute rollback operation of a corresponding transaction, and sequentially calling the second micro services before the second micro service which fails to be called by using the preset calling mode according to the reverse sequence of the calling sequence.
By the method, when any micro service in the combined service is invoked in failure, the micro services before the micro service are sequentially invoked to execute the rollback operation of the corresponding transaction so as to compensate the result generated by the commit operation of the transaction; and when the rollback operation of calling a certain micro-service execution transaction fails, the micro-service execution rollback operation is called again in response to the rollback instruction. Therefore, the transaction consistency in the distributed system can be ensured, and the transaction processing efficiency of the distributed system can be improved.
Referring to fig. 4 and fig. 5, fig. 4 is a first schematic structural diagram of a transaction processing apparatus 400 of a distributed system according to an embodiment of the present application, and fig. 5 is a second schematic structural diagram of the transaction processing apparatus 400 of the distributed system according to the embodiment of the present application. As shown in fig. 4, the transaction processing apparatus 400 includes:
a first determining module 410, configured to determine, in response to a target composite service invocation request, a plurality of micro services included in the target composite service and an invocation order of the plurality of micro services;
a second determining module 420, configured to determine, when a first micro service of the plurality of micro services fails to be called according to the calling order, second micro services located before the first micro service;
the failure processing module 430 is configured to sequentially call each second microservice according to a reverse order of the call order by using a preset call mode; the preset calling mode is that rollback operation of the transaction of the micro service is executed when the micro service is called; wherein the rollback operation is to compensate for a result produced by a commit operation of the transaction;
if the failure processing module 430 fails to invoke any one of the second microservices in the process of invoking the second microservices, the failure processing module 430 controls the second microservices which failed to invoke to execute the rollback operation of the corresponding transaction in response to the rollback instruction of the second microservices which failed to invoke, and sequentially invokes the second microservices before the second microservices which failed to invoke in the preset invoking manner according to the reverse order of the invoking order.
Further, as shown in fig. 5, the transaction processing apparatus 400 further includes: a timeout processing module 440;
the timeout processing module 440 is configured to determine, when a first micro service in the plurality of micro services is invoked according to the invocation sequence and times out, a relationship between the cumulative invocation time of the first micro service and a preset time threshold;
if the accumulated calling times are smaller than the preset times threshold, the first micro service is called again, and the accumulated calling times are increased by 1;
if the accumulated calling times are equal to the preset times threshold, controlling the first micro service to execute the rollback operation of the corresponding transaction in response to a rollback instruction for the first micro service; or, in response to a commit instruction for the first micro-service, controlling the first micro-service to perform a commit operation of a corresponding transaction.
Further, if the cumulative number of calls is equal to the preset number threshold, the timeout processing module 440 is further configured to:
determining whether the rollback instruction or the commit instruction is received within a preset time;
if not, the first micro service is called again.
Further, as shown in fig. 5, the transaction processing apparatus 400 further includes: a status marking module 450;
the state marking module 450 is configured to mark, for any micro service in the plurality of micro services, a service state of the micro service according to a calling manner and a calling result of the micro service;
when the service state of the micro service is calling failure, or when the service state of the micro service is calling overtime and the accumulated calling times of the micro service are equal to a preset time threshold, or when the service states of the micro services are calling successfully, correspondingly marking the service state of the target combined service; wherein the service state of the microservice and the service state of the target composite service comprise at least one of: calling fails, calling overtime and calling succeeds;
and assembling a response message based on the service state of the target combined service and the service state of each micro service in the plurality of micro services.
Further, when the failure processing module 430 is configured to sequentially call each second microservice according to the reverse order of the call order by using a preset call mode, the failure processing module 430 is further configured to:
in the process of calling each second micro service by using the preset calling mode, when any second micro service is successfully called, the previous second micro service of the successfully called second micro service is determined according to the calling sequence, and the previous second micro service is called by using the preset calling mode.
Further, when the target combined service is a current cash deposit, the plurality of micro services comprise a current account deposit check micro service, a cash voucher payment micro service and a cash deposit micro service; the calling sequence of the micro services sequentially deposits check micro services, cash voucher receiving and paying micro services and cash deposit micro services for the current account;
when the cash deposit micro-service of the plurality of micro-services fails to be called according to the calling sequence, the failure processing module 430 is further configured to, when the failure processing module 430 is configured to use a preset calling mode to sequentially call each second micro-service according to a reverse sequence of the calling sequence,:
calling the cash voucher payment micro-service by using the preset calling mode so as to enable the cash voucher payment micro-service to execute rollback operation of the transaction; the transaction of the cash voucher payment micro-service is a program execution unit used for updating the cash voucher stored in a voucher database corresponding to the cash voucher payment micro-service; the rollback operation of the transaction is used for deleting the cash voucher stored in the voucher database by the corresponding submission operation;
after the cash voucher receiving and paying micro-service is called successfully by using the preset calling mode, calling the current account deposit check micro-service by using the preset calling mode so that the current account deposit check micro-service executes the rollback operation of the transaction; the transaction of the current account deposit check micro service is a program execution unit used for updating account information stored in an account database corresponding to the current account deposit check micro service; the rollback operation of its transaction is used to restore the changes to the current account information stored in the account database by the corresponding commit operation.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 6, the electronic device 600 includes a processor 610, a memory 620, and a bus 630.
The memory 620 stores machine-readable instructions executable by the processor 610, when the electronic device 600 runs, the processor 610 communicates with the memory 620 through the bus 630, and when the machine-readable instructions are executed by the processor 610, the steps of the transaction processing method in the method embodiments shown in fig. 1 to fig. 3 may be executed.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the transaction processing method in the method embodiments shown in fig. 1 to fig. 3 may be executed.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A transaction processing method for a distributed system, the transaction processing method comprising:
in response to a target combined service calling request, determining a plurality of micro services included by the target combined service and a calling sequence of the plurality of micro services;
when calling a first micro service in the plurality of micro services according to the calling sequence fails, determining second micro services positioned before the first micro service;
sequentially calling each second microservice according to the reverse sequence of the calling sequence by using a preset calling mode; the preset calling mode is that rollback operation of the transaction of the micro service is executed when the micro service is called; wherein the rollback operation is to compensate for a result produced by a commit operation of the transaction;
if any one of the second micro services fails to be called in the process of calling the second micro services, responding to a rollback instruction for the second micro service which fails to be called, controlling the second micro service which fails to be called to execute rollback operation of a corresponding transaction, and sequentially calling the second micro services before the second micro service which fails to be called by using the preset calling mode according to the reverse sequence of the calling sequence.
2. The transaction processing method of claim 1, further comprising:
when a first micro service in the plurality of micro services is called according to the calling sequence and is overtime, judging the relation between the accumulated calling times of the first micro service and a preset time threshold;
if the accumulated calling times are smaller than the preset times threshold, the first micro service is called again, and the accumulated calling times are increased by 1;
if the accumulated calling times are equal to the preset times threshold, controlling the first micro service to execute the rollback operation of the corresponding transaction in response to a rollback instruction for the first micro service; or, in response to a commit instruction for the first micro-service, controlling the first micro-service to perform a commit operation of a corresponding transaction.
3. The transaction processing method of claim 2, wherein if the cumulative number of calls equals a preset number threshold, the transaction processing method further comprises:
determining whether the rollback instruction or the commit instruction is received within a preset time;
if not, the first micro service is called again.
4. The transaction processing method of claim 1, further comprising:
marking the service state of the micro service according to the calling mode and the calling result of the micro service aiming at any micro service in the plurality of micro services;
when the service state of the micro service is calling failure, or when the service state of the micro service is calling overtime and the accumulated calling times of the micro service are equal to a preset time threshold, or when the service states of the micro services are calling successfully, correspondingly marking the service state of the target combined service; wherein the service state of the microservice and the service state of the target composite service comprise at least one of: calling fails, calling overtime and calling succeeds;
and assembling a response message based on the service state of the target combined service and the service state of each micro service in the plurality of micro services.
5. The transaction processing method according to claim 1, wherein the using a preset calling manner to sequentially call each of the second microservices in a reverse order of the calling order comprises:
in the process of calling each second micro service by using the preset calling mode, when any second micro service is successfully called, the previous second micro service of the successfully called second micro service is determined according to the calling sequence, and the previous second micro service is called by using the preset calling mode.
6. A transaction method according to claim 1, wherein when the target combined service is a current cash deposit, the plurality of micro-services include a current account deposit check micro-service, a cash voucher receipt micro-service, and a cash deposit micro-service; the calling sequence of the micro services sequentially deposits check micro services, cash voucher receiving and paying micro services and cash deposit micro services for the current account;
when the calling of the cash deposit micro-services in the plurality of micro-services according to the calling sequence fails, the calling of the second micro-services in sequence according to the reverse sequence of the calling sequence by using a preset calling mode comprises the following steps:
calling the cash voucher payment micro-service by using the preset calling mode so as to enable the cash voucher payment micro-service to execute rollback operation of the transaction; the transaction of the cash voucher payment micro-service is a program execution unit used for updating the cash voucher stored in a voucher database corresponding to the cash voucher payment micro-service; the rollback operation of the transaction is used for deleting the cash voucher stored in the voucher database by the corresponding submission operation;
after the cash voucher receiving and paying micro-service is called successfully by using the preset calling mode, calling the current account deposit check micro-service by using the preset calling mode so that the current account deposit check micro-service executes the rollback operation of the transaction; the transaction of the current account deposit check micro service is a program execution unit used for updating account information stored in an account database corresponding to the current account deposit check micro service; the rollback operation of its transaction is used to restore the changes to the current account information stored in the account database by the corresponding commit operation.
7. A transaction processing apparatus for a distributed system, the transaction processing apparatus comprising:
the first determination module is used for responding to a target combined service calling request and determining a plurality of micro services included in the target combined service and a calling sequence of the micro services;
the second determining module is used for determining each second micro service before the first micro service when the calling of the first micro service in the plurality of micro services according to the calling sequence fails;
the failure processing module is used for sequentially calling the second microservices in a preset calling mode according to the reverse sequence of the calling sequence; the preset calling mode is that rollback operation of the transaction of the micro service is executed when the micro service is called; wherein the rollback operation is to compensate for a result produced by a commit operation of the transaction;
if the failure processing module fails to call any one of the second microservices in the process of calling the second microservices, the failure processing module responds to a rollback instruction for the second microservices which fail to be called, controls the second microservices which fail to be called to execute rollback operation of corresponding transactions, and uses the preset calling mode to call the second microservices before the second microservices which fail to be called in sequence according to the reverse sequence of the calling sequence.
8. The transaction processing apparatus according to claim 7, wherein the transaction processing apparatus further comprises: an overtime processing module;
the overtime processing module is used for judging the relation between the accumulated calling times of the first micro-service and a preset time threshold when the first micro-service in the plurality of micro-services is called according to the calling sequence and is overtime;
if the accumulated calling times are smaller than the preset times threshold, the first micro service is called again, and the accumulated calling times are increased by 1;
if the accumulated calling times are equal to the preset times threshold, controlling the first micro service to execute the rollback operation of the corresponding transaction in response to a rollback instruction for the first micro service; or, in response to a commit instruction for the first micro-service, controlling the first micro-service to perform a commit operation of a corresponding transaction.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the transaction processing method of any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the transaction processing method according to any one of claims 1 to 6.
CN202111550897.1A 2021-12-17 2021-12-17 Transaction processing method and transaction processing device of distributed system Pending CN114253673A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111550897.1A CN114253673A (en) 2021-12-17 2021-12-17 Transaction processing method and transaction processing device of distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111550897.1A CN114253673A (en) 2021-12-17 2021-12-17 Transaction processing method and transaction processing device of distributed system

Publications (1)

Publication Number Publication Date
CN114253673A true CN114253673A (en) 2022-03-29

Family

ID=80795613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111550897.1A Pending CN114253673A (en) 2021-12-17 2021-12-17 Transaction processing method and transaction processing device of distributed system

Country Status (1)

Country Link
CN (1) CN114253673A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129490A (en) * 2022-06-30 2022-09-30 中电金信软件有限公司 Micro-service calling method and device and electronic equipment
CN115271736A (en) * 2022-07-11 2022-11-01 中电金信软件有限公司 Method, device, equipment, storage medium and product for verifying transaction consistency
CN115509770A (en) * 2022-09-22 2022-12-23 北京车欢欢信息技术有限公司 Micro-service calling method and device, electronic equipment and readable storage medium
CN115577031A (en) * 2022-10-24 2023-01-06 北京力控元通科技有限公司 Database transaction processing method and device, electronic equipment and storage medium
CN115729946A (en) * 2022-11-24 2023-03-03 中电金信软件(上海)有限公司 Method, device, equipment and storage medium for processing distributed transaction
CN116126481A (en) * 2023-02-06 2023-05-16 安芯网盾(北京)科技有限公司 Distributed long transaction processing method and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129490A (en) * 2022-06-30 2022-09-30 中电金信软件有限公司 Micro-service calling method and device and electronic equipment
CN115271736A (en) * 2022-07-11 2022-11-01 中电金信软件有限公司 Method, device, equipment, storage medium and product for verifying transaction consistency
CN115509770A (en) * 2022-09-22 2022-12-23 北京车欢欢信息技术有限公司 Micro-service calling method and device, electronic equipment and readable storage medium
CN115509770B (en) * 2022-09-22 2023-12-05 北京车欢欢信息技术有限公司 Micro-service calling method and device, electronic equipment and readable storage medium
CN115577031A (en) * 2022-10-24 2023-01-06 北京力控元通科技有限公司 Database transaction processing method and device, electronic equipment and storage medium
CN115729946A (en) * 2022-11-24 2023-03-03 中电金信软件(上海)有限公司 Method, device, equipment and storage medium for processing distributed transaction
CN116126481A (en) * 2023-02-06 2023-05-16 安芯网盾(北京)科技有限公司 Distributed long transaction processing method and device
CN116126481B (en) * 2023-02-06 2023-08-25 安芯网盾(北京)科技有限公司 Distributed long transaction processing method and device

Similar Documents

Publication Publication Date Title
CN114253673A (en) Transaction processing method and transaction processing device of distributed system
US7640249B2 (en) System and method for transactional session management
EP2851799B1 (en) Fault tolerant batch processing
US7992148B2 (en) Issuing syncpoints during execution of a batch application to minimize or eliminate periods of record unavailability due to batch related record locking
KR101278818B1 (en) Transaction consistency and problematic states
CN110888893A (en) Order processing method based on micro-service e-commerce system
CN108845866B (en) Method and apparatus for processing distributed transactions
CN109255701B (en) Network credit business data processing method
CN110163572B (en) Chain code function processing method, device and equipment
CN115544044A (en) Data consistency keeping method, device, equipment and storage medium
CN112766956A (en) Order payment and weight control method and device based on distributed order system
CN113112344B (en) Service processing method, device, storage medium and computer program product
CN111400283B (en) Data processing method, system, electronic equipment and storage medium
CN112559496A (en) Distributed database transaction atomicity realization method and device
CN112099934A (en) Batch processing method, system, computer equipment and storage medium
CN111722946A (en) Distributed transaction processing method and device, computer equipment and readable storage medium
CN115208834A (en) Service flow limiting method based on database storage process design
CN115629920A (en) Data request exception handling method and device and computer readable storage medium
CN115934272A (en) Online batch task processing method and device
CN115271694A (en) Order payment method and system
GB2335516A (en) Failure recovery in distributed transaction avoids heuristic damage
CN114356888A (en) Transaction processing method and device, storage medium and electronic equipment
CN113177052A (en) Method and device for processing service data consistency of distributed system
CN115018325B (en) Service processing method and device
CN116643733B (en) Service processing system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination