Method for sending metadata of storage system and storage system

文档序号:828775 发布日期:2021-03-30 浏览:4次 中文

阅读说明:本技术 一种存储系统的元数据的发送方法及存储系统 (Method for sending metadata of storage system and storage system ) 是由 乔建峰 伍华涛 倪敏芳 王金红 葛挺峰 李建平 于 2019-09-30 设计创作,主要内容包括:一种存储系统的元数据的发送方法及存储系统,在该方法中,首先获取存储系统中根据操作请求更新的元数据,即更新的元数据,然后发送该更新的元数据。由于存储系统可以只提供存储系统中发生更新的元数据,因此,相对于现有技术中列举元数据的方式,可以提高元数据处理效率。(A method for sending metadata of a storage system and the storage system are provided. Since the storage system can only provide the metadata updated in the storage system, the metadata processing efficiency can be improved compared with the method of enumerating the metadata in the prior art.)

1. A method for sending metadata of a storage system, comprising:

acquiring updated metadata of a storage system, wherein the updated metadata is used for indicating the metadata which is updated according to an operation request in the storage system;

transmitting the updated metadata.

2. The method of claim 1, wherein the storage system comprises a plurality of metadata partitions; the obtaining of the metadata updated by the storage system comprises:

obtaining metadata updated by a first metadata partition of the plurality of metadata partitions.

3. The method of claim 1 or 2, wherein the obtaining metadata for the storage system update comprises:

acquiring updated metadata record items in a pre-write log of the storage system; the updated metadata entry comprises the operation corresponding to the operation request and the updated metadata.

4. The method of any of claims 1-3, wherein obtaining metadata for the storage system update comprises:

and acquiring the updated metadata of the storage system in real time.

5. The method according to any of claims 1-4, wherein said sending said updated metadata specifically comprises:

the updated metadata is sent in the form of a message.

6. The method of any of claims 1-3, wherein prior to sending the updated metadata, the method further comprises:

and receiving an acquisition request, wherein the acquisition request is used for acquiring the updated metadata in the storage system.

7. The method according to any one of claims 2-6, further comprising:

after a second metadata partition in the plurality of metadata partitions is changed, sending a first indication message, wherein the first indication message is used for indicating that the order of the updated metadata in the second metadata partition is cancelled.

8. The method of claim 7, further comprising:

acquiring updated metadata in the changed metadata partition;

sending a second indication message, wherein the second indication message is used for indicating the order preservation of the updated metadata in the changed metadata partition;

and sending the updated metadata in the changed metadata partition.

9. A storage system comprising a communication interface and a processor, wherein:

the processor is used for acquiring updated metadata of the storage system, wherein the updated metadata is used for indicating the metadata which is updated according to the operation request in the storage system;

the communication interface is used for sending the updated metadata.

10. The storage system of claim 9, wherein the storage system comprises a plurality of metadata partitions; the processor is specifically configured to:

obtaining metadata updated by a first metadata partition of the plurality of metadata partitions.

11. The memory system of claim 9 or 10, wherein the processor is specifically configured to:

acquiring updated metadata record items in a pre-write log of the storage system; the updated metadata entry comprises the operation corresponding to the operation request and the updated metadata.

12. The memory system of any of claims 9-11, wherein the processor is specifically configured to:

and acquiring the updated metadata of the storage system in real time.

13. The storage system according to any one of claims 9 to 12, wherein the communication interface is specifically configured to:

the updated metadata is sent in the form of a message.

14. The storage system of any of claims 9-13, wherein the communication interface is further configured to:

and receiving an acquisition request, wherein the acquisition request is used for acquiring the updated metadata in the storage system.

15. The storage system of any of claims 10-14, wherein the communication interface is further configured to:

after a second metadata partition in the plurality of metadata partitions is changed, sending a first indication message, wherein the first indication message is used for indicating that the order of the updated metadata in the second metadata partition is cancelled.

16. The memory system of claim 15, wherein the processor is further configured to:

acquiring updated metadata in the changed metadata partition;

the communication interface is further configured to:

sending a second indication message, wherein the second indication message is used for indicating the order preservation of the updated metadata in the changed metadata partition;

and sending the updated metadata in the changed metadata partition.

17. A memory system comprising a processing unit and a transceiver unit, wherein:

the processing unit is used for acquiring updated metadata of the storage system, and the updated metadata is used for indicating the metadata which is updated according to the operation request in the storage system;

the transceiving unit is configured to transmit the updated metadata.

18. The storage system of claim 17, wherein the storage system comprises a plurality of metadata partitions; the processing unit is specifically configured to:

obtaining metadata updated by a first metadata partition of the plurality of metadata partitions.

19. The storage system according to claim 17 or 18, wherein the processing unit is specifically configured to:

acquiring updated metadata record items in a pre-write log of the storage system; the updated metadata entry comprises the operation corresponding to the operation request and the updated metadata.

20. The storage system according to any one of claims 17 to 19, wherein the processing unit is specifically configured to:

and acquiring the updated metadata of the storage system in real time.

21. The storage system according to any of claims 17-20, wherein the transceiver unit is specifically configured to:

the updated metadata is sent in the form of a message.

22. The storage system according to any one of claims 17-21, wherein the transceiver unit is further configured to:

and receiving an acquisition request, wherein the acquisition request is used for acquiring the updated metadata in the storage system.

