CN116561217A - Metadata management system and method - Google Patents

Metadata management system and method Download PDF

Info

Publication number
CN116561217A
CN116561217A CN202210106286.6A CN202210106286A CN116561217A CN 116561217 A CN116561217 A CN 116561217A CN 202210106286 A CN202210106286 A CN 202210106286A CN 116561217 A CN116561217 A CN 116561217A
Authority
CN
China
Prior art keywords
node
data item
metadata
modification
master node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210106286.6A
Other languages
Chinese (zh)
Inventor
崔宝龙
李秀桥
高帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210106286.6A priority Critical patent/CN116561217A/en
Publication of CN116561217A publication Critical patent/CN116561217A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a metadata management system and method, and belongs to the field of metadata. The metadata management system comprises a main node and a secondary node, wherein the main node is a home node of first metadata, the secondary node is a node storing copies of the first metadata, the first metadata comprises first data items and second data items, and the synchronization requirement of the first data items is lower than that of the second data items.

Description

Metadata management system and method
Technical Field
The present disclosure relates to metadata, and more particularly, to a metadata management system and method.
Background
With the development of the information age, the amount of data stored in a storage system is increasing, and metadata is data describing data, and the amount of data is also increasing. In order to facilitate metadata management, metadata is typically stored in a distributed storage system to multiple nodes, where the metadata stored on each node is identical and consistent in real time, so that each node can provide a complete metadata service, but to maintain consistency of metadata among nodes in real time, metadata synchronization among nodes needs to be performed frequently, and frequent metadata synchronization consumes a lot of resources.
Disclosure of Invention
The embodiment of the application provides a metadata management system and method, which can reduce resource consumption caused by metadata synchronization among nodes. The technical scheme is as follows:
in a first aspect, a metadata management system is provided, where the metadata management system includes a primary node and a secondary node, where the primary node is a home node of first metadata, and the secondary node is a node storing a copy of the first metadata, where the first metadata includes a first data item and a second data item, and a synchronization requirement of the first data item is lower than a synchronization requirement of the second data item; the primary node is configured to update the first data item if a modification operation of the first data item is detected, and the secondary node does not receive the synchronized updated first data item; the master node is further configured to update the second data item and synchronize the updated second data item to the slave node if a modification operation of the second data item is detected.
In this application, the first metadata may be the complete metadata describing the data to be written, or may be a slice of the complete metadata describing the data to be written. The first metadata comprises a first data item and a second data item, wherein the synchronization requirement of the first data item is lower than that of the second data item, so that the primary node can update the first data item but not synchronize the updated first data item with the secondary node under the condition that the modification operation of the first data item is detected, update the second data item and synchronize the updated second data item with the secondary node under the condition that the modification operation of the second data item is detected, the data amount needed to keep synchronization in real time among all nodes can be reduced, and the resource consumption of metadata synchronization is effectively reduced.
Optionally, in the case that the first metadata is metadata of one file in the file distributed system, the first data item includes at least one of file size information and file modification time, and the second data item includes file authority information.
In the application, for metadata of files stored in a file type distribution system, because the requirements for consistency of size information and file modification time of the files among nodes are low in general cases and the requirements for consistency of file authority information among the nodes are high, real-time inter-node synchronization can be performed on the file authority information included in the metadata, and the synchronization among the nodes is not required to be maintained in real time for the file size information and the file modification time, so that the data volume for maintaining synchronization among the nodes in real time is reduced, and the consumption of resources by metadata synchronization is reduced.
Optionally, in a case that the first metadata is metadata of one folder in the file distributed system, the first data item includes at least one of child metadata and folder size information, and the second data item includes folder rights information, and the child metadata is used to indicate a file included in the folder.
In the application, for metadata of folders stored in a file distributed system, since the requirements for consistency of child metadata and folder size information of the folders between nodes are low and the requirements for consistency of folder authority information between nodes are high under normal conditions, real-time inter-node synchronization can be performed on the folder authority information included in the metadata, and the child metadata and the folder size information do not need to keep the synchronization between the nodes in real time, so that the data volume for keeping the synchronization between the nodes in real time is reduced, and the consumption of the metadata synchronization on resources is reduced.
Optionally, the second data item includes a manifest field including a node identification of the secondary node. That is, the manifest field may indicate which nodes in the metadata management system are secondary nodes. Therefore, under the condition that the main node fails or is offline, the auxiliary node can rapidly push and select a new main node according to the node identification included in the list field, and the disaster recovery capability of the metadata management system is effectively improved.
Optionally, in the case that the second data item includes a manifest field, the primary node may synchronize the updated second data item to the secondary node based on a node identification included in the manifest field. Illustratively, assuming that the manifest field includes node identifications for secondary node a and secondary node B, the primary node may synchronize the modified second data item to secondary node a and secondary node B. Therefore, the synchronization of the second data item only keeps synchronization between the secondary node indicated in the list field and the primary node, and the number of the secondary nodes indicated in the list field is possibly smaller than the number of nodes of the metadata management system, so that the synchronization of the second data item based on the list field can reduce the inter-node synchronization range of the second data item, and further reduce the consumption of resources in the metadata synchronization process.
Optionally, the metadata management system further includes a first node, where the first node is other nodes except the primary node and the secondary node; the first node is configured to send an access request to the first metadata to the master node; the master node is configured to send a copy of the first metadata to the first node based on the access request; the master node is further configured to add a node identifier of the first node to the manifest field, and synchronize the updated manifest field to the first node and the secondary node based on the node identifier included in the updated manifest field.
In the application, when the client process on the first node needs to access the first metadata, the copy of the first metadata can be pulled from the master node and stored locally, and then, when other client processes in the first node need to access the first metadata, the copy of the first metadata stored in the first node can be accessed directly through the memory sharing technology, so that the access efficiency of the metadata is improved.
Optionally, the primary node is further configured to synchronize the updated first data item to the secondary node when the first metadata is in a non-use state.
In the application, the master node performs synchronization of the first data item only when the first metadata is in a non-use state, so that the first data item can be kept synchronous between nodes finally.
Optionally, the modification operation of the second data item detected by the master node is that the master node determines that the modification operation of the second data item is detected if the modification operation of the second data item is detected by the first client process in the master node. The other is that the secondary node updates the second data item and sends a modification notification message of the second data item to the primary node under the condition that the secondary node detects the modification operation of the client process of the secondary node to the second data item included in the copy of the first metadata; the master node is configured to determine that a modification operation of the second data item is detected, in a case where a modification notification message of the second data item is received.
Optionally, when there are a plurality of modification notification messages, each modification notification message including modification information of the second data item, the master node is configured to select, in a case where there is a conflict in modification information of the second data item included in at least two modification notification messages, one modification notification message from the at least two modification notification messages based on an attribute of a modification item indicated by the modification information of the second data item included in the at least two modification notification messages; updating the second data item based on modification information of the second data item included in the selected modification notification message.
In the application, the master node also has the capability of solving the modification conflict, and can decide to update the first metadata stored by the master node and synchronize the nodes according to which modification notification message under the condition that at least two modification notification messages contain modification information conflict, so that the complexity of metadata synchronization is reduced.
Optionally, the master node is configured to determine that the modification operation of the first data item is detected, if the modification operation of the first client process in the master node is detected.
Optionally, the secondary node is configured to update the first data item if a modification operation of the secondary node to the first data item included in the copy of the first metadata by the client process is detected; when the copy of the first metadata is in a non-use state, sending a synchronization notification message to the master node, wherein the synchronization notification message comprises modification information of the first data item; the master node is configured to update the first data item stored in the master node based on the modification information of the first data item in the synchronization notification message, and synchronize the updated first data item to the slave node.
In the application, for any secondary node, after the client process of the secondary node modifies the first data item in the copy of the first metadata stored by the secondary node, if the first metadata is in a non-use state, a synchronization notification message can be sent to the primary node, and the primary node initiates synchronization between the nodes, so that complexity of synchronization between the nodes can be reduced.
Optionally, the master node is further configured to lock the first data item when updating the first data item, so as to prohibit other client processes except the first client process from modifying the first data item.
In the application, each client process of the master node can access the first metadata through the memory sharing technology, so that the first data item is locked by setting a process lock on the first data item, a plurality of client processes can be prevented from modifying the first data item at the same time, modification conflict is caused, and intra-node consistency of the first data item is ensured.
In a second aspect, a metadata management method is provided, where the metadata management system includes a primary node and a secondary node, the primary node is a home node of first metadata, the secondary node is a node storing a copy of the first metadata, the first metadata includes a first data item and a second data item, and a synchronization requirement of the first data item is lower than a synchronization requirement of the second data item, and the method includes: the primary node updates the first data item under the condition that the primary node detects the modification operation of the first data item, and the secondary node does not receive the synchronous updated first data item; and under the condition that the primary node detects the modification operation of the second data item, updating the second data item, and synchronizing the updated second data item to the secondary node.
Optionally, in the case that the first metadata is metadata of one file in the file distributed system, the first data item includes at least one of file size information and file modification time, and the second data item includes file authority information.
Optionally, in a case that the first metadata is metadata of one folder in the file distributed system, the first data item includes at least one of child metadata and folder size information, and the second data item includes folder rights information, and the child metadata is used to indicate a file included in the folder.
Optionally, the second data item includes a manifest field including a node identification of the secondary node.
Optionally, in a case that the second data item includes a manifest field, the implementation procedure of the master node to synchronize the updated second data item to the secondary node may be: the primary node synchronizes the updated second data item to the secondary node based on the node identification included in the manifest field.
Optionally, the metadata management system further includes a first node, the first node being a node other than the primary node and the secondary node, in which case the method further includes: the first node sends an access request for the first metadata to the master node; the master node sends a copy of the first metadata to the first node based on the access request; the primary node adds the node identification of the first node to the manifest field and synchronizes the updated manifest field to the first node and the secondary node based on the node identification included in the updated manifest field.
Optionally, after updating the first data item, if the primary node detects that the first metadata is in a non-use state, the primary node may synchronize the updated first data item to the secondary node.
Optionally, in the present application, the secondary node may update the second data item and send a modification notification message of the second data item to the primary node when detecting a modification operation of the secondary data item included in the copy of the first metadata by the client process of the secondary node; accordingly, the master node determines that a modification operation of the second data item is detected upon receiving a modification notification message of the second data item.
Wherein, the modification notification message may be one or more, when the modification notification messages are more than one, each modification notification message includes modification information of the second data item, and in this case, the process of updating the second data item by the master node may be; in the case that there is a conflict in the modification information of the second data item included in the at least two modification notification messages, the master node selects one modification notification message from the at least two modification notification messages based on the attribute of the modification item indicated by the modification information of the second data item included in the at least two modification notification messages; updating the second data item based on modification information of the second data item included in the selected modification notification message.
Optionally, in the present application, the master node determines that the modification operation of the second data item is detected if the modification operation of the first client process in the master node is detected. That is, in this application, the master node detecting a modification operation of the second data item may refer to detecting a modification operation of the second data item by its own client process.
Optionally, the secondary node updates the first data item if detecting a modification operation of the secondary node to the first data item included in the copy of the first metadata by the secondary node; when the copy of the first metadata is in a non-use state, sending a synchronization notification message to the master node, wherein the synchronization notification message comprises modification information of the first data item; correspondingly, the master node updates the first data item stored by the master node based on the modification information of the first data item in the synchronization notification message, and synchronizes the updated first data item to the slave node.
That is, in the present application, after the client process in the secondary node modifies the first data item stored in itself, when the first metadata is no longer used, the secondary node may instruct the primary node to initiate synchronization of the first data item by sending a synchronization notification message to the primary node.
Optionally, the master node determines that a modification operation of the first data item is detected if a modification operation of the first data item by a first client process in the master node is detected. That is, in this application, the master node detecting a modification operation of the first data item refers to the master node detecting a modification operation of the first data item by its own client process.
Optionally, when the master node updates the first data item, the master node may further lock the first data item to prohibit other client processes except the first client process from modifying the first data item, so as to avoid modification conflicts.
In a third aspect, a metadata management apparatus is provided, the metadata management apparatus comprising at least one module. When the apparatus is applied to a master node, the apparatus has a function of implementing the behavior of the master node in the first aspect, and the at least one module is configured to perform the steps performed by the master node provided in the first aspect; when the apparatus is applied to a secondary node, the apparatus has a function of implementing the behavior of the secondary node in the first aspect, and the at least one module is configured to perform the steps performed by the secondary node provided in the first aspect; when the apparatus is applied to a first node, the apparatus has a function of implementing the behavior of the first node in the first aspect, and the at least one module is configured to perform the steps performed by the first node provided in the first aspect.
In a fourth aspect, a storage node is provided, where the storage node includes a processor and a memory, where when the storage node is a master node, the memory is configured to store a program that supports the master node to execute the steps executed by the master node provided in the first aspect, and store data related to implementing the steps executed by the master node provided in the first aspect; when the storage node is a secondary node, the memory is configured to store a program for supporting the secondary node to execute the steps executed by the secondary node provided in the first aspect, and store data related to the steps executed by the secondary node provided in the first aspect; when the storage node is a first node other than the primary node and the secondary node, the memory is configured to store a program supporting the first node to execute the steps executed by the first node provided in the first aspect, and to store data related to implementing the steps executed by the first node provided in the first aspect. The processor is configured to execute a program stored in the memory.
In a fifth aspect, there is provided a computer readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the steps performed by the primary node, the secondary node, or the first node other than the primary node and the secondary node in the metadata management system described in the first aspect above.
In a sixth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps performed by a primary node, a secondary node or a first node other than the primary node and the secondary node in a metadata management system as described in the first aspect above.
The technical effects obtained by the second, third, fourth, fifth and sixth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and are not described in detail herein.
The beneficial effects that technical scheme that this application embodiment provided include at least:
in this embodiment of the present application, the first metadata includes a first data item and a second data item, where a synchronization requirement of the first data item is lower than that of the second data item, so that the master node may update the first data item but not synchronize the updated first data item with the slave node when detecting a modification operation of the first data item, and update the second data item and synchronize the updated second data item with the slave node when detecting a modification operation of the second data item, thereby reducing an amount of data that needs to be synchronized in real time between the nodes, and effectively reducing resource consumption of metadata synchronization.
Drawings
FIG. 1 is a block diagram of a distributed storage system to which a metadata management method according to an embodiment of the present application is applicable;
FIG. 2 is a block diagram of a distributed storage system to which another metadata management method according to an embodiment of the present application is applicable;
FIG. 3 is a flowchart of a metadata management method provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of a method for pulling a copy of first metadata from a master node according to an embodiment of the present application;
FIG. 5 is a flowchart of managing a first data item and a second data item in a first metadata provided in an embodiment of the present application;
FIG. 6 is a schematic diagram of a synchronization process for a second data item according to an embodiment of the present application;
fig. 7 is a schematic diagram of a new master node selection provided in an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Before explaining the embodiments of the present application in detail, an implementation environment of the embodiments of the present application is described.
The metadata management method provided by the embodiment of the application can be applied to a distributed storage system. The distributed storage system is a system for storing data on a plurality of independent storage nodes in a scattered manner, and compared with a centralized storage system, the distributed storage system adopts an extensible system structure, and the storage load is shared by the plurality of storage nodes, so that the reliability, the availability and the access efficiency of the system are improved, and the system is easy to expand.
Fig. 1 is a block diagram of a distributed storage system to which a metadata management method according to an embodiment of the present application is applied. When the metadata management method provided in the embodiment of the present application is applied to each storage node in a distributed storage system to manage metadata, the distributed storage system may also be referred to as a metadata management system. As shown in fig. 1, the system includes a plurality of storage nodes 110 (three storage nodes 110 are shown in fig. 1, but are not limited to three storage nodes 110), and the storage nodes 110 may communicate with each other.
Storage node 110 is a device that has both computing and storage capabilities, such as a server, desktop computer, etc., and as an example, an ARM server or an X86 server may be used as storage node 110 herein. On software, each storage node 110 has an operating system thereon. In one possible implementation, virtual machine 111 may be created on storage node 110, with computing resources required by virtual machine 111 originating from processor 112 and memory 113 local to storage node 110, and storage resources required by virtual machine 111 originating from hard disk 115 local to storage node 110, as well as from hard disks 115 in other storage nodes 110. In addition, various applications may be run in virtual machine 111, and a user may trigger a read/write data request through an application in virtual machine 111.
In hardware, as shown in fig. 1, the storage node 110 includes at least a processor 112, a memory 113, a network card 114, and a hard disk 115. The processor 112, the memory 113, the network card 114 and the hard disk 115 are connected by buses. Wherein the processor 112 and the memory 113 are used for providing computing resources. Specifically, the processor 112 is a central processing unit (central processing unit, CPU) for processing data access requests from outside the storage node 110 or requests generated inside the storage node 110. Illustratively, when the processor 112 receives write data requests, the data in these write data requests is temporarily stored in the memory 113. When the total amount of data in the memory 113 reaches a certain threshold, the processor 112 sends the data stored in the memory 113 to the hard disk 105 for persistent storage. In addition, the processor 112 is configured to perform calculations or processing on data, such as metadata management, deduplication, data compression, data verification, virtualized storage space, address translation, and the like.
Only one CPU 112 is shown in fig. 1, and in practical applications, there are often a plurality of CPUs 112, where one CPU 112 has one or more CPU cores. The present embodiment does not limit the number of CPUs and the number of CPU cores. The memory 113 is an internal memory for directly exchanging data with the processor, and can read and write data at any time, and is fast, and is used as a temporary data memory for an operating system or other running programs. The Memory includes at least two types of memories, for example, the Memory may be a random access Memory (ram) or a Read Only Memory (ROM). For example, the random access memory is a dynamic random access memory (Dynamic Random Access Memory, DRAM), or a storage class memory (Storage Class Memory, SCM). DRAM is a semiconductor memory, which, like most random access memories (Random Access Memory, RAM), is a volatile memory (volatile memory) device. SCM is a composite storage technology combining both traditional storage devices and memory characteristics, and storage class memories can provide faster read and write speeds than hard disks, but access speeds slower than DRAM, and are cheaper in cost than DRAM. However, the DRAM and SCM are only exemplary in this embodiment, and the memory may also include other random access memories, such as static random access memories (Static Random Access Memory, SRAM), and the like. For read-only memory, for example, it may be a programmable read-only memory (Programmable Read Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, EPROM), etc. In addition, the memory 113 may be a Dual In-line Memory Module (Dual In-line Memory Module, abbreviated as DIMM) memory module, i.e., a module composed of DRAM, or a Solid State Disk (SSD). In practical applications, a plurality of memories 113 and different types of memories 113 may be configured in the storage node 110. The number and type of the memories 113 are not limited in this embodiment. In addition, the memory 113 may be configured to have a power conservation function. The power-up protection function means that the data stored in the memory 113 is not lost when the system is powered down and powered up again. The memory having the power-saving function is called a nonvolatile memory.
The hard disk 115 is used to provide storage resources, such as storing data. It may be a magnetic disk or other type of storage medium such as a solid state disk or shingled magnetic recording hard disk, etc. The network card 114 is used to communicate with other storage nodes 110.
Alternatively, referring to FIG. 2, in one possible implementation, virtual machine 111 cannot be created on multiple storage nodes 110 within the system at the software level, in which case storage nodes 110 may receive requests from outside themselves and process the requests by processor 112, or a client program may be installed on storage nodes 110, so that processor 112 may also process requests generated by client programs on storage nodes 110.
Fig. 3 is a flowchart of a metadata management method according to an embodiment of the present application, where the method may be applied to the above-mentioned distributed storage system, and it should be noted that each node, such as a primary node, a secondary node, and other nodes except the primary node and the secondary node, mentioned below may be implemented by a storage node in the above-mentioned distributed storage system. As shown in fig. 3, the method comprises the steps of:
step 301: the master node creates first metadata.
In this embodiment, when a client process in a certain node in the metadata management system initiates a write data request, if first metadata of data to be written cannot be found according to the write data request, the client process may determine a home node of the first metadata to be created, that is, determine a master node of the first metadata, from a plurality of nodes included in the metadata management system, and then send a creation request of the first metadata to the master node. Correspondingly, the master node receives a creation request of the first metadata sent by the client process, creates the first metadata based on the creation request, and stores the first metadata into the memory. The first metadata may include a first data item and a second data item according to a difference in synchronization requirement of each data item in the first metadata between nodes, wherein the synchronization requirement of the first data item is lower than that of the second data item.
It should be noted that, the client process that initiates the metadata creation request may be a client process on any node of the metadata management system, and the first metadata may be complete metadata describing the data to be written, or may be a slice describing the complete metadata of the data to be written.
In addition, the client process may use a hash algorithm to determine which node in the metadata management system is used as the master node of the first metadata, or may use other implementations to implement the master node of the first metadata, which is not limited in this embodiment of the present application.
It should be noted that, in the embodiment of the present application, the home nodes of metadata of different data may be the same or different, that is, the home nodes of different metadata may be the same or different.
In addition, in the embodiment of the present application, according to different application scenarios of the distributed storage system, the synchronization requirements of different types of data items in the metadata may also be different, so that the implementation manners of the first data item and the second data item in the first metadata are also different.
For example, when the above-described distributed storage system is a file distributed system, in the case where the first metadata is metadata of one file in the file distributed system, since the file size information and the file modification time are not required for synchronization between nodes when a plurality of nodes write the file together, synchronization between nodes may not be necessary in real time, and thus the first data item may include at least one of the file size information and the file modification time. The file permission information can indicate which nodes can access the file and which nodes cannot access the file, and the real-time inter-node synchronization of the file permission information can prevent the nodes without access permission from wrongly accessing the file, so that the requirement of the file permission information on the synchronization among the nodes is higher, and the second data item can comprise the file permission information based on the file permission information.
Still taking a file distributed system as an example, in the case that the first metadata is metadata of one folder in the file distributed system, if the application scenario does not need to perform logic flow judgment according to whether a certain file exists under a certain folder, the first data item may include child metadata in metadata of the folder, where the child metadata is used to indicate the file included in the folder. In addition, in such a scenario, the first data item may also be included in the folder size information. And, the second data item may include folder rights information.
After the first metadata is created, for a plurality of client processes on the main node, the client processes can directly access the first metadata stored in the memory of the main node, that is, the client processes can share the first metadata in the memory of the main node through a memory sharing technology, so that the access efficiency of the first metadata is improved.
Step 302: the first node sends an access request to the first metadata to the master node, wherein the first node is any node in the metadata management system except the master node, which does not store a copy of the first metadata.
Referring to fig. 4, after the first metadata is created by the master node, for other nodes in the system, for example, the first node, if a second client process in the first node is to access the first metadata, the first node may first search whether the first metadata is stored in itself, and if not, determine the home node of the first metadata, that is, the master node. Then, the first node sends an access request of the first metadata to the master node. Wherein the second client process may be any client process in the first node.
The implementation manner of determining the home node of the first metadata by the first node may refer to the implementation manner of determining the home node of the first metadata described in step 301, which is not described herein.
In addition, each node of the metadata management system in the embodiment of the application is running a service process, and the service process can be used for transmitting metadata related information between the nodes. Based on this, the first node may send an access request of the first metadata to the master node through its own service process.
Step 303: the master node transmits a copy of the first metadata to the first node based on the access request.
After receiving an access request of first metadata sent by a first node, a master node creates a copy of the first metadata, and sends the created copy of the first metadata to the first node.
It should be noted that, in this embodiment of the present application, the second data item of the first metadata may further include a manifest field, where the manifest field includes a node identifier of the secondary node. That is, the manifest field may indicate which nodes in the metadata management system have copies of the first metadata stored therein. Based on this, since the primary node will become a secondary node of the first metadata after sending a copy of the first metadata to the first node, the primary node may add the node identification of the first node to the manifest field to update its own stored manifest field after sending the copy of the first metadata to the first node.
After receiving the copy of the first metadata, the first node may store the copy of the first metadata in the memory, such that the first node becomes a secondary node of the first metadata. In this way, the second client process in the first node can access the copy of the first metadata stored in the memory of the first node. Similarly, when the other client processes in the first node want to access the first metadata, the other client processes may also directly access the copy of the first metadata stored in the memory of the first node. That is, the multiple client processes in the subsequent first node may also share the copy of the first metadata in the memory of the first node by using the memory sharing technology, thereby improving the access efficiency of the metadata.
For each node in the metadata management system other than the primary node and the secondary node of the first metadata, the above-mentioned steps 302 and 303 may be referred to, and when the first metadata is accessed for the first time, a copy of the first metadata is pulled from the primary node and stored, thereby becoming the secondary node of the first metadata.
After the primary node creates the first metadata, the primary node itself may modify the first metadata and the secondary node may modify a copy of the first metadata, in which case the primary node may manage the first data item and the second data item by following steps 501-505. Referring to fig. 5, the process includes:
step 501: the master node updates the first data item if a modification operation of the first data item is detected.
In one implementation, the master node determines that the modification operation of the first data item is detected when detecting the modification operation of the first client process on the master node, and updates the first data item according to the modification operation of the first client process on the first data item.
Illustratively, the first data item may include one or more sub-data items. Any one of the first data items may be referred to as a first sub data item. When the main node detects the modification operation of the first client process on the first sub data item, the first sub data item is updated based on the modification operation, so that the first data item is updated.
Optionally, the master node may lock the first data item when updating the first data item based on the modification operation of the first client process, so as to prohibit other client processes than the first client process from modifying the first data item.
For example, the master node may set a corresponding process lock for the first data item to lock or unlock the first data item, so that in a process that the master node updates the first data item according to the modification operation of the first client process, the master node may implement locking of the first data item through the process lock to prohibit other client processes except the first client process from accessing the first data item.
The process lock may be a 1-bit tag field set for the first data item, the first data item is locked by modifying the value of the tag field to 1, the first data item is unlocked by modifying the value of the tag field to 0, and the first data item may be locked and unlocked by other modes.
Optionally, the master node may set a process lock for each sub data item of the first data item to lock and unlock each sub data item, so that when the master node updates a certain sub data item in the first data item based on a modification operation of the first client process, the sub data item may be locked by the process lock corresponding to the sub data item, so as to prohibit other client processes except the first client process from accessing the sub data item.
Optionally, the master node may set a corresponding process lock for the first metadata to which the first data item belongs to lock and unlock the first metadata, so that in a process that the master node updates the first data item according to the modification operation of the first client process on the first data item, the master node may implement locking of the first metadata through the process lock, so as to prohibit other client processes except for the first client process from accessing the first metadata.
Step 502: the master node detects whether the first metadata is in a non-use state or a use state.
After updating the first data item, the master node may detect whether there is any client process currently using the first metadata, determine that the first metadata is currently in a use state when detecting that there is a client process using the first metadata, and determine that the first metadata is currently in a non-use state when detecting that there is no client process using the first metadata.
The first data item may include a process record field for recording whether the first metadata is being used by the client process. Based on this, the master node may obtain a process record field in the updated first data item, and determine that the first metadata is currently in a non-use state if the process record field indicates that no client process is using the first metadata. If the process record field indicates that the client process is using the first metadata, then it is determined that the first metadata is currently in use.
If the master node detects that the first metadata is in use, then the following step 503 may be performed. If the master node detects that the first metadata is in a non-use state, the master node may perform step 504 described below.
Step 503: the primary node does not synchronize the updated first data item to the secondary node if the first metadata is in use.
In the case where the primary node determines that there is a process in itself using the first metadata, the primary node may temporarily not synchronize the updated first data item with the secondary node, since the first data item in the first metadata may be being modified or may be modified immediately.
Step 504: and the main node synchronizes the updated first data item to the auxiliary node when the first metadata is in a non-use state.
And under the condition that the master node determines that no process uses the first metadata, the master node can send a synchronization instruction of the first data item based on the slave node indicated by the manifest field in the second data item stored by the master node, wherein the synchronization instruction comprises the updated first data item or the modification information of the first data item. Correspondingly, the auxiliary node receives a synchronization instruction of the first data item sent by the main node, and updates the first data item in the copy of the first metadata stored by the auxiliary node based on the received synchronization instruction.
For example, assuming that the primary node updates the sub-data item 1 in the first data item, and the manifest field includes node identifiers of the secondary node a and the secondary node B, when determining that the client processes of the primary node do not use the first metadata, the primary node sends a synchronization instruction to the secondary node a and the secondary node B, where the synchronization instruction may carry the updated sub-data item 1. Correspondingly, the auxiliary node A and the auxiliary node B receive a synchronous instruction sent by the main node, and update the sub-data item 1 included in the first data item in the copy of the first metadata stored by the auxiliary node A and the auxiliary node B to the sub-data item 1 carried in the synchronous instruction.
Optionally, in some possible implementations, the master node may also synchronize the first data item based on a preset time interval. That is, the master node may have a synchronization timer for the first data item configured therein. In this way, after updating the first data item, the master node may determine whether the synchronization time of the first data item has been reached based on the synchronization timer of the first data item, and if the synchronization time of the first data item has been reached, synchronize the updated first data item to the slave node. If the synchronization time of the first data item is not reached, the updated first data item is not synchronized to the secondary node.
Alternatively, the master node may perform steps 502 to 504 in case it determines that the synchronization moment of the first data item is reached. That is, in the case where it is determined that the synchronization time of the first data item has arrived, it is determined whether to synchronize the updated first data item with the secondary node by detecting whether the first metadata is in the use state. Alternatively, the primary node may not perform the operation of synchronizing the first data item to the secondary node. That is, the first data item is not synchronized whether or not the first data item is modified, whether or not the first metadata is in use.
Of course, in some possible cases, the master node may synchronize itself stored first data items to the slave node at preset time intervals based on the synchronization counter even if the first data items are not updated, i.e. step 501 is not performed.
The foregoing mainly describes the update and synchronization process of the master node on the first data item in the first metadata stored by itself. Optionally, for any secondary node, the secondary node may refer to step 501 to detect a modification operation of the client process of the secondary node on the first data item included in the copy of the first metadata stored by the secondary node, and update the first data item if detecting a modification operation of the client process of the secondary node on the first data item included in the copy of the first metadata. The secondary node may then detect whether the copy of the first metadata is in use or not in use, with reference to step 502 described above. And then, when the secondary node detects that the copy of the first metadata is in a non-use state, sending a synchronization notification message to the primary node, wherein the synchronization notification message comprises modification information of the first data item. Accordingly, the primary node may update the first data item stored in the primary node based on the modification information of the first data item in the synchronization notification message, and synchronize the updated first data item to other secondary nodes except for sending the synchronization notification message.
It should be noted that, in the embodiment of the present application, after determining that the copy of the first metadata is in the non-use state, the secondary node may further delete the copy of the first metadata because no process is using the copy of the first metadata. Because the copy of the first metadata is to be deleted, before deleting the copy of the first metadata, the secondary node may delete its own node identifier in the manifest field, and then send a synchronization notification message to the primary node, where the synchronization notification message may include not only modification information of the first data item, but also modification information of the second data item, that is, the synchronization notification message carries modification information of the copy of the first metadata. The modification information of the data may refer to the updated corresponding data, or may refer to information describing the modification content of the corresponding data. After sending the synchronization notification message to the primary node, the secondary node deletes the locally stored copy of the first metadata. After receiving the synchronization notification message, the master node updates the first metadata stored by the master node based on the modification information carried in the synchronization notification message. The primary node may then synchronize the updated first metadata to the secondary node indicated by the node identification in the manifest field.
It should be noted that, after the foregoing secondary node deletes the copy of the first metadata, the secondary node will not store the copy of the first metadata, at this time, the secondary node will not be a secondary node of the first metadata any more, and subsequently, when there is a client process to access the first metadata on the secondary node again, the copy of the first metadata may be pulled from the primary node again by referring to the manner of pulling the copy of the first metadata by the first node.
Step 505: and under the condition that the primary node detects the modification operation of the second data item, updating the second data item, and synchronizing the updated second data item to the secondary node.
In a first implementation manner, the master node determines that the modification operation of the second data item is detected under the condition that the modification operation of the first client process of the master node on the second data item is detected, updates the second data item according to the modification operation of the first client process on the second data item, and further synchronizes the updated second data item to the slave node. The first client process is any client process in the master node.
For example, the second data item may include one or more sub-data items, any one of which is referred to as a second sub-data item. When the main node detects the modification operation of the first client process on the second sub data item, the second sub data item is updated based on the modification operation, so that the second data item is updated. The master node may then send a synchronization instruction for the second data item to the slave node indicated by the updated manifest field for the second data item, the synchronization instruction including modification information for the second sub data item. Correspondingly, the auxiliary node receives a synchronous instruction sent by the main node and updates the second sub-data item in the copy of the first metadata stored by the auxiliary node based on the synchronous instruction.
Optionally, the master node may lock the second data item when updating the second data item to prohibit other client processes than the first client process from modifying the first data item.
The specific implementation manner of locking the second data item may refer to the specific implementation manner of locking the first data item, which is not described herein.
In a second implementation, referring to fig. 6, the primary node determines that a modification operation of the second data item is detected in case of receiving a modification notification message of the second data item sent by the secondary node. The primary node may then update the second data item based on the modification notification message for the second data item and synchronize the updated second data item to the secondary node.
In this embodiment of the present application, the secondary node may also refer to the above-described manner to detect a modification operation of the client process of the secondary node on the second data item included in the copy of the first metadata, and in the case that the modification operation of the client process of the secondary node on the first data item is detected, the secondary node may update the second data item stored by the secondary node and send a modification notification message of the second data item to the primary node; the master node determines that a modification operation of the second data item is detected upon receiving a modification notification message of the second data item. Wherein the modification notification message may comprise modification information of the second data item.
It should be noted that there may be one or more secondary nodes of the first metadata, and thus, the primary node may receive the modification notification message of the second data item sent by one secondary node at a time, or may simultaneously receive the modification notification messages of the second data items sent by multiple secondary nodes.
When the modification notification message received by the master node is one, updating the second data item in the first metadata stored by the master node according to the received modification notification message, and then synchronizing the updated second data item to the slave node.
The specific implementation process of the master node updating the second data item in the first metadata stored in the master node according to the received modification notification message and synchronizing the updated second data item to the slave node may refer to the specific implementation process of the master node updating the first data item in the first metadata stored in the master node according to the received synchronization notification message and synchronizing the updated first data item to the slave node, which is not described herein in detail.
When the modification notification messages received by the master node are multiple, the master node selects one modification notification message from the at least two modification notification messages based on the attribute of the modification item indicated by the modification information of the second data item included in the at least two modification notification messages under the condition that the modification information of the second data item included in the at least two modification notification messages conflicts; updating the second data item based on modification information of the second data item included in the selected modification notification message.
For example, the master node may search for modification information modified for the same sub-data item in the second data item from the plurality of modification notification messages based on the modification information in the respective modification notification messages. If it is found that the modification information included in the at least two modification notification messages is for the same sub-data item in the second data item, but the modification content is different, i.e. when the modifications to the same sub-data item in the second data item in the at least two modification notification messages are different, it is determined that there is a conflict in the modification information of the second data item included in the at least two modification notification messages. In this case, the master node may determine a conflict resolution principle of the modified sub data item according to the attribute of the modification item indicated by the modification information included in the at least two modification notification messages, i.e. the attribute of the modified sub data item, and further determine with which of the secondary nodes the modification notification message updates the second data item stored by itself based on the conflict resolution principle.
For example, the secondary node a sends a modification notification message a to the primary node, where the modification information in the modification notification message a indicates that the file authority information in the first metadata is updated to the file authority information a, and at the same time, the secondary node B sends a modification notification message B to the primary node, where the modification notification message B indicates that the file authority information in the first metadata is updated to the file authority information B, and where the secondary node a and the secondary node B modify the file authority information differently, so as to cause a modification conflict of the file authority information, the primary node may determine with which secondary node the modification notification message of the file authority information updates the file authority information of the first metadata stored by itself according to the attribute of the file authority information, and if the primary node determines that the file authority information stored by itself is updated according to the modification notification message of the secondary node a, send a message of the file authority information setting failure to the secondary node B.
In addition, when the master node synchronizes the updated second data item, the updated second data item may be synchronized to other secondary nodes except for sending the synchronization notification message, or may be synchronized to all secondary nodes, which is not limited herein.
In a third implementation, as can be seen from the description of the foregoing step 303, the master node, after sending the copy of the first metadata to the first node, acts as determining the first node as a secondary node for the first metadata, and therefore, the master node may add the identification of the first node to the manifest field included in the second data item. In this case, the operation of the master node adding the identifier of the first node to the manifest field is also a modification operation to the second data item, and at this time, the master node may acquire the updated manifest field and synchronize the updated manifest field to the slave node based on the node identifier included in the updated manifest field.
Optionally, in this embodiment of the present application, the foregoing manifest field may include, in addition to the node identifier of the secondary node, the node identifier of the primary node, and in this case, when the secondary node finds that the primary node fails or has gone offline, the secondary node may further reselect the primary node based on the node identifier included in the manifest field.
In an exemplary embodiment, when the secondary node sends a modification notification message of the second data item or a synchronization notification message of the first data item or other information to the primary node, if feedback of the primary node is not received for more than a certain period of time, the primary node is determined to be faulty or is offline, in this case, the secondary node may delete the node identifier of the primary node in the manifest field in the second data item stored in the secondary node, to obtain an updated manifest field, and then use the node indicated by the first node identifier in the updated manifest field as a new primary node. After determining the new master node, if the new master node is the slave node and the updated manifest field does not include the node identification of other nodes except the slave node, the slave node ends the operation.
Optionally, if the first node identifier in the updated list field is the node identifier of the secondary node, that is, the new primary node is the secondary node, and the updated list field further includes node identifiers of other secondary nodes, the new primary node may send a synchronization instruction of the updated list field to other secondary nodes indicated in the updated list field, and accordingly, the other secondary nodes update the self-stored list field according to the received synchronization instruction.
Optionally, if the first node in the updated list field indicates that the indicated node is not the secondary node, that is, the new primary node is not the secondary node, the secondary node may send a modification notification message of the list field to the new primary node, and accordingly, the new primary node updates the self-stored list field according to the received modification notification message, and sends a synchronization instruction of the list field to other secondary nodes, and accordingly, the other secondary nodes update the self-stored list field according to the received synchronization instruction.
It should be noted that, after the new master node is determined, the new master node may implement a corresponding operation with reference to the function of the master node.
In addition, in the embodiment of the present application, step 505 may be performed before step 501, may be performed after step 503 or step 504, and may be performed during the execution of steps 501-504, which is not limited in this embodiment of the present application.
In this embodiment of the present application, the first metadata includes a first data item and a second data item, where a synchronization requirement of the first data item is lower than that of the second data item, so that the master node may update the first data item but not synchronize the updated first data item with the slave node when detecting a modification operation of the first data item, and update the second data item and synchronize the updated second data item with the slave node when detecting a modification operation of the second data item, thereby reducing an amount of data that needs to be synchronized in real time between the nodes, and effectively reducing resource consumption of metadata synchronization.
In addition, in the metadata management system of the embodiment of the present application, for other nodes except the master node, copies of the first metadata are locally stored only when the first metadata needs to be accessed, and become slave nodes, that is, the number of the slave nodes in the embodiment of the present application may be smaller than the number of nodes of the metadata management system.
Furthermore, the master node in the embodiment of the present application further has a capability of resolving modification conflicts, so that under the condition that at least two modification notification messages include modification information conflicts, it can be determined according to which modification notification message to update the first metadata stored in the master node and perform synchronization between nodes, thereby reducing complexity of metadata synchronization.
Finally, since the first metadata in the embodiment of the present application includes the manifest field, where the manifest field includes the node identifier of the secondary node, when the primary node fails or is already offline, the secondary node can quickly push out the new primary node according to the node identifier included in the manifest field, thereby effectively improving the disaster recovery capability of the metadata management system.
In the above embodiments, it 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 the computer instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, data subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., digital versatile Disk (Digital Versatile Disc, DVD)), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description is not intended to limit the embodiments of the present application, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the embodiments of the present application are intended to be included within the scope of the embodiments of the present application.

