A method and system for erasure code batch recovery oriented to a distributed storage system

By dividing stripes into odd and even batches and using a method of forward and reverse parallel transmission, the high time overhead and bandwidth consumption problems in traditional erasure coding recovery methods are solved, and efficient recovery and load balancing of distributed storage systems are achieved.

CN114741232BActive Publication Date: 2026-04-10BEIJING INFORMATION SCI & TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING INFORMATION SCI & TECH UNIV
Filing Date
2022-04-26
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In large-scale distributed storage systems, traditional erasure coding recovery methods result in high time overhead and significant cross-rack bandwidth consumption, failing to effectively improve recovery efficiency and load balancing.

Method used

By dividing the stripe into odd-numbered and even-numbered batches, and further dividing it into smaller batches based on the number of source racks and the number of idle racks, data recovery is performed using a method of forward and reverse parallel transmission, and the recovered data blocks are calculated using decoding coefficients.

Benefits of technology

It improves the recovery efficiency and load balancing of distributed storage systems, reduces the amount of data transmission and bandwidth usage during recovery, and enhances the overall recovery performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114741232B_ABST
    Figure CN114741232B_ABST
Patent Text Reader

Abstract

The application provides a method and system for erasure code batch recovery of a distributed storage system, comprising: dividing the strips to be recovered in the distributed storage cluster into odd batches and even batches according to the number of source racks of the strips, dividing the strips with the same source rack in the odd batches and the even batches into small batches, determining the number of strips recovered in a single batch according to the number of idle racks in the small batches, and dividing the strips in the small batches into single batches in sequence; reading and recording the idle rack numbers in the single batches, assigning idle racks to store replacement nodes for each strip in sequence according to the idle rack numbers and the total number of idle racks, and recovering each single batch in turn according to the corresponding data recovery scheme selected according to whether the single batch currently selected is an odd batch or an even batch.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the data recovery problem of distributed storage system, and in particular to a kind of batch recovery method for distributed storage system oriented erasure code to improve recovery efficiency, belong to the field of distributed computing. BACKGROUND

[0002] With the rapid development of Internet technology, we have entered the era of big data, and the way of data storage has gradually changed from single machine storage to distributed storage. The most popular big data open source framework is Hadoop, a big data platform that can process massive data offline in parallel, with high reliability, high scalability, high efficiency, low cost, open source and other characteristics, and has become the preferred massive data processing solution for many Internet companies. Hadoop mainly includes Hadoop distributed file system (HDFS), MapReduce distributed computing framework and Yarn resource manager. Although Hadoop has been relatively mature so far, there are still some deficiencies that need to be improved and optimized.

[0003] Distributed clusters (such as Hadoop) are usually composed of many independent low-reliability commercial components, and component failures are common. In order to ensure the high reliability and availability of data in such distributed storage systems, the common way is to use three copies or erasure code. Among them, erasure code provides fault tolerance close to multiple copies as a solution, and has lower storage overhead. However, using erasure code to recover a failed block in a stripe requires retrieving available blocks in multiple source racks, which results in high recovery cost. Although erasure codes improve storage efficiency, they significantly increase disk I / O and network bandwidth occupancy for fault recovery.

[0004] In the field of data recovery, traditional single-stripe multi-node recovery can meet the data recovery needs to a certain extent. However, in actual large-scale distributed storage systems, a large number of stripes and racks are arranged in data centers. This traditional recovery method inevitably leads to high time overhead problem of large-scale multi-stripe data recovery, and also occupies a large amount of cross-rack bandwidth. Usually, the available cross-rack bandwidth of each node is only 1 / 20 to 1 / 5 of the internal rack bandwidth. SUMMARY

[0005] The present application provides a kind of erasure code data batch parallel recovery method, target is when there is data loss in distributed system, by large-scale batch recovery of each strip data, to improve the recovery efficiency of entire system and load balancing when recovering.This method divides each strip into different batches according to the number of source rack (provides data block to participate in data recovery rack) in strip to carry out recovery, and different recovery schemes are set according to the odd number of source rack.In addition, the method also increases reverse parallel transmission on the basis of traditional RS erasure code parallel transmission recovery.

[0006] Specifically, the present application proposes a kind of distributed storage system-oriented erasure code batch recovery method, wherein includes:

[0007] Step 1, according to the number of source rack, the strip to be recovered in distributed storage cluster is divided into odd batch and even batch, the strip with same source rack in odd batch and even batch is divided into small batch, according to the number of idle rack in small batch, the number of strip in single batch is determined, and the strip in small batch is divided into single batch according to order;

[0008] Step 2, read and record the number of idle rack in single batch, according to the number of idle rack and total number of idle rack, idle rack storage replacement node is specified for each strip in order, judge whether the single batch selected currently belongs to even batch, if yes, execute step 3, otherwise execute step 4;