23. The storage system according to any one of claims 17-22, wherein the transceiver unit is further configured to:

after a second metadata partition in the plurality of metadata partitions is changed, sending a first indication message, wherein the first indication message is used for indicating that the order of the updated metadata in the second metadata partition is cancelled.

24. The storage system of claim 23, wherein the processing unit is further configured to:

acquiring updated metadata in the changed metadata partition;

the transceiver unit is further configured to:

sending a second indication message, wherein the second indication message is used for indicating the order preservation of the updated metadata in the changed metadata partition;

and sending the updated metadata in the changed metadata partition.

25. A computer storage medium having stored thereon instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1-8.

26. A computer program product having stored thereon instructions which, when run on a computer, cause the computer to perform the method according to any one of claims 1-8.

Technical Field

The present application relates to the field of storage technologies, and in particular, to a method for sending metadata of a storage system and a storage system.

Background

In a storage system, various business functions can be provided to a user by accessing metadata of the storage system. For example, all metadata in a directory may be scanned to implement a business function of counting the remaining capacity of the directory, or all metadata in the directory may be obtained to analyze data stored in the directory, implement a business function of file classification or fuzzy search, etc., which are not examples herein.

In the existing storage system, the metadata is mainly accessed through an enumeration interface provided by the storage system, however, when the data volume of the metadata in the storage system is continuously increased, in this case, the metadata processing efficiency of the storage system is seriously affected.

Disclosure of Invention

The embodiment of the application provides a method for sending metadata of a storage system and the storage system, which are used for improving the metadata processing efficiency of the storage system.

In a first aspect, the present application provides a method for transmitting metadata of a storage system, in which metadata updated according to an operation request in the storage system, that is, updated metadata, is first acquired, and then the updated metadata is transmitted.

In the above technical solution, the storage system may only provide the metadata that is updated in the storage system, and compared with a manner of enumerating metadata in the prior art, the metadata processing efficiency may be improved.

And, because the metadata which is not updated is not required to be provided, the transmission amount of the metadata can be reduced, and the bandwidth resource can be saved.

In one possible design, if the storage system includes multiple metadata partitions, the metadata updated by the storage system may be the metadata updated by one of the multiple metadata partitions, for example, the first metadata partition.

In the above technical solution, since only the metadata updated in the first metadata partition may be obtained, and all the changed metadata in the storage system need not be obtained, the transmission amount of the metadata may be further reduced, and the bandwidth resource may be saved.

In one possible design, the metadata in the storage system may be recorded using the pre-write log, each metadata entry corresponding to a metadata entry, each metadata entry containing an operation corresponding to the operation request and the metadata for which the update occurs, and the metadata for the update of the storage system may be obtained by obtaining the metadata entry for the update in the pre-write log of the storage system.

In the above technical solution, a way of providing updated metadata by pre-write logs is provided, which may increase flexibility of the storage system.

In one possible design, obtaining metadata for a storage system update may include, but is not limited to, the following two ways:

in the first way, the updated metadata of the storage system is acquired in real time.

In this way, as long as updated metadata exists in the storage system, the storage system can send the updated metadata at the first time, and consistency between the metadata used by the user and the metadata in the storage system can be ensured.

In a second manner, the storage system first receives an acquisition request for acquiring updated metadata in the storage system, and then sends the updated metadata.

In this way, the storage system may send updated metadata according to the needs of the user.

In one possible design, the storage system may send the updated metadata in the form of a message.

In one possible design, the storage system includes a plurality of metadata partitions, and the metadata partitions may be changed, for example, two metadata partitions are merged, or one metadata partition is split into two new metadata partitions, in which case, when one of the metadata partitions, for example, a second metadata partition, is changed, the storage system may send a first indication message indicating that the order of the updated metadata in the second metadata partition is cancelled.

In the above technical solution, when the metadata partition is changed, there may be unsent updated metadata in the metadata partition before the change, and after the metadata partition is changed, the unsent updated metadata may be continuously sent, and then after the sending is completed, the first indication message is sent.

In one possible design, after the storage system obtains the updated metadata in the changed metadata partition, a second indication message for indicating order preservation of the updated metadata in the changed metadata partition is sent first, and then the updated metadata in the changed metadata partition is sent again.

In the above technical solution, when the metadata partition is changed, the order preservation of the updated metadata in the metadata partition may be implemented through the first indication message and the second indication message, for example, when the user has received the first indication message before receiving the second indication message, it indicates that all the updated metadata in the metadata partition before the change is successfully sent, and then receives the updated metadata in the metadata partition after the change, so that the order preservation may be implemented.

In a second aspect, a method for sending metadata of a storage system is provided, in which a storage system records metadata in the storage system using a pre-write log, each metadata corresponds to a metadata entry, each metadata entry contains an operation corresponding to an operation request and updated metadata, and the storage system first obtains an updated metadata entry in the pre-write log of the storage system and then sends the updated metadata entry.

In the above technical solution, the storage system may only provide the record items of the metadata that are updated in the storage system, and compared with a manner of enumerating the metadata in the prior art, the metadata processing efficiency may be improved.

In one possible design, if the storage system includes multiple metadata partitions, the metadata entry updated by the storage system may be the updated metadata entry of one of the multiple metadata partitions, e.g., the first metadata partition.

In one possible design, obtaining metadata entries for storage system updates may include, but is not limited to, the following two ways:

first, the metadata entries updated by the storage system are obtained in real time.

