Data processing system, data processing method, and related device

By writing directly to the shared storage space between nodes, the problems of memory bandwidth and computing power consumption during data storage are solved, resulting in a more efficient data processing system.

WO2026011745A1PCT designated stage Publication Date: 2026-01-15HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/073958
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-12
Filing Date
2025-01-22
Publication Date
2026-01-15

AI Technical Summary

Technical Problem

In existing technologies, during data storage, nodes need to cache data in memory and persist it to the local disk, resulting in high memory bandwidth usage and computing power consumption, which affects cluster performance.

Method used

By writing directly to shared storage space between nodes, the dependence on memory is reduced. Data is written directly to the shared storage space of nodes and the shared storage space of other nodes, avoiding memory caching and local disk persistence processes.

Benefits of technology

It effectively reduces computing power consumption and memory bandwidth usage, improves the overall performance of the data processing system, and increases data writing efficiency and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025073958_15012026_PF_FP_ABST
    Figure CN2025073958_15012026_PF_FP_ABST
Patent Text Reader

Abstract

A data processing system, a data processing method, and a related device, relating to the technical field of data storage. The data processing system comprises a first node and a second node. The first node comprises a non-overlapping local storage space and shared storage space. The first node is used for acquiring first data, and when the shared storage space of the first node is sufficient to store the first data, the first data is written into the shared storage space of the first node and a shared storage space of the second node. The shared storage spaces of the foregoing two nodes are both used for persistently storing data. Since the first node directly writes the first data into the shared storage spaces of a plurality of nodes, computing power consumption can be effectively reduced, and memory bandwidth occupation can be reduced. In addition, the first node does not need to execute a process of applying for storage space used for storing data, which can prevent computing power consumption caused by executing the process of applying for storage space each time data is stored, thereby improving the overall performance of the data processing system.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing systems, data processing methods and related equipment

[0001] This application claims priority to Chinese Patent Application No. 202410941795.X, filed on July 12, 2024, entitled “Data Processing System, Data Processing Method and Related Equipment”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of data storage technology, and in particular to a data processing system, data processing method and related equipment. Background Technology

[0003] With the widespread application of digital technologies, the reliability requirements for data storage are becoming increasingly stringent. Currently, multi-replica storage is commonly used to ensure the reliability of data stored in a cluster. That is, different nodes in the cluster store a copy of the data to prevent data loss due to the failure of a single node.

[0004] Taking the example of storing three copies of data in a cluster, as shown in Figure 1, assume the cluster includes nodes A, B, and C. When an application sends data, node A caches the data in memory during the data reception process and forwards it to nodes B and C respectively. Nodes B and C also cache the data in their respective memories during the data reception process. Then, each node persists the data in memory to its local disk space to complete persistent data storage. After nodes A, B, and C have all completed persistent data storage, node A sends a notification to the application that data storage was successful. In this way, nodes A, B, and C each store a copy of the data, ensuring the reliability of data storage.

[0005] However, during the data storage process, each node needs to cache the data in memory and perform the process of persisting the data in memory to the local disk. This not only consumes a lot of memory bandwidth, but also the processors (such as CPUs) in the nodes consume a lot of computing power to cache the data in memory and persist the data in memory to the disk, thus affecting the overall performance of the cluster. Summary of the Invention

[0006] This application provides a data processing system to reduce the computing power consumption and memory bandwidth occupied during data storage, thereby improving the overall performance of the data processing system (such as a cluster). Furthermore, this application also provides a corresponding data processing method, computing device, computer-readable storage medium, and computer program product.

[0007] Firstly, this application provides a data processing system comprising multiple nodes, including, for example, a first node and a second node. The first node, such as a storage server, includes local storage space and shared storage space, wherein the local storage space and the shared storage space of the first node do not overlap. The first node is used to acquire first data to be stored, which is data that needs to be backed up and stored in the data processing system. When the shared storage space of the first node is sufficient to store the first data, the first node writes the first data into its shared storage space. Additionally, the first node is also used to write the first data into the shared storage space of the second node, such as by directly writing the first data into the shared storage space of the second node via an interconnection bus. Furthermore, the shared storage spaces of the first and second nodes are used for persistent data storage.

[0008] Thus, in the data processing system, since the first node can directly write the first data into its shared storage space and the shared storage space of the second node, compared to caching the first data in memory and then writing the data in memory to the local disk, this effectively reduces computing power consumption and memory bandwidth usage, thereby improving the overall performance of the data processing system. Furthermore, when the shared storage space of the first node is sufficient to store the first data, the first node can directly write the first data into the shared storage space without needing to request storage space for that data. This avoids the computing power consumption caused by requesting storage space every time data is stored, further contributing to improving the overall performance of the data processing system.

[0009] In practical applications, the first node and the second node can be connected through an interconnect bus. The first node can then write the first data directly into the shared storage space of the second node based on the interconnect bus, without going through the second node's memory. This avoids consuming the second node's computing power and memory bandwidth resources and improves the efficiency of data writing.

[0010] Initially, the first node may only include local storage space without creating shared storage space. When the first node begins storing data, it can use a portion of its local storage space as shared storage space, thus creating the shared storage space for subsequent data storage. Alternatively, initially, the first node can divide the storage space provided by the storage medium into local and shared storage spaces based on a configuration file (such as a configuration file generated based on user settings), thus creating both types of storage spaces.

[0011] In one possible implementation, the first node is further configured to acquire the second data to be stored, and when the shared storage space of the first node is insufficient to store the second data, to allocate a portion of the storage space in the first node's local storage space to the shared storage space. Additionally, the first node is also configured to write the second data into its shared storage space and then into the shared storage space of the second node. Thus, by dynamically allocating a portion of its local storage space to the shared storage space, the first node expands the shared storage space, thereby ensuring that the first node can successfully save the second data.

[0012] In practical applications, when the first node expands its shared storage space, it can also request the second node to expand its shared storage space, thereby ensuring that the second node has enough storage space to store the second data.

[0013] In one possible implementation, the data processing system further includes a cluster management node, which may be, for example, a computing device capable of providing cluster management services. In this case, the first node can also be used to send an expansion request for the shared storage space to the second node when it is determined that the shared storage space is insufficient to store the second data, so as to request the second node to synchronously expand the shared storage space in the second node; the second node is further used to send an authentication request to the cluster management node to request verification of whether the first node has the authority to expand the shared storage space; the cluster management node is used to authenticate the first node's authority to expand the shared storage space according to the authentication request, and send the authentication result to the second node; at this time, the second node is further used to, based on the expansion request, allocate a portion of the storage space in the second node's local storage space to the second node's shared storage space when the authentication result indicates that the first node has the authority to expand the shared storage space; and specifically, the first node is used to allocate a portion of the storage space in its local storage space to the first node's shared storage space when the first node has the authority to expand the shared storage space. In this way, the first and second nodes can simultaneously expand their shared storage space, ensuring that both nodes have sufficient shared storage to store the second data. Furthermore, authentication by the cluster management node guarantees that all expansion operations performed by the first and second nodes on the shared storage space are legitimate, thereby enhancing the security of expanding shared storage space within the data processing system.

[0014] In one possible implementation, the first node includes a primary manager and a secondary manager. The primary manager allocates a portion of the first node's local storage space to its shared storage space. The secondary manager determines that the first node's shared storage space is insufficient to store the second data. Thus, by adding a secondary manager to the first node, fine-grained management of the shared storage space can be achieved. Furthermore, multiple managers enable flexible control and adjustment of the local and shared storage spaces within the first node, avoiding the need for dynamic storage allocation for each data save, thereby reducing computational power consumption and network overhead.

[0015] In this context, allocating a portion of local storage space to shared storage space means that this portion of storage space will no longer be managed by the primary manager, but rather by the secondary manager. That is, the primary manager will manage the remaining local storage space, while the secondary manager will manage the newly allocated portion.