[0009] Step 3, two two groupings of source rack in single batch, in forward parallel transmission, the source data block in the rack with smaller number in two racks of the same group in the first strip of single batch is aggregated and transmitted to the rack with larger number, and then the source data block in the rack with larger number is aggregated, the rack with larger number is marked as * rack;Two two groups are combined, and the aggregated data block is transmitted from the * rack with smaller number to the * rack with larger number, at this time, the rack with smallest number cancels the mark, until all aggregated source data blocks of source rack are transmitted to the rack with largest number, and then aggregated and transmitted to the replacement node, through decoding coefficient calculation, the data block to be recovered is obtained;

[0010] Step 4, grouping the source racks in the single batch except the last one in pairs, in the forward parallel transmission, aggregating and transmitting the source data blocks in the smaller numbered rack in the same group in the first strip of the single batch to the larger numbered rack, and then aggregating with the source data blocks in the larger numbered rack; marking the larger numbered rack as a * rack, and then merging the groups in pairs, transmitting the aggregated data blocks from the larger * rack to the smaller * rack, at this time the larger rack cancels the * mark, until the aggregated source data blocks of all source racks are transmitted to the second largest numbered source rack, and then aggregated and transmitted together to the replacement node; directly transmitting the data of the largest numbered source rack to the replacement node, and obtaining the data blocks to be recovered through decoding coefficient calculation.

[0011] The method for batch recovery of erasure codes for a distributed storage system, wherein step 3 further comprises, if the single batch also has a second strip, executing a reverse parallel transmission at the same time as the forward parallel transmission, the reverse parallel transmission comprising:

[0012] aggregating and transmitting the source data blocks in the larger numbered rack in the same group to the smaller numbered rack in the second strip, and then aggregating with the source data blocks in the smaller numbered rack; marking the smaller numbered rack as a * rack; then merging the groups in pairs, transmitting the aggregated data blocks from the larger * rack to the smaller * rack, at this time the larger rack cancels the * mark, until the aggregated source data blocks of all source racks are transmitted to the smallest numbered source rack, and then aggregated and transmitted together to the designated idle rack; and finally using decoding coefficient calculation to obtain the data blocks to be recovered.

[0013] The method for batch recovery of erasure codes for a distributed storage system, wherein step 4 further comprises, if the single batch also has a second strip, executing a reverse parallel transmission at the same time as the forward parallel transmission, the reverse parallel transmission comprising:

[0014] aggregating and transmitting the source data blocks in the larger numbered rack in the same group to the smaller numbered rack in the second strip, and then aggregating with the source data blocks in the smaller numbered rack; marking the smaller numbered rack as a * rack; then merging the groups in pairs, transmitting the aggregated data blocks from the larger * rack to the smaller * rack, at this time the larger rack cancels the * mark, until the aggregated source data blocks of all source racks are transmitted to the smallest numbered source rack, and then aggregated and transmitted together to the designated idle rack; and finally using decoding coefficient calculation to obtain the data blocks to be recovered.

[0015] The method for batch recovery of erasure codes for a distributed storage system, wherein step 1 comprises:

[0016] If the number of idle racks t is greater than or equal to 4, the number of strips in a single batch recovery is set to 4, otherwise the number of strips in a single batch recovery is set to t.

[0017] The application further provides a distributed storage system-oriented erasure code batch recovery system, which comprises:

[0018] An initial module is configured to divide the strips to be recovered in the distributed storage cluster into odd batches and even batches according to the number of source racks of the strips, divide the strips with the same source rack in the odd batches and the even batches into small batches, determine the number of strips in a single batch recovery according to the number of idle racks in the small batches, and divide the strips in the small batches into single batches in sequence.

[0019] A judgment module is configured to read and record the idle rack numbers in a single batch, assign idle racks to store replacement nodes for each strip in sequence according to the idle rack numbers and the total number of idle racks, and judge whether the selected single batch belongs to an even batch, and if yes, call the first decoding module, otherwise execute the second decoding module.

[0020] The first decoding module is configured to group the source racks in a single batch two by two, aggregate and transmit the source data blocks in the smaller-numbered rack in the same group to the larger-numbered rack in the first strip of the single batch in forward parallel transmission, aggregate the source data blocks in the larger-numbered rack, and mark the larger-numbered rack as a * rack; then combine the two groups, transmit the aggregated data blocks from the smaller-numbered * rack to the larger-numbered * rack, cancel the * mark of the smaller-numbered rack at this time, until the aggregated source data blocks of all source racks are transmitted to the largest-numbered source rack, and then aggregate and transmit them to the replacement node together, and obtain the data blocks to be recovered through decoding coefficient calculation.