In a second manner, the storage system first receives an acquisition request for acquiring an updated metadata entry in the storage system, and then sends the updated metadata entry.

In one possible design, the storage system may send the updated metadata entry in the form of a message.

In one possible design, the storage system includes a plurality of metadata partitions, and the plurality of metadata partitions may be changed, in which case, when one metadata partition of the plurality of metadata partitions, for example, a second metadata partition, is changed, the storage system may send a first indication message for indicating that order of metadata updated in the second metadata partition is to be cancelled.

In one possible design, after the storage system obtains the updated metadata entry in the changed metadata partition, a second indication message for indicating order preservation of the updated metadata in the changed metadata partition is sent first, and then the updated metadata entry in the changed metadata partition is sent again.

In a third aspect, a storage system is provided, where the storage system may be a storage node or a storage server, or may be a device in the storage node or the storage server. The apparatus for managing memory space comprises a processor for implementing the method described in the first aspect above. The means for managing the storage space may further comprise a memory for storing program instructions and data. The memory is coupled to the processor, and the processor can call and execute the program instructions stored in the memory for implementing any one of the methods described in the first aspect above. The memory system may also include a communication interface in communication with the processor.

In one possible design, the storage system includes a communication interface and a processor, wherein:

the processor is used for acquiring updated metadata of the storage system, wherein the updated metadata is used for indicating the metadata which is updated according to the operation request in the storage system;

the communication interface is used for sending the updated metadata.

In one possible design, the storage system includes a plurality of metadata partitions; the processor is specifically configured to:

obtaining metadata updated by a first metadata partition of the plurality of metadata partitions.

In one possible design, the processor is specifically configured to:

acquiring updated metadata record items in a pre-write log of the storage system; the updated metadata entry comprises the operation corresponding to the operation request and the updated metadata.

In one possible design, the processor is specifically configured to:

and acquiring the updated metadata of the storage system in real time.

In one possible design, the communication interface is specifically configured to:

the updated metadata is sent in the form of a message.

In one possible design, the communication interface is further to:

and receiving an acquisition request, wherein the acquisition request is used for acquiring the updated metadata in the storage system.

In one possible design, the communication interface is further to:

after a second metadata partition in the plurality of metadata partitions is changed, sending a first indication message, wherein the first indication message is used for indicating that the order of the updated metadata in the second metadata partition is cancelled.

In one possible design, the processor is further to:

acquiring updated metadata in the changed metadata partition;

the communication interface is further configured to:

sending a second indication message, wherein the second indication message is used for indicating the order preservation of the updated metadata in the changed metadata partition;

and sending the updated metadata in the changed metadata partition.

In a fourth aspect, a storage system is provided, where the storage system may be a storage node or a storage server, or may be a device in the storage node or the storage server. The storage system may include a processing unit and a transceiver unit, and these units may perform corresponding functions performed in any of the design examples of the first aspect, specifically:

the processing unit is used for acquiring updated metadata of the storage system, and the updated metadata is used for indicating the metadata which is updated according to the operation request in the storage system;

the transceiving unit is configured to transmit the updated metadata.

In one possible design, the storage system includes a plurality of metadata partitions; the processing unit is specifically configured to:

obtaining metadata updated by a first metadata partition of the plurality of metadata partitions.

In one possible design, the processing unit is specifically configured to:

acquiring updated metadata record items in a pre-write log of the storage system; the updated metadata entry comprises the operation corresponding to the operation request and the updated metadata.

In one possible design, the processing unit is specifically configured to:

and acquiring the updated metadata of the storage system in real time.

In one possible design, the transceiver unit is specifically configured to:

the updated metadata is sent in the form of a message.

In one possible design, the transceiver unit is further configured to:

and receiving an acquisition request, wherein the acquisition request is used for acquiring the updated metadata in the storage system.

In one possible design, the transceiver unit is further configured to:

after a second metadata partition in the plurality of metadata partitions is changed, sending a first indication message, wherein the first indication message is used for indicating that the order of the updated metadata in the second metadata partition is cancelled.

In one possible design, the processing unit is further configured to:

acquiring updated metadata in the changed metadata partition;

the transceiver unit is further configured to:

sending a second indication message, wherein the second indication message is used for indicating the order preservation of the updated metadata in the changed metadata partition;

and sending the updated metadata in the changed metadata partition.

In a fifth aspect, the present application provides a computer-readable storage medium storing a computer program, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the method of any one of the first aspect.

In a sixth aspect, the present application provides a computer program product, which stores a computer program, the computer program comprising program instructions, which, when executed by a computer, cause the computer to perform the method of any one of the first aspect.

In a seventh aspect, the present application provides a chip system, which includes a processor and may further include a memory, and is configured to implement the method according to the first aspect. The chip system may be formed by a chip, and may also include a chip and other discrete devices.

Advantageous effects of the second to seventh aspects and implementations thereof described above reference may be made to the description of the method of the first aspect and advantageous effects of implementations thereof.

Drawings

FIG. 1 is an architecture diagram of an example of a prior art memory system;

FIG. 2 is a schematic diagram of a process for writing data to a storage system;

FIG. 3 is an architecture diagram of an example of a memory system provided by an embodiment of the present application;

fig. 4 is a flowchart of a method for transmitting metadata in an embodiment of the present application;

FIG. 5 is a diagram illustrating an example of multiple metadata partitions in an embodiment of the present application;