[0016] Optionally, the first node may also include a manager, and the manager in the first node can integrate the functions of the first-level manager and the second-level manager. That is, the manager in the first node can determine that the shared storage space of the first node is insufficient to store the second data, and can allocate a portion of the storage space in the first node's local storage space to the shared storage space of the first node.

[0017] In one possible implementation, the first node is further configured to, when the storage resource release conditions are met, allocate a portion of the storage space in its shared storage space to its local storage space. In this way, the first node can reclaim that portion of the storage space by reallocating it to its local storage space, thereby improving resource utilization.

[0018] In one possible implementation, the first data written to the shared storage space of the first node belongs to the first placement group, and the first data written to the shared storage space of the second node belongs to the second placement group. The identifiers of the first and second placement groups are the same. Thus, the first node can back up and store data on a placement group basis, which improves subsequent fast indexing and access to the data, increasing data reading efficiency. That is, only the placement group to be read needs to be read, without needing to read all the data in the entire placement group.

[0019] In one possible implementation, the first node includes multiple databases, each of which records metadata related to a placement group, and different databases record metadata related to different placement groups. Thus, when the first node subsequently accesses data in a first placement group, it can retrieve the data required by the application based on the metadata in the database corresponding to the first placement group, thereby achieving fast data indexing and access and improving data reading efficiency.

[0020] In one possible implementation, the first node is also used to record processing operations on metadata in the databases corresponding to multiple placement groups in the WAL (Write-Ahead Log). Thus, when data in multiple placement groups needs to be accessed subsequently, the first node can generate one I / O operation and record the first node's access operations for multiple placement groups in the WAL all at once based on that I / O, thereby avoiding the first node frequently performing write access records to the WAL and reducing the number of I / O operations.

[0021] In one possible implementation, the first node is also used to store replica metadata corresponding to the first data. The replica metadata describes the replicas of the first data in the first node and the replicas of the first data in the second node. Thus, for multiple replicas of data, only one set of replica metadata needs to be recorded in the data processing system, which can effectively reduce the storage resources required to record replica metadata in the data processing system.

[0022] In one possible implementation, the data processing system further includes a third node; the second node is used to back up the first data to the shared storage space of the third node when the first node fails, and the shared storage space of the third node is used for persistent data storage. In practical applications, the third node can partition a portion of its local storage space into shared storage space. Thus, after the first node fails, the second node can back up the first data to the third node, ensuring that multiple copies of the first data are still stored in the data processing system, thereby guaranteeing the reliability of data storage within the data processing system.

[0023] In one possible implementation, the first node is used to write first data into the shared storage space of the second node via a DPU (Data Processing Unit) or a smart network interface card (NIC). In this way, the first node can achieve backup storage of data through the DPU or smart NIC, thereby freeing up CPU computing power in the first node and enabling it to provide better business services based on more computing power.

[0024] Secondly, this application provides a data processing method applied to a data processing system, which includes a first node and a second node. The first node includes local storage space and shared storage space, wherein the local storage space and the shared storage space of the first node do not overlap. The method includes: the first node acquiring first data to be stored; when the shared storage space of the first node is sufficient to store the first data, the first node writing the first data into the shared storage space of the first node; and the first node writing the first data into the shared storage space of the second node. The shared storage space of the first node and the shared storage space of the second node are used for persistent storage of data.

[0025] In one possible implementation, the method further includes: a first node acquiring second data to be stored; when the shared storage space of the first node is insufficient to store the second data, the first node allocates a portion of the storage space in its local storage space to the shared storage space of the first node; the first node writes the second data into the shared storage space of the first node and writes the second data into the shared storage space of the second node.

[0026] In one possible implementation, the data processing system further includes a cluster management node, and the method further includes: a first node sending a request to a second node to expand the shared storage space; the second node sending an authentication request to the cluster management node; the cluster management node authenticating the first node's permission to expand the shared storage space based on the authentication request, and sending the authentication result to the second node; when the authentication result indicates that the first node has the permission to expand the shared storage space, the second node, based on the expansion request, allocates a portion of its local storage space to the second node's shared storage space; and when the first node has the permission to expand the shared storage space, the first node allocates a portion of its local storage space to the first node's shared storage space.

[0027] In one possible implementation, the first node includes a primary manager and a secondary manager. The primary manager is used to allocate a portion of the storage space in the local storage space of the first node to the shared storage space of the first node, and the secondary manager is used to determine that the shared storage space of the first node is insufficient to store the second data.

[0028] In one possible implementation, the method further includes: when the storage resource release conditions are met, the first node allocates a portion of the storage space in the shared storage space of the first node to the local storage space of the first node.

[0029] In one possible implementation, the first data written to the shared storage space of the first node belongs to the first placement group, and the first data written to the shared storage space of the second node belongs to the second placement group. The identifiers of the first placement group and the second placement group are the same.

[0030] In one possible implementation, the first node includes multiple databases, each of which records metadata associated with a placement group, and different databases are used to record metadata associated with different placement groups.

[0031] In one possible implementation, the method further includes: the first node recording in the write log (WAL) the processing operations of metadata in the databases corresponding to the multiple placement groups respectively.

[0032] In one possible implementation, the method further includes: the first node storing replica metadata corresponding to the first data, the replica metadata being used to describe the replica of the first data in the first node and the replica of the first data in the second node.

[0033] In one possible implementation, the data processing system further includes a third node, and the method further includes: when the first node fails, the second node backs up the first data to the shared storage space of the third node, the shared storage space of the third node being used for persistent storage of the data.

[0034] In one possible implementation, the first node writes the first data into the shared storage space of the second node, including: the first node writes the first data into the shared storage space of the second node through a data processing unit (DPU) or a smart network interface card (NIC).

[0035] The data processing method provided in the second aspect corresponds to the data processing system provided in the first aspect. Therefore, the technical effects of any implementation method in the second aspect can be referred to the technical effects of the corresponding implementation method in the first aspect.

[0036] Thirdly, this application provides a data processing method applied to a data processing system. The data processing system includes a first node and a second node connected via an interconnect bus. The first node is used to acquire first data to be stored and write the first data into a first storage space within the first node. The first node is also used to write the first data into a second storage space within the second node via the interconnect bus. The first and second storage spaces are used for persistent data storage. Thus, in the data processing system, since the first node can directly write the first data into the shared storage space of both the first and second nodes, compared to caching the first data in memory and then writing the data from memory to the local disk, this effectively reduces computational power consumption and memory bandwidth usage, thereby improving the overall performance of the data processing system.

[0037] Fourthly, this application provides a computing device, which includes a processor and a memory. The processor and the memory communicate with each other. The processor is used to execute instructions stored in the memory to cause the computing device to execute a data processing method as executed by the first node in the second aspect or any implementation thereof, or to execute a data processing method as executed by the second node in the second aspect or any implementation thereof, or to execute a data processing method as executed by the first node in the third aspect, or to execute a data processing method as executed by the second node in the third aspect. It should be noted that the memory can be integrated into the processor or can be independent of the processor. The computing device may also include a bus. The processor is connected to the memory via the bus. The memory may include readable storage memory and random access memory.

[0038] Fifthly, this application provides a computer-readable storage medium storing instructions that, when executed on a computing device, cause the computing device to perform the operation steps of the data processing method described in the second aspect or any implementation thereof, or to perform the operation steps of the data processing method described in the third aspect.

[0039] Sixthly, this application provides a computer program product containing instructions that, when run on a computing device, causes the computing device to perform the operation steps of the data processing method described in the second aspect or any implementation thereof, or the computing device to perform the operation steps of the data processing method described in the third aspect.

[0040] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0041] Figure 1 is a schematic diagram of multiple replicas of data stored in a cluster;

[0042] Figure 2 is a schematic diagram of the structure of an exemplary data processing system provided in this application;