[0021] The second decoding module is configured to group the source racks in a single batch two by two except the last largest-numbered source rack, aggregate and transmit the source data blocks in the smaller-numbered rack to the larger-numbered rack in the same group in the first strip of the single batch in forward parallel transmission, aggregate the source data blocks in the larger-numbered rack, mark the larger-numbered rack as a * rack, combine the two groups, transmit the aggregated data blocks from the smaller-numbered * rack to the larger-numbered * rack, cancel the * mark of the smaller-numbered rack at this time, until the aggregated source data blocks of all source racks are transmitted to the second largest-numbered source rack, and then aggregate and transmit them to the replacement node together; directly transmit the data of the largest-numbered source rack to the replacement node, and obtain the data blocks to be recovered through decoding coefficient calculation.

[0022] The distributed storage system-oriented erasure code batch recovery system, wherein the first decoding module is further configured to, if the single batch still has a second strip, execute reverse parallel transmission while executing the forward parallel transmission, and the reverse parallel transmission comprises:

[0023] The source data blocks in the larger numbered rack of the two racks in the same group in the second strip are aggregated and transmitted to the smaller numbered rack, and then aggregated with the source data blocks in the smaller numbered rack, and the smaller numbered rack is marked as a rack; then the groups are merged two by two, and the aggregated data blocks are transmitted from the larger numbered rack to the smaller numbered rack, at which time the larger numbered rack cancels the mark, until all the aggregated source data blocks of the source racks are transmitted to the smallest numbered source rack, and then aggregated and transmitted together to the designated idle rack, and the data blocks to be recovered are calculated by using the decoding coefficients.

[0024] The erasure code batch recovery system for the distributed storage system, wherein the second decoding module is further configured to, if the second strip also exists in the single batch, perform reverse parallel transmission while performing the forward parallel transmission, and the reverse parallel transmission comprises:

[0025] The source data blocks in the larger numbered rack of the two racks in the same group in the second strip are aggregated and transmitted to the smaller numbered rack, and then aggregated with the source data blocks in the smaller numbered rack, and the smaller numbered rack is marked as a rack; then the groups are merged two by two, and the aggregated data blocks are transmitted from the larger numbered rack to the smaller numbered rack, at which time the larger numbered rack cancels the mark, until all the aggregated source data blocks of the source racks are transmitted to the smallest numbered source rack, and then aggregated and transmitted together to the designated idle rack; the largest numbered source rack directly transmits data to the designated idle rack, and finally the data blocks to be recovered are calculated by using the decoding coefficients.

[0026] The erasure code batch recovery system for the distributed storage system, wherein the initial module is configured to, if the number t of idle racks is greater than or equal to 4, set the number L of strips recovered in a single batch as 4, or otherwise set the number L of strips recovered in a single batch as t.

[0027] The application further provides a storage medium for storing a program for executing any one of the erasure code batch recovery methods for the distributed storage system.

[0028] The application further provides a client for the erasure code batch recovery system for the distributed storage system.

[0029] From the above scheme, the application has the advantages that: a distributed storage system-oriented erasure code data batch parallel recovery method is provided, first, according to the source rack of each stripe, the parity large batch and the small batch with the same source rack are divided, and then the single batch is divided according to the number of idle racks and the idle rack where the replacement node of each stripe is determined. Then, the data recovery scheme is selected according to the batch to recover. Through the batch parallel recovery method provided by the application, the recovery efficiency and load balancing of the entire system of the distributed cluster are improved, and the data transmission amount and bandwidth occupation during recovery are reduced. BRIEF DESCRIPTION OF DRAWINGS

[0030] Figure 1 The batch scheme diagram of an embodiment of the application;

[0031] Figure 2 The flowchart of data batch recovery of the application. DETAILED DESCRIPTION

[0032] Specifically, the application comprises the following steps:

[0033] A. Determine the recovery batch according to the number of source racks of each stripe:

[0034] A1. According to the number of source racks of the stripe in the distributed cluster, divide into two large batches: odd batch and even batch. For example: in the example of the table, the data blocks of the first stripe have four racks (rack two, three, four and five) involved in data recovery, so the number of source racks of the first stripe is four, which belongs to the even large batch of stripes. The data blocks of the sixth stripe have five racks (rack two, three, four, five and six) involved in data recovery, so the number of source racks of the sixth stripe is five, which belongs to the odd large batch of stripes. Figure 1

[0035] A2. According to whether the source racks are the same, respectively divide the stripes with the same source racks into the same recovery small batch in the two large batches. For example: in the example of the table, there are five stripes (stripes one, two, three, four and five) in the confirmed even large batch, among which the source racks of the first, second and third stripes are rack two, three and four, five, and these stripes with the same source racks are divided into a recovery small batch. The source racks of the fourth and fifth stripes are rack one, two, three and four, which is another recovery small batch. Figure 1