fig. 6 is a schematic diagram of an example of a change in metadata partition in an embodiment of the present application;

FIG. 7 is a diagram illustrating an example of dynamic change of a metadata partition in an embodiment of the present application;

FIG. 8 is a diagram illustrating an example of a split metadata partition in an embodiment of the present application;

FIG. 9 is an architecture diagram of an example of a storage system implemented using a publish/subscribe system in an embodiment of the present application;

FIG. 10 is a schematic diagram of a storage system implemented by a publish/subscribe system to send metadata according to an embodiment of the present application;

FIG. 11 is a schematic diagram of an example of a storage system in an embodiment of the present application;

fig. 12 is a schematic diagram of another example of a storage system in the embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be described in detail below with reference to the drawings and specific embodiments of the specification.

In the embodiments of the present application, "a plurality" means two or more, and in view of this, the "plurality" may also be understood as "at least two". "at least one" is to be understood as meaning one or more, for example one, two or more. For example, including at least one means including one, two, or more, and does not limit which ones are included, for example, including at least one of A, B and C, then including may be A, B, C, A and B, A and C, B and C, or a and B and C. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" generally indicates that the preceding and following related objects are in an "or" relationship, unless otherwise specified.

Unless stated to the contrary, the embodiments of the present application refer to the ordinal numbers "first", "second", etc., for distinguishing between a plurality of objects, and do not limit the sequence, timing, priority, or importance of the plurality of objects.

The method in the embodiment of the present application may be applied to a storage system, which may be a centralized storage system or a distributed storage system, and specifically, may be a database storage system, a file storage system, a block storage system, an object storage system, a columnar storage system, or the like, may also be a cloud storage system, or may also be a combination of the foregoing storage systems, and the form of the storage system is not limited herein.

Referring to fig. 1, a storage system 100 includes an access node 110 and one or more storage nodes 120, and in fig. 1, the storage system 100 includes one access node 110 and two storage nodes 120 (storage node 1 and storage node 2, respectively) as an example.

It should be noted that the access node 110 and the storage node 120 may be independent servers or may be virtual devices. When one access node 110 and one storage node 120 are virtual devices, the virtual devices may run on multiple servers respectively, or may run on the same server, and those skilled in the art may determine the virtual devices according to an actual operating environment.

Referring to fig. 2, when the storage system 100 writes data, the access node 110 receives a write operation request, where the write operation request includes data to be written, generates metadata corresponding to the data to be written, and then stores the generated metadata in a storage node, for example, in the storage node 2. In one implementation, the storage system 100 records the operation request and the metadata using a Write-ahead Logging (WAL) approach.

The embodiment of the application provides a method and a device for sending metadata of a storage system, which are used for improving the processing efficiency of the metadata of the storage system.

Hereinafter, a data storage method provided in an embodiment of the present application will be described with reference to the drawings. To implement the method in the embodiment of the present application, the storage system shown in fig. 1 is first modified. The specific improvement points are as follows:

referring to fig. 3, an architecture diagram of an example of a memory system according to an embodiment of the present application is shown. Unlike the storage system shown in fig. 1, an interface is added in the access node 110 of fig. 3, and the interface is used to provide metadata that is updated, and for convenience of description, in this embodiment of the present application, the interface is referred to as an update metadata interface for short, and the name of the interface is not limited here.

The storage system 100 can obtain the changed metadata, for example, when a client writes new data into the storage system 100, the metadata corresponding to the new data is the changed metadata; or, when the client modifies the data a already stored in the storage system 100, the metadata corresponding to the modified data is the changed metadata; or, when the client deletes the already stored data B in the storage system 100, the metadata corresponding to the data B is the metadata that has changed, that is, the updated metadata is obtained according to an operation request (for example, a data modification operation request, a data deletion operation request, or a new data writing operation request) for updating the data in the storage system. The update metadata interface may provide metadata that changes in the storage system 100.

It should be noted that, in the storage system shown in fig. 3, the new interface is disposed in the storage system 100 as an example, and in other embodiments, the new interface may be disposed outside the storage system 100, which is not limited herein.

In the following, a storage system shown in fig. 3 is taken as an example to introduce a method for sending metadata in an embodiment of the present application, please refer to fig. 4, which is a flowchart of the method, and the flowchart is described as follows:

s401, the access node receives an operation request.

The operation request is used to update data in the storage system, for example, the operation request may be an operation request for writing new data into the storage system, or may be an operation request for deleting data already stored in the storage system, or may be an operation request for modifying data stored in the storage system.

S402, the access node generates metadata corresponding to the operation request.

When the access node receives the operation request, the data in the storage node 1 is updated according to the operation request, and after the data is updated, the metadata corresponding to the updated data can be generated. The specific process is similar to the process shown in fig. 2, and is not described herein again.

S403, the access node sends the generated metadata to a metadata storage node, and the metadata storage node stores the metadata.

In this embodiment of the present application, the metadata storage node may be the storage node 2 shown in fig. 3, and for convenience of description, the metadata storage node is taken as the storage node 2 as an example hereinafter. The storage node 2 storing this metadata may include, but is not limited to, the following.

In the first storage mode, the storage node 2 may sequentially write the metadata into the storage node 2 in a remote update mode, that is, according to the sequence of the metadata generated by the access node. For example, if the storage node 2 receives the first metadata and the second metadata in sequence, the storage node 2 writes the first metadata into a first metadata entry in the storage node 2, and then writes the second metadata into a second metadata entry in the storage node 2.