Claims (26)

1. The metadata management system is characterized by comprising a main node and a secondary node, wherein the main node is a home node of first metadata, the secondary node is a node storing a copy of the first metadata, the first metadata comprises a first data item and a second data item, and the synchronization requirement of the first data item is lower than that of the second data item;
the primary node is configured to update the first data item if a modification operation of the first data item is detected, and the secondary node does not receive the synchronized updated first data item;
The master node is further configured to update the second data item and synchronize the updated second data item to the slave node if a modification operation of the second data item is detected.
2. The metadata management system according to claim 1, wherein in the case where the first metadata is metadata of one file in a file distribution system, the first data item includes at least one of file size information and file modification time, and the second data item includes file authority information.
3. The metadata management system according to claim 1 or 2, wherein in the case where the first metadata is metadata of one folder in a file distribution system, the first data item includes at least one of child metadata for indicating a file included in the folder and folder size information, and the second data item includes folder authority information.
4. A metadata management system according to any of claims 1-3, wherein said second data item comprises a manifest field comprising a node identification of said secondary node.
5. The metadata management system of claim 4, wherein the master node is configured to:
and synchronizing the updated second data item to the secondary node based on the node identification included in the manifest field.
6. The metadata management system according to claim 4, further comprising a first node that is other than the primary node and the secondary node;
the first node is configured to send an access request to the first metadata to the master node;
the master node is configured to send a copy of the first metadata to the first node based on the access request;
the master node is further configured to add a node identifier of the first node to the manifest field, and synchronize the updated manifest field to the first node and the secondary node based on the node identifier included in the updated manifest field.
7. The metadata management system according to any one of claims 1-6, wherein the master node is further configured to:
and synchronizing the updated first data item to the auxiliary node when the first metadata is in a non-use state.
8. The metadata management system according to any one of claims 1 to 7, wherein,
the secondary node is used for updating the second data item and sending a modification notification message of the second data item to the primary node under the condition that the secondary node detects modification operation of the client process of the secondary node on the second data item included in the copy of the first metadata;
the master node is configured to determine that a modification operation of the second data item is detected, in a case where a modification notification message of the second data item is received.
9. The metadata management system according to claim 8, wherein there are a plurality of the modification notification messages, each modification notification message including modification information of the second data item, the master node being configured to;
in the case that there is a conflict in the modification information of the second data item included in at least two modification notification messages, selecting one modification notification message from the at least two modification notification messages based on the attribute of the modification item indicated by the modification information of the second data item included in the at least two modification notification messages;
updating the second data item based on modification information of the second data item included in the selected modification notification message.
10. The metadata management system according to any one of claims 1 to 9, wherein,
the master node is configured to determine that a modification operation of the second data item is detected if a modification operation of the second data item by a first client process in the master node is detected.
11. The metadata management system according to any one of claims 1 to 10, wherein,
the secondary node is used for updating the first data item under the condition that the secondary node detects the modification operation of the client process of the secondary node on the first data item included in the copy of the first metadata; when the copy of the first metadata is in a non-use state, sending a synchronization notification message to the master node, wherein the synchronization notification message comprises modification information of the first data item;
the master node is configured to update the first data item stored in the master node based on the modification information of the first data item in the synchronization notification message, and synchronize the updated first data item to the slave node.
12. The metadata management system of any one of claims 1 to 11 wherein,
the master node is configured to determine that a modification operation of the first data item is detected if a modification operation of the first data item by a first client process in the master node is detected.
13. The metadata management system of claim 12, wherein the master node is further configured to:
when the first data item is updated, the first data item is locked to prohibit other client processes except the first client process from modifying the first data item.
14. A metadata management method, applied to a metadata management system, where the metadata management system includes a primary node and a secondary node, the primary node is a home node of first metadata, the secondary node is a node storing a copy of the first metadata, the first metadata includes a first data item and a second data item, and a synchronization requirement of the first data item is lower than a synchronization requirement of the second data item, and the method includes:
the primary node updates the first data item under the condition that the primary node detects the modification operation of the first data item, and the secondary node does not receive the synchronous updated first data item;
and under the condition that the primary node detects the modification operation of the second data item, updating the second data item, and synchronizing the updated second data item to the secondary node.
15. The method of claim 14, wherein in the case where the first metadata is metadata of one file in a file distributed system, the first data item includes at least one of file size information and file modification time, and the second data item includes file rights information.
16. The method according to claim 14 or 15, wherein in case the first metadata is metadata of one folder in a file distribution system, the first data item comprises at least one of child metadata and folder size information, the second data item comprises folder rights information, and the child metadata is used to indicate a file included in the folder.
17. The method according to any of claims 14-16, wherein the second data item comprises a manifest field comprising a node identification of the secondary node.
18. The method of claim 17, wherein the master node synchronizing the updated second data item to the secondary node comprises:
the primary node synchronizes the updated second data item to the secondary node based on the node identification included in the manifest field.
19. The method of claim 17, wherein the metadata management system further comprises a first node, the first node being a node other than the primary node and the secondary node, the method further comprising:
the first node sends an access request for the first metadata to the master node;
the master node sends a copy of the first metadata to the first node based on the access request;
the primary node adds the node identification of the first node to the manifest field and synchronizes the updated manifest field to the first node and the secondary node based on the node identification included in the updated manifest field.
20. The method according to any of claims 14-19, wherein the master node, after updating the first data item, further comprises:
and the main node synchronizes the updated first data item to the auxiliary node when the first metadata is in a non-use state.
21. The method according to any one of claims 14-20, further comprising:
the secondary node updates the second data item under the condition that the secondary node detects the modification operation of the client process of the secondary node to the second data item included in the copy of the first metadata, and sends a modification notification message of the second data item to the primary node;
The master node determines that a modification operation of the second data item is detected upon receiving a modification notification message of the second data item.
22. The method of claim 21, wherein there are a plurality of said modification notification messages, each modification notification message including modification information for said second data item, said master node updating said second data item, comprising;
in the case that there is a conflict in the modification information of the second data item included in the at least two modification notification messages, the master node selects one modification notification message from the at least two modification notification messages based on the attribute of the modification item indicated by the modification information of the second data item included in the at least two modification notification messages; updating the second data item based on modification information of the second data item included in the selected modification notification message.
23. The method according to any one of claims 14-22, further comprising:
the master node determines that a modification operation of the second data item is detected if a modification operation of the second data item is detected by a first client process in the master node.
24. The method according to any one of claims 14-23, further comprising:
the secondary node updates the first data item under the condition that the secondary node detects the modification operation of the client process of the secondary node on the first data item included in the copy of the first metadata; when the copy of the first metadata is in a non-use state, sending a synchronization notification message to the master node, wherein the synchronization notification message comprises modification information of the first data item;
and the master node updates the first data item stored by the master node based on the modification information of the first data item in the synchronization notification message, and synchronizes the updated first data item to the slave node.
25. The method according to any one of claims 14-24, further comprising:
the master node determines that a modification operation of the first data item is detected if a modification operation of the first data item by a first client process in the master node is detected.
26. The method of claim 25, wherein when the master node updates the first data item, the method further comprises:
The master node locks the first data item to prohibit other client processes than the first client process from modifying the first data item.
CN202210106286.6A 2022-01-28 2022-01-28 Metadata management system and method Pending CN116561217A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210106286.6A CN116561217A (en) 2022-01-28 2022-01-28 Metadata management system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210106286.6A CN116561217A (en) 2022-01-28 2022-01-28 Metadata management system and method