[0043] Figure 3 is a flowchart illustrating a data processing method provided in this application;

[0044] Figure 4a is a schematic diagram of node 1 writing data 1 into the shared storage space of node 1 and node 2 respectively;

[0045] Figure 4b is a schematic diagram of simplified multi-replica metadata;

[0046] Figure 4c is a schematic diagram of node 1 transferring part of the local storage space to the shared storage space;

[0047] Figure 5 is a schematic diagram of multiple nodes expanding and sharing storage space;

[0048] Figure 6 is a schematic diagram of the data recovery process after node 1 fails;

[0049] Figure 7 is a schematic diagram of the hardware structure of a computing device provided in this application. Detailed Implementation

[0050] This application provides a data processing system in which, during the data storage process, some nodes can directly write the data to be stored to other nodes without the nodes needing to perform the process of writing data from memory to local storage space. This reduces the computing power consumption and memory bandwidth usage during data storage, allowing the data processing system to perform other business based on more computing power and memory bandwidth, thereby improving the overall performance of the data processing system.

[0051] The relevant technical terms used in this application will be explained below.

[0052] A process is an execution of a program on a set of data in a computer. It can request and own system resources and is the basic unit for resource allocation in a system.

[0053] Local storage space refers to the storage space located locally on a node, which is not allowed to be written to by other nodes.

[0054] Shared storage space refers to storage space located locally on a node, but which can be written to by other nodes.

[0055] Write-ahead log (WAL) is a technique that records data update operations in a log before writing data to persistent storage media in order to avoid data loss.

[0056] A placement group (PG) is a logical entity in a distributed storage system used to manage object storage and object backup. Each PG can be divided into multiple smaller subgroups, each indicating the actual storage location of the data. Each PG can be configured with an identifier, and different PGs can be configured with different identifiers. This way, during subsequent data retrieval, only the PG containing the data needs to be accessed, instead of accessing all PGs, thereby reducing resource consumption and latency during data retrieval.

[0057] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0058] Referring to Figure 2, a schematic diagram of a data processing system is shown. As shown in Figure 2, the data processing system 20 may include multiple nodes. Figure 2 illustrates an example with N nodes, namely node 1 to node N, where N is a positive integer greater than 1.

[0059] Each node can be implemented using a device with data storage capabilities, such as one or more storage servers, or a computing device configured with storage media. Each node can be configured with one or more storage media for persistent data storage. For example, the storage media in a node can be a solid-state drive (SSD), a hard disk drive (HDD), a disk, or other types of storage media. Furthermore, multiple locations on the storage media to support data storage on the node constitute the storage space.

[0060] Different nodes can be connected via a bus that allows nodes to write data to the storage space of other nodes without the need for the central processing unit (CPU) and memory in the other nodes. For example, the bus between different nodes could be a compute express link (CXL) bus, an NVLink bus, or a unified bus (UB or Ubus), or other types of buses; there is no limitation on this. Alternatively, different nodes can also exchange data via a data processing unit (DPU) or a smart network interface card (NIC). For instance, node 1 can directly write data to the storage space of node 2 via the DPU or smart NIC. Alternatively, different nodes can also exchange data based on other numerical control separation technologies.

[0061] As shown in Figure 2, the storage space in node 1 can be divided into local storage space and shared storage space; that is, local storage space and shared storage space do not overlap. Furthermore, different types of storage space can be managed by different managers. As shown in Figure 2, local storage space can be managed by a first-level manager; shared storage space can be managed by a second-level manager.

[0062] During the management of local storage space, the primary manager can dynamically allocate a portion of the local storage space to the shared storage space (e.g., when the local node or other nodes request an increase in the shared storage space capacity). In this case, the allocated storage space is not managed by the primary manager but is managed by the secondary manager as part of the shared storage space. Alternatively, the primary manager can reclaim part or all of the shared storage space allocated to the secondary manager and manage it as part of the local storage space.

[0063] The secondary manager manages the storage space (i.e., shared storage space) allocated by the primary manager. This includes determining the storage location of data within the shared storage space, assessing whether the remaining storage space is sufficient to store the data to be written, and requesting expansion of the shared storage space from the primary manager when the remaining space is insufficient. Furthermore, the secondary manager can also support releasing part or all of the shared storage space.

[0064] Additionally, node 1 can be configured with a message processor 1, which is used to process messages related to the node, such as receiving messages from application 1 / other nodes, or sending messages to application 1 / other nodes. For example, message processor 1 can be implemented through a processor in node 1, specifically through a process running on that processor. In the data processing system 20 shown in Figure 2, node 1 can act as the master node corresponding to application 1, used to interact with application 1 and save a copy of the data sent by application 1. Furthermore, other nodes (e.g., node 2) that participate in backing up and saving the data sent by application 1 act as slave nodes corresponding to application 1, used to save other copies of the data.

[0065] Similarly, nodes 2 through N can have the same or similar configuration as node 1, as shown in Figure 2, which will not be elaborated further. Node 2 can act as the master node of application 2, used to interact with application 2 and store a copy of the data sent by application 2. Other nodes (e.g., node N) that participate in backing up and storing the data sent by application 2 act as slave nodes corresponding to application 2, used to store other copies of that data.

[0066] In practical applications, the data processing system 20 typically stores multiple copies of the same data on different nodes. This way, when a node fails, copies from other nodes can be used to restore data read and write services, preventing data loss and improving data storage reliability.

[0067] In a practical implementation, taking two replicas of data stored on Node 1 and Node 2 as an example, Node 1 can receive data provided by the application using Message Handler 1. The secondary manager can determine if the local shared space is sufficient to store the data. If so, the secondary manager can use Message Handler 1 to write the data to the shared storage space. The storage location of the data in the shared storage space can be allocated by the secondary manager. Furthermore, the secondary manager can use Message Handler 1 to write data to the shared storage space on Node 2.

[0068] If the local shared storage space is insufficient to store the data, the secondary manager can request storage space allocation from the primary manager. Correspondingly, the primary manager can allocate a portion of its local storage space to the secondary manager to expand the shared storage capacity. Furthermore, the primary manager can also request expansion of the shared storage space from the primary manager in node 2 via message processor 1, thereby increasing the capacity of the shared storage space in node 2 under the allocation of the primary manager in node 2. In this way, node 1 can use message processor 1 to write data to its shared storage space and also to the shared storage space in node 2.

[0069] Furthermore, after successfully writing data to the shared storage space of multiple nodes, node 1 can determine that the data writing is complete and can send a notification to the application that the data writing was successful.

[0070] Thus, in the data processing system 20, since node 1 can directly write data to the shared storage space of node 1 and the shared storage space of node 2 (without going through memory), compared with caching data to memory and then writing the data in memory to persistent storage medium, this can effectively reduce computing power consumption and memory bandwidth occupation, thereby improving the overall performance of the data processing system 20.

[0071] Furthermore, when the shared storage space of node 1 is sufficient to store data, node 1 can directly write the data into the shared storage space without having to perform the operation of requesting storage space for storing the data. This can avoid the computational power consumption caused by node 1 and node 2 performing the operation of requesting storage space every time data is stored, thereby helping to further improve the overall performance of the data processing system 20.

[0072] In practical applications, the data processing system 20 may further include a cluster management node 200. This cluster management node 200 can authenticate whether node 1 has the permission to request an expansion of the shared storage space from node 2. Only when node 1 passes the permission authentication will the first-level manager in node 2 allocate a portion of the storage space in its local storage space to the shared storage space. Furthermore, the cluster management node 200 can associate multiple nodes, allowing multiple copies of the same data to be stored on the associated nodes, with each node holding one copy of the data.

[0073] For example, the primary manager and secondary manager in each node shown in Figure 2 can be implemented by software or hardware.