In the second storage mode, the storage node 2 includes a plurality of metadata partitions, for example, all metadata that can be stored in the storage node 2 may be partitioned by a Key (Key) (or index number understood as metadata) in a range partition (range partition) mode. As shown in fig. 5, the Key range of the metadata that can be stored by the storage node 2 is { 0-100 }, and then the metadata is divided into 5 metadata partitions according to a preset step length, and the metadata at the boundary point may be fixed by adopting a left-closed and right-open principle or a left-open and right-closed principle to ensure the indifference of the attribute. For example, in FIG. 5, the Key of the metadata of the first metadata partition ranges from 0 to 19, the Key of the metadata of the second metadata partition ranges from 20 to 39, and so on. Thus, when the storage node 2 receives the at least one piece of metadata, the partition to which the metadata belongs can be determined according to the Key of the metadata. In another implementation, different metadata partitions are stored to different storage nodes. The embodiment of the present invention is not limited thereto.

In the embodiment of the present application, the plurality of metadata partitions may have the following form.

In the first form, the metadata partitions are fixed, for example, the storage system is preset with 5 metadata partitions as shown in fig. 5, and the 5 metadata partitions are maintained during subsequent use.

In a second form, the multiple metadata partitions may be dynamically merged or split according to usage requirements. For example, since the data amount of the metadata in each metadata partition may be different, in order to ensure service balance, when the data amount of the metadata in a certain metadata partition exceeds a threshold, the metadata partition may be split, so as to generate a new metadata partition. When the amount of metadata in one or more metadata partitions decreases, the metadata partitions may be merged. For example, the second metadata partition shown in FIG. 5 is split into two metadata partitions {20 ~ 30} and {31 ~ 39}, resulting in 6 metadata partitions shown in 6 (a). Alternatively, the first metadata partition and the second metadata partition shown in fig. 5 may be merged, resulting in 4 metadata partitions as shown in fig. 6 (b).

In this case, since the metadata partition is dynamically changed, the metadata of the same Key may be located in a different metadata partition at different time periods due to the difference in metadata partition. For example, referring to FIG. 7, for metadata with Key of 8, the metadata is located in the metadata partition {0 ~ 19} for time period t 1-t 2, where {0 ~ 19} represents the range of metadata Key in the metadata partition; thus, a partition is represented by a metadata Key. In the time period from t3 to t4, due to the occurrence of metadata partition splitting, the metadata partition { 0-19 } is split into a metadata partition { 0-9 } and a metadata partition { 10-19 }, so that the metadata with the Key of 8 is located in the metadata partition { 0-9 }; at time t 5-t 6, the metadata partition { 0-9 } is split into metadata partition { 0-5 } and metadata partition { 6-9 }, and then the metadata with Key of 8 is located in metadata partition { 6-9 }.

In an embodiment of the present invention, in an implementation manner, each metadata partition uses a WAL to record metadata in the metadata partition. The operation request and the metadata of the operation request are recorded, for example, in the form of log entries.

S404, the access node receives an obtaining request, where the obtaining request is used to obtain the updated metadata of the storage system 100, and the access node sends the obtaining request to the storage node 2.

As an example, when the client needs to obtain all metadata at the current time, the client may send the obtaining request to the access node by calling the update metadata interface. In another implementation, in this embodiment of the present invention, other applications or systems may send the obtaining request to obtain the metadata updated in the storage system 100.

S405, the storage node 2 acquires the updated metadata in the storage system.

In the embodiment of the present application, the manner in which the storage node 2 acquires the metadata in which the update occurs may include, but is not limited to, the following manner.

In the first mode, the storage node 2 may obtain the updated metadata through a snapshot. For example, the storage node 2 obtains a first snapshot of metadata stored in the storage node 2 at a first time, then obtains a second snapshot of the stored metadata again after a preset time period, and by comparing the first snapshot with the second snapshot, the metadata updated in the storage node 2 may be obtained.

In a second obtaining manner, when the storage node 2 stores the metadata, an identification information may be added to each metadata, where the identification information is used to indicate that the metadata is not sent, and if the metadata is sent, the identification information may be deleted. In this way, the storage node 2 can acquire metadata in which update occurs by searching for metadata including identification information.

In the third acquisition mode, the metadata stored in the storage node 2 are sequentially stored in order. The stored metadata has a sequence number. The storage node 2 may record the sequence number of the metadata transmitted each time, for example, in an initial state of the storage system, the storage system does not transmit any metadata, the initial value of the sequence number of the transmitted metadata is 0, and the storage node 2 determines the metadata with the sequence number greater than 0 as the metadata whose update occurs. The sequence number of the metadata can be understood as the number corresponding to the metadata entry stored in the metadata.

In this case, the metadata that is updated in the storage system 100 may be obtained, specifically, the metadata that is updated in a certain metadata partition (for example, a first metadata partition) in the storage system. As an example, the obtaining request is used to obtain all metadata related to a certain service, and all metadata related to the service are stored in the first metadata partition, the storage node 2 may only obtain updated metadata in the first metadata partition, instead of obtaining all changed metadata in the storage system, and may reduce the transmission amount of metadata, thereby saving bandwidth resources.

In this case, the obtaining of the updated metadata in the storage system 100 in the embodiment of the present invention may specifically be obtaining of an updated metadata entry in a pre-write log of the storage system.