[0036] A3. According to the number of idle racks (racks that do not store any data of the current small batch and can store the new data blocks after recovery) in the small batch, set the number of stripes for single batch recovery, and divide the stripes in the recovery small batch into single batches according to the order from small to large.

[0037] B. Determine the idle rack where the replacement node (the node used to place new data blocks) is located based on the batch divided in step A:​​

[0038] B1. Read and record the ID of the idle rack in a single batch.

[0039] B2. According to the idle rack determined in step B1 and the number of strips in step A3, assign the idle rack to store the replacement node for each strip in turn.

[0040] C. Select a data parallel recovery scheme according to the batches divided in step A.

[0041] C1. Determine whether the recovery single batch belongs to an even large batch or an odd large batch.

[0042] C2. According to the result of step C1, select a data recovery scheme.

[0043] D. Recover each single batch in turn according to the data recovery scheme selected in step C.

[0044] In order to make the above features and effects of the present application more explicit and easy to understand, the following embodiments are described in detail below, with reference to the accompanying drawings.

[0045] The steps of the present application are further described below in conjunction with the accompanying Figure 1 , 2 , which include: A. determining recovery batches according to the number of source racks of each strip; B. determining the idle rack where the replacement node is located based on the batches divided in step A; C. selecting a data parallel recovery scheme according to the batches divided in step A; D. recovering according to the data recovery scheme selected in step C. A specific implementation is as follows:

[0046] A. Determine recovery batches according to the number of source racks of each strip.

[0047] A1. According to whether the number of source rack of the strip in the distributed cluster is even or odd, divide the strips to be recovered into two batches of odd large batches and even large batches, as shown in Figure 1 .

[0048] A2. According to whether the source racks of each strip are the same, divide the strips with the same source racks in the two large batches into small batches.

[0049] A3. According to the number of idle racks in the small batch, set the number of strips recovered in a single batch, and divide the strips in the small batch into single batches in order.

[0050] A3-1. If the number of idle racks t ≥ 4, set the number of strips recovered in a single batch L as 4.

[0051] A3-2. If the number of idle racks 0 < t < 4, set the number of strips recovered in a single batch L as t.

[0052] B. Determine the free rack where the replacement node is located based on the batch divided in step A.

[0053] B1. Read and record the ID of the free rack in a single batch.

[0054] B1-1. Traverse the strip and record the free rack position and ID.

[0055] B2. According to the rack ID determined in step B1 and the number of strips t that have been set in step A3, assign a free rack to each strip in order from small to large to store the recovered new data block, and the free rack where the new data block is located is the replacement node. The replacement node is the free rack where the new data block is located, and all the data blocks needed for recovery are aggregated and transmitted to the replacement node for calculation to obtain the recovered new data block, and the location of the new data block is the replacement node, i.e. the designated free rack.

[0056] In specific embodiments, there are two cases, whether the number of free racks t is greater than or equal to 4, if 0 < t < 4, then the number of strips in the recovery single batch is the number of free racks, so the value of the number of strips in the recovery single batch is equal to t. If t ≥ 4, then the value of the number of strips in the recovery single batch is equal to 4.

[0057] B2-1. According to the above conditions, the number of strips to be recovered in the single batch has been determined, and the corresponding free rack has also been determined. We specify that the first strip of the single batch is recovered to the first free rack recorded, the second strip is recovered to the second free rack recorded, and so on, according to the order of the number of each strip to assign a free rack to store the recovered data block.

[0058] For example: In the first recovery single batch (strip one and strip two) in Figure 1 the number of free racks is two, according to the order from small to large, the recovered data block of strip one is stored in free rack one, and the replacement node of strip one is rack one. The recovered data block of strip two is stored in free rack six, and the replacement node of strip two is rack six.

[0059] C. Select a data parallel recovery scheme according to the batch divided in step A.

[0060] C1. Read the single batch divided in step A, determine whether it belongs to an odd large batch or an even large batch, and record it.

[0061] C2. According to the results of step C1, select a data recovery scheme for each single batch.

[0062] D. According to the data recovery scheme selected in step C, perform batch recovery in order from single batch one.

[0063] D1. If it is an even batch data recovery scheme, the number of source racks in a stripe is even, and the source racks are divided into groups of two. For example Figure 2 The two source racks N2 and N3 in the above are divided into a group, and the two source racks N4 and N5 are divided into a group.