[0074] In the first example, when implemented through software, the primary and secondary managers in each node can be implemented, for example, through program code running in the node. This program code can be, for example, program code in the form of software such as processes, components, database engines, software development kits (SDKs).

[0075] In the second example, when implemented in hardware, the primary and secondary managers in each node can be implemented using processors or processor cores. The processor can be any type of processor core or any combination thereof, such as an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a system-on-chip (SoC), a software-defined infrastructure (SDI) chip, an artificial intelligence (AI) chip, or a data processing unit (DPU).

[0076] It is worth noting that the data processing system 20 shown in Figure 2 is only an example. In other possible implementations, the data processing system 20 may include any number of nodes. Each node may include a message processor, a primary manager, and a secondary manager, as well as components with other functions, such as an accelerator card. Alternatively, in other possible implementations, the primary manager and secondary manager in the data processing system 20 may be integrated into a single manager, which can simultaneously possess the functions of both the primary and secondary managers, and can manage local storage space and shared storage space respectively. Alternatively, in other possible implementations, the cluster management node 200 may be implemented by one of N nodes, i.e., one node not only supports persistent data storage but also supports authentication of whether that node and other nodes have the permission to request an expansion of shared storage space. Alternatively, in other possible implementations, the data processing system 20 may also include an interactive platform that can interface with multiple applications and forward data provided by the multiple applications to different nodes for data storage. This application does not limit the implementation of the data processing system.

[0077] The embodiments of the data processing method provided in this application will now be described with reference to the accompanying drawings.

[0078] Referring to Figure 3, which is a flowchart illustrating a data processing method provided in an embodiment of this application, this method can be applied to the data processing system 20 shown in Figure 2, or to other applicable data processing systems. For ease of explanation, this embodiment uses an example of a data processing system 20 shown in Figure 2, where two copies of data are stored on node 1 and node 2, as an example.

[0079] The data processing method shown in Figure 3 may specifically include:

[0080] S301: Application 1 sends data 1 to be stored to node 1.

[0081] Application 1 can be, for example, a client running on the user's side, or a process running on the server.

[0082] During its operation, Application 1 can generate new data and send this data to Data Processing System 10 for persistent storage. For example, when Application 1 is specifically a user-side client, the client can generate a data storage request 1 based on the user's data storage operation and send this data storage request 1 to Storage System 10. Data storage request 1 includes the data to be stored, or Node 1 can pull the data to be stored from Application 1 based on this data storage request 1. For ease of distinction and description, the data provided by Application 1 will be referred to as Data 1 below.

[0083] Accordingly, node 1 can obtain the data to be stored through a communication interface or network card.

[0084] S302: Node 1 determines that the shared storage space is sufficient to store data 1.

[0085] In this embodiment, the storage space in both node 1 and node 2 can be divided into local storage space and shared storage space, as shown in Figure 4a. Furthermore, the local storage space and shared storage space are managed by a primary manager and a secondary manager, respectively.

[0086] The primary manager can store and manage metadata in its local storage space. This metadata describes the addresses of the local storage space and the shared storage space in Node 1, allowing the primary manager to determine which storage spaces in the node have not been allocated to the secondary managers and which have. Furthermore, the metadata can be stored as a single copy in a designated location within the local storage space. This designated location could be, for example, a pre-specified storage medium (such as a pre-specified disk). Node 1 can also store the metadata managed by the primary manager using a redundant array of independent disks (RAID) mechanism to improve the reliability of metadata storage and avoid data loss due to single points of failure, as shown in Figure 4a. For example, Node 1 can store the metadata managed by the primary manager using RAID 1+0 or RAID 5. Alternatively, Node 1 can also improve the reliability of metadata storage by storing copies of the metadata on different storage media. As long as the metadata is not released, it remains continuously stored in Node 1, meaning the metadata's lifecycle is consistent with the lifecycle of Node 1.

[0087] The secondary manager can store and manage metadata in the shared storage space. This metadata describes information related to data written to the shared storage space, such as the data's storage location on the disk and its data type. Furthermore, the metadata managed by the secondary manager can also describe the storage space already used for storing data (and metadata) within the shared storage space, as well as the remaining available storage space. The secondary manager can utilize a separate storage space within the shared storage space to store metadata, and when data written to the shared storage space is deleted or migrated, the corresponding metadata stored in the shared storage space can also be deleted or migrated to prevent invalid data and metadata from occupying shared storage space.

[0088] In one possible implementation, node 1 can use message processor 1 to parse the data storage request 1 sent by application 1, determine the storage space size A required for the data 1 to be stored, and notify the secondary manager. The secondary manager can detect the remaining available storage space size B in the shared storage space and determine whether the storage space size B is greater than or equal to the storage space size A. If it is greater than or equal to A, it indicates that the shared storage space is sufficient to store data 1; if the storage space size B is less than the storage space size A, it indicates that the shared storage space is insufficient to store data 1.

[0089] S303: Node 1 writes data 1 to the shared storage space of Node 1.

[0090] S304: Node 1 writes data 1 to the shared storage space of node 2.

[0091] In this embodiment, node 2 can be associated with node 1. For example, the cluster management node 200 can configure the association between node 1 and node 2. Therefore, for data 1 stored in node 1, a copy of data 1 will be stored in node 2. Exemplarily, the resource configuration for the data copy in node 2 can be synchronized with the resource configuration for the same data copy in node 1. For example, the size of the shared storage space in node 2 can be the same as the size of the shared storage space in node 1. Thus, if the shared storage space in node 1 is sufficient to store data 1, the shared storage space in node 2 can also store data 1.

[0092] Since Node 1 can connect to Node 2 via the CXL bus / NVLink bus / UB bus, or communicate with Node 2 via the DPU / smart NIC, Node 1 can directly write Data 1 to the shared storage space of Node 2 via the CXL bus, NVLink bus, UB bus, DPU, or smart NIC, without requiring the CPU or memory of Node 2 to participate. Simultaneously, Node 1 will also write Data 1 to its shared storage space without occupying the memory bandwidth of Node 1, as shown in Figure 4a.

[0093] In the first implementation, node 1 can write data to the shared storage space in both node 1 and node 2 based on the PG (Placement Group) mechanism. In practical applications, PG can also be referred to as a partition.

[0094] In practice, before writing data to the shared storage space, node 1 can record the write operation for data 1 in the WAL log. After the WAL log successfully records the write operation for data 1, node 1 can determine the first PG to which data 1 belongs. For example, the secondary manager can pre-create at least one PG based on the shared storage space, and each PG corresponds to a segment of storage space in the shared storage space. Then, the secondary manager can determine the first PG to which data 1 belongs by performing a hash operation on data 1, or by determining the first PG to which data 1 belongs according to the order of PG identifiers (the identifier of the first PG is the first in the order among the PGs that can currently store data 1). Thus, node 1 can write data 1 to the storage location corresponding to the first PG. If the resource configurations of node 1 and node 2 for storing copies of the same data are synchronized, node 2 will also include at least one PG, and at least one PG in node 2 has the same identifier and configuration as at least one PG in node 1. In this way, node 1 can determine the second PG in the shared storage space of node 2 for data 1 based on a similar method, and write data 1 to the storage location corresponding to the second PG in the shared storage space of node 2. In this system, the identifier of the first PG in node 1 is the same as the identifier of the second PG in node 2, so that the two replicas of data 1 can be stored in node 1 and node 2 based on the same PG, reducing the difficulty of managing the two replicas in the data processing system 20.

[0095] In the second implementation, node 1 can also write data 1 to the shared storage space of node 1 and node 2 respectively by appending, which can simplify the allocation logic of storage space for data 1 by the secondary manager in each node.

[0096] In addition, during the process of writing data 1 to multiple shared storage spaces by node 1, the secondary manager in node 1 and the secondary manager in node 2 can generate metadata corresponding to data 1 and save the metadata corresponding to data 1 to the storage location pre-allocated in the shared storage space. This metadata is used to describe the storage location of data 1 in the shared storage space, the data type of data 1, and other information.