S406, the storage node 2 sends the acquired metadata which is updated to the access node, and the access node sends the metadata which is updated to the client.

In the embodiment of the invention, the storage system can only provide the updated metadata, so that compared with the prior art which lists the metadata, the metadata processing efficiency is improved, the transmission quantity of the metadata is reduced, and the bandwidth resource is further saved.

In one implementation, the storage node 2 sends the metadata that is updated according to the order of the metadata that is updated, so that the metadata obtained by the client is also ordered.

In another implementation, the metadata is stored according to metadata partitions, and when the metadata updated in the storage system 100 is obtained, the storage node sends the metadata updated in the metadata partition to the access node, so that the access node sends the metadata updated in the metadata partition to the client, thereby reducing the transmission amount of the metadata and saving bandwidth resources.

In another implementation, if the metadata is stored according to metadata partitions, when obtaining the updated metadata in the storage system 100 is obtaining the updated metadata in multiple metadata partitions, the storage node sends the updated metadata in the multiple metadata partitions in parallel to the sending access node, so that the sending delay can be reduced.

In another implementation, in the case of recording metadata based on WAL, the metadata may be transmitted by way of transmitting WAL entries.

In another implementation, in the case of recording metadata based on WAL, the location information of the updated metadata of the WAL record may also be sent, and the updated metadata of the WAL record may be read by a client or other application according to the location information. The location information may include an identification of each WAL entry and/or an offset location of the WAL entry, etc. If there are a plurality of WAL entries to be sent, since the plurality of WAL entries are stored sequentially in this case, the position information may include an identifier of the WAL entry, an offset position of the WAL entry, and a length of a unit storage space occupied by the plurality of WAL entries, and the WAL entries may be obtained in batch by the position information.

S407, the second metadata partition in the metadata storage node is changed, and a new metadata partition is generated.

In an embodiment of the present invention, the change of the second metadata partition may include splitting the second metadata partition or merging the second metadata partition with other metadata partitions. For convenience of explanation, the second metadata partition splitting is described as an example below.

As the amount of metadata stored in the metadata storage node increases, the second metadata partition in the metadata storage node splits into multiple metadata partitions when the split condition is reached. The second metadata partition is any one of a plurality of metadata partitions in the metadata storage node.

As an example, as shown in fig. 8, the partition Key of the metadata partition 1 ranges from a to C, and the metadata partition 1 is split into a metadata partition 2 (the range of Key is a to less than B) and a metadata partition 3 (the range of Key is from B to C) at the position where Key is B.

S408, the metadata storage node sends a first indication message to the access node, wherein the first indication message is used for indicating that the order of the metadata updated in the second metadata partition is cancelled.

As shown in fig. 8, when the splitting occurs in the metadata partition 1, the maximum sequence number of the metadata updated in the metadata partition 1 is 102, and when the splitting occurs, the metadata storage node only sends the metadata with the metadata sequence number of 100 to the access node, in this case, if the metadata storage node guarantees that the metadata with the sequence number of 101 and the metadata with the sequence number of 102 are sent in order, after the splitting occurs, the metadata with the sequence number of 101 and the metadata with the sequence number of 102 are continuously sent, and after the sending of the metadata with the sequence number of 102 is completed, a message for instructing to cancel the order preservation of the metadata updated in the second metadata partition is sent to the access node. In the embodiment of the present invention, the sequence number of the metadata refers to a sequence number of the metadata storage. For example, the metadata is recorded in a WAL manner, and the sequence number refers to the order of entries of the WAL.

S409, the access node generates a mark for canceling the order preserving relation of the second metadata partition.

S410, the metadata storage node acquires the updated metadata in the split metadata partition.

S411, the metadata storage node sends a second indication message to the access node, and the access node sends the second indication message to the client.

The second indication message is used for indicating that the updated metadata in the split metadata partition is subjected to order preservation.

S412, the client sends a confirmation response message to the second indication message to the access node, and the access node sends the confirmation response message to the metadata storage node.

And after receiving the second indication message, the client inquires whether a mark for canceling the order preserving relation of the second metadata partition exists in the access node, if so, the client feeds back a confirmation response to the access node, and after receiving the confirmation response message, the access node clears the mark. If the client confirms that the mark does not exist in the access node after receiving the message for establishing the partition order-preserving relationship, the client does not send a confirmation response to the access node (or send a negative confirmation response to the access node).

Since the sending time of the first indication message is after the sending of the updated metadata in the pre-split metadata partition is completed, when the client confirms that the first indication message has been received before the second indication message is received, it indicates that all the updated metadata in the pre-split metadata partition are successfully sent, and then the updated metadata is received according to the split metadata partition, thereby achieving order preservation.

If the metadata storage node does not receive the acknowledgement message, the metadata storage node may send the second indication message until receiving the acknowledgement message.

S413, the metadata storage node sends the updated metadata in the split metadata partition to the access node, and the access node sends the updated metadata to the client.

After receiving the acknowledgement message, the metadata storage node sends the updated metadata in the split metadata partition to the access node.

It should be noted that, when the metadata partitions are merged, the processing procedure is the same as the above-mentioned manner, and is not described herein again.

In addition, the access node may also record a sequence number of the updated metadata that has been sent, and when the access node determines that the sequence number of the received updated metadata is smaller than the recorded sequence number, the updated metadata is considered to be duplicate data, so that the updated metadata may be directly discarded, and duplicate processing is avoided.