[0064] In forward parallel transmission, the source data blocks in the smaller-numbered rack of the same group in the first stripe of the single batch are aggregated and transmitted to the larger-numbered rack, and then aggregated with the source data blocks in the larger-numbered rack. The larger-numbered rack is marked as a * rack. Then the two groups are combined, and the aggregated data blocks are transmitted from the smaller-numbered * rack to the larger-numbered * rack. At this time, the smaller-numbered * rack is unmarked. This process is repeated until the aggregated source data blocks of all source racks are transmitted to the largest-numbered source rack, and then aggregated and transmitted to the replacement node of the stripe. The data blocks to be recovered are calculated using the decoding coefficients. For example Figure 2 The source data blocks in the smaller-numbered N2 rack are aggregated and transmitted to the larger-numbered N3 rack, and then aggregated with the source data blocks in the N3 rack. At this time, the N3 rack is marked as a * rack. Then the N2 and N3 groups are combined with the N4 and N5 groups, and the aggregated data blocks are transmitted from the smaller-numbered N3 * rack to the larger-numbered N5 * rack. At this time, the N3 * rack is unmarked and becomes the N3 rack. This process is repeated until the aggregated source data blocks of all source racks are transmitted to the largest-numbered source rack, which is the N5 rack. Finally, all the data in the largest-numbered N5 rack are aggregated and transmitted to the designated N6 idle rack. The data blocks to be recovered are calculated using the decoding coefficients.

[0065] In reverse parallel transmission, the source data blocks in the larger-numbered rack of the same group in the second stripe are aggregated and transmitted to the smaller-numbered rack, and then aggregated with the source data blocks in the smaller-numbered rack. The smaller-numbered rack is marked as a * rack. Then the two groups are combined, and the aggregated data blocks are transmitted from the larger-numbered * rack to the smaller-numbered * rack. At this time, the larger-numbered * rack is unmarked. This process is repeated until the aggregated source data blocks of all source racks are transmitted to the smallest-numbered source rack, and then aggregated and transmitted to the designated idle rack. Finally, the data blocks to be recovered are calculated using the decoding coefficients. The forward parallel transmission and the reverse parallel transmission are started simultaneously.

[0066] If there is a third stripe, the forward parallel transmission of the data blocks of the third stripe is started at time 2t. If there is a fourth stripe, the reverse parallel transmission of the data blocks of the fourth stripe is started at time 2t.

[0067] For example, if two strips in a single batch need to be recovered, the first strip and the second strip are started to recover at the same time at the time of 1t, the first strip is forward recovery, and the second strip is reverse recovery. The time for uploading and downloading an aggregated data block is set to 1t. If three / four strips in a single batch need to be recovered, the third strip is started to recover forwardly at the time of 2t, and the fourth strip is started to recover reversely at the time of 2t in the case of the above-mentioned two-strip recovery.

[0068] D2. If it is an odd batch data recovery scheme, the number of source racks in the strip is odd, and the source racks except the last one with the largest number are divided into a group two by two.

[0069] In forward parallel transmission, the source data blocks in the two racks with the same group in the first strip of a single batch are aggregated and transmitted to the rack with the larger number, and then aggregated with the source data blocks in the rack with the larger number. The rack with the larger number is marked as a * rack. Then the groups two by two are combined, and the aggregated data blocks are transmitted from the * rack with the smaller number to the * rack with the larger number, at this time the * mark of the rack with the smaller number is cancelled, and this is continued until the aggregated source data blocks of all source racks are transmitted to the second largest numbered source rack, and then aggregated and transmitted to the designated idle rack. The largest numbered source rack starts at the same time as the forward parallel transmission, and directly transmits data to the designated idle rack, and finally the data blocks to be recovered are obtained by using the decoding coefficient calculation.

[0070] In reverse parallel transmission, the source data blocks in the two racks with the same group in the second strip are aggregated and transmitted to the rack with the smaller number, and then aggregated with the source data blocks in the rack with the smaller number. The rack with the smaller number is marked as a * rack. Then the groups two by two are combined, and the aggregated data blocks are transmitted from the * rack with the larger number to the * rack with the smaller number, at this time the * mark of the rack with the larger number is cancelled, and this is continued until the aggregated source data blocks of all source racks are transmitted to the smallest numbered source rack, and then aggregated and transmitted to the designated idle rack. The largest numbered source rack starts at the same time as the reverse parallel transmission, and directly transmits data to the designated idle rack, and finally the data blocks to be recovered are obtained by using the decoding coefficient calculation. The forward parallel transmission and the reverse parallel transmission are started to run at the same time.

[0071] If there is a third strip, the forward parallel transmission of the third strip data block is started at the time of 2t. If there is a fourth strip, the reverse parallel transmission of the fourth strip data block is started at the time of 2t.

[0072] The present application generates odd source rack large batches and even source rack large batches by three times batch processing of the strips needing recovery according to the source rack, then divides into small batches according to the same source rack, and finally divides into single batches in connection with the number of idle racks, and simultaneously recovers the strips in each single batch.

