Transaction commit system, method, and related device
The transaction processing system addresses long commit delays in distributed systems by using a coordination server to directly send write requests to storage servers, reducing latency and enhancing efficiency through a one-phase commit process.
Patent Information
- Application Number
- HK42026123895
- Authority / Receiving Office
- HK · HK
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2026-05-23
- Publication Date
- 2026-07-31
AI Technical Summary
In distributed systems, the two-phase commit method for transaction processing results in long transaction commit delays due to multiple interactions between the coordinator, participants, and primary replicas, which affects the efficiency and reliability of data processing.
A transaction processing system with a coordination server and multiple storage servers that directly sends write requests to storage servers based on pre-stored data distribution information, allowing for one-phase transaction commit, reducing latency and improving processing efficiency by eliminating redundant communication steps.
The system reduces transaction commit latency and enhances the processing efficiency of business servers by directly sending write requests to storage servers, thereby improving the overall efficiency and reliability of the transaction processing system.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
(19) State Intellectual Property Office (12) Invention Patent Application (10) Application Publication Number (43) Application Publication Date (21) Application Number 202511240062.4 (22) Application Date 2019.11.30 (62) Divisional Application Data 201980102354.8 2019.11.30 (71) Applicant Huawei Cloud Computing Technology Co., Ltd. Address 550025, Guizhou Province, Guiyang City, Gui'an New District, Qianzhong Avenue, Xinggong Road, Huawei Cloud Data Center (72) Inventors Wang Yanqun, Lin Chao, Wei Mingchang (74) Patent Agency Guangzhou Sanhuan Patent & Trademark Agency Co., Ltd. 44202 Patent Attorney Shi Chaoqing (51) Int.Cl. G06F 16 / 27 (2019.01) G06F 16 / 2458 (2019.01) G06F 16 / 953 (2019.01) (54) Invention Title: A Transaction Submission System, Method, and Related Equipment (57) Abstract: This application provides a transaction submission system, method, and related equipment. The system includes a coordination server and multiple storage servers. The coordination server receives transactions sent by business servers, generates at least one write request based on the transaction, and sends each write request to a storage server storing the data to be operated on by each write request. The storage servers receiving the write requests execute the received write requests and send the execution results back to the coordination server. The coordination server determines the transaction processing result based on the execution results of the write requests returned by each storage server and sends the transaction processing result to the business servers. The coordination server can determine the transaction processing result based on the execution results of the write requests sent by each storage server and returns the transaction processing result to the business servers, thereby achieving one-stage transaction submission, reducing the latency of write request processing, and improving processing efficiency and the working efficiency of the business servers. Claims (5 pages), Description (24 pages), Drawings (7 pages), CN 121009147 A, 2025.11.25, CN 1 21 00 91 47 A. 1. A transaction processing system, characterized in that it includes a coordination server and multiple storage servers; the coordination server is configured to receive transactions, the transactions including at least one transaction data information, each transaction data information including storage location information of a copy of original data on the storage server and a write operator; determine transaction data distribution information according to pre-stored data distribution information, wherein the data distribution information indicates the storage server storing each copy of each original data in the transaction processing system, and the transaction data distribution information indicates the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction; generate at least one write request.Each write request includes the transaction data distribution information and a transaction data information; each write request is sent to the storage server where the copy of the original data corresponding to the transaction data information included in each write request is located; the storage server receiving any write request is used to store the transaction data distribution information; according to the transaction data information included in the write request, it operates on the copy of the original data corresponding to the transaction data information included in the write request; it sends the execution result of the write request to the coordination server; the coordination server is further used to determine the transaction processing result of the transaction based on the execution result of the write request sent by each storage server that received the write request, and sends the transaction processing result to the business server; the coordination server is further used to determine the operation information that each storage server that received the write request needs to perform based on the execution result of the write request sent by each storage server that received the write request, the operation information indicating the execution of a commit operation or a rollback operation, and sends the operation information to each storage server that received the write request. 2. The transaction processing system as claimed in claim 1, wherein the coordinating server is further configured to receive a read request, the read request including the storage location of a copy of the target data on the storage server and a read operator; determine the storage server storing the copy of the target data according to the data distribution information; send the read request to the storage server storing the copy of the target data; the storage server receiving the read request is configured to query the execution result of the write request from each storage server that received the write request according to the transaction data distribution information; determine whether to perform a commit operation or a rollback operation according to the execution result of the write request sent by each storage server that received the write request; after performing the commit operation or the rollback operation, read the target data according to the storage location of the copy of the target data on the storage server; and send the read target data to the coordinating server. 3. The transaction processing system as claimed in claim 2, wherein the storage server receiving the read request is further configured to generate operation information according to the execution result of the write request, the operation information indicating a commit operation or a rollback operation, and send the operation information to each storage server that received the write request. 4. The transaction processing system as described in claim 2 or 3, wherein the storage location of the copy of the target data on the storage server overlaps with the storage location of the copy of the original data on the storage server, or the copy of the target data and the copy of the original data are stored in data blocks that need to maintain consistency. 5. The transaction processing system as described in claim 2 or 3, wherein the coordination server is used to determine, based on the data distribution information, multiple locations for storing copies of the target data.Storage server; select a target storage server from the determined plurality of storage servers storing copies of the target data; send the read request to the target storage server. 6. The transaction processing system as claimed in claim 1, wherein the storage server receiving the write request is further configured to determine that if it has not received the operation information sent by the coordination server within a preset time after sending the execution result of the operation to the coordination server, query the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction for the execution result of the write request according to the transaction data distribution information; and determine to execute the commit operation or the rollback operation according to the execution result. 7. A transaction processing method, characterized in that it is applied to a transaction processing system including a coordination server and multiple storage servers, the method comprising: the coordination server receiving a transaction sent by a business server, the transaction including at least one transaction data information, each transaction data information including storage location information of a copy of original data on the storage server and a write operator; the coordination server determining transaction data distribution information according to pre-stored data distribution information, wherein the data distribution information indicates a storage server in the transaction processing system storing each copy of each original data, and the transaction data distribution information indicates a storage server storing each copy of the original data corresponding to each transaction data information included in the transaction; the coordination server generating at least one write request, each write request including the transaction data distribution information and a transaction data information; the coordination server sending each write request to the storage server where the copy of the original data corresponding to the transaction data information included in each write request is located; the storage server receiving any write request storing the transaction data distribution information, operating on the copy of the original data corresponding to the transaction data information included in the write request according to the transaction data information included in the write request, and sending the execution result of the write request to the coordination server; The coordination server determines the transaction processing result of the transaction based on the execution result of the write request sent by each storage server that received the write request, and sends the transaction processing result to the business server. The coordination server determines the operation information that each storage server that received the write request needs to perform based on the execution result of the write request sent by each storage server that received the write request, the operation information indicating whether to perform a commit operation or a rollback operation; the coordination server sends the operation information to each storage server that received the write request. 8. The method of claim 7, wherein the method further comprises: the coordination server receiving a read request sent by the business server, the read request including a copy of the target data.The storage location and read operator on the storage server; the coordination server determines the storage server storing the copy of the target data according to the data distribution information, and sends the read request to the storage server storing the copy of the target data; the storage server receiving the read request queries the execution result of the write request from each storage server that received the write request according to the transaction data distribution information; based on the execution result of the write request sent by each storage server that received the write request, it determines whether to perform a commit operation or a rollback operation; the storage server receiving the read request reads the target data according to the storage location of the copy of the target data on the storage server, and sends the read target data to the coordination server. 9. The method as described in claim 8, wherein the method further comprises: the storage server receiving the read request generating operation information according to the execution result of the write request, and sending the operation information to each storage server that received the write request, the operation information indicating a commit operation or a rollback operation. Claims 2 / 5, Page 3, CN 121009147 A 10. The method of claim 8 or 9, wherein the storage location of the copy of the target data on the storage server overlaps with the storage location of the copy of the original data on the storage server, or the copy of the target data and the copy of the original data are stored in a data block that needs to maintain consistency. 11. The method of claim 8 or 9, wherein the coordinating server determines a storage server storing a copy of the target data based on the data distribution information, and sends the read request to the storage server storing the copy of the target data, comprising: the coordinating server determining a plurality of storage servers storing copies of the target data based on the data distribution information; the coordinating server selecting a target storage server from the determined plurality of storage servers storing copies of the target data, and sending the read request to the target storage server. 12. The method of claim 7, further comprising: after the storage server receiving the write request determines that it has not received the operation information sent by the coordination server within a preset time after sending the execution result of the operation to the coordination server, querying the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction for the execution result of the write request according to the transaction data distribution information; and determining, based on the execution result, to execute the commit operation or the rollback operation. 13. A transaction processing method, comprising: a coordination server receiving a transaction sent by a business server, the transaction including at least one transaction data information, each...The transaction data information includes the storage location information of a copy of the original data on the storage server and a write operator; the coordination server determines the transaction data distribution information based on pre-stored data distribution information, wherein the data distribution information indicates the storage server storing each copy of each original data in the transaction processing system, and the transaction data distribution information indicates the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction; the coordination server generates at least one write request, each write request including the transaction data distribution information and a transaction data information; the coordination server sends each write request to the storage server where the copy of the original data corresponding to the transaction data information included in each write request is located; the coordination server receives the execution result of the write request sent by each storage server that received the write request; the coordination server determines the transaction processing result of the transaction based on the execution result of the write request sent by each storage server that received the write request, and sends the transaction processing result to the business server; the coordination server determines the operation information that each storage server that received the write request needs to perform based on the execution result of the write request sent by each storage server that received the write request, the operation information indicating whether to perform a commit operation or a rollback operation. The coordination server sends the operation information to each storage server that receives the write request. 14. A transaction processing method, characterized in that the method comprises: a storage server receiving a write request sent by a coordination server, the write request including transaction data distribution information and transaction data information, the write request being at least one write request generated by the coordination server according to a received transaction (see claim 3 / 5, page 4, CN 121009147 A), the storage server being one of a plurality of storage servers where a copy of the original data corresponding to the transaction data information included in the at least one write request is located, the transaction including at least one transaction data information, each transaction data information including the storage location information of a copy of the original data on the storage server and a write operator, the transaction data distribution information indicating the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction; the storage server operating on the copy of the original data corresponding to the transaction data information included in the write request according to the transaction data information, and sending the execution result of the write request to the coordination server; the storage server receiving a read request sent by the coordination server, the read request including the storage location information of a copy of target data on the storage server and a read operator; the storage server, according to the transaction data distribution information, operating on the copy of the original data corresponding to each transaction data information included in the transaction; and the storage server, according to the transaction data distribution information, operating on the copy of the original data corresponding to each transaction data information included in the transaction.The storage server for each copy of the original data corresponding to the transaction data queries the execution result of the at least one write request; the storage server performs a commit operation or a rollback operation based on the execution result of the at least one write request obtained from the query. 15. The method of claim 14, wherein the method further comprises: the storage server generating operation information based on the execution result of the at least one write request obtained from the query, the operation information indicating a commit operation or a rollback operation; the storage server sending the operation information to the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction. 16. The method of claim 14 or 15, wherein the storage location of the copy of the target data on the storage server overlaps with the storage location of the copy of the original data on the storage server, or the copy of the target data and the copy of the original data are stored in data blocks that need to maintain consistency. 17. A coordination device, characterized in that the coordination device comprises: a communication unit, configured to receive a transaction sent by a business server, the transaction including at least one transaction data information, each transaction data information including storage location information of a copy of original data on a storage server and a write operator; a processing unit, configured to determine transaction data distribution information according to pre-stored data distribution information, wherein the data distribution information indicates a storage server storing each copy of each original data in a transaction processing system, and the transaction data distribution information indicates a storage server storing each copy of the original data corresponding to each transaction data information included in the transaction; generating at least one write request, each write request including the transaction data distribution information and a transaction data information; the communication unit is further configured to send each write request to the storage server where the copy of the original data corresponding to the transaction data information included in each write request is located; receiving the execution result of the write request sent by each storage server that receives the write request; the processing unit is further configured to determine the transaction processing result of the transaction according to the execution result of the write request sent by each storage server that receives the write request; the communication unit is further configured to send the transaction processing result to the business server; The communication unit is further configured to determine, based on the execution result of the write request sent by each storage server receiving the write request, operation information to be performed by each storage server receiving the write request, wherein the operation information indicates whether to perform a commit operation or a rollback operation, and to send the operation information to each storage server receiving the write request. 18. The apparatus of claim 17, wherein the processing unit is further configured to determine, based on the execution result of the write request sent by each storage server receiving the write request, operation information to be performed by each storage server receiving the write request.The execution result determines the operation information that each storage server receiving the write request needs to perform, and the operation information indicates whether to perform a commit operation or a rollback operation; the communication unit is used to send the operation information to each storage server receiving the write request. 19. A storage device, characterized in that the device comprises: a communication unit, configured to receive a write request sent by a coordination server, the write request including transaction data distribution information and transaction data information, the write request being one of at least one write requests generated by the coordination server based on a received transaction, the storage server being one of a plurality of storage servers where a copy of the original data corresponding to the transaction data information included in the at least one write request is located, the transaction including at least one transaction data information, each transaction data information including storage location information of a copy of the original data on the storage server and a write operator, the transaction data distribution information indicating a storage server storing each copy of the original data corresponding to each transaction data information included in the transaction; a processing unit, configured to operate on the copy of the original data corresponding to the transaction data information included in the write request according to the transaction data information; the communication unit is further configured to send the execution result of the write request to the coordination server; receive a read request sent by the coordination server, the read request including the storage location of a copy of target data on the storage server and a read operator; the processing unit is further configured to query the execution result of the at least one write request from the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction according to the transaction data distribution information; Based on the execution result of the at least one write request obtained from the query, a commit operation or a rollback operation is performed. 20. The apparatus of claim 19, wherein the processing unit is further configured to generate operation information based on the execution result of the at least one write request obtained from the query, the operation information indicating a commit operation or a rollback operation; the communication unit is further configured to send the operation information to a storage server storing each copy of the original data corresponding to each transaction data information included in the transaction. 21. The apparatus of claim 19 or 20, wherein the storage location of the copy of the target data on the storage server overlaps with the storage location of the copy of the original data on the storage server, or the copy of the target data and the copy of the original data are stored in a data block that needs to maintain consistency. 22. A coordination server, comprising a processor and a memory; the memory is used to store instructions, the processor is used to execute the instructions, and when the processor executes the instructions, the processor performs the method of claim 13. 23. A storage server, comprising a processor and a memory; the memory is used to store instructions, the...The processor is configured to execute the instructions, and when the processor executes the instructions, the processor performs the method as described in any one of claims 14 to 16. 24. A non-transient computer-readable storage medium storing a computer program, the computer program implementing the method as described in claim 13 when executed by a coordination server. 25. A non-transient computer-readable storage medium storing a computer program, the computer program implementing the method as described in any one of claims 14 to 16 when executed by a storage server. Claims 5 / 5 Page 6 CN 121009147 A Transaction Submission System, Method and Related Equipment
[0001] This application is a divisional application, the original application number is 201980102354.8, the original application date is November 30, 2019, and the entire contents of the original application are incorporated herein by reference. Technical Field
[0002] This application relates to the field of computer technology, and more particularly to a transaction submission system, method and related equipment. Background Art
[0003] A transaction is a logical unit in the execution process of a database management system, including a finite sequence of database operations. In a distributed system, in order to improve data reliability, it is necessary to establish redundant relationships for data, such as storing multiple copies of data to establish redundant relationships, and these multiple copies are distributed in different nodes. When a transaction is executed across multiple participants, each participant can determine the execution result of its own transaction, but cannot know the execution result of other participants. In order to maintain the atomicity, consistency, isolation, and durability of transactions, a coordinator needs to be introduced to manage the participants executing the transaction. Two-phase commit is a method designed for transaction commit based on a distributed system architecture, but in this method, the coordinator, participants, and the primary replica in the distributed system need to interact multiple times, which will lead to a long transaction commit delay. Summary of the Invention
[0004] Embodiments of the present invention provide a transaction commit system, method, and related devices that can reduce the transaction commit delay.
[0005] In a first aspect, this application provides a transaction processing system, including a coordination server and multiple storage servers, wherein,
[0006] the coordination server is configured to receive transactions, the transactions including at least one transaction data information, each transaction data information including storage location information of a copy of the original data on the storage server and a write operator; and to determine transaction data distribution information based on pre-stored data distribution information, wherein the data distribution information indicates the storage server storing each copy of each original data in the transaction processing system, and the transaction data distribution information indicates the storage location of each copy of the original data.The storage server for each copy of the original data corresponding to each transaction data information included in the transaction; generating at least one write request, each write request including the transaction data distribution information and a transaction data information; sending each write request to the storage server where the copy of the original data corresponding to the transaction data information included in each write request is located;
[0007] The storage server receiving any write request is used to store the transaction data distribution information; according to the transaction data information included in the write request, it operates on the copy of the original data corresponding to the transaction data information included in the write request; and sends the execution result of the write request to the coordination server;
[0008] The coordination server is further used to determine the transaction processing result of the transaction according to the execution result of the write request sent by each storage server that received the write request, and send the transaction processing result to the business server.
[0009] The coordination server generates one or more write requests based on the transaction data information in the received transaction. Then, based on the pre-stored data distribution information of the distributed system, it directly sends each write request to the storage server where each replica of the original data corresponding to the transaction data information included in each write request is located. This avoids the process described in the coordination server manual (page 1 / 24, CN 121009147 A) first sending the write request to the storage server where the primary replica of the original data corresponding to the transaction data information is located, and then the primary replica sending the write request to the corresponding backup replica, thus improving the efficiency of sending write requests to each storage server. In addition, after the storage server that receives the write request executes the received write request, each storage server feeds back the execution result of the write request to the coordination server. Based on the execution results fed back by each storage server, the coordination server can determine the transaction processing result of the transaction, and then return the transaction processing result of the above transaction to the business server, thereby realizing one-phase transaction commit, reducing the latency of write request processing, and improving the processing efficiency of write requests and the working efficiency of the business server.
[0010] In one possible implementation, the coordination server is configured to receive a read request, the read request including the storage location of a copy of the target data on the storage server and a read operator; determine the storage server storing the copy of the target data according to the data distribution information; and send the read request to the storage server storing the copy of the target data;
[0011] The storage server receiving the read request is configured to query the execution result of the write request from each storage server that received the write request according to the transaction data distribution information; determine whether to perform a commit operation or a rollback operation based on the execution result of the write request sent by each storage server that received the write request; after performing the commit operation or the rollback operation, read the data according to the storage location of the copy of the target data on the storage server.Target data; The read target data is sent to the coordination server.
[0012] In one possible implementation, the storage server receiving the read request is further configured to generate operation information based on the execution result of the write request, the operation information indicating a commit operation or a rollback operation, and send the operation information to each storage server that received the write request.
[0013] If the storage server receives a read request without sending a commit or rollback instruction to the storage server, the coordination server can query the execution result of the write request from the storage server storing each copy of the original data corresponding to each transaction data information included in the above transaction based on the transaction data identifier and transaction data distribution information in the received write request. Based on the queryed execution result of the write request, it determines whether to execute a commit operation or a rollback operation, and then executes the received read request. By using the storage server to determine whether to execute a commit operation or a rollback operation for the transaction corresponding to the write request, the amount of data processed by the business server is reduced, and the efficiency of the business server is improved.
[0014] In one possible implementation, the storage location of the target data copy on the storage server overlaps with the storage location of the original data copy on the storage server, or the target data copy and the original data copy are stored in data blocks that need to maintain consistency.
[0015] In one possible implementation, the coordination server is used to determine multiple storage servers storing copies of the target data based on the data distribution information; select a target storage server from the determined multiple storage servers storing copies of the target data; and send the read request to the target storage server.
[0016] The target storage server may be the one closest to the coordination server among the multiple storage servers storing copies of the target data, or the one with the fastest access speed to the coordination server among the multiple storage servers storing copies of the target data, thereby improving the speed at which the business server reads the target data and improving work efficiency.
[0017] In one possible implementation, the coordination server is further configured to determine, based on the execution result of the write request sent by each storage server that received the write request, operation information that each storage server that received the write request needs to perform, wherein the operation information indicates whether to perform a commit operation or a rollback operation, and to send the operation information to each storage server that received the write request.
[0018] In one possible implementation, the storage server that received the write request is further configured to determine, within a preset time after sending the execution result of the operation to the coordination server, if it does not receive the specified information from the coordination server, the operation information is not provided.The operation information, based on the transaction data distribution information, queries the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction for the execution result of the write request; based on the execution result, it determines whether to execute the commit operation or the rollback operation.
[0019] After the storage server sends the execution result back to the coordination server, if it does not receive the operation information sent by the coordination server within a preset time, the storage server determines that the coordination server has failed. The storage server queries the other storage servers included in the transaction data distribution information for the execution results of the write requests executed by other storage servers, and then determines whether to execute the commit operation or the rollback operation based on the execution results of other storage servers. This prevents the storage server from being unable to release the system resources requested by the above-mentioned write request when it does not receive the commit instruction or rollback instruction from the coordination server, which would lead to system blocking and the inability to execute new transactions, and improves the reliability of the system.
[0020] In a second aspect, this application provides a transaction processing method applied to a transaction processing system including a coordination server and multiple storage servers, the method comprising:
[0021] the coordination server receiving a transaction sent by a business server, the transaction including at least one transaction data information, each transaction data information including storage location information of a copy of original data on the storage server and a write operator;
[0022] the coordination server determining transaction data distribution information according to pre-stored data distribution information, wherein the data distribution information indicates a storage server in the transaction processing system storing each copy of each original data, and the transaction data distribution information indicates a storage server storing each copy of the original data corresponding to each transaction data information included in the transaction;
[0023] the coordination server generating at least one write request, each write request including the transaction data distribution information and a transaction data information;
[0024] the coordination server sending each write request to the storage server where the copy of the original data corresponding to the transaction data information included in each write request is located;
[0025] The storage server that receives any write request stores the transaction data distribution information, operates on the copy of the original data corresponding to the transaction data information included in the write request, and sends the execution result of the write request to the coordination server;
[0026] The coordination server determines the transaction processing result of the transaction based on the execution result of the write request sent by each storage server that receives the write request, and sends the transaction processing result to the business server.
[0027] In one possible implementation, the coordination server receives the read request sent by the business server,The read request includes the storage location of a copy of the target data on the storage server and a read operator;
[0028] The coordination server determines the storage server storing the copy of the target data according to the data distribution information, and sends the read request to the storage server storing the copy of the target data;
[0029] The storage server receiving the read request queries the execution result of the write request from each storage server that received the write request according to the transaction data distribution information; and determines whether to perform a commit operation or a rollback operation based on the execution result of the write request sent by each storage server that received the write request;
[0030] The storage server receiving the read request reads the target data according to the storage location of the copy of the target data on the storage server, and sends the read target data to the coordination server.
[0031] In one possible implementation, the storage server receiving the read request generates operation information according to the execution result of the write request, and sends the operation information to each storage server that received the write request, wherein the operation information indicates a commit operation or a rollback operation.
[0032] In one possible implementation, the storage location of the target data copy on the storage server overlaps with the storage location of the original data copy on the storage server, or the target data copy and the original data copy are stored in a data block that needs to maintain consistency.
[0033] In one possible implementation, the coordination server determines the storage server storing the target data copy based on the data distribution information and sends the read request to the storage server storing the target data copy, including:
[0034] The coordination server determines multiple storage servers storing the target data copy based on the data distribution information;
[0035] The coordination server selects a target storage server from the determined multiple storage servers storing the target data copy and sends the read request to the target storage server.
[0036] In one possible implementation, the method further includes: the coordination server determining, based on the execution result of the write request sent by each storage server that received the write request, operation information that each storage server that received the write request needs to perform, wherein the operation information indicates whether to perform a commit operation or a rollback operation;
[0037] the coordination server sends the operation information to each storage server that received the write request.
[0038] In one possible implementation, the method further includes:
[0039] the storage server that received the write request determining to send the execution result of the operation to the coordination server.If the operation information sent by the coordination server is not received within a preset time, the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction queries the execution result of the write request according to the transaction data distribution information;
[0040] The storage server receiving the write request determines to execute the commit operation or the rollback operation according to the execution result.
[0041] In a third aspect, this application provides a transaction processing method applied to a coordination server in a transaction processing system including a coordination server and multiple storage servers. The method includes:
[0042] The coordination server receives a transaction sent by a business server, the transaction including at least one transaction data information, each transaction data information including storage location information of a copy of original data on a storage server and a write operator;
[0043] The coordination server determines transaction data distribution information according to pre-stored data distribution information, wherein the data distribution information indicates a storage server in the transaction processing system that stores each copy of each original data, and the transaction data distribution information indicates a storage server that stores each copy of the original data corresponding to each transaction data information included in the transaction;
[0044] The coordination server generates at least one write request, each write request including the transaction data distribution information and a transaction data information;
[0045] The coordination server sends each write request to the storage server where the copy of the original data corresponding to the transaction data information included in each write request is located;
[0046] The coordination server receives the execution result of the write request sent by each storage server that received the write request;
[0047] The coordination server determines the transaction processing result of the transaction based on the execution result of the write request sent by each storage server that received the write request, and sends the transaction processing result to the business server. Specification 4 / 24 pages 10 CN 121009147 A
[0048] In one possible implementation, the method further includes: the coordination server determines the operation information that each storage server that received the write request needs to perform based on the execution result of the write request sent by each storage server that received the write request, the operation information indicating to perform a commit operation or a rollback operation;
[0049] the coordination server sends the operation information to each storage server that received the write request.
[0050] In a fourth aspect, this application provides a transaction processing method, applied to a storage server in a transaction processing system including a coordination server and multiple storage servers, the method including:
[0051] the storage server receives a write request sent by the coordination server, the write request including transaction data distribution information toThe transaction includes transaction data information, wherein the write request is one of at least one write requests generated by the coordinating server based on the received transaction, and the storage server is one of a plurality of storage servers where a copy of the original data corresponding to the transaction data information included in the at least one write request is located. The transaction includes at least one transaction data information, each transaction data information including the storage location information of a copy of the original data on the storage server and a write operator. The transaction data distribution information indicates the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction;
[0052] The storage server operates on the copy of the original data corresponding to the transaction data information included in the write request based on the transaction data information, and sends the execution result of the write request to the coordinating server;
[0053] The storage server receives a read request sent by the coordinating server, the read request including the storage location of a copy of the target data on the storage server and a read operator;
[0054] The storage server queries the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction for the execution result of the at least one write request based on the transaction data distribution information;
[0055] The storage server performs a commit operation or a rollback operation based on the execution result of the at least one write request obtained from the query.
[0056] In one possible implementation, the method further includes: the storage server generating operation information based on the execution result of the at least one write request obtained from the query, the operation information indicating a commit operation or a rollback operation;
[0057] The storage server sends the operation information to a storage server storing each copy of the original data corresponding to each transaction data information included in the transaction.
[0058] In one possible implementation, the storage location of the target data copy on the storage server overlaps with the storage location of the original data copy on the storage server, or the target data copy and the original data copy are stored in data blocks that need to maintain consistency.
[0059] In a fifth aspect, this application provides a transaction processing method applied to a storage server in a transaction processing system including a coordination server and multiple storage servers. The method includes:
[0060] A storage server receives a write request sent by a coordination server. The write request includes transaction data distribution information and transaction data information. The write request is one of at least one write requests generated by the coordination server based on a received transaction. The storage server is one of multiple storage servers where a copy of the original data corresponding to the transaction data information included in the at least one write request is located. The transaction includes at least one piece of transaction data information. Each piece of transaction data information includes the storage location information of a copy of the original data on the storage server and a write operator. The transaction data distribution...The information indicates the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction;
[0061] The server operates on the copy of the original data corresponding to the transaction data information included in the write request according to the transaction data information, and sends the execution result of the write request to the coordination server; Specification 5 / 24 pages 11 CN 121009147 A
[0062] If the storage server determines that it has not received the operation information sent by the coordination server within a preset time after sending the execution result of the write request to the coordination server, it queries the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction for the execution result of the at least one write request according to the transaction data distribution information;
[0063] The storage server performs a commit operation or a rollback operation according to the execution result of the at least one write request obtained by query.
[0064] In a sixth aspect, this application provides a coordination device, the coordination device comprising:
[0065] a communication unit, configured to receive a transaction sent by a business server, the transaction including at least one transaction data information, each transaction data information including storage location information of a copy of original data on a storage server and a write operator;
[0066] a processing unit, configured to determine transaction data distribution information according to pre-stored data distribution information, wherein the data distribution information indicates a storage server storing each copy of each original data in a transaction processing system, and the transaction data distribution information indicates a storage server storing each copy of the original data corresponding to each transaction data information included in the transaction;
[0067] generating at least one write request, each write request including the transaction data distribution information and a transaction data information;
[0068] the communication unit is further configured to send each write request to a storage server where the copy of the original data corresponding to the transaction data information included in each write request is located;
[0069] receiving the execution result of the write request sent by each storage server that received the write request;
[0070] The processing unit is further configured to determine the transaction processing result of the transaction based on the execution result of the write request sent by each storage server that received the write request;
[0071] The communication unit is further configured to send the transaction processing result to the business server.
[0072] In one possible implementation, the processing unit is specifically configured to determine the operation information that each storage server that received the write request needs to perform based on the execution result of the write request sent by each storage server that received the write request, wherein the operation information indicates whether to perform a commit operation or a rollback operation;
[0073] The communication unit is further configured to send the operation information to each storage server that received the write request.
[0074] In a seventh aspect, this application provides a storage device, the device comprising:
[0075] a communication unit, configured to receive a write request sent by a coordination server, the write request including transaction data distribution information and a transaction data information, the write request being one of at least one write requests generated by the coordination server based on a received transaction, the storage server being one of a plurality of storage servers where a copy of the original data corresponding to the transaction data information included in the at least one write request is located, the transaction including at least one transaction data information, each transaction data information including storage location information of a copy of the original data on the storage server and a write operator, the transaction data distribution information indicating a storage server storing each copy of the original data corresponding to each transaction data information included in the transaction;
[0076] a processing unit, configured to operate on the copy of the original data corresponding to the transaction data information included in the write request according to the transaction data information;
[0077] the communication unit is further configured to send the execution result of the write request to the coordination server; receive a read request sent by the coordination server, the read request including the storage location information of a copy of the target data on the storage server and the original data information; and receive a copy of the original data corresponding to the transaction data information included in the write request. Read operator;
[0078] The processing unit is further configured to query the execution result of the at least one write request from the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction, according to the transaction data distribution information;
[0079] Execute a commit operation or a rollback operation according to the execution result of the at least one write request obtained by query.
[0080] In one possible implementation, the processing unit is further configured to generate operation information according to the execution result of the at least one write request obtained by query, the operation information indicating a commit operation or a rollback operation;
[0081] The communication unit is further configured to send the operation information to the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction.
[0082] In one possible implementation, the storage location of the target data copy on the storage server overlaps with the storage location of the original data copy on the storage server, or the target data copy and the original data copy are stored in a data block that needs to maintain consistency.
[0083] In an eighth aspect, this application provides a storage device, the device comprising:
[0084] a communication unit, configured to receive a write request sent by a coordination server, the write request including transaction data distribution information and transaction data information, the write request being one of at least one write requests generated by the coordination server based on a received transaction, and the storage server being the original data corresponding to the transaction data information included in the at least one write request.The transaction includes at least one transaction data information, each transaction data information including the storage location information of a copy of the original data on the storage server and a write operator, and the transaction data distribution information indicating the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction;
[0085] The processing unit is configured to operate on the copy of the original data corresponding to the transaction data information included in the write request according to the transaction data information;
[0086] The communication unit is further configured to send the execution result of the write request to the coordination server;
[0087] The processing unit is further configured to determine that no operation information is received from the coordination server within a preset time after sending the execution result of the write request to the coordination server, and query the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction according to the transaction data distribution information;
[0088] Based on the execution result of the at least one write request obtained by query, a commit operation or a rollback operation is performed.
[0089] In a ninth aspect, this application provides a coordination server, including a processor and a memory; the memory is used to store instructions, and the processor is used to execute the instructions, wherein when the processor executes the instructions, the processor performs the method provided by the third aspect or any possible implementation of the third aspect.
[0090] In a tenth aspect, this application provides a storage server, including a processor and a memory; the memory is used to store instructions, and the processor is used to execute the instructions, wherein when the processor executes the instructions, the processor performs the method provided by the fourth aspect or any possible implementation of the fourth aspect.
[0091] In an eleventh aspect, this application provides a storage server, including a processor and a memory; the memory is used to store instructions, and the processor is used to execute the instructions, wherein when the processor executes the instructions, the processor performs the method provided by the fifth aspect or any possible implementation of the fifth aspect.
[0092] In a twelfth aspect, this application provides a non-transient computer-readable storage medium storing a computer program, which, when executed by a coordination server, implements the method provided in the third aspect or any possible implementation of CN 121009147 A (page 7 / 24 of the specification).
[0093] In a thirteenth aspect, this application provides a non-transient computer-readable storage medium storing a computer program, which, when executed by a storage server, implements the method provided in the fourth aspect or any possible implementation of the fourth aspect.
[0094] In a fourteenth aspect, this application provides a non-transient computer-readable storage medium storing a computer program that, when executed by a storage server, implements the method provided in the fifth aspect or any possible implementation of the fifth aspect. Brief Description of the Drawings
[0095] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0096] Figure 1 is a schematic diagram of the system architecture of a distributed system provided in an embodiment of this application;
[0097] Figure 2 is a schematic diagram of the interaction of a two-phase commit provided in an embodiment of this application;
[0098] Figure 3 is a schematic diagram of executing a commit operation or a rollback operation provided in an embodiment of this application;
[0099] Figure 4 is a schematic diagram of the interaction of another two-phase commit provided in an embodiment of this application;
[0100] Figure 5 is a schematic diagram of the interaction of a transaction commit provided in an embodiment of this application;
[0101] Figure 6 is a schematic diagram of the interaction of executing a read request provided in an embodiment of this application;
[0102] Figure 7 is a schematic diagram of the interaction of another transaction commit provided in an embodiment of this application;
[0103] Figure 8 is a schematic diagram of the structure of a coordination device provided in an embodiment of this application;
[0104] Figure 9 is a schematic diagram of the structure of a storage device provided in an embodiment of this application;
[0105] Figure 10 is a schematic diagram of the structure of another storage device provided in an embodiment of this application;
[0106] Figure 11 is a schematic diagram of the structure of a coordination server provided in an embodiment of this application;
[0107] Figure 12 is a schematic diagram of the structure of a storage server provided in an embodiment of this application;
[0108] Figure 13 is a schematic diagram of another storage server structure provided in an embodiment of this application. Detailed Description
[0109] The terms "first" and "second" in the embodiments of this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined as "first" and "second" may explicitly or implicitly include one or more of that feature.
[0110] First, some concepts involved in the embodiments of this application will be introduced.
[0111] A transaction is a logical unit in the execution process of a database management system, which includes a finite sequence of database operations. To ensure the correctness and reliability of data, a transaction must have four properties: atomicity, consistency, isolation, and durability. Atomicity means that all operations in a transaction are either all completed or none are completed, and will not end at some intermediate stage. If an error occurs during the execution of a transaction, it will be rolled back to the state before the transaction began. Consistency means that before the transaction begins and after the transaction ends,The integrity of the database is not compromised. Isolation means that the database allows multiple concurrent transactions to read, write, and modify data simultaneously. Isolation can prevent data inconsistency caused by cross-execution when multiple transactions are executed concurrently. Durability means that after the transaction is completed, the modifications to the data are permanent and will not be lost even if the system fails.
[0112] Participants act as executors during the transaction execution process, receiving transaction requests sent by the coordinator and performing specified operations on the data specified in the transaction request in CN 121009147 A, page 8 / 24 of the specification. A transaction includes transaction requests for one or more data, which can be read or write requests. In a distributed system, data is stored in different storage servers. Since each storage server may fail, in order to improve the reliability of the data, it is necessary to establish redundancy relationships for the data, such as by establishing replicas or erasure coding verification to improve system fault tolerance. In this embodiment, the redundancy relationship is described as a replica, and other redundancy relationships are also applicable. During the execution of a transaction, multiple copies of the same target data are referred to as a participant. The target data is one or more data requested in the transaction request. One of the multiple copies is the primary copy, and the rest are backup copies. It can be understood that when server resources are sufficient, multiple copies of the same data are distributed on different storage servers, and one participant corresponds to one or more storage servers. In this embodiment of the application, multiple copies of the same data are distributed on different storage servers as an example.
[0113] The coordinator plays a coordinating role during the execution of the transaction. In a distributed system, when a transaction is executed across multiple participants (i.e., a transaction includes transaction requests executed by multiple participants), each participant can determine the result of its own execution of the transaction request, but cannot know the result of other participants' execution of the transaction request. In order to maintain the above-mentioned transaction characteristics, a coordinator is introduced to manage the result of the execution of the transaction request and instruct the storage server whether to commit the result of the execution of the transaction request, for example, to replace the original data with updated data.
[0114] For example, a distributed system includes one or more business servers, one or more coordination servers (coordinators), and multiple storage servers. Figure 1 illustrates a distributed system comprising one business server, one coordination server, and multiple storage servers. The coordinator receives transaction requests from the business server and forwards them to one or more participants for execution. Each participant includes multiple replicas, and each storage server includes multiple logical storage nodes. Multiple replicas of the same data are stored on logical storage nodes of different storage servers. Each storage server includes multiple logical storage nodes, and each logical storage node can be a partition within the storage server.(chunk). For example, if storage server P1 in Figure 1 includes logical storage nodes P11, P12, and P13, storage server P2 includes logical storage nodes P21, P22, and P23, and storage server P3 includes logical storage nodes P31, P32, and P33. If logical storage nodes P11, P21, and P31 each contain 3 copies of the same data, logical storage nodes P12, P22, and P32 each contain 3 copies of the same data, and logical storage nodes P13, P23, and P33 each contain 3 copies of the same data, then logical storage nodes P11, P21, and P31 are logically one participant; P12, P22, and P32 are logically one participant; and P13, P23, and P33 are logically one participant. Among the multiple copies, one is the primary copy, and the rest are backup copies. For example, P11 is the primary copy for its respective participant, and P12 and P13 are backup copies for their respective participants.
[0115] Two-phase commit is a method designed for transaction committing based on a distributed system architecture. Two-phase commit includes a prepare phase and a commit phase. Specifically, as shown in Figure 2, taking a transaction sent by the business server as an example where the transaction requests include write requests, the prepare phase includes:
[0116] a. After receiving the transaction sent by the business server, the coordinator forwards one or more write requests included in the transaction to the participant where the original data requested in each write request is located. In Figure 2, participant 1 receives the first write request, participant 2 receives the second write request, and participant n receives the nth write request as an example.
[0117] b. After receiving the write request, each participant executes the write request it received. The participant executes the write request on the original data to obtain the target data, but does not replace the original data with the target data; it only temporarily stores the target data.
[0118] c. Participants send operation results to the coordinator. If a participant can successfully obtain the target data based on the original data requested in the write request in step b, the participant sends a successful operation result to the coordinator. If a participant cannot successfully obtain the target data based on the original data requested in the write request in step b, the participant sends a failed operation result to the coordinator. Figure 2 shows an example where participant 1 generates the first operation result based on the execution of the first write request, participant 2 generates the second operation result based on the execution of the second write request, and participant n generates the nth operation result based on the execution of the nth write request.
[0119] The commit phase includes:
[0120] d. The coordinator determines the execution result of the write request based on the operation results sent by each participant and sends a commit instruction or a rollback instruction to each participant. Wherein, the operation result of each participant is...If the operation is successful, the coordinator determines that the execution result of the write request is successful and sends a commit instruction to each participant. If at least one of the operation results of each participant is a failure, the coordinator determines that the execution result of the write request is a failure and sends a rollback instruction to each participant. Figure 2 uses the execution result of the write request as a commit instruction as an example.
[0121] e, each participant executes the received commit instruction or rollback instruction. When the coordinator sends a commit instruction, each participant performs a commit operation, replacing the original data with the target data mentioned above; when the coordinator sends a rollback instruction, each participant performs a rollback operation, deleting the temporarily stored target data mentioned above. As shown in Figure 3, the target data obtained after performing a write operation on the original data A is B. Before receiving the commit instruction or rollback instruction, the target data B is temporarily stored. If a participant performs a commit operation according to the commit instruction, B replaces A. If a participant performs a rollback operation according to the rollback instruction, the temporarily stored target data B is deleted.
[0122] f, Each participant sends a confirmation message to the coordinator, indicating that the commit operation or rollback operation is complete. Figure 2 shows an example where participant 1 generates the first confirmation message, participant 2 generates the second confirmation message, and participant n generates the nth confirmation message.
[0123] After receiving the confirmation messages from each participant, the coordinator returns the execution result of the transaction to the business server.
[0124] The above describes the interaction process between the coordinator and participants in the two-phase commit. In a distributed system, a participant includes one or more replicas of the same data, and the logical storage nodes of each replica of the same data are distributed on different storage servers. Therefore, in the preparation phase, after a participant receives a write request sent by the coordinator, there is an interaction relationship between the multiple replicas in that participant. Specifically, the coordinating server sends the write requests corresponding to each participant to the logical storage node where the primary replica of each participant is located. The storage server where the primary replica is located forwards the write request to the storage server where the backup replica is located. Then, the multiple logical storage nodes that receive the write request execute the operation in the write request and send the operation results of the storage servers where the backup replicas are located to the coordinating server through the storage server where the primary replica is located. During the commit phase, the coordinating server determines whether the write request was successfully executed based on the operation results received from each participant, and sends a commit or rollback command to the primary replica. The primary replica then forwards the received command to the corresponding backup replica. It should be noted that interactions between logical storage nodes and between logical storage nodes and the coordinator are all conducted through the storage servers where each logical storage node resides.
[0125] For example, taking a distributed system with three copies of data as an example, the above write request needs to modify two original data. The first original data is distributed in logical storage nodes P11, P21 and P31. The above three logical storage nodes are located in storage servers P1, P2 and P3 respectively. The second original data is distributed in logical storage nodes P33, P43 and P53. The three logical storage nodes are located in storage servers P3, P4 and P5 respectively. That is, P11, P21 and P31 are one participant, P33, P43 and P53 are one participant, and P11 and P43 store the primary replica. As shown in Figure 4, the interaction process between logical storage nodes in the distributed system during the two-phase commit process is as follows:
[0126] The prepare phase includes:
[0127] a. The coordinating server first sends the first write request to the logical storage node P11 where the primary replica of the first original data is stored, and sends the second write request to the logical storage node P43 where the primary replica of the second original data is stored. The first write request and the second write request are included in the transaction received by the coordinating server. The first write request indicates that the first original data is modified, and the second write request indicates that the second original data is modified.
[0128] b. P11 sends the received first write request to P21 and P31 where the backup replicas are stored, and P43 sends the received second write request to P33 and P53 where the backup replicas are stored.
[0129] c, P11, P21, and P31 respectively execute the corresponding operations in the first write request, and P33, P43, and P53 respectively execute the corresponding operations in the second write request. P21 and P31 send the operation results of the first write request to the storage server P11, and P33 and P53 send the operation results of the second write request to P43. The operation results indicate whether the write request operation was successful or failed.
[0130] P11 determines the execution result of the first write request based on the operation results of P11, P21, and P31, and P43 determines the execution result of the second write request based on the operation results of P33, P43, and P53. Then, P11 and P43 send the execution results of the first and second write requests to the coordination server respectively. Specifically, when the operation results of P11, P21, and P31 are all successful, P11 determines that the execution result of the first write request is successful. When the operation result of any one or more of P11, P21, and P31 is a failure, P11 determines that the execution result of the first write request is a failure. The method for P43 to determine whether the execution result of the second write request is successful or failed is similar.
[0131] The commit phase includes:
[0132] d. The coordinating server sends a commit command or a rollback command to P11 and P43 based on the execution results of the first and second write requests fed back by P11 and P43. Figure 4 uses the execution result of the write request as an example of a commit command.
[0133] e. P11 sends the received commit command or rollback command to P21 and P31, and P43 sends the received commit command or rollback command to P33 and P53. Figure 4 uses a commit command as an example.
[0134] f. P11, P21, P31, P33, P43, and P53 execute the received commit command or rollback command. Specifically, when a commit command is received, each logical storage node performs a commit operation, replacing the original data with the updated target data; when a rollback command is received, each logical storage node performs a rollback operation. Then P21 and P31 send the first confirmation information (commit operation completed or rollback operation completed) to P11, and P33 and P53 send the second confirmation information (commit operation completed or rollback operation completed) to P43.
[0135] During the execution of the above transaction, the coordinator and the participants need to interact twice, and the primary and backup replicas in the same participant need to interact twice, which will result in a long delay in transaction commit. In addition, if the coordination server fails during the execution of the transaction, the resources requested by the storage server during the execution of the transaction cannot be released in time, which will cause the system to be in a blocked state. Other blocked transactions will wait until the resources related to the original transaction request are released.
[0136] This application embodiment provides a transaction commit method, which is applied to the distributed system shown in Figure 1. In this embodiment, the business server sends a transaction to the coordination server. The coordination server sends one or more write requests included in the transaction to the corresponding storage server for execution according to the data distribution information of the distributed system and the transaction data information in the transaction. Each storage server executes the corresponding operation according to the received write request and sends its execution result to the coordination server. The coordination server determines the transaction processing result based on the execution results of each storage server and returns the transaction processing result to the business server. The transaction commit method provided in this application will be described in detail below with reference to the accompanying drawings, focusing on both write and read transaction requests. As shown in Figure 5, when the transaction request is a write request, the transaction commit method includes:
[0137] S301, the business server sends a transaction to the coordination server.
[0138] In this embodiment of the application, the above transaction includes one or more transaction data information and one or more transaction data description pages 11 / 24 17 CN 121009147 AThe identifier, wherein each transaction data information corresponds to a transaction data identifier, each transaction data information indicates an operation on one or more original data in the distributed database, each transaction data information includes the storage location information of the original data and an operator, the storage location information includes an address or a data identifier, and the operator indicates a write operation on the original data.
[0139] The coordination server stores the data distribution information of the distributed system, the data distribution information records the logical storage node where each piece of data in the distributed system is located and the storage server to which each logical storage node belongs. The coordination server can determine the logical storage node where the original data is located in the distributed database and the storage server to which the logical storage node belongs based on the storage location information and the data distribution information of the original data.
[0140] S302, the coordination server generates one or more write requests based on the transactions sent by the business server, and sends each write request to the corresponding storage server.
[0141] After receiving a transaction, the coordination server queries the data distribution information based on the storage location information of the original data in each transaction data information. The query result includes the logical storage node where each copy of the original data indicating the write operation is located and the storage server where each logical storage node is located. Each copy of the original data corresponds to one logical storage node. Based on each transaction data information and the data distribution information, the coordination server determines the query results corresponding to all transaction data information within the transaction. It then merges the query results corresponding to all transaction data information included in the transaction to obtain transaction data distribution information. This transaction data distribution information indicates the storage server where each copy of the original data corresponding to the storage location information in each transaction data information is located.
[0142] After determining the transaction data distribution information, the coordination server generates multiple write requests based on the transaction data information, transaction data identifier, and transaction data distribution information within the transaction. Each write request includes a transaction data information, a transaction data identifier, and the aforementioned transaction data distribution information. Then, each write request is sent to the storage server where each copy of the original data corresponding to the transaction data information included in each write request is located.
[0143] For example, taking a transaction that includes three transaction data messages, each indicating a write operation on one piece of original data as an example, the first transaction data message indicates that the data in the second field of the record in page1 is incremented by 1; the second transaction data message indicates that the data in the fifth field of the record in page2 is incremented by 1; and the third transaction data message indicates that the data in the third field of the record in page3 is decremented by 1. That is, the transaction indicates that three pieces of original data are written.
[0144] Based on the aforementioned data distribution information, the coordination server determines that page1 is located in logical storage node 11 of storage server 1, logical storage node 21 of storage server 2, and logical storage node 31 of storage server 3; page2 is located in logical storage node 12 of storage server 1, logical storage node 22 of storage server 2, and logical storage node 42 of storage server 4; and page3 is located in logical storage node 13 of storage server 1, logical storage node 33 of storage server 3, and logical storage node 43 of storage server 4. The three transaction data identifiers corresponding to these three transaction data information are block1, block2, and block3, respectively. Based on the determined logical storage nodes and storage servers corresponding to each of the three transaction data information, the coordination server determines the transaction data distribution information corresponding to the transaction, as shown in Table 1 below.
[0145] Table 1 Specification 12 / 24 pages 18 CN 121009147 A
[0146]
[0147] After determining the logical storage node and storage server corresponding to each of the above transaction data information, the coordination server generates three write requests based on the three transaction data information, the three transaction data identifiers and the above transaction data distribution information. The first write request includes the above first transaction data information, the three transaction data identifiers and the transaction data distribution information, that is, the first write request indicates that the data of the second field recorded in page1 be incremented by 1; the second write request includes the above second transaction data information, the three transaction data identifiers and the transaction data distribution information, that is, the second write request indicates that the data of the fifth field recorded in page2 be incremented by 1; the third write request includes the above third transaction data information, the three transaction data identifiers and the transaction data distribution information, that is, the third write request indicates that the data of the third field recorded in page3 be decremented by 1. Then the coordinating server sends the first write request to storage server 1, storage server 2, and storage server 3, the second write request to storage server 1, storage server 2, and storage server 4, and the third write request to storage server 1, storage server 3, and storage server 4.
[0148] The coordinating server generates one or more write requests based on the transaction data information in the received transaction, and then, based on the pre-stored data distribution information of the distributed system, sends each write request directly to the storage server where each replica of the original data corresponding to the transaction data information included in each write request is located. This avoids the process where the coordinating server first sends the write request to the storage server where the primary replica of the original data corresponding to the transaction data information is located, and then the primary replica sends the write request to the corresponding backup replica, thus improving the efficiency of sending write requests to each storage server.
[0149] S303. The storage server executes the corresponding write operation according to the received write request.
[0150] After receiving the write request sent by the coordinating server, each storage server executes the corresponding write operation on the original data indicated by the transaction data information in the write request according to the write request it received. For example, after receiving the above-mentioned write request, storage server 1, storage server 2, storage server 3 and storage server 4 perform the corresponding write operation on the original data of the specified field in the transaction data information according to the specific operation indicated by the write request they received. For example, when storage server 1 receives the first write request, the second write request and the third write request, logical storage node 11 in storage server 1 increments the data of the second field of page 1 by 1, logical storage node 12 increments the data of the fifth field of page 2 by 1, and logical storage node 13 decrements the data of the third field of page 3 by 1. Upon receiving the first write request and the second write request, the logical storage node 21 of the storage server 2 increments the data in the second field of page 1 by 1, and the logical storage node 22 increments the data in the fifth field of page 2 by 1. Each storage server temporarily stores the target data obtained after performing the write operation on the original data, but does not replace the original data with the target data.
[0151] S304, the storage server sends the execution result of the write request to the coordination server.
[0152] After the storage server that received the write request performs the write operation on the data in the specified field of the write request corresponding to page 13 / 24 of the specification, CN 121009147 A, it sends the execution result to the coordination server. Each write request corresponds to an execution result, which indicates whether the storage server executed the write request successfully or failed. Successful execution means that the storage server performed the write operation on the original data specified in the write request to obtain the target data, and failure means that the storage server could not perform the write operation on the original data specified in the write request to obtain the target data.
[0153] If the storage server successfully executes the write operation on the specified data in the received write request, it sends the successful execution result of the write request to the coordination server. If the storage server fails to execute the write operation on the specified data in the received write request, it sends the failed execution result of the write request to the coordination server. For example, if the coordination server sends a first write request, a second write request, and a third write request to storage server 1, then storage server 1 needs to return three execution results corresponding to the three write requests to the coordination server. For instance, if the logical storage node 11 in storage server 1 can successfully execute the write operation on the data in page 1, that is, storage server 1 can successfully execute the first write request...If a write request is received, storage server 1 will send the execution result of the first write request being executed successfully to the coordination server; if logical storage node 12 in storage server 1 cannot successfully execute the write operation on the data in page 2, that is, storage server 1 cannot successfully execute the second write request, then storage server 1 will send the execution result of the second write request being executed unsuccessfully to the coordination server.
[0154] S305. The coordination server determines the transaction processing result based on the execution result sent by the storage server and sends the transaction processing result to the business server.
[0155] After receiving the execution results corresponding to each write request sent by each storage server, the coordination server determines the transaction processing result based on the execution results sent by each storage server and sends the transaction processing result to the business server. Specifically, if the coordination server receives that the execution results of each storage server for the received write request are all successful, the coordination server determines that the transaction processing result of the above transaction is successful and sends a message of successful transaction processing to the above business server. If the coordination server receives any one or more execution results as unsuccessful, the coordination server determines that the transaction processing result of the above transaction is unsuccessful and sends a message of unsuccessful transaction processing to the business server. For example, if the execution results sent by storage server 1, storage server 2, and storage server 4 are all successful, but the logical storage node 33 in storage server 3 fails to perform the decrement operation on the data in page 3, that is, the execution of the third write request by storage server 3 fails, then the coordination server will receive an execution result of execution failure sent by storage server 3. The coordination server determines that the transaction processing result of the above write request is a failure and sends a transaction processing failure message to the above business server.
[0156] After the storage server that received the write request executes the received write request, each storage server feeds back the execution result of the write request to the coordination server. The coordination server can determine the transaction processing result of the transaction based on the execution results fed back by each storage server, and then returns the transaction processing result of the above transaction to the business server, thereby realizing a one-stage transaction commit, reducing the latency of write request processing, and improving the processing efficiency of write requests and the working efficiency of the business server.
[0157] After the coordination server determines the transaction processing result based on the execution result sent by the storage server and sends the transaction processing result to the business server, the coordination server does not send a commit instruction or a rollback instruction to each storage server. If a storage server receives a read request after executing a write request, the receiving storage server needs to first determine whether the target data to be read in the received read request is related to the original data to be operated on in the previously executed write request. If they are related, the receiving storage server needs to first determine the context of the previously executed write request.The task requires either a commit operation or a rollback operation, and then executes the received read request after executing the commit operation or rollback operation. The relatedness between the target data to be read in the read request and the original data to be operated on in the write request refers to the following: the target data to be read in the read request is the same as the original data to be operated on in the write request; the target data to be read in the read request overlaps with the original data to be operated on in the write request; the storage location of the target data to be read in the read request overlaps with the storage location of the original data to be operated on in the write request; or the target data to be read in the read request and the original data to be operated on in the write request belong to the same storage area, which can be a data block or a data chunk. The following describes the processing procedure when the storage server receives a read request after executing a write request, in conjunction with Figure 6.
[0158] S601: The coordination server receives the read request sent by the business server and sends the read request to the target storage server.
[0159] The above read request includes the storage location information and operator of the target data to be read. After receiving a read request, the coordination server first queries the data distribution information of the distributed system based on the storage location information of the target data in the read request, and obtains the query result corresponding to the read request. The query result includes multiple logical storage nodes where multiple replicas of the target data to be read by the read request are located, and multiple storage servers where these multiple logical storage nodes are located. Each replica corresponds to one logical storage node, and each logical storage node corresponds to one storage server. Then, the coordination server determines the target storage server from the multiple storage servers included in the query result; and sends the read request to the target storage server. The target storage server is any one of the multiple storage servers where the target data is located. For example, the target storage server may be the one closest to the coordination server among the multiple storage servers where the target data to be read is located, or the one where the coordination server has the fastest access speed among the multiple storage servers where the target data to be read is located.
[0160] S602. The target storage server sends a query request to one or more storage servers according to the read request.
[0161] After receiving the above-mentioned read request, the target storage server determines, based on the read request and one or more previously received write requests, that the target data to be read by the read request is related to the original data to be written by the target write request. Therefore, the target storage server cannot directly read the target data. Instead, the target storage server needs to first determine the transaction processing result of the transaction to which the target write request belongs, and then determine whether to perform a commit operation or a rollback operation based on the transaction processing result to ensure the consistency of multiple copies of the target data to be read by the read request. The target write request includes the target...The target storage server receives one or more write requests before receiving a read request, and in this embodiment, the target write request includes one write request as an example.
[0162] The target storage server determines the multiple storage servers included in the transaction data distribution information in the target write request based on the transaction data identifier and transaction data distribution information in the target write request, and then sends a query request to these multiple storage servers. The query request includes multiple transaction data identifiers contained in the target write request. The query request instructs the storage server to query the execution results of the write requests corresponding to the multiple transaction data identifiers in the query request, and sends the queried execution results to the target storage server.
[0163] S603. The target storage server receives the query results, performs a commit operation or a rollback operation based on the query results, and executes a read request to obtain the target data and send it to the coordination server.
[0164] The target storage server determines the transaction processing result of the transaction to which the target write request belongs based on the execution results returned by multiple storage servers. If the transaction processing result is successful, the target storage server sends a commit instruction to the multiple storage servers included in the transaction data distribution information in the target write request and performs a commit operation on the transaction to which the target write request belongs. If the transaction processing result is unsuccessful, the target storage server sends a rollback instruction to the multiple storage servers included in the transaction data distribution information in the target write request and performs a rollback operation on the transaction to which the target write request belongs. Finally, the received read request is executed, the target data to be read by the read request is obtained, and the target data (as described on pages 15 / 24 of this specification, CN 121009147 A) is sent to the coordinating server.
[0165] For example, the target storage server is storage server 1. After executing the first write request, the second write request, and the third write request, storage server 1 receives a read request. The target data to be read by the read request is located in logical storage node 11. Storage server 1 first determines, based on the transaction data identifier and transaction data distribution information sent by the coordinating server, that the coordinating server sent the first write request, the second write request, and the third write request included in the transaction to which the first write request belongs to storage server 1, storage server 2, storage server 3, and storage server 4. Then, storage server 1 determines the execution result of the first write request, the second write request, and the third write request, and sends a query request to storage server 2, storage server 3, and storage server 4. The query request includes the transaction data identifier block1 corresponding to the first write request, the transaction data identifier block2 corresponding to the second write request, and the transaction data identifier block3 corresponding to the third write request. The query request instructs storage server 2, storage server 3, and storage server 4 to query the query.The transaction data in the request identifies the execution result of the corresponding write request and sends the execution result of each write request to storage server 1. For example, if storage server 2 receives the first write request and the second write request, then storage server 2 queries the execution result of the first write request and the second write request, and sends the two execution results of the first write request and the second write request to storage server 1 respectively.
[0166] After receiving the execution results returned by storage server 2, storage server 3 and storage server 4, if storage server 1, storage server 2, storage server 3 and storage server 4 have all successfully executed their respective received write requests, then storage server 1 performs a commit operation. If any one of storage server 1, storage server 2, storage server 3 or storage server 4 fails to execute a write request, then storage server 1 performs a rollback operation.
[0167] After performing a commit operation or a rollback operation, storage server 1 reads the target data specified in the above read request and sends the read target data to the coordination server. After receiving the target data sent by storage server 1, the coordination server sends the target data to the business server.
[0168] If the storage server receives a read request without sending a commit or rollback command to the storage server, and the target data to be read by the read request is related to the original data to be operated on by a write request previously received by the storage server, the storage server can determine the transaction processing result of the transaction to which the write request belongs based on the transaction data identifier and transaction data distribution information in the write request. Based on the transaction processing result, the storage server performs a commit or rollback operation on the transaction to which the write request belongs, and then executes the received read request. Determining the transaction processing result of the write request through the storage server reduces the amount of data processed by the business server and improves the efficiency of the business server.
[0169] In one possible implementation, after the target storage server receives the above-mentioned read request and determines the above-mentioned target write request, since the coordination server has determined the transaction processing result of the transaction to which the target write request belongs, the target storage server can send a query request to the coordination server to query the transaction processing result of the transaction to which the target write request belongs. If the target storage server receives a successful transaction processing result from the coordinating server, it sends a commit instruction to the multiple storage servers included in the transaction data distribution information of the target write request and performs a commit operation on the transaction to which the target write request belongs. If the target storage server receives a failed transaction processing result from the coordinating server, it sends a rollback instruction to the multiple storage servers included in the transaction data distribution information of the target write request and performs a rollback operation on the transaction to which the target write request belongs. Finally, it executes the received read request.The request is to obtain the target data to be read and send the target data to the coordination server.
[0170] Referring to Figure 7, in the above S305, after the coordination server sends the transaction processing result to the business server, the coordination server can generate operation information based on the execution result of the write request fed back by the storage server that received the write request. The operation information instructs the storage server to perform a commit operation or a rollback operation. If all the execution results fed back by the storage server that received the write request are successful, the coordination server generates the operation information as a commit instruction and sends the commit instruction to each storage server. After receiving the commit instruction sent by the coordination server, each logical storage node in each storage server performs the commit operation. If any one of the execution results fed back by the storage server that received the write request is a failure, the coordination server generates the operation information as a rollback instruction and sends the rollback instruction to each storage server. After receiving the rollback instruction sent by the coordination server, each storage server performs the rollback operation.
[0171] In S302 above, after the coordinating server generates multiple write requests based on the transaction and sends these multiple write requests to some or all of the corresponding multiple storage servers, and before sending the commit instruction or rollback instruction to all of the multiple storage servers, the coordinating server may fail or the network card may experience packet loss, causing the storage server receiving the write request to not receive the commit instruction or rollback instruction sent by the coordinating server. At this time, the storage server receiving the write request needs to determine whether the transaction to which the received write request belongs needs to perform a commit operation or a rollback operation. The execution process of the transaction when the coordinating server fails is described below.
[0172] In this embodiment of the application, the storage server has the ability to detect the failure of the coordinating server. For example, if the storage server receiving the write request executes the operations in S303 and S304 above, and if it does not receive the commit instruction or rollback instruction sent by the coordinating server within a preset time after executing S304 above, then the storage server receiving the write request determines that the coordinating server has failed.
[0173] The storage server that receives the write request determines the multiple storage servers included in the transaction data distribution information based on the transaction data distribution information in the received write request, and then sends a query request to the other storage servers among these multiple storage servers besides itself. The query request includes multiple transaction data identifiers contained in the write request, and the query request instructs the storage server that receives the query request to query the execution of the write request corresponding to the multiple transaction data identifiers in the query request.The execution result is retrieved and sent to the storage server that sent the query request. The storage server that receives the write request generates operation information based on the received execution result.
[0174] The storage server that receives the write request can be any storage server that receives the write request. In this case, each storage server that receives the write request needs to send a query request to other storage servers and then generate operation information based on the received execution result. The storage server that receives the write request can also be any storage server, for example, the first storage server that determines that the coordinating server has failed. When the storage server that receives the write request is a storage server, the first storage server that determines that the coordinating server has failed generates operation information based on the retrieved execution result. After determining whether to perform a commit operation or a rollback operation based on the operation information, it sends the generated operation information to the multiple storage servers included in the transaction data distribution information.
[0175] For example, after determining that the coordinating server has failed, storage server 1 determines that the coordinating server has sent the first write request, the second write request, and the third write request to storage server 1, storage server 2, storage server 3, and storage server 4 based on the transaction data distribution information. Therefore, storage server 1 sends query requests to storage servers 2, 3, and 4, instructing them to query the execution results of the first, second, and third write requests they received, and send the execution results of the write requests back to storage server 1.
[0176] After receiving the execution results returned by storage servers 2, 3, and 4, if all storage servers 1, 2, 3, and 4 have successfully executed their respective received write requests, storage server 1 determines that the transaction processing result is successful. Storage server 1 generates a commit instruction and sends the commit instruction to storage servers 2, 3, and 4, and then executes the commit operation as per page 23 of the specification, CN 121009147 A. If any one or more of the write requests from storage server 1, storage server 2, storage server 3, or storage server 4 fail, storage server 1 determines the transaction processing result as a failure, generates a rollback instruction, and sends the rollback instruction to storage servers 2, 3, and 4, then performs a rollback operation.
[0177] Optionally, when the coordination server fails, some storage servers may receive the message from the coordination server.The storage server that receives the operation information, after receiving a query request from another storage server, determines the write request queried by the query request based on the transaction data identifier in the query request, and then determines the operation information corresponding to the transaction to which the write request belongs, and then sends the operation information to the storage server that sent the query request. For example, if storage server 1 receives a commit instruction from the coordinating server, after storage server 1 receives a query request from another storage server, storage server 1 determines that the transaction to which the write request queried by the query request belongs corresponds to a commit instruction, and then sends a commit instruction to the storage server that sent the query request.
[0178] By sending transaction data distribution information to the storage server, when the storage server detects a failure of the coordinating server, it queries the other storage servers included in the transaction data distribution information for the execution results of the write requests executed by the other storage servers, and then determines whether to perform a commit operation or a rollback operation based on the execution results of the other storage servers. This prevents the storage server from being unable to release the system resources requested by the above-mentioned write request when it has not received the operation information from the coordinating server, which would lead to system blocking and the inability to execute new transactions, and improves the reliability of the system.
[0179] In one specific embodiment, during the execution of a transaction, the storage server may also fail, causing it to be unable to execute a write request or, after executing the write request, to be unable to return the execution result to the coordination server. If the coordination server does not receive the execution result from the storage server within a preset time, it determines that the storage server has failed. At this time, in order to maintain the consistency of the number of data backups in the system, the distributed system will select a replacement storage server from other storage servers to replace the failed storage server, and restore the data in the replacement storage server according to the copy corresponding to the data in the failed storage server. After determining the information of the replacement storage server, the coordination server will resend the corresponding write request to the replacement storage server, and then the replacement storage server that receives the write request will execute the write operation specified in the write request and send the execution result of the write request to the coordination server.
[0180] Continuing with the example of the coordination server sending write requests to storage servers 1, 2, 3, and 4, when storage server 2 fails, the distributed system selects storage server m to replace storage server 2, and restores the data in storage server 2 in storage server m according to the copy corresponding to the data in storage server 2. After determining that storage server m will replace storage server 2, the coordinating server updates the transaction data distribution information, for example, by replacing storage server 2 with storage server m in the transaction data distribution information, and then sends the data to storage server 2.A write request is sent to storage server m, and the updated transaction data distribution information is sent to storage servers 1, 3, and 4. After receiving the write request, storage server m executes the operation specified in the write request, and then sends the execution result after executing the write request to the coordination server. The coordination server determines the transaction processing result based on the execution results of storage servers 1, 3, 4, and m.
[0181] The transaction commit system provided by this application has been described in detail above with reference to Figures 1 to 7. The related devices and equipment for implementing transaction commit according to this application will be described below with reference to Figures 8 to 13. Referring to Figure 8, Figure 8 is a schematic diagram of the structure of a coordination device provided in an embodiment of this application. The coordination device 800 includes a communication unit 810 and a processing unit 820. The communication unit 810 is used to communicate with the business server and the storage server (storage device). Specification page 18 / 24 24 CN 121009147 A
[0182] Communication unit 810 is used to receive a transaction sent by a business server. The transaction includes at least one transaction data information. Each transaction data information includes the storage location information of a copy of the original data on the storage server and a write operator. The information included in the above transaction can be referred to the relevant description in S302 above, and will not be repeated here.
[0183] Processing unit 820 is used to determine transaction data distribution information according to pre-stored data distribution information. The data distribution information indicates the storage server storing each copy of each original data in the transaction processing system, and the transaction data distribution information indicates the storage server storing each copy of the original data corresponding to each transaction data information included in the above transaction.
[0184] Processing unit 820 is also used to generate at least one write request according to the received transaction. Each write request includes the above transaction data distribution information and a transaction data information. The specific operation of processing unit 820 in generating write requests can be referred to the relevant description in S302 above.
[0185] The communication unit 810 is further configured to send each write request to the storage server where the copy of the original data corresponding to the transaction data information included in each write request is located. It also receives the execution result sent by each storage server that received the write request, which is the execution result of the storage server that received the write request operating on the copy of the original data corresponding to the transaction data information included in the received write request. The operation of the communication unit 810 sending each write request to the corresponding storage server can be referenced to the relevant description in S302 above.
[0186] The processing unit 820 is further configured to determine the transaction processing result based on the execution result of the write request sent by each storage server that received the write request. The operation of the processing unit 820 in determining the transaction processing result can be referred to the relevant description in S305 above, and will not be repeated here.
[0187] The communication unit 810 is also used to send the above-mentioned transaction processing results to the business server.
[0188] The coordination device 800 may also include a storage unit 830, which is used to store the above-mentioned data distribution information.
[0189] Specifically, the specific operation of the coordination device 800 to implement distributed transaction submission can refer to the operation performed by the coordination server in the above method embodiment. For example, the processing unit 820 is used to perform the operation performed by the coordination server in S301 to S305 or S601 to S603, which will not be described again here.
[0190] Referring to FIG9, FIG9 is a schematic diagram of the structure of a storage device provided in this application. The storage device 900 includes a communication unit 910 and a processing unit 920. The communication unit 910 is used to communicate with other storage servers (storage devices) and coordination servers (coordination devices).
[0191] The communication unit 910 is used to receive a write request sent by the coordination server. The write request includes transaction data distribution information and a transaction data information. The write request is any one or more write requests generated by the coordination server based on the received transaction. The target storage server is any one of a plurality of storage servers where a copy of the original data corresponding to the transaction data information included in the at least one write request is located. The transaction includes at least one transaction data information, and the transaction data distribution information indicates the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction. The information included in the transaction, the transaction data information, etc., can be referred to the description in S301 above, and will not be repeated here.
[0192] The processing unit 920 operates on the copy of the original data corresponding to the transaction data information included in the write request according to the transaction data information. The communication unit 910 sends the execution result of the write request to the coordination server. The operation performed by the processing unit 920 after receiving the write request can be referred to the operation performed by the storage server in S303 and S304 above, and will not be repeated here.
[0193] The communication unit 910 is further configured to receive a read request sent by the coordination server, the read request including the storage location of the copy of the target data on the storage server and a read operator. Specific information included in the read request can be found in the description in S601 above.
[0194] The processing unit 920, based on the transaction data distribution information in the received write request, queries the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction for the execution results of at least one write request; based on the execution results of the at least one write request obtained from the query, performs a commit operation or a rollback operation; reads the target data according to the storage location of the copy of the target data on the storage device, and forwards the read target data...The data is sent to the coordination server. The specific operation of the processing unit 920 in querying the execution result of the above-mentioned at least one write request can refer to the operation of the target storage server sending a query request to one or more storage servers in S602 above; the method of the processing unit 920 in determining whether to perform a commit operation or a rollback operation based on the execution result fed back by each storage server that received the write request can refer to the description of the target storage server performing a commit operation or a rollback operation based on the query result in S603 above, and will not be repeated here.
[0195] The processing unit 920 is also used to generate operation information based on the execution result of the at least one write request obtained by query, the operation information indicating a commit operation or a rollback operation; the communication unit 910 is also used to send the operation information to the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction. The method of the processing unit 920 in generating operation information can refer to the method of the target storage server generating operation information in S603 above.
[0196] The storage device 900 also includes a storage unit 930, which is used to store the original data to be operated on by the above-mentioned write request and the target data to be read by the read request.
[0197] Specifically, the specific operations of the storage device 900 in implementing distributed factual submission can refer to the operations performed by the storage server in the above method embodiments. For example, the processing unit 920 is used to execute the operations performed by the storage server in S301-S305 or S601-S603, which will not be repeated here.
[0198] Referring to FIG10, FIG10 is a schematic diagram of the structure of a storage device provided in this application. The storage device 1000 includes a communication unit 1010 and a processing unit 1020. The communication unit 910 is used to communicate with other storage servers (storage devices) and coordination servers (coordination devices).
[0199] Communication unit 1010 is used to receive a write request sent by a coordination server. The write request includes transaction data distribution information and a transaction data information. The write request is one of at least one write requests generated by the coordination server based on the received transaction. The storage server is one of a plurality of storage servers where a copy of the original data corresponding to the transaction data information included in the at least one write request is located. The transaction includes at least one transaction data information. Each transaction data information includes the storage location information of a copy of the original data on the storage server and a write operator. The transaction data distribution information indicates the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction. The information included in the transaction, the transaction data information, etc., can be referred to the description in S301 above, and will not be repeated here.
[0200] Processing unit 1020 is used to process the transaction data information corresponding to the write request according to the transaction data information.The processing unit 1020 performs operations on copies of the original data; the communication unit 1010 is also used to send the execution result of the write request to the coordination server. The operations performed by the processing unit 1020 after receiving the write request can refer to the operations performed by the storage server in S303 and S304 above, and will not be repeated here.
[0201] The processing unit 1020 is also used to determine that no operation information is received from the coordination server within a preset time after the execution result of the write request is sent to the coordination server, and according to the transaction data distribution information, to query the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction for the execution result of the at least one write request; according to the execution result of the at least one write request obtained by query, to perform a commit operation instruction manual 20 / 24 pages 26 CN 121009147 A or a rollback operation. The processing unit 1020 performs the operation of querying the execution result of the at least one write request from the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction, based on the transaction data distribution information, and performing the operation based on the execution result of the at least one write request. This can be referred to the operation performed by the storage server after it detects a failure in the coordination server in the above method embodiment, which will not be repeated here.
[0202] The storage device 1000 also includes a storage unit 1030, which is used to store the original data to be operated on by the above write request and the target data to be read by the read request. The processing unit 1020 performs the operation performed by the storage server in S301 to S305 and the operation performed by the storage server after it detects a failure in the coordination server, which will not be repeated here.
[0203] Referring to FIG11, FIG11 is a schematic diagram of the structure of a coordination server provided in an embodiment of this application. The coordination server 1100 includes: one or more processors 1110, a communication interface 1120, and a memory 1130. Optionally, the processor 1110, communication interface 1120, and memory 1130 are interconnected via bus 1140, wherein,
[0204] the processor 1110 is used to implement the operations performed by the processing unit 820. The specific implementation of the various operations performed by the processor 1110 can refer to the specific operations performed by the coordination server as the execution subject in the above method embodiment. For example, the processor 1110 is used to execute the operations of the coordination server in S303 and S304 in Figure 5, etc., which will not be described in detail here.
[0205] The processor 1110 can have various specific implementation forms. For example, the processor 1110 can be a central processing unit (CPU) or a graphics processing unit (GPU), processing...The processor 1110 can also be a single-core processor or a multi-core processor. The processor 1110 can be a combination of a CPU and a hardware chip. The hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 1110 can also be implemented using a logic device with built-in processing logic, such as an FPGA or a digital signal processor (DSP).
[0206] The communication interface 1120 can be a wired interface or a wireless interface for communicating with other modules or devices. The wired interface can be an Ethernet interface, a local interconnect network (LIN), etc., and the wireless interface can be a cellular network interface or a wireless local area network interface, etc.
[0207] In this embodiment, the communication interface 1120 performs the operations implemented by the communication unit 810 described above. For example, it can be used to execute the transaction sent by the service server in S301 described above, or to receive the execution result of the storage server, etc. Specifically, the actions performed by the communication interface 1120 can refer to the actions of coordinating the server to receive or send data in the above method embodiment, which will not be repeated here.
[0208] The memory 1130 can be a non-volatile memory, such as a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or flash memory. The memory 1130 can also be a volatile memory, which can be a random access memory (RAM) used as an external cache.
[0209] The memory 1130 can also be used to store instructions and data so that the processor 1110 can call the instructions stored in the memory 1130 to implement the operations performed by the processing unit 820, such as the operations performed by the coordinating server in the above method embodiment.Furthermore, the coordination server 1100 may contain more or fewer components than those shown in Figure 11, or have different component configurations.
[0210] The bus 1140 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 1140 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in Figure 11, but this does not mean that there is only one bus or one type of bus.
[0211] Optionally, the coordination server 1100 may also include an input / output interface 1150, which is connected to an input / output device for receiving input information and outputting operation results.
[0212] Specifically, the specific implementation of the various operations performed by the coordination server 1100 can be referred to the specific operations performed by the coordination server in the above method embodiments, and will not be repeated here.
[0213] Referring to Figure 12, Figure 12 is a schematic diagram of the structure of a storage server provided in an embodiment of this application. The storage server 1200 includes: one or more processors 1210, a communication interface 1220, and a memory 1230. Optionally, the processors 1210, the communication interface 1220, and the memory 1230 are interconnected via a bus 1240, wherein,
[0214] the processor 1210 is used to implement the operations performed by the processing unit 920. The specific implementation of the various operations performed by the processor 1210 can refer to the specific operations performed by the storage server as the execution subject in the above method embodiment. For example, the processor 1210 is used to execute the operations performed by the storage server in S303 and S304 in Figure 5, or the operations performed by the storage server in S301 to S305, and the operations performed by the storage server after sensing that the coordination server has failed. These will not be described in detail here.
[0215] The processor 1210 can have various specific implementations. For example, the processor 1210 can be a central processing unit or a graphics processing unit. The processor 1210 can also be a single-core processor or a multi-core processor. The processor 1210 can be a combination of a CPU and a hardware chip.
[0216] The communication interface 1220 can be a wired interface or a wireless interface, specifically referring to the communication interface 1120.
[0217] In the embodiments of this application, the communication interface 1220 performs the operations implemented by the communication unit 910 described above. Specifically, it can be used to perform operations such as receiving transaction data identifiers, transaction data information, and transaction data distribution information in S303 described above, or to perform...In S304, the execution result of the storage server is sent to the coordination server, etc. Specifically, the actions performed by the communication interface 1220 can refer to the actions of the storage server receiving or sending in the above method embodiment, and will not be repeated here.
[0218] The memory 1230 can be a non-volatile memory or a volatile memory, specifically referring to the memory 1130.
[0219] The memory 1230 can also be used to store instructions and data so that the processor 1210 can call the instructions stored in the memory 1230 to implement the operations performed by the processing unit 920, such as the operations performed by the storage server in the above method embodiment. In addition, the storage server 1200 may contain more or fewer components than those shown in FIG12, or have different component configurations.
[0220] The bus 1240 can be a PCI bus or an EISA bus, etc., specifically referring to the bus 1140.
[0221] Optionally, the storage server 1200 may also include an input / output interface 1250, which is connected to an input / output device for receiving input information and outputting operation results.
[0222] Specifically, the specific implementation of the various operations performed by the server 1200 can refer to the specific operations performed by the storage server in the above method embodiment, and will not be repeated here.
[0223] Referring to FIG13, FIG13 is a schematic diagram of the structure of a storage server provided in an embodiment of this application. The storage server 1300 includes: one or more processors 1310, communication interface 1320 and memory 1330. Optionally, the processor 1310, communication interface 1320 and memory 1330 are interconnected through bus 1340, wherein,
[0224] The processor 1310 is used to implement the operations performed by the processing unit 920. The specific implementation of the various operations performed by the processor 1310 can refer to the specific operations performed by the storage server as the execution subject in the above method embodiment. For example, the processor 1310 is used to execute the operations performed by the storage server in S301 to S305 in FIG5 above and the operations performed by the storage server after sensing the failure of the coordination server in the above method embodiment specification page 22 / 24 28 CN 121009147 A, and will not be repeated here.
[0225] The processor 1310 can have various specific implementations. For example, the processor 1310 can be a central processing unit or a graphics processing unit. The processor 1310 can also be a single-core processor or a multi-core processor. The processor 1310 can also be a combination of a CPU and a hardware chip.
[0226] The communication interface 1320 can be a wired interface or a wireless interface. For details, please refer to the communication interface 1120.
[0227] In the embodiments of this application, the communication interface 1320 performs the operations implemented by the communication unit 910 described above. Specifically, it can be used to perform...The above-mentioned operations such as receiving transaction data identifiers, transaction data information, and transaction data distribution information in S303 are performed, or the operations such as sending the execution results of the storage server to the coordination server in S304 are performed. Specifically, the actions performed by the communication interface 1320 can refer to the actions of the storage server receiving or sending in the above method embodiment, and will not be repeated here.
[0228] The memory 1330 can be a non-volatile memory or a volatile memory, specifically referring to the memory 1130.
[0229] The memory 1330 can also be used to store instructions and data so that the processor 1310 can call the instructions stored in the memory 1330 to implement the operations performed by the above-mentioned processing unit 820, such as the operations performed by the storage server in the above method embodiment. In addition, the storage server 1300 may contain more or fewer components than those shown in FIG13, or have different component configurations.
[0230] The bus 1340 can be a PCI bus or an EISA bus, specifically referring to the bus 1140.
[0231] Optionally, the storage server 1300 may further include an input / output interface 1350, which is connected to an input / output device for receiving input information and outputting operation results.
[0232] This application embodiment also provides a non-transient computer-readable storage medium, in which a computer program is stored. When the computer program runs on a processor, it can implement the method steps executed by the coordination server in the above method embodiments. The specific implementation of the processor of the computer storage medium in executing the above method steps can refer to the specific operation of the coordination server in the above method embodiments, and will not be repeated here.
[0233] This application embodiment also provides a non-transient computer-readable storage medium, in which a computer program is stored. When the computer program runs on a processor, it can implement the method steps executed by the storage server in the above method embodiments. The specific implementation of the processor of the computer storage medium in executing the above method steps can refer to the specific operation of the storage server in the above method embodiments, and will not be repeated here.
[0234] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0235] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in computer-readable storage.In the storage medium, or from one computer-readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive (SSD). Specification 23 / 24 pages 29 CN 121009147 A
[0236] The steps in the method of the embodiments of this application can be adjusted, merged, or deleted in order according to actual needs; the modules in the device of the embodiments of this application can be divided, merged, or deleted according to actual needs.
[0237] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application. Instruction manual 24 / 24 pages 30 CN 121009147 A Figure 1 Figure 2 Instruction manual Appendix 1 / 7 pages 31 CN 121009147 A Figure 3 Figure 4 Instruction manual Appendix 2 / 7 pages 32 CN 121009147 A Figure 5 Instruction manual Appendix 3 / 7 pages 33 CN 121009147 A Figure 6 Instruction manual Appendix 4 / 7 pages 34 CN 121009147 A Figure 7 Figure 8 Instruction manual Appendix 5 / 7 pages 35 CN 121009147 A Figure 9 Figure 10 Figure 11 Instruction manual Appendix 6 / 7 pages 36 CN 121009147 A Figure 12 Figure 13 Instruction manual Appendix 7 / 7 pages 37 CN 121009147 A Abstract Abdominal ultrasound examination method, system and device TRANSACTION COMMIT SYSTEM, METHOD, AND RELATED DEVICE Abstract Thepresent application provides a transaction commit system, a method, and a related device. The system includes a coordination server and a plurality of storage servers. The coordination server receives a transaction sent by a business server, generates at least one write request according to the transaction, and sends each write request to a storage server that stores data to be operated by the write request. The storage servers that receive the write requests execute the received write requests and respectively send execution results to the coordination server. The coordination server determines a transaction processing result of the transaction based on the execution results of the write requests fed back by the respective storage servers, and sends the transaction processing result to the business server. The coordination server can determine the transaction processing result of the transaction based on the execution results of the write requests sent by the respective storageservers, and return the transaction processing result of the above transaction to the business server, thereby implementing one-phase transaction commit, reducing latency of write request processing, and improving processing efficiency and working efficiency of the business server.
Claims
1. A transaction processing system, characterized in that, This includes a coordination server and multiple storage servers; The coordination server is configured to receive transactions, each transaction including at least one transaction data information, each transaction data information including the storage location information of a copy of the original data on a storage server and a write operator; determine transaction data distribution information based on pre-stored data distribution information, wherein the data distribution information indicates the storage server storing each copy of each original data in the transaction processing system, and the transaction data distribution information indicates the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction; generate at least one write request, each write request including the transaction data distribution information and a transaction data information; and send each write request to the storage server where the copy of the original data corresponding to the transaction data information included in each write request is located. The storage server that receives any write request stores the transaction data distribution information; operates on a copy of the original data corresponding to the transaction data information included in the write request; and sends the execution result of the write request to the coordination server. The coordination server is further configured to determine the transaction processing result of the transaction based on the execution result of the write request sent by each storage server that received the write request, and send the transaction processing result to the business server. The coordination server is further configured to determine, based on the execution result of the write request sent by each storage server that received the write request, operation information that each storage server that received the write request needs to perform, the operation information indicating whether to perform a commit operation or a rollback operation, and to send the operation information to each storage server that received the write request.
2. The transaction processing system as described in claim 1, characterized in that, The coordination server is also configured to receive read requests, the read requests including the storage location of a copy of the target data on the storage server and a read operator; and to determine the storage server storing the copy of the target data based on the data distribution information. The read request is sent to the storage server that stores a copy of the target data; The storage server that receives the read request is configured to query the execution result of the write request from each storage server that received the write request, based on the transaction data distribution information. Based on the execution result of the write request sent by each storage server that received the write request, determine whether to perform a commit operation or a rollback operation; After performing the commit operation or the rollback operation, the target data is read from the storage location on the storage server according to the copy of the target data; The read target data is sent to the coordination server.
3. The transaction processing system as described in claim 2, characterized in that, The storage server that receives the read request is further configured to generate operation information based on the execution result of the write request, the operation information indicating a commit operation or a rollback operation, and send the operation information to each storage server that received the write request.
4. The transaction processing system as described in claim 2 or 3, characterized in that, The storage location of the target data copy on the storage server overlaps with the storage location of the original data copy on the storage server, or the target data copy and the original data copy are stored in data blocks that need to maintain consistency.
5. The transaction processing system as described in claim 2 or 3, characterized in that, The coordination server is configured to determine, based on the data distribution information, multiple storage servers storing copies of the target data; and select a target storage server from the determined multiple storage servers storing copies of the target data. The read request is sent to the target storage server.
6. The transaction processing system as described in claim 1, characterized in that, The storage server that receives the write request is further configured to determine that it has not received the operation information sent by the coordination server within a preset time after sending the execution result of the operation to the coordination server, and query the storage server that stores each copy of the original data corresponding to each transaction data information included in the transaction for the execution result of the write request according to the transaction data distribution information; Based on the execution result, determine whether to perform the commit operation or the rollback operation.
7. A transaction processing method, characterized in that, Applied to a transaction processing system including a coordination server and multiple storage servers, the method includes: The coordination server receives transactions sent by the business server. Each transaction includes at least one transaction data information, and each transaction data information includes the storage location information of a copy of the original data on the storage server and a write operator. The coordination server determines the transaction data distribution information based on the pre-stored data distribution information, wherein the data distribution information indicates the storage server that stores each copy of each original data in the transaction processing system, and the transaction data distribution information indicates the storage server that stores each copy of the original data corresponding to each transaction data information included in the transaction; The coordination server generates at least one write request, each write request including the transaction data distribution information and a transaction data information; The coordination server sends each write request to the storage server where the copy of the original data corresponding to the transaction data information included in each write request is located; Upon receiving any write request, the storage server stores the transaction data distribution information, operates on a copy of the original data corresponding to the transaction data information included in the write request, and sends the execution result of the write request to the coordination server. The coordination server determines the transaction processing result based on the execution result of the write request sent by each storage server that received the write request, and sends the transaction processing result to the business server. The coordination server determines the operation information that each storage server that received the write request needs to perform based on the execution result of the write request sent by each storage server that received the write request. The operation information indicates whether to perform a commit operation or a rollback operation. The coordination server sends the operation information to each storage server that receives the write request.
8. The method as described in claim 7, characterized in that, The method further includes: The coordination server receives a read request sent by the business server, the read request including the storage location of a copy of the target data on the storage server and a read operator; The coordination server determines the storage server storing the copy of the target data based on the data distribution information, and sends the read request to the storage server storing the copy of the target data. The storage server that receives the read request queries the execution result of the write request from each storage server that received the write request, based on the transaction data distribution information; and determines whether to perform a commit operation or a rollback operation based on the execution result of the write request sent by each storage server that received the write request. Upon receiving the read request, the storage server reads the target data from its storage location on the storage server based on a copy of the target data, and then sends the read target data to the coordination server.
9. The method as described in claim 8, characterized in that, The method further includes: The storage server that receives the read request generates operation information based on the execution result of the write request, and sends the operation information to each storage server that received the write request. The operation information indicates whether to commit the operation or rollback the operation.
10. The method as described in claim 8 or 9, characterized in that, The storage location of the target data copy on the storage server overlaps with the storage location of the original data copy on the storage server, or the target data copy and the original data copy are stored in data blocks that need to maintain consistency.
11. The method as described in claim 8 or 9, characterized in that, The coordination server determines the storage server storing the copy of the target data based on the data distribution information, and sends the read request to the storage server storing the copy of the target data, including: The coordination server determines multiple storage servers that store copies of the target data based on the data distribution information. The coordination server selects a target storage server from the determined plurality of storage servers storing copies of the target data, and sends the read request to the target storage server.
12. The method as described in claim 7, characterized in that, The method further includes: If the storage server that received the write request does not receive the operation information from the coordination server within a preset time after determining that it has sent the execution result of the operation to the coordination server, it queries the storage server that stores each copy of the original data corresponding to each transaction data information included in the transaction for the execution result of the write request according to the transaction data distribution information. The storage server that receives the write request determines whether to perform the commit operation or the rollback operation based on the execution result.
13. A transaction processing method, characterized in that, The method includes: The coordination server receives transactions sent by the business server. The transactions include at least one transaction data information, and each transaction data information includes the storage location information of a copy of the original data on the storage server and a write operator. The coordination server determines the transaction data distribution information based on the pre-stored data distribution information, wherein the data distribution information indicates the storage server that stores each copy of each original data in the transaction processing system, and the transaction data distribution information indicates the storage server that stores each copy of the original data corresponding to each transaction data information included in the transaction; The coordination server generates at least one write request, each write request including the transaction data distribution information and a transaction data information; The coordination server sends each write request to the storage server where the copy of the original data corresponding to the transaction data information included in each write request is located; The coordination server receives the execution result of the write request from each storage server that received the write request; The coordination server determines the transaction processing result of the transaction based on the execution result of the write request sent by each storage server that received the write request, and sends the transaction processing result to the business server. The coordination server determines the operation information that each storage server that received the write request needs to perform based on the execution result of the write request sent by each storage server that received the write request. The operation information indicates whether to perform a commit operation or a rollback operation. The coordination server sends the operation information to each storage server that receives the write request.
14. A transaction processing method, characterized in that, The method includes: The storage server receives a write request sent by the coordination server. The write request includes transaction data distribution information and a transaction data information. The write request is one of at least one write requests generated by the coordination server based on the received transaction. The storage server is one of a plurality of storage servers where a copy of the original data corresponding to the transaction data information included in the at least one write request is located. The transaction includes at least one transaction data information. Each transaction data information includes the storage location information of a copy of the original data on the storage server and a write operator. The transaction data distribution information indicates the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction. The storage server operates on a copy of the original data corresponding to the transaction data information included in the write request based on the transaction data information, and sends the execution result of the write request to the coordination server; The storage server receives a read request sent by the coordination server, the read request including the storage location of a copy of the target data on the storage server and a read operator; The storage server queries the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction for the execution result of the at least one write request based on the transaction data distribution information. The storage server performs a commit operation or a rollback operation based on the execution result of the at least one write request obtained from the query.
15. The method as described in claim 14, characterized in that, The method further includes: The storage server generates operation information based on the execution results of the at least one write request obtained from the query, and the operation information indicates a commit operation or a rollback operation. The storage server sends the operation information to each storage server that stores a copy of the original data corresponding to each transaction data information included in the transaction.
16. The method as described in claim 14 or 15, characterized in that, The storage location of the target data copy on the storage server overlaps with the storage location of the original data copy on the storage server, or the target data copy and the original data copy are stored in data blocks that need to maintain consistency.
17. A coordination device, characterized in that, The coordination device includes: A communication unit is used to receive transactions sent by a business server. The transaction includes at least one transaction data information, and each transaction data information includes the storage location information of a copy of the original data on the storage server and a write operator. The processing unit is configured to determine transaction data distribution information based on pre-stored data distribution information, wherein the data distribution information indicates the storage server in the transaction processing system that stores each copy of each original data, and the transaction data distribution information indicates the storage server that stores each copy of the original data corresponding to each transaction data information included in the transaction; Generate at least one write request, each write request including the transaction data distribution information and a transaction data information; The communication unit is also used to send each write request to the storage server where the copy of the original data corresponding to the transaction data information included in each write request is located; Receive the execution result of the write request sent by each storage server that received the write request; The processing unit is further configured to determine the transaction processing result of the transaction based on the execution result of the write request sent by each storage server that received the write request; The communication unit is also used to send the transaction processing result to the business server; The communication unit is further configured to determine, based on the execution result of the write request sent by each storage server that received the write request, operation information that each storage server that received the write request needs to perform, the operation information indicating whether to perform a commit operation or a rollback operation, and to send the operation information to each storage server that received the write request.
18. The apparatus as claimed in claim 17, characterized in that, The processing unit is further configured to determine the operation information that each storage server receiving the write request needs to perform based on the execution result of the write request sent by each storage server that received the write request, wherein the operation information indicates whether to perform a commit operation or a rollback operation. The communication unit is used to send the operation information to each storage server that receives the write request.
19. A storage device, characterized in that, The device includes: A communication unit is used to receive a write request sent by a coordination server. The write request includes transaction data distribution information and a transaction data information. The write request is one of at least one write requests generated by the coordination server based on the received transaction. The storage server is one of a plurality of storage servers where a copy of the original data corresponding to the transaction data information included in the at least one write request is located. The transaction includes at least one transaction data information. Each transaction data information includes the storage location information of a copy of the original data on the storage server and a write operator. The transaction data distribution information indicates the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction. The processing unit operates on a copy of the original data corresponding to the transaction data information included in the write request, based on the transaction data information. The communication unit is also used to send the execution result of the write request to the coordination server; and to receive a read request sent by the coordination server, wherein the read request includes the storage location of the copy of the target data on the storage server and the read operator; The processing unit is further configured to query the execution result of the at least one write request from the storage server storing each copy of the original data corresponding to each transaction data information included in the transaction, based on the transaction data distribution information; Based on the execution result of the at least one write request obtained from the query, perform a commit operation or a rollback operation.
20. The apparatus as claimed in claim 19, characterized in that, The processing unit is further configured to generate operation information based on the execution result of the at least one write request obtained from the query, wherein the operation information indicates a commit operation or a rollback operation. The communication unit is further configured to send the operation information to a storage server that stores a copy of the original data corresponding to each transaction data information included in the transaction.
21. The apparatus as claimed in claim 19 or 20, characterized in that, The storage location of the target data copy on the storage server overlaps with the storage location of the original data copy on the storage server, or the target data copy and the original data copy are stored in data blocks that need to maintain consistency.
22. A coordination server, characterized in that, It includes a processor and a memory; the memory is used to store instructions, and the processor is used to execute the instructions, wherein when the processor executes the instructions, the processor performs the method as described in claim 13.
23. A storage server, characterized in that, It includes a processor and a memory; the memory is used to store instructions, and the processor is used to execute the instructions, wherein when the processor executes the instructions, the processor performs the method as described in any one of claims 14 to 16.
24. A non-transient computer-readable storage medium storing a computer program that, when executed by a coordination server, implements the method of claim 13.
25. A non-transient computer-readable storage medium storing a computer program that, when executed by a storage server, implements the method as described in any one of claims 14 to 16.