[0097] For example, when saving metadata, the secondary manager (in node 1 or node 2) can specifically save the metadata of data 1 in the shared storage space through an append-only write mode. For instance, the secondary manager can save metadata based on a log structured merge (LSM) tree structure to improve the efficiency of writing metadata to the shared storage space. In practice, the secondary manager can also write metadata to the shared storage space in other ways, without limitation. Correspondingly, the secondary manager can subsequently perform garbage collection (GC) on the metadata stored in the shared storage space to release the storage resources occupied by invalid metadata, thereby achieving effective management of the shared storage space.

[0098] When the secondary manager writes data to the shared storage space based on the PG mechanism, it can manage metadata for each PG individually. Specifically, this can involve creating a database for each PG, with each database recording metadata related to that PG. This metadata can include metadata related to the data belonging to that PG (such as the data's storage address) and metadata about the PG itself (such as the PG's identifier). Furthermore, the storage location information of each PG's database within the shared storage space can be attached to the secondary manager's management information for the PGs on node 1. Thus, when application 1 subsequently requests to read data belonging to any PG, node 1 can access the database at the specified storage location based on the storage location information attached to the PG's management information to obtain the corresponding database for that PG. Then, node 1 can further access the metadata corresponding to that data based on the database, allowing it to access the data required by application 1. In this process, node 1 only needs to access and read the database corresponding to the PG containing the data required by application 1, without needing to access all PG databases or read all data within all PGs. This enables fast data indexing and access, improving data retrieval efficiency.

[0099] In the shared storage space, the storage space used to store the database corresponding to each PG and the data in that PG can be reused. At this time, the secondary manager can manage the storage space (used to store data and metadata) corresponding to each PG based on space allocation algorithms such as bitmap allocator or simple allocator, or it can be managed separately based on other applicable space allocation algorithms, etc., without limitation.

[0100] Because the secondary manager manages the metadata for each PG independently, it can create a separate WAL for each PG. Each PG's WAL records metadata access operations for that PG. When application 1 requests to read data from multiple PGs, node 1 accesses the databases corresponding to those PGs (to obtain their respective metadata). Consequently, node 1 records access operations for each PG in multiple WALs, resulting in frequent write operations to the WALs and a large number of input / output (IO) operations.

[0101] Based on this, in one implementation example, the secondary manager can create a WAL for multiple PGs and use this WAL to record the access operations of node 1 for the databases corresponding to the multiple PGs. In this way, when application 1 requests access to data in multiple PGs, node 1 can generate an I / O operation and record the access operations of node 1 for multiple PGs in the WAL all at once based on this I / O, thereby avoiding node 1 frequently performing the operation of writing access records to the WAL and reducing the number of I / O operations.

[0102] After data 1 is successfully saved in multiple copies in node 1 and node 2, node 1 can also store the corresponding copy metadata 1 in the shared storage space. The copy metadata 1 is used to describe the copy of data 1 in node 1, such as describing the offset of multiple data blocks in the copy stored in the shared storage space, the starting storage location of the copy in the shared storage space, and other attribute information.

[0103] In the first implementation example, node 1 can also store the replica metadata 2 of data 1 in node 2 in the shared storage space. The replica metadata 2 is used to describe the replica of data 1 in node 2, such as describing the offset of each data block in the replica stored in the shared storage space of node 2, and describing the starting storage location of the replica stored in the shared storage space of node 2.

[0104] In the second implementation example, since the data blocks in multiple replicas of data 1 can be stored based on the same location offset in the shared storage space of multiple nodes, node 1 can store only one copy of the replica metadata in the shared storage space. This replica metadata includes the starting storage location of data 1 in the shared storage space of each node, and the offset of each data block in the replica in the shared storage space of node 1 (the offsets of each data block in other replicas are the same in the shared storage space of other nodes). Specifically, as shown in Figure 4b, node 1 can record the offset of each data block in data 1 in the shared storage space of node 1, and record the starting storage location of multiple replicas in multiple nodes. In this way, for multiple replicas of data, only one copy of the replica metadata can be recorded in the data processing system 20, which can effectively reduce the storage resources required to record the replica metadata in the data processing system 20. Assuming that the data is stored in M ​​copies in the data processing system 20, where M is an integer greater than 1, by storing one copy of the copy metadata on a node, the number of recorded copy metadata can be reduced to approximately 1 / M of the original. Thus, the write performance of the copy metadata can be improved by approximately M times, and the required storage resources (cost) can be reduced to approximately 1 / M.

[0105] The above explanation uses the example of shared storage space being sufficient to store data 1. In practical applications, after data has been stored in the shared storage space, the remaining storage space may be insufficient to store new, complete data. Below, steps S305 to S311 will be used to further describe the process by which node 1 persists data 2 when the shared storage space is insufficient.

[0106] S305: Application 1 sends data 2 to be stored to node 1.

[0107] The specific implementation process of step S305 can be found in the relevant description of step S301, and will not be repeated here.

[0108] S306: Node 1 determines that the shared storage space is insufficient to store data 2.

[0109] In this embodiment, we will take the example of shared storage space being insufficient to completely store data 2. In real-world applications, as the amount of data stored in the shared storage space increases, the remaining storage space gradually decreases, resulting in a situation where the remaining storage space is insufficient to store complete new data.

[0110] S307: Node 1 allocates a portion of its local storage space to the shared storage space.

[0111] In this embodiment, the local storage space and the shared storage space in node 1 are managed separately. Furthermore, when the shared storage space is insufficient, node 1 can allocate part of the storage space in the local storage space to the shared storage space to expand the capacity of the shared storage space.

[0112] In one possible implementation, message processor 1 in node 1 can parse the data storage request 2 sent by application 1 to determine the storage space size 'a' required for the data 2 to be stored, and notify the secondary manager. The secondary manager can detect the remaining available storage space size 'b' in the shared storage space and determine whether 'b' is greater than or equal to 'a'. If it is greater than or equal to 'a', it indicates that the shared storage space is sufficient to store the data 2; if 'b' is less than 'a', it indicates that the shared storage space is insufficient to store the data 2. In this embodiment, the example of 'b' being less than 'a' is used for illustration. At this time, the secondary manager can request the primary manager to expand the shared storage space. Based on this request, the primary manager can determine one or more segments of storage space from the local storage space, i.e., a portion of the local storage space, and allocate the determined portion of storage space to the secondary manager, i.e., incorporate this portion of storage space into the shared storage space, as shown in Figure 4c. For ease of description, this portion of storage space will be referred to as storage space X below. The primary manager can also update the metadata so that the local storage space described by the updated metadata does not include storage space X. After a storage space X in the local storage space is allocated to the shared storage space, the storage space X can be managed only by the secondary manager (the primary manager does not need to manage the storage space X); correspondingly, the metadata managed by the secondary manager can include the metadata corresponding to the storage space X.

[0113] The size of storage space X can be a preset size, such as a primary manager allocating 4GB (gigabytes) of local storage space to shared storage space each time. Alternatively, the size of storage space X can be based on the storage space corresponding to one or more PGs, and there is no limitation on this.

[0114] It is understandable that since data 2 is stored using a multi-replica method in data processing system 20, if the shared storage space in node 1 is insufficient, the shared storage space in node 2 may also be insufficient. Therefore, node 1 can also instruct node 2 to expand the shared storage space.

[0115] S308: Node 1 sends a request to Node 2 to expand the capacity of the shared storage space in Node 2.

[0116] S309: Based on the expansion request, Node 2 allocates a portion of its local storage space to the shared storage space in Node 2.

[0117] For ease of description, the portion of local storage space in node 2 that is allocated to shared storage space will be referred to as storage space Y. The size of storage space Y can be the same as the size of storage space X.