[0073] The following is a system embodiment corresponding to the above method embodiment. The present embodiment can be implemented in cooperation with the above embodiments. The related technical details mentioned in the above embodiments are still valid in the present embodiment. In order to reduce repetition, they will not be described again. Correspondingly, the related technical details mentioned in the present embodiment can also be applied in the above embodiments.

[0074] The present application also proposes a distributed storage system-oriented erasure code batch recovery system, which comprises:

[0075] The initial module is used to divide the strips to be recovered in the distributed storage cluster into odd batches and even batches according to the number of source racks of the strips, divide the strips with the same source rack in the odd batches and even batches into small batches, determine the number of strips recovered in a single batch according to the number of idle racks in the small batches, and divide the strips in the small batches into single batches in order;

[0076] The judgment module is used to read and record the idle rack numbers in the single batch, assign idle racks to store the replacement nodes for each strip according to the idle rack numbers and the total number of idle racks, judge whether the selected single batch belongs to the even batch, and if so, call the first decoding module, otherwise execute the second decoding module;

[0077] The first decoding module is used to group the source racks in the single batch two by two, aggregate and transmit the source data blocks in the smaller numbered rack in the same group of the first strip in the single batch to the larger numbered rack in the same group in the forward parallel transmission, aggregate the source data blocks in the larger numbered rack, and mark the larger numbered rack as a * rack; then combine the two groups, and transmit the aggregated data blocks from the smaller numbered * rack to the larger numbered * rack, at this time, the smallest numbered rack is unmarked, until the aggregated source data blocks of all source racks are transmitted to the largest numbered source rack, and then aggregated and transmitted to the replacement node, and the data blocks needing recovery are obtained through decoding coefficient calculation;

[0078] a second decoding module, configured to group the source racks in the single batch except the last one with the largest number two by two, aggregate and transmit the source data blocks in the smaller-numbered rack in the same group to the larger-numbered rack in the first strip of the single batch in the forward parallel transmission, and then aggregate the source data blocks in the larger-numbered rack; mark the larger-numbered rack as a * rack, and then merge the two groups two by two, and transmit the aggregated data blocks from the smaller-numbered * rack to the larger-numbered * rack, at which time the larger-numbered rack cancels the * mark, until the aggregated source data blocks of all the source racks are transmitted to the second largest-numbered source rack, and then aggregated and transmitted together to the replacement node; directly transmit the data of the largest-numbered source rack to the replacement node, and obtain the data blocks to be recovered through decoding coefficient calculation.

[0079] The distributed storage system-oriented erasure code batch recovery system, wherein the first decoding module is further configured to, if the single batch also has a second strip, execute reverse parallel transmission while executing the forward parallel transmission, and the reverse parallel transmission comprises:

[0080] aggregate and transmit the source data blocks in the larger-numbered rack in the same group to the smaller-numbered rack in the second strip, and then aggregate the source data blocks in the smaller-numbered rack; mark the smaller-numbered rack as a * rack; then merge the two groups two by two, and transmit the aggregated data blocks from the larger-numbered * rack to the smaller-numbered * rack, at which time the larger-numbered rack cancels the * mark, until the aggregated source data blocks of all the source racks are transmitted to the smallest-numbered source rack, and then aggregated and transmitted together to the designated idle rack; and finally obtain the data blocks to be recovered through decoding coefficient calculation.

[0081] The distributed storage system-oriented erasure code batch recovery system, wherein the second decoding module is further configured to, if the single batch also has a second strip, execute reverse parallel transmission while executing the forward parallel transmission, and the reverse parallel transmission comprises:

[0082] aggregate and transmit the source data blocks in the larger-numbered rack in the same group to the smaller-numbered rack in the second strip, and then aggregate the source data blocks in the smaller-numbered rack; mark the smaller-numbered rack as a * rack; then merge the two groups two by two, and transmit the aggregated data blocks from the larger-numbered * rack to the smaller-numbered * rack, at which time the larger-numbered rack cancels the * mark, until the aggregated source data blocks of all the source racks are transmitted to the smallest-numbered source rack, and then aggregated and transmitted together to the designated idle rack; and finally obtain the data blocks to be recovered through decoding coefficient calculation.

[0083] The distributed storage system-oriented erasure code batch recovery system, wherein the initial module is configured to set the number of strips L of a single batch recovery as 4 if the number t of idle racks is greater than or equal to 4, and otherwise set the number of strips L of a single batch recovery as t.

[0084] The application further provides a storage medium for storing a program for executing any of the distributed storage system-oriented erasure code batch recovery methods.

[0085] The application further provides a client for any of the distributed storage system-oriented erasure code batch recovery systems.

Claims