S414, the metadata storage node sends a metadata deletion message to the access node, and the access node deletes the metadata according to the metadata deletion message.

After the metadata storage node sends the updated metadata, a deletion operation of the already sent metadata may be periodically triggered, so as to send a metadata deletion message to the access node. Since the metadata message in the embodiment of the present application is sent in order-preserving manner, after the access node receives the metadata deletion message, it can be guaranteed that the metadata corresponding to the metadata partition has already been consumed, so that the received updated metadata can be deleted, and the storage resource of the storage system is saved.

It should be noted that step S404 is an optional step, which is not necessarily performed, for example, the storage node 2 may obtain updated metadata in the storage system in real time, and then actively send the updated metadata, as an example, a monitoring event may be set in the storage node 2 to detect whether the metadata in the storage node changes, so that as long as there is a metadata change in the storage node 2, the monitoring event is triggered, and thus the updated metadata is actively sent to the access node. Therefore, in fig. 4, step S404 is shown as a broken line to indicate that this step is an optional step.

In another implementation manner of the embodiment of the present invention, the implementation manner shown in fig. 4 may be implemented by both a storage node and an access node. In the centralized storage system, the embodiment of the present invention may be implemented by an array controller, which is not limited to this embodiment of the present invention. And the storage system acquires the updated metadata and sends the updated metadata to the client or the third-party system/application. In the embodiment of the present invention, the above various implementations are collectively referred to as being implemented by a storage system. In addition, the embodiment of the present invention may also support implementation by a third-party device independent of the storage system, which is not described herein again.

The metadata transmission method in the embodiment of the present application will be described in detail below by taking an example of an implementation of a publish/subscribe system (pub/sub system).

Referring to FIG. 9, an architecture diagram of one example of a storage system implemented using a publish/subscribe system is shown. In contrast to the storage system described in fig. 1, a publish/subscribe system 130 is added to fig. 9, the publish/subscribe system 130 being in communication with the access node and the storage node 120, respectively, the publish/subscribe system 130 being configured to send updated metadata in the form of messages. The publish/subscribe system 130 may also communicate with third party applications.

To facilitate understanding by those skilled in the art, a publish/subscribe system will first be described.

The publish/subscribe system includes two participants, a message publisher (producer) and a message subscriber (consumer), the message publisher is used to create a topic (topic) in the publish/subscribe system and then send a message to the topic, and the publish/subscribe system retains the messages in the topic for the message subscribers and forwards the messages in the topic to each message subscriber. When a message subscriber receives a message from a topic and acknowledges receipt of the message to the publish/subscribe system, the publish/subscribe system removes the message from the topic.

When the publish/subscribe system is applied to the storage system, the storage node 120 may be used as a message publisher of the publish/subscribe system, then, an application of an access node, a client or a third party of the storage system is used as a message subscriber, the storage node 120 publishes metadata in the publish/subscribe system, and the application of the access node 110, the client or the third party of the storage system consumes the metadata in real time, so that the application of the access node 110, the client or the third party of the storage system can provide corresponding services according to the acquired metadata.

Next, a method for transmitting metadata in the embodiment of the present application will be described by taking the storage system shown in fig. 9 as an example.

Upon initial startup of the storage system, topics are created in the publish/subscribe system, message publishers are created in the storage nodes, and message subscribers are created in the access nodes.

When the storage system is started for the first time, a topic is first created in the publish/subscribe system, and the topic may include a default topic partition (tpention). The method comprises the steps that a message publisher is created in a storage node to generate a message and a message subscriber is created to consume the message, therefore, the message publisher is created in the storage node, the message subscriber is created in an access node, the message publisher only comprises a default message publisher (TProducer) at the initial start, the message subscriber only comprises a default message subscriber (TConsumer), the default topic is associated with the default message publisher and the default message subscriber, the default topic is sent to the default topic after the default message publisher generates the message, and the message in the default topic is pushed to the default message subscriber to be processed.

It should be noted that, in the embodiment of the present application, when the storage system stores metadata in a metadata partition manner, correspondingly, the theme may also adopt a partition manner, each metadata partition includes a unique identifier, and one metadata partition may be mapped with one theme partition by the unique identifier of the metadata partition. At initial startup of the storage system, the metadata storage node includes only one metadata partition, and as new metadata is generated, the metadata partition is split to generate a new metadata partition, e.g., split from a default metadata partition into metadata partition 1 and metadata partition 2.

As an example, the WAL record sent by the message publisher is taken as an example for explanation. Referring to fig. 10, after the metadata storage node obtains the updated metadata in the metadata partition 2, a new WAL entry corresponding to the updated metadata is generated and written into the partition update queue. And if the default message publisher determines that the message publisher corresponding to the metadata partition 2 is not included according to the new WAL record item, the message publisher corresponding to the metadata partition 2 is created in the message publisher and is marked as the message publisher 2. The message publisher 2 then retrieves the new WAL entry from the partition update queue and sends it to the topic. And after the default theme partition receives the new WAL record item, determining that the theme partition corresponding to the new WAL record item is not included in the theme, thereby creating a theme partition 2 corresponding to the metadata partition 2 in the theme, and receiving the new WAL record item through the theme partition 2. Meanwhile, the default topic partition sends an event message for generating a new metadata partition to a default message subscriber, and after the default message subscriber receives the event message, a message subscriber 2 corresponding to the metadata partition 2 is created in the message subscriber, so that the new WAL record item is acquired from the topic partition 2 through the message subscriber 2.