[0118] For example, node 2 may be configured with a message processor 2, which can receive expansion requests sent by node 1 and, based on the expansion request, instruct the primary manager in node 2 to allocate a portion of the local storage space (i.e., storage space Y) to the shared storage space. The primary manager in node 2 and the primary manager in node 1 can allocate a portion of the local storage space to the shared storage space based on the same rules, as shown in Figure 5, to synchronize the resource allocation between node 2 and node 1 for storing different copies of the same data.

[0119] In a further possible implementation, during the process of node 1 requesting node 2 to expand the shared storage space, node 1 can also be authenticated. Only when node 1 passes the authentication can node 1 and node 2 execute the process of transferring a portion of the local storage space to the shared storage space.

[0120] In practice, after the secondary manager in node 1 notifies the primary manager that the shared storage space is insufficient, the primary manager can send a scaling request to node 2 through message processor 1. This scaling request carries the authentication information of node 1, which may be, for example, the identifier of node 1, or other information that can indicate the identity of node 1. Message processor 2 in node 2 can parse the received scaling request, obtain the authentication information of node 1, and generate an authentication request including this authentication information. Then, message processor 2 can send the authentication request to cluster management node 200.

[0121] Cluster management node 200 can authenticate whether node 1 has the permission to expand the shared storage space based on the authentication request. For example, cluster management node 200 can parse the identity authentication information of node 1 from the authentication request and match this identity authentication information with at least one identity authentication information in a preset identity set. If there is an identity authentication information in the identity set that matches the identity authentication information of node 1, then cluster management node 200 can determine that node 1 has the permission to expand the shared storage space; if there is no identity authentication information in the identity set that matches the identity authentication information of node 1, then cluster management node 200 can determine that node 1 does not have the permission to expand the shared storage space. For example, the identity authentication information included in the identity set may specifically be the identifier of at least one node with the permission to expand the shared storage space, or it may be other information that can indicate the identity of a node. Then, cluster management node 200 can send the authentication result to node 2. In this embodiment, the example of the authentication result indicating that node 1 has the permission to expand the shared storage space is used for explanation.

[0122] The cluster management node 200 can be implemented as a standalone server deployed within the data processing system 20, or it can be implemented by a subset of nodes within the data processing system 20 (i.e., these nodes not only have data storage capabilities but also authentication capabilities). For example, the cluster management node 200 can run a cluster manager server (CMS), which can be used to authenticate the permissions of any node in the data processing system 20 requesting expansion of shared storage space. In practical applications, the cluster management service can also manage multiple nodes, such as establishing associations between multiple nodes to store multiple copies of the same data. Alternatively, the cluster management node 200 can run a bus authorization service, which can be used to authenticate the permissions of any node in the data processing system 20 requesting expansion of shared storage space.

[0123] Message processor 2 in node 2 can receive the authentication result. After determining that the authentication result indicates that node 1 has the permission to expand the shared storage space, it can instruct the first-level manager in node 2 to allocate a portion of storage space from the local storage space to the shared storage space, thereby expanding the shared storage space in node 2. Furthermore, message processor 2 can also send a successful shared storage space expansion response back to node 1. Thus, upon receiving this response, message processor 1 in node 1 can instruct the first-level manager in node 1 to allocate a portion of storage space from the local storage space to the shared storage space, thereby expanding the shared storage space in node 1. Further, node 2 can also record the owner information of storage space Y allocated to the shared storage space. This owner information indicates that the data copy stored in storage space Y belongs to node 1 (i.e., it cannot be used to store copies of data from other nodes). Similarly, node 1 can also record the owner information of storage space X allocated to the shared storage space. This owner information indicates that the data copy stored in storage space X belongs to node 1.

[0124] Typically, the size of storage space X will be larger than the size of data 2. This ensures that after node 1 uses storage space X allocated to the shared storage space to store data 2, node 1's shared storage space will still have remaining space to support node 1 storing new data. Similarly, after node 2 uses storage space Y allocated to the shared storage space to store data 2, node 2's shared storage space will also have remaining space to support node 2 storing new data. Thus, for multiple copies of other data that still need to be stored in nodes 1 and 2, one copy of each other can be stored in storage space X and storage space Y respectively.

[0125] S310: Node 1 writes data 2 into the shared storage space of Node 1.

[0126] S311: Node 1 writes data 2 into the shared storage space of node 2.

[0127] It is understandable that when the shared storage space in Node 1 and Node 2 is expanded, the available storage space in the shared storage space of each node can completely save data 2. At this time, Node 1 can write data 2 into the shared storage space of Node 1 (specifically storage space X) and the shared storage space of Node 2 (specifically storage space Y) respectively, thereby realizing the multiple copy storage of data 2 in the data processing system 20, as shown in Figure 5.

[0128] The specific implementation methods of steps S310 and S311 can be found in the relevant descriptions of steps S303 and S304 above, and will not be repeated here.

[0129] It is worth noting that this embodiment uses the example of storing two copies of data in node 1 and node 2 for illustration. In actual applications, multiple copies of data can also be stored on other nodes. Furthermore, the number of copies of data stored in the data processing system 20 can be other numbers. For example, the data processing system 20 can store three copies of data 1 or data 2 in nodes 1, 2, and 3, etc., based on a similar method described above.

[0130] Furthermore, under initial conditions, the shared storage space in each node can be 0, meaning that the storage space on each node is its local storage space. When multiple nodes in the data processing system 20 begin storing multiple copies of data, each node can allocate a portion of its local storage space to the shared storage space based on the methods described in steps S305 to S311 above, so as to dynamically expand the shared storage space according to data storage needs.

[0131] Alternatively, under initial conditions, each node can be pre-allocated a certain amount of shared storage space. That is, under initial conditions, the storage space on each node has been divided into two types of storage space: local storage space and shared storage space. Furthermore, when the shared storage space in a node is exhausted or insufficient to continue storing data, the node can allocate part of its local storage space to the shared storage space in the manner described above, thereby expanding the shared storage space.

[0132] In this embodiment, during the storage of data 1, when there is sufficient shared storage space, node 1 can directly write data 1 into both node 1's shared storage space and node 2's shared storage space. This eliminates the need to first save the data to memory and then persist it from memory to local storage. This effectively reduces the computational power consumption and memory bandwidth usage associated with data storage. Consequently, the data processing system 20 can utilize more computational power and memory bandwidth to perform other tasks, thereby improving the overall performance of the data processing system 20. Furthermore, node 1 does not need to request storage space for storing the data, avoiding the computational power consumption caused by requesting storage space every time data is stored. This further contributes to improving the overall performance of the data processing system 20.

[0133] During the storage of data 2, when the shared storage space is insufficient, dynamic expansion of the shared storage space can be achieved by allocating a portion of the local storage space to the shared storage space. This satisfies the storage space requirements of the node storing data replicas and improves the storage space utilization of the persistent storage medium in the node. In practical applications, the storage space utilization of the persistent storage medium can be increased from 60% (pre-allocated fixed-size storage space to store data replicas) to 90%. After completing one expansion of the shared storage space, the expanded shared storage space can typically support the node to execute multiple data storage tasks, thus avoiding the large computational consumption caused by the node frequently requesting storage space. In practical application scenarios, the computational consumption generated by node 1 storing data can be reduced by more than 90% (computational consumption is reduced due to the reduction in the number of storage space requests).

[0134] In practical applications, when data 2 no longer needs to be stored on nodes 1 and 2, the data processing system 20 can also release the storage space occupied by data 2. For example, when multiple new nodes are configured in the data processing system 20, some data (including data 2) stored on nodes 1 and 2 can be migrated to the newly configured nodes, thereby balancing the load on each node in the data processing system 20. At this time, the data processing system 20 can release the storage space occupied by this part of the data on nodes 1 and 2.