1. A batch recovery method for erasure coding in a distributed storage system, characterized in that, include: Step 1: Based on the number of source racks for each stripe, divide the stripes to be recovered in the distributed storage cluster into odd-numbered batches and even-numbered batches. Then, divide the stripes with the same source rack within the odd-numbered and even-numbered batches into smaller batches. Determine the number of stripes to be recovered in a single batch based on the number of idle racks in each smaller batch, and then divide the stripes within each smaller batch into single batches in ascending order of their stripe numbers. Here, the source rack is the rack used to provide data blocks for data recovery, and the idle rack is the rack that does not store any stripe data from the current smaller batch but can store new data blocks after recovery. Step 2: Read and record the idle rack numbers in a single batch. Based on the idle rack numbers and the total number of idle racks, assign idle rack storage replacement nodes to each strip in ascending order of numbers. Determine whether the currently selected single batch is an even batch. If it is an even batch, proceed to Step 3; otherwise, proceed to Step 4. The replacement node is the node used to place the new data block; Step 3: Divide the source racks in a single batch into pairs. In the forward parallel transmission, aggregate the source data blocks from the rack with the smaller number in the same group of the first strip of the single batch and transmit them to the rack with the larger number. Then aggregate them with the source data blocks from the rack with the larger number and mark the rack with the larger number as the * rack. Then merge the pairs of groups and transmit the aggregated data blocks from the * rack with the smaller number to the * rack with the larger number. At this time, the rack with the smallest number will have the * mark removed. Continue until the aggregated source data blocks of all source racks are transmitted to the source rack with the largest number. Then aggregate them together and transmit them to the replacement node. The data blocks to be recovered are obtained by calculating the decoding coefficients. Step 4: Divide the source racks in a single batch into pairs, except for the last source rack with the largest number. In the forward parallel transmission, aggregate the source data blocks from the racks with smaller numbers in the same group within the first strip of the single batch and transmit them to the rack with the largest number. Then, aggregate them with the source data blocks from the rack with the largest number. Mark the rack with the largest number as the * rack. Then, merge the pairs of groups and transmit the aggregated data blocks from the * rack with the smaller number to the * rack with the larger number. At this time, the * mark on the rack with the smaller number is removed. Continue until the aggregated source data blocks from all source racks are transmitted to the second largest source rack, and then aggregate and transmit them together to the replacement node. Transmit the data from the source rack with the largest number directly to the replacement node. Calculate the decoding coefficients to obtain the data blocks that need to be recovered.

2. The erasure coding batch recovery method for distributed storage systems as described in claim 1, characterized in that, Step 3 also includes performing a reverse parallel transfer simultaneously with the forward parallel transfer in step 3 if the batch contains a second stripe. The reverse parallel transfer includes: In the second stripe, the source data blocks from the rack with the larger rack number in the same group are aggregated and transmitted to the rack with the smaller rack number. Then, they are aggregated again with the source data blocks from the rack with the smaller rack number, and the rack with the smaller rack number is marked as * rack. Next, the groups are merged in pairs, and the aggregated data blocks are transmitted from the * rack with the larger rack number to the * rack with the smaller rack number. At this time, the * mark on the rack with the larger rack number is removed. This process continues until the aggregated source data blocks from all source racks are transmitted to the source rack with the smallest rack number. Then, they are aggregated together and transmitted to the designated idle rack. The data blocks that need to be recovered are calculated using the decoding coefficients.

3. The erasure coding batch recovery method for distributed storage systems as described in claim 1, characterized in that, Step 4 also includes performing a reverse parallel transfer simultaneously with the forward parallel transfer in step 4 if a second stripe is present in the batch. The reverse parallel transfer includes: In the second stripe, the source data blocks from the rack with the larger rack number are aggregated and transmitted to the rack with the smaller rack number. Then, they are aggregated again with the source data blocks from the rack with the smaller rack number, and the rack with the smaller rack number is marked as * rack. Next, the two groups are merged, with the aggregated data blocks transmitted from the * rack with the larger rack number to the * rack with the smaller rack number. At this point, the * mark on the rack with the larger rack number is removed. This process continues until the aggregated source data blocks from all source racks are transmitted to the source rack with the smallest rack number, and then they are aggregated together and transmitted to a designated idle rack. The source rack with the largest rack number transmits the data directly to the designated idle rack. Finally, the decoding coefficients are used to calculate the data blocks that need to be recovered.

4. The erasure coding batch recovery method for distributed storage systems as described in claim 1, characterized in that, Step 1 includes: If the number of idle racks t≥4, then set the number of stripes L for single batch recovery to 4; otherwise, set the number of stripes L for single batch recovery to t.