In another implementation, the access node of the storage system acts as a publisher of the message and the client or third party application acts as a subscriber to the message. In another implementation, the storage system acts as a publisher of the message and the client or third party application acts as a subscriber to the message.

In the embodiments provided in the present application, in order to implement the functions in the methods provided in the embodiments of the present application, the storage system may include a hardware structure and/or a software module, and the functions are implemented in the form of a hardware structure, a software module, or a hardware structure and a software module. Whether any of the above-described functions is implemented as a hardware structure, a software module, or a hardware structure plus a software module depends upon the particular application and design constraints imposed on the technical solution.

Fig. 11 shows a schematic diagram of a memory system 1100. The storage system 1100 may be used, among other things, to implement the functionality of an array controller for a storage node or storage array of a storage system. The storage system 1100 may be a hardware structure, a software module, or a hardware structure plus a software module. The memory system 1100 may be implemented by a system-on-chip. In the embodiment of the present application, the chip system may be composed of a chip, and may also include a chip and other discrete devices.

The memory system 1100 may include a processing unit 1101 and a transceiving unit 1102.

The transceiving unit 1102 may be configured to perform step S403, step S404, step S406, step S408, step S411 to step S414 in the embodiment shown in fig. 4, and/or other processes for supporting the techniques described herein. In one possible implementation, the transceiver unit 1102 may be used for communication with the processing unit 1101, or the transceiver unit 1102 may be used for communication with the storage system 1100 and other modules, which may be circuits, devices, interfaces, buses, software modules, transceivers, or any other devices capable of implementing communication.

Processing unit 1101 may be used to perform steps S405, S407, and S410 in the embodiment shown in fig. 4, and/or other processes for supporting the techniques described herein.

All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.

The division of the modules in the embodiment shown in fig. 11 is schematic, and only one logical function division is provided, and in actual implementation, there may be another division manner, and in addition, each functional module in the embodiments of the present application may be integrated in one processor, or may exist alone physically, or two or more modules are integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.

Fig. 12 illustrates a memory system 1200 provided in an embodiment of the present application, where the memory system 1200 may be used to implement functions of an array controller of a storage node or a storage array of a memory system. The memory system 1200 may be a chip system. In the embodiment of the present application, the chip system may be composed of a chip, and may also include a chip and other discrete devices.

The storage system 1200 includes at least one processor 1220 for implementing or supporting the storage system 1200 to implement the functions of an array controller of a storage node or a storage array in the methods provided by the embodiments of the present application. For example, the processor 1220 may obtain metadata updated in the storage system, which is described in detail in the method example and is not described herein again.

The memory system 1200 may also include at least one memory 1230 for storing program instructions and/or data. Memory 1230 is coupled to processor 1220. The coupling in the embodiments of the present application is an indirect coupling or a communication connection between devices, units or modules, and may be an electrical, mechanical or other form for information interaction between the devices, units or modules. The processor 1220 may cooperate with the memory 1230. Processor 1220 may execute program instructions stored in memory 1230. At least one of the at least one memory may be included in the processor.

The storage system 1200 may also include an interface 1210 for communicating with the processor 1220 or for communicating with other devices over a transmission medium so that the management apparatus 1200 for storage space may communicate with other devices. Illustratively, the other device may be a client. The processor 1220 may transceive data using the interface 1210.

The specific connection medium among the interface 1210, the processor 1220 and the memory 1230 is not limited in the embodiment of the present application. In fig. 12, the memory 1230, the processor 1220 and the interface 1210 are connected by a bus 1240, the bus is represented by a thick line in fig. 12, and the connection manner among other components is only schematically illustrated and is not limited. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 12, but this is not intended to represent only one bus or type of bus.

In the embodiments of the present application, the processor 1220 may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.

In this embodiment, the memory 1230 may be a non-volatile memory, such as a Hard Disk Drive (HDD) or a solid-state drive (SSD), and may also be a volatile memory (RAM), for example. The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.

Also provided in embodiments herein is a computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method performed by the storage node or array controller in the embodiment shown in fig. 4.

Also provided in embodiments herein is a computer program product comprising instructions which, when executed on a computer, cause the computer to perform the method performed by the storage node or array controller in the embodiment shown in fig. 4.

The embodiment of the present application provides a chip system, which includes a processor and may further include a memory, and is used to implement the functions of the storage node or the array controller in the foregoing method. The chip system may be formed by a chip, and may also include a chip and other discrete devices.

Embodiments of the present application provide a storage system, which includes a storage device and a storage node or array controller in the embodiment shown in fig. 4.

The method provided by the embodiment of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, a network appliance, a user device, or other programmable apparatus. The computer instructions may be stored in, or transmitted from, a computer-readable storage medium to another computer-readable storage medium, e.g., from one website, computer, server, or data center, over a wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL), for short) or wireless (e.g., infrared, wireless, microwave, etc.) network, the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more integrated servers, data centers, etc., the available medium may be magnetic medium (e.g., floppy disk, hard disk, magnetic tape), optical medium (e.g., digital video disc (digital video disc, DVD for short), or a semiconductor medium (e.g., SSD).

24页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种数据迁移方法、系统及相关设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类