[0135] In a further possible implementation, taking the release of storage space X as an example, the secondary manager in node 1 can detect whether storage space X in the shared storage space meets the storage resource release conditions. The storage resource release conditions refer to the conditions that must be met to trigger the release of part or all of the storage space in the shared storage space. For example, when the data stored in storage space X is migrated to other nodes and the remaining available storage space in the shared storage space is greater than a threshold, the secondary manager can determine that storage space X meets the storage resource release conditions; or, when the data stored in storage space X is deleted / expired and the remaining available storage space in the shared storage space is greater than a threshold, the secondary manager can determine that storage space X meets the storage resource release conditions, etc. If storage space X meets the storage resource release conditions, the secondary manager can notify the primary manager to reclaim storage space X. At this time, the primary manager can reassign storage space X to the local storage space and update the metadata of the local storage space, wherein the updated metadata describes a local storage space that includes storage space X. The secondary manager can update the metadata corresponding to the shared storage space so that the updated metadata describes a shared storage space that does not include storage space X. In this way, node 1 can reclaim the storage space X.

[0136] Furthermore, Node 1 can also instruct the primary manager in Node 2 to reclaim storage space Y within Node 2. Specifically, the primary manager can send a reclamation request to Node 2 via message processor 1, instructing Node 2 to reclaim storage space Y. Message processor 2 in Node 2 can then instruct the primary manager in Node 2, based on the received reclamation request, to reallocate storage space Y from the shared storage space to the local storage space. Additionally, the primary manager and secondary manager in Node 2 will update their respective managed metadata for the reclaimed storage space Y.

[0137] In other implementations, besides node 1 triggering the reclamation of a portion of the shared storage space, cluster management node 200 can also instruct some nodes to reclamate a portion of the shared storage space. For example, cluster management node 200 may be running a cluster management service, and when a new node is configured in the data processing system 20 and some data from nodes 1 and 2 is migrated to the newly configured node, cluster management node 200 can instruct node 1 to reclamate storage space X and instruct node 2 to reclamate storage space Y, respectively. It is understood that the above reclamation of storage space X and storage space Y is only an example; in actual applications, each node can reclamate any storage space in the shared storage space.

[0138] The embodiment shown in Figure 3 above mainly describes the process of saving multiple copies of data 1 and data 2 in the shared storage space of nodes 1 and 2. In practical applications, some nodes in the data processing system 20 may fail. For example, node 1 may experience a hardware failure during operation. In this case, the data processing system 20 can use other nodes to recover the data saved in node 1, thereby realizing data recovery after a failure.

[0139] The following describes the data recovery process for a faulty node 1 in the data processing system 20, referring to Figure 6. Referring to Figure 6, the specific steps may include the following.

[0140] S601: Cluster management node 200 detected a failure in node 1.

[0141] In this embodiment, the failure of node 1 is used as an example for explanation. When other nodes in the data processing system 20 fail, the following similar procedures can be followed.

[0142] In the first fault detection implementation, the cluster management node 200 can periodically send heartbeat messages to each node. After receiving the heartbeat message, each node can send a response back to the cluster management node 200. When the cluster management node 200 does not detect a response from node 1 to the heartbeat message, or does not detect a response from node 1 for several consecutive periods, it can determine that node 1 has failed.

[0143] In the second fault detection implementation, when multiple nodes in the data processing system 20 are interconnected via a bus (such as a CXL bus), the cluster management node 200 can detect whether each node is disconnected from the bus. When it is detected that node 1 is disconnected from the bus, the cluster management node 200 can determine that node 1 has failed.

[0144] S602: Cluster management node 200 instructs node 2 to act as the master node of application 1 and instructs node 2 to start the service database used for storing data.

[0145] It is understandable that in a multi-replica scenario, some nodes can act as master nodes, responsible for interacting with application 1, while the remaining nodes storing data replicas can act as slave nodes. When node 1 (the original master node) fails, the cluster management node 200 can instruct node 2 to become the master node of application 1 and start its local service database so that it can continue to provide business services to application 1. The service database started by node 2 includes the same data replicas as those stored in node 1, and may include data 1 and data 2 as described in the embodiment shown in Figure 3. In practical applications, the cluster management node 200 can also send a notification message to application 1 to inform it that the node interacting with it has changed from node 1 to node 2, so that application 1 can subsequently send data to node 2 to achieve data backup and storage in the data processing system 20.

[0146] S603: Node 2 backs up the data in the service database to Node 3.

[0147] In this embodiment, after node 1 fails, the number of data replicas in the data processing system 20 is reduced from 2 to 1. This means that if node 2 also fails subsequently, the data stored on node 2 will be lost, which will affect the reliability of data storage in the data processing system 20.

[0148] Therefore, other nodes can store another copy of the data, so that the data processing system 20 still stores multiple copies of the data. In this embodiment, the example of storing a copy of the data on node 3 is used for illustration.

[0149] In practice, node 2 can request a shared storage space of a corresponding size from node 3 based on the size of the shared storage space (used to store data copies in the service database), or the cluster management node 200 can instruct node 3 to create a shared storage space of a corresponding size. Node 3 can then obtain the shared storage space by partitioning its local storage space. The implementation method for node 3 to create the shared storage space can be found in the relevant descriptions of the foregoing embodiments, and will not be repeated here.

[0150] After creating the corresponding shared storage space on node 3, node 2 can write data from the service database (including data 1 and data 2 mentioned above) into the shared storage space on node 3 via CXL bus, NVLink bus, UB bus, DPU, or smart network interface card. In this way, the data in the service database can be stored in two copies on nodes 2 and 3, ensuring the reliability of data storage in the data processing system 20. Specifically, when data in the service database is saved on node 2 based on PG, the data copy backed up to the shared storage space on node 3 can have the same PG identifier as the data copy on node 2. The PG identifier of the data copy indicates which storage locations indicated by the PGs the data copy is stored in.

[0151] It is worth noting that other reasonable combinations of steps that can be conceived by those skilled in the art based on the above description also fall within the scope of protection of this application. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to this application.

[0152] The data processing system and data processing method provided in the embodiments of this application have been described above with reference to Figures 2 to 6. Next, the structure of the computing device provided in the embodiments of this application will be described with reference to the accompanying drawings.

[0153] Figure 7 is a schematic diagram of the hardware structure of a computing device 700 provided in this application. The computing device 700 can, for example, execute the method executed by node 1 or node 2 in the embodiment shown in Figure 3 above.

[0154] As shown in Figure 7, the computing device 700 includes a processor 701, a memory 702, and a communication interface 703. The processor 701, memory 702, and communication interface 703 communicate via a bus 704, or via wireless transmission or other means. The memory 702 stores instructions, and the processor 701 executes the instructions stored in the memory 702. Further, the computing device 700 may also include a memory unit 705, which is connected to the processor 701, the storage medium 702, and the communication interface 703 via the bus 704. The memory 702 stores program code, and the processor 701 can call the program code stored in the memory 702 to execute the operation steps performed by node 1 in the embodiment shown in Figure 3, or execute the operation steps performed by node 2 in the embodiment shown in Figure 3.

[0155] It should be understood that in this embodiment, the processor 701 may be a CPU, or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), other programmable logic devices, discrete gate or transistor logic devices, discrete device assemblies, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0156] The memory 702 may include read-only memory and random access memory, and provides instructions and data to the processor 701. The memory 702 may also include non-volatile random access memory.

[0157] The memory 702 can be volatile memory or non-volatile memory, or it can include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM).

[0158] The communication interface 703 is used to communicate with other devices connected to the computing device 700. The bus 704 may include a data bus, a power bus, a control bus, and a status signal bus, etc. However, for clarity, all buses are labeled as bus 704 in the figure.