5. A batch recovery system for erasure coding in a distributed storage system, characterized in that, include: The initial module is used to divide the stripes to be recovered in the distributed storage cluster into odd-numbered batches and even-numbered batches according to the number of source racks of the stripes. Stripes with the same source rack in the odd-numbered batches and even-numbered batches are divided into sub-batches. The number of stripes to be recovered in a single batch is determined according to the number of free racks in the sub-batches. The stripes in the sub-batches are divided into single batches in ascending order of stripe number. The source rack is the rack used to provide data blocks to participate in data recovery. The free rack is the rack that does not store any stripe data in the current sub-batchens and can store new data blocks after recovery. The judgment module is used to read and record the idle rack numbers in a single batch. Based on the idle rack numbers and the total number of idle racks, it assigns idle racks to each stripe in ascending order of numbers to store replacement nodes. It determines whether the currently selected single batch belongs to an even batch. If it belongs to an even batch, it calls the first decoding module; otherwise, it executes the second decoding module. The replacement node is a node used to place new data blocks. The first decoding module is used to group the source racks in a single batch into pairs. In the forward parallel transmission, the source data blocks from the rack with the smaller number in the same group of two racks in the first strip of the single batch are aggregated and transmitted to the rack with the larger number. Then, they are aggregated with the source data blocks in the rack with the larger number, and the rack with the larger number is marked as the * rack. Then, the pairs of groups are merged, and the aggregated data blocks are transmitted from the * rack with the smaller number to the * rack with the larger number. At this time, the rack with the smallest number is demarked as *. This process continues until the aggregated source data blocks of all source racks are transmitted to the source rack with the largest number. Then, they are aggregated together and transmitted to the replacement node. The data blocks to be recovered are obtained by calculating the decoding coefficients. The second decoding module is used to group the source racks in a single batch into pairs, except for the last source rack with the largest number. In the forward parallel transmission, the source data blocks from the smaller rack in the same group of the first strip of the single batch are aggregated and transmitted to the larger rack, and then aggregated with the source data blocks in the larger rack. The larger rack is marked as the * rack, and the pairs of groups are merged. The aggregated data blocks from the smaller * rack are transmitted to the larger * rack. At this time, the * mark on the smaller rack is removed, until the aggregated source data blocks of all source racks are transmitted to the second largest source rack, and then aggregated together and transmitted to the replacement node. The data from the largest source rack is directly transmitted to the replacement node, and the data blocks to be recovered are obtained by calculating the decoding coefficients.

6. The erasure coding batch recovery system for distributed storage systems as described in claim 5, characterized in that, The first decoding module is also configured to perform a reverse parallel transmission simultaneously with the forward parallel transmission if a second stripe exists in a single batch. The reverse parallel transmission includes: In the second stripe, the source data blocks from the rack with the larger rack number in the same group are aggregated and transmitted to the rack with the smaller rack number. Then, they are aggregated again with the source data blocks from the rack with the smaller rack number, and the rack with the smaller rack number is marked as * rack. Next, the groups are merged in pairs, and the aggregated data blocks are transmitted from the * rack with the larger rack number to the * rack with the smaller rack number. At this time, the * mark on the rack with the larger rack number is removed. This process continues until the aggregated source data blocks from all source racks are transmitted to the source rack with the smallest rack number. Then, they are aggregated together and transmitted to the designated idle rack. The data blocks that need to be recovered are calculated using the decoding coefficients.

7. The erasure coding batch recovery system for distributed storage systems as described in claim 5, characterized in that, The second decoding module is also configured to perform a reverse parallel transmission simultaneously with the forward parallel transmission if a second stripe exists in a single batch. The reverse parallel transmission includes: In the second stripe, the source data blocks from the rack with the larger rack number are aggregated and transmitted to the rack with the smaller rack number. Then, they are aggregated again with the source data blocks from the rack with the smaller rack number, and the rack with the smaller rack number is marked as * rack. Next, the two groups are merged, with the aggregated data blocks transmitted from the * rack with the larger rack number to the * rack with the smaller rack number. At this point, the * mark on the rack with the larger rack number is removed. This process continues until the aggregated source data blocks from all source racks are transmitted to the source rack with the smallest rack number, and then they are aggregated together and transmitted to a designated idle rack. The source rack with the largest rack number transmits the data directly to the designated idle rack. Finally, the decoding coefficients are used to calculate the data blocks that need to be recovered.

8. The erasure coding batch recovery system for distributed storage systems as described in claim 5, characterized in that, This initial module is used to set the number of stripes L for a single batch recovery to 4 if the number of idle racks t≥4, otherwise set the number of stripes L for a single batch recovery to t.

9. A storage medium for storing a program that executes the erasure coding batch recovery method for a distributed storage system as described in any one of claims 1 to 4.

10. A client for use in an erasure coding batch recovery system for a distributed storage system as described in any one of claims 6 to 8.