Publications (1)

Publication Number Publication Date
CN116561217A true CN116561217A (en) 2023-08-08

Family

ID=87490314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210106286.6A Pending CN116561217A (en) 2022-01-28 2022-01-28 Metadata management system and method

Country Status (1)

Country Link
CN (1) CN116561217A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991635A (en) * 2023-09-26 2023-11-03 武汉吧哒科技股份有限公司 Data synchronization method and data synchronization device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991635A (en) * 2023-09-26 2023-11-03 武汉吧哒科技股份有限公司 Data synchronization method and data synchronization device
CN116991635B (en) * 2023-09-26 2024-01-19 武汉吧哒科技股份有限公司 Data synchronization method and data synchronization device

Similar Documents

Publication Publication Date Title
US20210173853A1 (en) Selective synchronization of content items in a content management system
US10789217B2 (en) Hierarchical namespace with strong consistency and horizontal scalability
WO2019119212A1 (en) Method and device for identifying osd sub-health, and data storage system
WO2018059032A1 (en) Data migration method for virtual node, and virtual node
EP3564835B1 (en) Data redistribution method and apparatus, and database cluster
EP3811229B1 (en) Hierarchical namespace service with distributed name resolution caching and synchronization
JP5686034B2 (en) Cluster system, synchronization control method, server device, and synchronization control program
CN105760391B (en) Method, data node, name node and system for dynamically redistributing data
WO2022242372A1 (en) Object processing method and apparatus, computer device, and storage medium
CN116561217A (en) Metadata management system and method
CN112286889B (en) Wide area network-oriented metadata copy synchronization method for distributed file system
US9871863B2 (en) Managing network attached storage
CN107943615B (en) Data processing method and system based on distributed cluster
CN111459416B (en) Distributed storage-based thermal migration system and migration method thereof
CN116389233B (en) Container cloud management platform active-standby switching system, method and device and computer equipment
CN114579514B (en) File processing method, device and equipment based on multiple computing nodes
CN116737810B (en) Consensus service interface for distributed time sequence database
WO2020207078A1 (en) Data processing method and device, and distributed database system
JP4280919B2 (en) Replication management system, replication management method, and replication management program
CN114218326A (en) Method for improving data routing efficiency of distributed database
CN117290156A (en) Distributed cluster and data access method

Legal Events

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