[0159] It should be understood that the computing device 700 shown in Figure 7 corresponds to node 1 or node 2 in the method embodiment shown in Figure 3. Therefore, the functions and technical effects of the computing device 700 shown in Figure 7 can be found in the relevant descriptions of the methods executed by node 1 or node 2 shown in Figure 3. For the sake of brevity, these descriptions will not be repeated here.

[0160] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform the aforementioned data processing method.

[0161] This application also provides a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application are generated.

[0162] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0163] The computer program product can be a software installation package. When any of the aforementioned data processing methods is required, the computer program product can be downloaded and executed on a computing device.

[0164] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0165] The terminology used in the above embodiments is for the purpose of describing specific embodiments only and is not intended to be a limitation of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to also include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the embodiments of this application, “one or more” refers to one, two, or more; the character “ / ” generally indicates that the preceding and following objects are in an “or” relationship. In the embodiments of this application, “simultaneously” means within the same time period, including situations where they are at the same moment. The terms “first,” “second,” etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate, and this is merely a way of distinguishing objects with the same attributes in the embodiments of this application.

[0166] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0167] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

A data processing system, characterized in that, The data processing system includes a first node and a second node. The first node includes local storage space and shared storage space. The local storage space and the shared storage space of the first node do not overlap. The first node is used to acquire the first data to be stored, and when the shared storage space of the first node is sufficient to store the first data, write the first data into the shared storage space of the first node; The first node is also used to write the first data into the shared storage space of the second node, and the shared storage space of the first node and the shared storage space of the second node are used for persistent storage of data. The system according to claim 1, characterized in that, The first node is further configured to acquire the second data to be stored, and when the shared storage space of the first node is insufficient to store the second data, to allocate a portion of the storage space in the local storage space of the first node to the shared storage space of the first node; and to write the second data into the shared storage space of the first node and to write the second data into the shared storage space of the second node. The system according to claim 2 is characterized in that, The data processing system also includes a cluster management node; The first node is also used to send an expansion request for the shared storage space to the second node; The second node is also used to send an authentication request to the cluster management node; The cluster management node is used to authenticate the first node's permission to expand the shared storage space according to the authentication request, and send the authentication result to the second node; The second node is further configured to, when the authentication result indicates that the first node has the permission to expand the shared storage space, allocate a portion of the storage space in the local storage space of the second node to the shared storage space of the second node based on the expansion request. Specifically, the first node is used to allocate a portion of its local storage space to the shared storage space of the first node when the first node has the permission to expand the shared storage space. The system according to claim 2 or 3 is characterized in that, The first node includes a primary manager and a secondary manager; The first-level manager is used to allocate a portion of the storage space in the local storage space of the first node to the shared storage space of the first node. The secondary manager is used to determine that the shared storage space of the first node is insufficient to store the second data. The system according to any one of claims 2 to 4 is characterized in that, The first node is also configured to, when the storage resource release conditions are met, allocate a portion of the storage space in the shared storage space of the first node to the local storage space of the first node. The system according to any one of claims 1 to 5 is characterized in that, The first data written to the shared storage space of the first node belongs to the first placement group, and the first data written to the shared storage space of the second node belongs to the second placement group. The identifier of the first placement group is the same as the identifier of the second placement group. The system according to claim 6 is characterized in that, The first node includes multiple databases, each of which is used to record metadata related to a placement group, and different databases are used to record metadata related to different placement groups. The system according to claim 7 is characterized in that, The first node is also used to record the processing operations of metadata in the databases corresponding to the multiple placement groups in the Write Log (WAL). The system according to any one of claims 1 to 8 is characterized in that, The first node is also used to store the replica metadata corresponding to the first data, which describes the replica of the first data in the first node and the replica of the first data in the second node. The system according to any one of claims 1 to 9 is characterized in that, The data processing system also includes a third node; The second node is used to back up the first data to the shared storage space of the third node when the first node fails. The shared storage space of the third node is used for persistent storage of the data. The system according to any one of claims 1 to 10 is characterized in that, The first node is used to write the first data into the shared storage space of the second node through a data processing unit (DPU) or a smart network interface card (NIC). A data processing method, characterized in that, The data processing method is applied to a data processing system, which includes a first node and a second node. The first node includes local storage space and shared storage space, and the local storage space and the shared storage space of the first node do not overlap. The method includes: The first node acquires the first data to be stored; When the shared storage space of the first node is sufficient to store the first data, the first node writes the first data into the shared storage space of the first node; The first node writes the first data into the shared storage space of the second node, and the shared storage space of the first node and the shared storage space of the second node are used for persistent storage of data. The method according to claim 12, characterized in that, The method further includes: The first node acquires the second data to be stored; When the shared storage space of the first node is insufficient to store the second data, the first node allocates a portion of the storage space in its local storage space to the shared storage space of the first node. The first node writes the second data into its shared storage space, and then writes the second data into the shared storage space of the second node. The method according to claim 13, characterized in that, The data processing system further includes a cluster management node, and the method further includes: The first node sends a request to the second node to expand the shared storage space; The second node sends an authentication request to the cluster management node; The cluster management node verifies that the first node has the authority to expand the shared storage space according to the authentication request, and sends the authentication result to the second node; When the authentication result indicates that the first node has the permission to expand the shared storage space, the second node, based on the expansion request, allocates a portion of the storage space in the second node's local storage space to the second node's shared storage space. If the first node has the authority to expand the shared storage space, it will allocate a portion of the storage space in its local storage space to the shared storage space of the first node. The method according to claim 13 or 14 is characterized in that, The first node includes a primary manager and a secondary manager. The primary manager is used to allocate a portion of the storage space in the local storage space of the first node to the shared storage space of the first node. The secondary manager is used to determine that the shared storage space of the first node is insufficient to store the second data. The method according to any one of claims 13 to 15, characterized in that, The method further includes: When the storage resource release conditions are met, the first node will allocate a portion of the storage space in its shared storage space to its local storage space. The method according to any one of claims 12 to 16, characterized in that, The first data written to the shared storage space of the first node belongs to the first placement group, and the first data written to the shared storage space of the second node belongs to the second placement group. The identifier of the first placement group is the same as the identifier of the second placement group. The method according to claim 17, characterized in that, The first node includes multiple databases, each of which is used to record metadata related to a placement group, and different databases are used to record metadata related to different placement groups. The method according to claim 18, characterized in that, The method further includes: The first node records the processing operations of metadata in the databases corresponding to the multiple placement groups in the Write Log (WAL). The method according to any one of claims 12 to 19, characterized in that, The method further includes: The first node stores the replica metadata corresponding to the first data, and the replica metadata is used to describe the replica of the first data in the first node and the replica of the first data in the second node. The method according to any one of claims 12 to 20, characterized in that, The data processing system further includes a third node, and the method further includes: When the first node fails, the second node backs up the first data to the shared storage space of the third node, which is used for persistent data storage. The method according to any one of claims 12 to 21, characterized in that, The first node writes the first data into the shared storage space of the second node, including: The first node writes the first data into the shared storage space of the second node through a data processing unit (DPU) or a smart network card. A computing device, characterized in that, Including processor and memory; The processor is configured to execute instructions stored in the memory to cause the computing device to perform the operation steps performed by the first node in any one of claims 12 to 22, or to cause the computing device to perform the operation steps performed by the second node in any one of claims 12 to 22. A computer-readable storage medium, characterized in that, Includes instructions that, when executed on a computing device, cause the computing device to perform the steps of the method as described in any one of claims 12 to 22. A computer program product containing instructions, characterized in that, When it is run on at least one computing device, it causes the at least one computing device to perform the steps of the method as described in any one of claims 12 to 22.

Citation Information

Patent Citations

  • Data sharing system and sharing method suitable for media stream

    CN101453480A

  • Information processing apparatus and memory access method

    CN103198022A

  • Assisted Coherent Shared Memory

    CN104750658A

  • Business system and memory management method and device

    CN115794368A

  • Shared memory architecture

    US20080301379A1