Separated memory system, hybrid indexing method, controller and distributed storage system

By designing a hybrid index tree structure in a separated memory system and using the RDMA network card for efficient indexing operations, the problems of insufficient memory consumption and concurrency performance in the existing technology are solved, and efficient memory utilization and performance improvement are achieved.

CN118568091AActive Publication Date: 2024-08-30HUAZHONG UNIV OF SCI & TECH

Patent Information

Application Number
CN202410583976.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-11
Publication Date
2024-08-30
Estimated Expiration
2044-05-11

AI Technical Summary

Technical Problem

In existing separated memory systems, index structures such as B+-tree and adaptive radix tree have shortcomings in memory consumption and concurrency performance. In particular, the limitation of atomic primitives leads to index concurrency performance bottlenecks.

Method used

A hybrid index tree structure is designed. The internal nodes only store part of the bytes of the key. Efficient index operations are implemented through the RDMA network card, including insertion, search, range query, update and delete operations, and RDMA primitives are used to perform atomic operations. to ensure consistency.

Benefits of technology

It effectively reduces memory consumption, improves system performance, supports efficient range queries, optimizes concurrent operations through the RDMA network, and reduces the frequency of use of atomic primitives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568091A
    Figure CN118568091A
Patent Text Reader

Abstract

The invention discloses a separated memory system, a hybrid index method, a controller and a distributed storage system, and belongs to the field of distributed storage, and the method comprises the following steps: in the distributed memory system formed by a computing server and a memory server which are interconnected by an RDMA network card, constructing a hybrid index tree in the memory server, the information stored in the leaf node comprises a parent node pointer revptr, a key minimum value min, a key maximum value max, a key array Key [n], a value array Values [n] and a read-write lock; keys stored in the key array Keys [n] are located in the range of [min, max) and have the same prefixes as the leaf nodes; the prefix is a part of continuous bytes starting from the first byte in the key; and meanwhile, maintaining an index cache in a memory area of the computing server. Meanwhile, the invention provides a hybrid index method based on the hybrid index tree. According to the invention, the memory consumption in the separated memory system can be reduced, and the system performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of distributed storage, and more specifically, relates to a separate memory system, a hybrid indexing method, a controller and a distributed storage system. Background Art

[0002] In modern data centers, the total cost of DRAM (Dynamic Random Access Memory) is very expensive, accounting for about 50% of the hardware cost. However, Google, Azure, and Alibaba report that there is a large amount of idle memory in their data centers. Therefore, academia and industry have been committed to studying split memory architecture in recent years. In the split memory architecture, CPUs are clustered in compute nodes and DRAMs are clustered in memory nodes. Compute nodes and memory nodes are connected using high-speed interconnect protocols (RDMA, CXL) and constitute compute resource pools and memory resource pools respectively. Cloud providers can allocate compute resources and memory resources according to user needs, thereby improving resource utilization and reducing hardware costs. A small amount of DRAM is usually configured in the compute node as a cache for the compute node, and a small amount of CPU is configured in the memory node to complete basic resource allocation functions.

[0003] RDMA (Remote Direct Memory Access) is a high-speed network technology that supports unilateral WRITE, READ, FAA, and CAS primitives. These primitives can perform byte addressing on the memory in the remote server and do not require the participation of the CPU in the remote server. The data transfer in the memory is completely completed by the RDMA network card and DMA controller in the remote server. Therefore, it is naturally suitable for the separated memory scenario. In the separated memory scenario, the computing server initiates the RDMA unilateral primitive and reads and writes the data in the memory server according to the location pointed by the remote pointer. When the unilateral primitive reaches the RDMA network card in the memory server, the network card directly reads and writes the memory without the participation of the CPU in the memory server. This is the basic principle of the operation of the separated memory system.

[0004] How to efficiently index the key-value data stored in the memory nodes is the key to ensuring the read and write performance of the separated memory system. B+-tree and adaptive radix tree (ART) are the two mainstream index data structures. B+-tree is a classic and widely used data structure. Each of its nodes stores dozens of data items. The data items of the internal nodes store ordered keys and child node pointers, and the leaf node pointers store ordered keys and corresponding values. Since the leaf nodes of B+-tree store dozens of adjacent data items, dozens of data items can be obtained in one continuous memory access, so the range query efficiency is high. However, B+-tree needs to store complete keys, so it consumes more memory space. Adaptive radix tree (ART) is a new data structure. The internal nodes of ART include four types: N_4, N_16, N_48 and N_256, which represent the number of child node pointers stored in the node. It will dynamically select the most suitable internal node structure to save memory space. For ART, the complete key is not stored in its internal nodes, but the path is used to represent the complete key, so it consumes less memory space. However, since the data items are discretely stored in each leaf node, ART cannot support efficient range query operations, and multiple memory accesses are required to obtain the data items with the query. In addition, whether it is ART or B+-tree, the latest related research requires the use of atomic primitives to synchronize concurrent update operations. In the separated memory scenario, atomic primitives are the main bottleneck limiting the concurrent performance of indexes. Summary of the invention

[0005] In view of the defects and improvement needs of the prior art, the present invention provides a separate memory system, a hybrid indexing method, a controller and a distributed storage system, the purpose of which is to reduce the memory consumption in the separate memory system and improve the system performance.

[0006] To achieve the above object, according to one aspect of the present invention, a split memory system is provided, comprising: a computing server and a memory server interconnected via an RDMA network card;

[0007] A hybrid index tree is built in the memory server; an index cache is created in the memory area of ​​the computing server to cache the internal nodes of the hybrid index tree according to the tree structure;

[0008] In a hybrid index tree, the information stored in a leaf node includes: parent node pointer rev_ptr, minimum key value min, maximum key value max, key array Keys[n], value array Values[n], and read-write lock lock; the keys stored in the key array Keys[n] are in the range [min, max) and have the same prefix as the leaf node; the prefix is ​​a portion of consecutive bytes starting from the first byte in the key;

[0009] The information stored in the internal node includes: the depth of the node in the hybrid index tree, the parent node pointer, the partial key, and the child node pointer array; in the child node pointer array, each child node pointer contains the identification byte, the child node type, and the memory address of the child node in the memory server; the partial key is a part of the continuous bytes in the key;

[0010] The prefix of the root node is the partial key stored therein; the prefix of the internal node is composed of the prefix of its parent node, the identification byte in the child node pointer pointing to the internal node, and the partial key in the internal node; if the parent node of the leaf node is a custom node, the prefix of the leaf node is the same as the prefix of its parent node, otherwise, the prefix of the leaf node is composed of the prefix of its parent node and the identification byte in the child node pointer pointing to the leaf node; a custom node is an internal node with a prefix length of L-1, where L is the length of the key, and the prefix of the custom node and the identification character in the child node pointer are concatenated to form the minimum key value of the corresponding leaf node.

[0011] According to another aspect of the present invention, a hybrid indexing method based on the above-mentioned separate memory system is provided, including an insert operation; the insert operation includes:

[0012] (I1) For the key-value pair to be inserted [k i ,v i ], execute the path-finding algorithm, and obtain the key k i The target node is a leaf node L i , then go to step (I2); if it is an internal node N i , then proceed to step (I5);

[0013] For any key k, the pathfinding algorithm consists of:

[0014] (P1) Access the memory index, traverse the index downward from the root node, and find the node N1 that has the longest common prefix with the key k. If the node N1 is a leaf node, use the node N1 as the target node of the key k; if the node N1 is an internal node, go to step (P2);

[0015] (P2) Access the memory server and start searching for a leaf node with the same prefix as key k from node N1. If the search is successful, the leaf node is used as the target node for key k. If the search is unsuccessful, the internal node with the longest common prefix with key k is recorded and used as the target node for key k.

[0016] (I2) If the leaf node L i If the read-write lock of the leaf node L is not in the write lock state, the leaf node L is locked through the RDMA FAA operation. i The read-write lock of the leaf node L is set to the read lock state, and then the process goes to step (I3); otherwise, the read is repeated until the write lock of the read-write lock is released, and then the leaf node L is set to the read lock state through the RDMA FAA operation. i The read-write lock is set to the read lock state, and the process goes to step (I3);

[0017] (I3) At the leaf node L i Search for an empty slot in the key array Keys[n] and use RDMA CAS operation to transfer key k i Write to the slot and then use the RDMA WRITE operation to set the value v i Write to the corresponding slot in the value array Values[n];

[0018] (I4) Release leaf node L through RDMA FAA operation i The read lock is released, and the process goes to step (I7);

[0019] (I5) Create a new leaf node L in the memory server new , its parent node pointer rev_ptr points to the internal node N i , key k i The last 8 positions are 0 as leaf node L new The minimum value of the key k i The last 8 positions are 255 as leaf node L new The maximum value of the key k i Write to the empty slot in the key array Keys[n], and change the value v i Write to the corresponding slot in the value array Values[n];

[0020] (I6) Use RDMA CAS operation to transfer internal node N i An empty slot in the child node pointer array is set to point to the leaf node L new The child node pointer of , go to step (I7);

[0021] (I7) The insertion operation is completed.

[0022] Furthermore, step (I3) further includes: if key k is written into the key array Keys[n] i After that, if the key array Keys[n] is full, the split operation is performed; the split operation includes:

[0023] If the leaf node L i If the read-write lock of the leaf node L is in the write lock state, it means that other node split operations are in progress. Repeatedly read the read-write lock until the write lock of the read-write lock is released, and obtain the leaf node L through the RDMA FAA operation. i The read-write lock of the leaf node L is set to the write lock state; otherwise, the leaf node L is directly i The read-write lock is set to the write lock state;

[0024] If the leaf node L i If the read lock of the read-write lock lock has not been released, wait until the read lock of the read-write lock lock is released, and then execute the subsequent steps; otherwise, execute the subsequent steps directly;

[0025] Create a new leaf node L in memory i ′;

[0026] The leaf node L i The key-value pairs in the L are sorted in order of keys and then divided equally. The key-value pairs with larger keys are written to the leaf nodes L. i ′ and from the leaf node L i Clear in;

[0027] The leaf node L i ' is set to the minimum key min stored in it s , the key maximum value is set to the leaf node L i The maximum value of the key; the leaf node L i The maximum value of the key is updated to the min s ;

[0028] If the leaf node L i The parent node of For custom nodes, set the leaf node L i ''s parent node pointer rev_ptr points to and in The child node array is written to point to the leaf node L i '; otherwise, create a new custom node Set the leaf node L i and L i ′’s parent node pointer points to exist The child node array is written to point to the leaf node Li and L s The child node pointer of Points to leaf node L i The child node pointer is modified to point to The child node pointer of

[0029] Release the leaf node L through RDMA FAA operation i Write lock.

[0030] Furthermore, the hybrid indexing method provided by the present invention further includes: a search operation; the search operation includes:

[0031] (S1) For the key k to be searched s , execute the pathfinding algorithm and get the key k s The target node, if it is a leaf node L s , then go to step (S2); if it is an internal node N s , it is determined that the reading fails and the process goes to step (S5);

[0032] (S2) From the leaf node L s Search the key array Keys[n] for the key k stored in s If the search is successful, go to step (S3); otherwise, go to step (S4);

[0033] (S3) Read the value from the corresponding slot of the value array Values[n] through the RDMA READ operation and then return, and go to step (S5);

[0034] (S4) According to the leaf node L s The parent node pointer rev_ptr traces back to its parent node P s , according to the key range from P s Find the child node that stores key k s The leaf node L s ′, from the leaf node L s ′’s key array Keys[n] searches for the key k stored in it s The RDMA READ operation reads the value from the corresponding slot of the value array Values[n] and returns the result, and the process goes to step (S5);

[0035] (S5) The read operation ends.

[0036] Furthermore, the hybrid indexing method provided by the present invention further includes: a range query operation; the range query operation includes:

[0037] (SC1) Access the memory index to obtain all node pointers within the query range;

[0038] (SC2) grouping node pointers pointing to nodes located in the same memory server into the same node pointer group;

[0039] (SC3) For each node pointer group, read the nodes pointed to by each node pointer to the computing server through batch RDMA READ;

[0040] (SC4) For a node read into the computing server, if it is a leaf node, read the key-value pair data within the query range from it; if it is an internal node, read the node pointer within the query range;

[0041] (SC5) Repeat steps (SC2) to (SC4) until all leaf nodes within the query range have been read.

[0042] Furthermore, in the insert operation, if the value v i If the size of the space occupied is larger than the size of a cache line, use the RDMAWRITE operation to write the value v i When writing to the corresponding slot in the value array Values[n], it also includes: adding a version field in each cache line;

[0043] Furthermore, in search operations and range query operations, if the space occupied by the read value is larger than the size of a cache line, after reading the content of the value, verify whether the version numbers in the cache line are equal. If they are not equal, reread the content of the value until the version numbers in the cache line are equal.

[0044] Furthermore, the hybrid index method provided by the present invention further includes: an update operation; the update operation includes:

[0045] (U1) For the key-value pair data to be updated [k u ,v u ], execute the path-finding algorithm, and get the key k u The target node, if it is a leaf node L u , then go to step (U2); if it is an internal node N u , then the update is determined to have failed, and the process goes to step (U5);

[0046] (U2) From the leaf node L u Search the key array Keys[n] for the key k stored in u If the search is successful, go to step (U3); otherwise, go to step (U4);

[0047] (U3) Set the corresponding slot of the value array Values[n] to v through the RDMA WRITE operation u , go to step (U5);

[0048] (U4) According to the leaf node L u The parent node pointer rev_ptr traces back to its parent node P u , according to the key range from P u Find the child node that stores key k u The leaf node L u ′, from the leaf node L u ′’s key array Keys[n] searches for the key k stored in it u The leaf node L is written to the slot by RDMA WRITE operation. u The corresponding slot of the value array Values[n] of ′ is set to v u , go to step (U5);

[0049] (U5) The update operation is completed.

[0050] Furthermore, the hybrid indexing method provided by the present invention further includes: a deletion operation; the deletion operation includes:

[0051] (D1) For the key k to be deleted d , execute the pathfinding algorithm, get the key k d The target node, if it is a leaf node L d , then go to step (D2); if it is an internal node N d , then the deletion is determined to have failed, and the process goes to step (D5);

[0052] (D2) From leaf node L d Search the key array Keys[n] for the key k stored in d If the search is successful, go to step (D3); otherwise, go to step (D4);

[0053] (D3) Set the corresponding slots of the key array Keys[n] and the value array Values[n] to empty through the RDMA WRITE operation, and go to step (D5);

[0054] (D4) According to the leaf node L d The parent node pointer rev_ptr traces back to its parent node P d , according to the key range from P d Find the child node that stores key k d The leaf node L d ′, from the leaf node L d ′’s key array Keys[n] searches for the key k stored in it d The leaf node L is written to the slot by RDMA WRITE operation. dThe corresponding slots of the key array Keys[n] and the value array Values[n] of ′ are set to empty, and the process goes to step (D5);

[0055] (D5) The update operation is completed.

[0056] According to another aspect of the present invention, a controller based on the above-mentioned split memory system is provided, comprising:

[0057] A computer-readable storage medium for storing a computer program;

[0058] And a processor, used for reading a computer program in a computer-readable storage medium, and executing the hybrid indexing method provided by the present invention.

[0059] According to another aspect of the present invention, there is provided a distributed storage system, comprising: the above-mentioned separate memory system provided by the present invention, and the controller provided by the present invention.

[0060] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:

[0061] (1) The present invention constructs a hybrid index tree in a distributed memory system, which includes two types of nodes, wherein the internal nodes store partial bytes of the key and child node pointers, and link the child nodes according to the logic of byte comparison; the leaf nodes have a structure similar to the leaf nodes of a B+-tree, storing ordered keys and corresponding values, and the entire path from the root node to the leaf node constitutes a complete key. Compared with storing a complete key in each node, the memory overhead of storing the key can be effectively saved, and efficient range queries can be supported; in addition, an index cache is maintained in the computing server to cache the upper (internal) nodes of the hybrid index, thereby avoiding remote traversal of the index and improving the performance of the separate memory system.

[0062] (2) In the hybrid index tree constructed by the present invention, the keys and values ​​in the leaf nodes are stored in two arrays respectively. The modification of the keys is completed through RDMACAS, and the modification of the values ​​is completed through RDMA WRITE operation, which can effectively ensure the consistency of the values. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A schematic diagram of a separate memory system provided by an embodiment of the present invention;

[0064] Figure 2 A schematic diagram of leaf nodes of a hybrid index tree provided in an embodiment of the present invention;

[0065] Figure 3A schematic diagram of a hybrid index operation provided by an embodiment of the present invention; wherein (a) and (b) are schematic diagrams of insert operations, (c) is a schematic diagram of update operations, and (d) and (e) are schematic diagrams of split operations;

[0066] Figure 4 Schematic diagrams of concurrent update operations and concurrent insert operations provided in an embodiment of the present invention; wherein (a) is a schematic diagram of concurrent update operations, and (b) is a schematic diagram of concurrent insert operations. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0068] In the present invention, the terms "first", "second", etc. (if any) in the present invention and the accompanying drawings are used to distinguish similar objects but not necessarily to describe a specific order or sequence.

[0069] In order to reduce memory consumption in a separate memory system and improve system performance, the present invention provides a separate memory system, a hybrid indexing method, a controller and a distributed storage system. The overall idea is to design a new hybrid index tree structure from the perspective of both memory overhead and performance, in which the internal nodes only store part of the key content, and the sub-nodes are logically linked in the internal nodes according to byte comparison, and the complete key is composed of the internal nodes and leaf nodes. This effectively reduces the memory overhead of storing the key while ensuring the implementation of the indexing function. In addition, the cache index is maintained in the computing server to avoid remote traversal of the index, thereby effectively improving the system performance.

[0070] In the distributed memory system to which the present invention is applicable, the computing server and the memory server are interconnected through an RDMA network card, and the corresponding operations rely on RDMA unilateral operations, mainly including:

[0071] RDMACAS operation: When the value of the target memory address is equal to the given comparison value, the new value is written to the memory, otherwise it is not updated. The operation is atomic, and the old value in the target memory address is returned regardless of whether the update is successful.

[0072] RDMA WRITE operation: Writes data of a specified size in local memory to a continuous remote memory starting at the target memory address through the RDMA network.

[0073] RDMA READ operation: Reads data of a specified size from the target memory address in the remote memory through the RDMA network and stores it in the local memory.

[0074] RDMA FAA operation: Increase or decrease the value of the target memory address. The operation is guaranteed to succeed and is atomic. After the operation is completed, the old value in the target memory address is returned.

[0075] The following are examples.

[0076] Embodiment 1:

[0077] A split memory system, such as Figure 1 As shown, it includes: a computing server and a memory server interconnected by an RDMA network card.

[0078] Like the traditional separate memory system, in this embodiment, the computing server integrates hundreds of CPUs and a small amount of DRAM, and the memory server integrates hundreds or thousands of GB of DRAM and a small amount of CPU. The computing server and the memory server are interconnected using the RDMA high-speed network to form a computing resource pool and a memory resource pool. The client running on the computing server can use the CPU on demand and use the memory pool provided by the memory server.

[0079] like Figure 1 As shown, in this embodiment, a hybrid index tree is constructed in the memory server, and the hybrid index tree is completely and distributedly stored in multiple memory servers. The client in the computing server remotely obtains the target data item in the hybrid index through the RDMA network.

[0080] like Figure 2 As shown in the figure, in the hybrid index tree, the information stored in the leaf node includes: parent node pointer rev_ptr, minimum key value min, maximum key value max, key array Keys[n], value array Values[n], and read-write lock lock; the key stored in the key array Keys[n] is in the range [min, max) and has the same prefix as the leaf node; the prefix is ​​part of the continuous bytes starting from the first byte in the key. The leaf node stores key-value pair data within a range.

[0081] The information stored in the internal node includes: the depth of the node in the hybrid index tree, the parent node pointer, the partial key, and the child node pointer array; in the child node pointer array, each child node pointer contains the identification byte, the child node type, and the memory address of the child node in the memory server; the partial key is a part of the continuous bytes in the key;

[0082] The prefix of the root node is the partial key stored in it; the prefix of the internal node is the prefix of its parent node, the identification byte in the child node pointer pointing to the internal node, and the partial key in the internal node. It is easy to understand that the partial keys stored in the internal nodes (including the root node) may be empty. The root node pointer is stored in a fixed area in the memory server and is shared globally by the client. In order to avoid multiple clients modifying the root node pointer concurrently, the root node is created by thread 0 of client 0.

[0083] In order to realize the conversion of the internal node's path finding path based on byte comparison to the leaf node's path finding path based on key size comparison, this embodiment introduces a customized node, i.e., a customized internal node, whose depth is the length of the key, expressed as L=Length(Key). The customized node can be regarded as an internal node with a prefix length of L-1, in which the ideas of byte comparison and range search are integrated.

[0084] If the parent node of a leaf node is a custom node, the prefix of the leaf node is the same as the prefix of its parent node. Otherwise, the prefix of the leaf node is composed of the prefix of its parent node and the identification byte in the child node pointer pointing to the leaf node. The prefix of the custom node and the identification character in the child node pointer are concatenated to form the minimum key value of the corresponding leaf node.

[0085] The hybrid index tree constructed in this embodiment consists of the entire path from the root node to the leaf node, which constitutes a complete key, and each child node has the same prefix as its parent node. Since a custom node with a depth of Length(Key) represents at least Length(Key)-1 bytes of the key, even if the wrong leaf node is accessed due to node splitting or cache failure, the correct leaf node can be quickly found by backtracking instead of searching again from the root.

[0086] In this embodiment, the internal nodes in the hybrid index tree only need to store partial bytes of the key, which can effectively reduce the memory overhead required for storing the key compared to storing the complete key in each key.

[0087] like Figure 1 As shown, an index cache is created in the memory area of ​​the computing server to cache the internal nodes of the hybrid index tree according to the tree structure. Before any operation accesses the memory server, it first accesses the index cache in the computing server to find the ancestor node as close to the leaf node as possible, and finally obtains the latest target leaf node through the RDMA network, thereby effectively avoiding remote traversal of the index and effectively improving system performance.

[0088] The distributed memory system provided in this embodiment can implement path search in the following manner:

[0089] Starting from the root node, use each byte of the key to compare with the prefix of the child node pointer of the internal node in the index cache, and continue to traverse downward until there are no child nodes;

[0090] If the current internal node is not a customized internal node, it means that there is no optional target leaf node at present, and it returns empty or inserts a new leaf node; if the current internal node is a customized internal node, then there must be optional child nodes (leaf nodes), because the customized internal node is upgraded when the leaf node of the corresponding range is split. Find the child node pointer with prefix matching. The matching rule here is not to directly judge whether it is equal, but: for example, there are multiple child node pointers, which contain multiple different prefixes, all of which represent the last byte of the demarcation key generated when the child node is split. Sort the multiple child node pointers to get sequence A, and then find a prefix b from sequence A, which is smaller than the last byte of the target key. In sequence A, the prefixes greater than b are greater than the last byte of the target key. The range of leaf nodes pointed to by the child node pointer to which prefix b belongs includes the target key;

[0091] Read the target leaf node from the memory server according to the remote address in the found child node pointer.

[0092] In Figure 3 Take searching for "1234FF11" in the mixed index tree shown in (b) as an example, the key length is 4 bytes. The root node prefix is ​​empty, the root node contains one child node, namely internal node A, the partial key of internal node A includes two bytes, specifically "1234", and the identification byte in the child node pointer pointing to internal node A is empty, therefore, the prefix of internal node A is "1234"; internal node A includes two child nodes, namely leaf node B and leaf node C, the identification bytes of the child node pointers pointing to these two leaf nodes are "FF" and "00" respectively, since the depth of internal node A is 1, therefore, internal node A is not a custom node, then the prefix of leaf node B is "1234FF", the prefix of leaf node C is "123456", therefore, leaf node B is the target leaf node to be searched.

[0093] Subsequent search, insertion, update, and deletion operations all depend on the search process of the target leaf node mentioned above.

[0094] In this embodiment, the read-write lock in the leaf node is a read-write lock based on the RDMA FAA primitive, which is used to implement high-concurrency write operations in the leaf node and consistent node split operations. In this embodiment, the read-write lock in the leaf node has the same concept as the traditional read-write lock, but the function is different in that the read lock protects the write operation in the node from being affected by possible node split operations, and supports multiple node write operations to jointly hold the read lock, and the write lock protects the node from being affected by possible node write operations during splitting, and only allows one node split operation to exclusively occupy the write lock.

[0095] Embodiment 2:

[0096] The hybrid indexing method for the split memory system provided in the above embodiment 1 includes an insert operation, a split operation, a search operation, a range query operation, an update operation, and a delete operation. The basic idea of ​​each operation is as follows:

[0097] (1) Insertion operation: There are two cases for insertion operation. One case is that the client can find the target leaf node with a common prefix, such as Figure 3 As shown in (a), the target leaf node B is read directly, and then an empty slot Keys[i] is found. The key in Keys[i] is set as the target key using the RDMACAS operation, and then the value is written to Values[i] using RDMA WRITE. The other is that there is no leaf node in the index that can express the first Length(Key)-1 bytes of the target Key, such as Figure 3 As shown in (b) in the figure, the client will find the internal node with the longest common prefix and insert a new child leaf node into it. For ease of presentation, a key with 4 bytes is used in the figure.

[0098] (2) Update / delete operations: Figure 3 As shown in (c) in the figure, the client first finds the leaf node where the target key is located, then finds that Keys[j] is equal to the target key, and then uses RDMA WRITE to set Values[j] to the target value. The Delete operation is similar to the Update operation. After finding the target Keys[j], RDMA WRITE is used to set Keys[j] and Values[j] to empty respectively.

[0099] (3) Split operation: When the leaf node is full, it is necessary to split the leaf node. When inserting a new key into a leaf node with only one empty slot, the split is divided into two cases depending on whether the parent node of the leaf node is a customized node: ① The parent node is not a customized internal node, such as Figure 3As shown in (d) in the figure, at this time, the data items in the leaf node C need to be divided equally, and the larger part of the data items are placed in the new leaf node E, and then the node E and a customized internal node D are written to the memory node. Node D contains two pointers to its two child leaf nodes. Then modify the original pointer pointing to the leaf node C to point to node D. Finally, update the leaf node C and modify the rev_ptr and data items therein. ② The father node is a customized internal node, such as Figure 3 As shown in (e) in the figure, it needs to write a new leaf node F, insert a pointer to the leaf node F into the internal node D, and modify the old leaf node E.

[0100] (4) Search operation: After the client obtains the target leaf node through the search operation, it directly initiates the RDMA READ operation to obtain the target data item in the leaf node. If the index cache is not updated in time due to the split of the leaf node, the client may read the old leaf node. At this time, the client first reads the parent node pointed to by rev_ptr in the leaf node, then searches for the pointer of the new leaf node split from the parent node, and finally initiates RDMA READ to read the leaf node where the target data item is located according to the pointer. This process is called backtracking.

[0101] (5) Range query operation: Similar to the B+-tree scan operation, the client first queries the index cache to obtain all node pointers within the range (including internal nodes and leaf nodes), and then divides the pointers into groups according to the memory nodes they point to (dividing the memory nodes in the same memory server into one group), and then reads the target node to the computing server through batch RDMA READ. If it is a leaf node, the data items belonging to the target range are recorded. If it is an internal node, a batch RDMA READ of the next layer of nodes is initiated until all target leaf nodes are read.

[0102] Combined with the implementation methods of internal nodes and leaf nodes in the hybrid index tree, the specific steps of each operation are as follows.

[0103] The insert operation consists of:

[0104] (I1) For the key-value pair to be inserted [k i ,v i ], execute the path-finding algorithm, and obtain the key k i The target node, if it is a leaf node L i , then go to step (I2); if it is an internal node N i , then proceed to step (I5);

[0105] For any key k, the pathfinding algorithm consists of:

[0106] (P1) Access the memory index, traverse the index downward from the root node, and find the node N1 that has the longest common prefix with the key k. If the node N1 is a leaf node, use the node N1 as the target node of the key k; if the node N1 is an internal node, go to step (P2);

[0107] (P2) Access the memory server and start searching for a leaf node with the same prefix as key k from node N1. If the search is successful, the leaf node is used as the target node for key k. If the search is unsuccessful, the internal node with the longest common prefix with key k is recorded and used as the target node for key k.

[0108] (I2) If the leaf node L i If the read-write lock of the leaf node L is not in the write lock state, the leaf node L is locked through the RDMA FAA operation. i The read-write lock of the leaf node L is set to the read lock state, and then the process goes to step (I3); otherwise, the read is repeated until the write lock of the read-write lock is released, and then the leaf node L is set to the read lock state through the RDMA FAA operation. i The read-write lock is set to the read lock state, and the process goes to step (I3);

[0109] (I3) At the leaf node L i Search for an empty slot in the key array Keys[n] and use RDMA CAS operation to transfer key k i Write to the slot and then use the RDMA WRITE operation to set the value v i Write to the corresponding slot in the value array Values[n];

[0110] (I4) Release leaf node L through RDMA FAA operation i The read lock is released, and the process goes to step (I7);

[0111] (I5) Create a new leaf node L in the memory server new , its parent node pointer rev_ptr points to the internal node N i , key k i The last 8 positions are 0 as leaf node L new The minimum value of the key k i The last 8 positions are 255 as leaf node L new The maximum value of the key k i Write to the empty slot in the key array Keys[n], and change the value v i Write to the corresponding slot in the value array Values[n];

[0112] (I6) Use RDMA CAS operation to transfer internal node N iAn empty slot in the child node pointer array is set to point to the leaf node L new The child node pointer of , go to step (I7);

[0113] (I7) The insertion operation is completed.

[0114] This embodiment uses the RDMA WRITE operation to insert the target Value (i.e., v i ) writes the target value to the corresponding position in the value array. If the size of the target Value is smaller than the cache line size (64 bytes), the remote RDMA network card ensures the atomicity of RDMA_WRITE, and all reads and writes to the target Value are consistent. If the size of the target Value is larger than the cache line size, since RDMA WRITE is executed in the order of increasing addresses, it can also ensure that the final target Value must be the expected value of the last update request.

[0115] To ensure consistency, for a value that occupies more space than a cache line, a version field is added to each cache line when writing it into the value array. Optionally, in this embodiment, the version field includes a 6-bit client version number and a 10-bit logical timestamp. When reading the value, it is verified whether the version numbers in the cache line are equal. If they are equal, it means that the read value must be consistent.

[0116] The split operations include:

[0117] If the leaf node L i If the read-write lock of the leaf node L is in the write lock state, it means that other node split operations are in progress. Repeatedly read the read-write lock until the write lock of the read-write lock is released, and obtain the leaf node L through the RDMA FAA operation. i The read-write lock of the leaf node L is set to the write lock state; otherwise, the leaf node L is directly i The read-write lock is set to the write lock state;

[0118] If the leaf node L i If the read lock of the read-write lock lock has not been released, wait until the read lock of the read-write lock lock is released, and then execute the subsequent steps; otherwise, execute the subsequent steps directly;

[0119] Create a new leaf node L in memory i ′;

[0120] The leaf node L i The key-value pairs in the L are sorted in order of keys and then divided equally. The key-value pairs with larger keys are written to the leaf nodes L. i ′ and from the leaf node Li Clear in;

[0121] The leaf node L i ' is set to the minimum key min stored in it s , the key maximum value is set to the leaf node L i The maximum value of the key; the leaf node L i The maximum value of the key is updated to the min s ;

[0122] If the leaf node L i The parent node of For custom nodes, set the leaf node L i ''s parent node pointer rev_ptr points to and in The child node array is written to point to the leaf node L i '; otherwise, create a new custom node Set the leaf node L i and L i ′’s parent node pointer points to exist The child node array is written to point to the leaf node L i and L s The child node pointer of the leaf node (the identification byte of the child node pointer is the last byte of the minimum key value in the leaf node), and Points to leaf node L i The child node pointer is modified to point to The child node pointer of

[0123] Release the leaf node L through RDMA FAA operation i Write lock.

[0124] Through the above split operation, accurate byte comparison is used as much as possible in the upper layer of the index, and only a "special" internal node, namely a custom node, is introduced at the depth L = Length (Key) layer, because the custom node represents at least L-1 bytes of the key. Therefore, even if the wrong leaf node is accessed due to node splitting or cache failure, the correct leaf node can be quickly found by backtracking instead of re-searching from the root. If the range search method is used too early, it is possible to continue searching down along the wrong path, and the error will be discovered when the leaf node is finally read. At this time, the context information is lost, and the only way is to re-traverse from the root, which is too costly.

[0125] Since custom nodes are not leaf nodes, but special internal nodes (such as Figure 3(d) shows the internal node D in the hybrid index tree. In order to unify the encoding, the format of the custom node is still the ART internal node, but its part of the key is empty, and each byte is accompanied by a pointer to a leaf node (for example Figure 3 The leaf node D / E shown in (d) in the figure stores a portion of data items greater than min and less than max in the leaf node. In addition, when a leaf node splits, the min and max of the old and new leaf nodes will be reset in a similar way to the setting when the B+-tree leaf node splits. By customizing the node transition, data items are stored tightly in the leaf node while ensuring that the target leaf can be found accurately, thereby reducing the total memory consumption of the leaf node and indirectly reducing the number of remote pointers pointing to the leaf node in the index cache by dozens of times.

[0126] The search operations include:

[0127] (S1) For the key k to be searched s , execute the pathfinding algorithm and get the key k s The target node, if it is a leaf node L s , then go to step (S2); if it is an internal node N s , it is determined that the reading fails and the process goes to step (S5);

[0128] (S2) From the leaf node L s Search the key array Keys[n] for the key k stored in s If the search is successful, it means k s If it is within the key range of the leaf node, then go to step (S3); otherwise, go to step (S4);

[0129] (S3) Read the value from the corresponding slot of the value array Values[n] through the RDMA READ operation and then return, and go to step (S5);

[0130] (S4) According to the leaf node L s The parent node pointer rev_ptr traces back to its parent node P s , according to the key range from P s Find the child node that stores key k s The leaf node L s ′, from the leaf node L s ′’s key array Keys[n] searches for the key k stored in it s The RDMA READ operation reads the value from the corresponding slot of the value array Values[n] and returns the result, and the process goes to step (S5);

[0131] (S5) The read operation ends.

[0132] In a lookup operation, if the space occupied by the read value is larger than the size of a cache line, after reading the value content, verify whether the version numbers in the cache line are equal. If they are not equal, reread the value content until the version numbers in the cache line are equal.

[0133] Range query operations include:

[0134] (SC1) Access the memory index to obtain all node pointers within the query range;

[0135] (SC2) grouping node pointers pointing to nodes located in the same memory server into the same node pointer group;

[0136] (SC3) For each node pointer group, read the nodes pointed to by each node pointer to the computing server through batch RDMA READ;

[0137] (SC4) For a node read into the computing server, if it is a leaf node, read the key-value pair data within the query range from it; if it is an internal node, read the node pointer within the query range;

[0138] (SC5) Repeat steps (SC2) to (SC4) until all leaf nodes within the query range have been read.

[0139] In a range query operation, if the space occupied by the read value is larger than the size of a cache line, after reading the content of the value, verify whether the version numbers in the cache line are equal. If they are not equal, reread the content of the value until the version numbers in the cache line are equal.

[0140] Update operations include:

[0141] (U1) For the key-value pair data to be updated [k u ,v u ], execute the pathfinding algorithm, get the key k u The target node, if it is a leaf node L u , then go to step (U2); if it is an internal node N u , then the update is determined to have failed, and the process goes to step (U5);

[0142] (U2) From the leaf node L u Search the key array Keys[n] for the key k stored in u If the search is successful, go to step (U3); otherwise, go to step (U4);

[0143] (U3) Set the corresponding slot of the value array Values[n] to v through the RDMA WRITE operation u , go to step (U5);

[0144] (U4) According to the leaf node L u The parent node pointer rev_ptr traces back to its parent node P u , according to the key range from P u Find the child node that stores key k u The leaf node L u ′, from the leaf node L u ′’s key array Keys[n] searches for the key k stored in it u The leaf node L is written to the slot by RDMA WRITE operation. u The corresponding slot of the value array Values[n] of ′ is set to v u , go to step (U5);

[0145] (U5) The update operation is completed.

[0146] Deletion operations include:

[0147] (D1) For the key k to be deleted d , execute the pathfinding algorithm, get the key k d The target node, if it is a leaf node L d , then go to step (D2); if it is an internal node N d , then the deletion is determined to have failed, and the process goes to step (D5);

[0148] (D2) From leaf node L d Search the key array Keys[n] for the key k stored in d If the search is successful, go to step (D3); otherwise, go to step (D4);

[0149] (D3) Set the corresponding slots of the key array Keys[n] and the value array Values[n] to empty through the RDMA WRITE operation, and go to step (D5);

[0150] (D4) According to the leaf node L d The parent node pointer rev_ptr traces back to its parent node P d , according to the key range from P d Find the child node that stores key k d The leaf node L d ′, from the leaf node L d ′’s key array Keys[n] searches for the key k stored in it d The leaf node L is written to the slot by RDMA WRITE operation. d The corresponding slots of the key array Keys[n] and the value array Values[n] of ′ are set to empty, and the process goes to step (D5);

[0151] (D5) The update operation is completed.

[0152] In this embodiment, the implementation of the above operation realizes the memory server network card write synchronization mechanism, and solves the write-write conflict with very low network overhead. It also implements corresponding conflict resolution methods according to different concurrency conflict types, as follows:

[0153] (1) Update-Update Conflict: In the process of frequent updates of hot data, this embodiment only needs to use RDMAWRITE to complete the overwriting of the target Value. If the size of the target Value is smaller than the cache line size (64 bytes), the RDMA network card ensures the atomicity of RDMA_WRITE, and all reads and writes to the target Value are consistent. If the size of the target Value is larger than the cache line size, the consistency of the operation is also ensured, because RDMA WRITE is executed in byte address order. Therefore, the final target Value must be the expected value of the last update request. Figure 4 As shown in (a) in the figure, concurrent update operations are synchronized when modifying the target Value. The synchronization process is implemented in the RDMA network card of the memory server, so the synchronization overhead is very small.

[0154] (2) Insert-insert conflict: During the insertion process, the client needs to select an empty slot and then use RDMACAS to modify the empty slot from 0 to the target key. RDMACAS is atomic, so it can resolve insertion conflicts. A failed insertion request will select a new empty slot to continue the insertion attempt.

[0155] (3) Update-delete conflict: The delete operation will first set the target key to null, and then set the value to null, thus invalidating the target data item. If a concurrent Update occurs and believes that the target key is still valid, it will only set the value field to the target value without modifying the key. Therefore, the delete operation is synchronized with the update operation by operating on the target key.

[0156] (4) Split-node operation conflict. Intra-node operations include insert, delete, and update operations. The split operation process requires modification of the entire leaf node, while the intra-node operation only modifies the data item, so they are mutually exclusive. This embodiment uses a read-write lock to implement the mutual exclusion relationship between the split operation and the intra-node operation. The intra-node operation is similar to the read lock in terms of the lock operation function. The read-write lock not only synchronizes the split and intra-node operations, but also allows the intra-node operations to share the read lock and execute with high concurrency, thereby making the memory node network card write synchronization mechanism more effective.

[0157] (5) Read-write operation conflict: When performing a write operation on a Value that is larger than the cache line size, this embodiment adds a cache line version number to the value. It adds a version field [client version number (6 bits), logical timestamp (10 bits)] in each cache line. When reading the Value, it verifies whether the version fields in the cache line are equal. If they are equal, it means that the read value is consistent.

[0158] (6) Split-read operation conflict: During the split operation, the concurrent read operation may access the old leaf node, and the target data item may be allocated to the new leaf node. In this embodiment, the leaf node stores min and max, and they are in the first cache line of the leaf node, so the read operation can identify that the target data item is not in the current leaf node, and then use the backtracking method to find the correct leaf node.

[0159] In general, this embodiment can effectively resolve conflicts, efficiently implement various operations while ensuring data consistency, and effectively improve operation performance. This embodiment utilizes the characteristics of the RDMA network card and relies on the RDMA network card in the memory server to synchronize concurrent update operations from the memory server, thereby reducing the use of atomic primitives.

[0160] Embodiment 3:

[0161] The controller of the split memory system provided in the above embodiment 1 includes:

[0162] A computer-readable storage medium for storing a computer program;

[0163] And a processor, used to read the computer program in the computer-readable storage medium and execute the hybrid indexing method provided in the above embodiment 2.

[0164] Embodiment 4:

[0165] A distributed storage system includes: the separate memory system provided in the above embodiment 1, and the controller provided in the above embodiment 3.

[0166] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A split memory system, characterized in that: include: Compute servers and memory servers interconnected via RDMA network cards; A hybrid index tree is constructed in the memory server; An index cache is created in the memory area of ​​the computing server, which is used to cache the internal nodes of the hybrid index tree according to the tree structure; In the hybrid index tree, the information stored in the leaf node includes: parent node pointer rev_ptr, key minimum value min, key maximum value max, key array Keys[n], value array Values[n] and read-write lock lock; the key stored in the key array Keys[n] is in the range [min, max) and has the same prefix as the leaf node; the prefix is ​​part of the continuous bytes starting from the first byte in the key; The information stored in the internal node includes: the depth of the node in the hybrid index tree, the parent node pointer, the partial key and the child node pointer array; in the child node pointer array, each child node pointer contains an identification byte, a child node type and a memory address of the child node in the memory server; the partial key is a portion of continuous bytes in the key; The prefix of the root node is the partial key stored therein; the prefix of the internal node is composed of the prefix of its parent node, the identification byte in the child node pointer pointing to the internal node, and the partial key in the internal node; if the parent node of the leaf node is a custom node, the prefix of the leaf node is the same as the prefix of its parent node, otherwise, the prefix of the leaf node is composed of the prefix of its parent node and the identification byte in the child node pointer pointing to the leaf node; a custom node is an internal node with a prefix length of L-1, where L is the length of the key, and the prefix of the custom node and the identification character in the child node pointer are concatenated to form the minimum key value of the corresponding leaf node.

2. A hybrid indexing method based on the split memory system according to claim 1, characterized in that: Including an insert operation; the insert operation includes: (I1) For the key-value pair to be inserted [k i ,v i ], execute the path-finding algorithm, and obtain the key k i The target node, if it is a leaf node L i , then go to step (I2); if it is an internal node N i , then proceed to step (I5); For any key k, the pathfinding algorithm includes: (P1) Access the memory index, traverse the index downward from the root node, and find the node N1 that has the longest common prefix with the key k. If the node N1 is a leaf node, use the node N1 as the target node of the key k; if the node N1 is an internal node, go to step (P2); (P2) Access the memory server and start searching for a leaf node with the same prefix as key k from node N1. If the search is successful, the leaf node is used as the target node for key k. If the search is unsuccessful, the internal node with the longest common prefix with key k is recorded and used as the target node for key k. (I2) If the leaf node L i If the read-write lock of the leaf node L is not in the write lock state, the leaf node L is locked through the RDMA FAA operation. i The read-write lock of the leaf node L is set to the read lock state, and then the process goes to step (I3); otherwise, the read is repeated until the write lock of the read-write lock is released, and then the leaf node L is set to the read lock state through the RDMA FAA operation. i The read-write lock is set to the read lock state, and the process goes to step (I3); (I3) At the leaf node L i Search for an empty slot in the key array Keys[n] and use RDMA CAS operation to transfer key k i Write to the slot and then use the RDMA WRITE operation to set the value v i Write to the corresponding slot in the value array Values[n]; (I4) Release leaf node L through RDMA FAA operation i The read lock is released, and the process goes to step (I7); (I5) Create a new leaf node L in the memory server new , its parent node pointer rev_ptr points to the internal node N i , key k i The last 8 positions are 0 as leaf node L new The minimum value of the key k i The last 8 positions are 255 as leaf node L new The maximum value of the key k is obtained by using RDMA CAS operation. i Write to an empty slot in the key array Keys[n] using the RDMAWRITE operation to write the value v i Write to the corresponding slot in the value array Values[n]; (I6) Use RDMA CAS operation to transfer internal node N i An empty slot in the child node pointer array is set to point to the leaf node L new The child node pointer of , go to step (I7); (I7) The insertion operation is completed.

3. The hybrid indexing method according to claim 2, characterized in that: The step (I3) also includes: if key k is written into the key array Keys[n] i After that, if the key array Keys[n] is full, a split operation is performed; the split operation includes: If the leaf node L i If the read-write lock is in the write lock state, the read-write lock is read repeatedly until the write lock of the read-write lock is released, and the leaf node L is obtained through the RDMA FAA operation. i The read-write lock of the leaf node L is set to the write lock state; otherwise, the leaf node L is directly i The read-write lock is set to the write lock state; If the leaf node L i If the read lock of the read-write lock lock has not been released, wait until the read lock of the read-write lock lock is released, and then execute the subsequent steps; otherwise, execute the subsequent steps directly; Create a new leaf node L in memory i ′; The leaf node L i The key-value pairs in the L are sorted in order of keys and then divided equally. The key-value pairs with larger keys are written to the leaf nodes L. i ′ and from the leaf node L i Clear in; The leaf node L i ' is set to the minimum key min stored in it s , the key maximum value is set to the leaf node L i The maximum value of the key; the leaf node L i The maximum value of the key is updated to the min s ; If the leaf node L i The parent node of For custom nodes, set the leaf node L i ′’s parent node pointer rev_ptr points to and in The child node array is written to point to the leaf node L i '; otherwise, create a new custom node Set the leaf node L i and L i ′’s parent node pointer points to exist The child node array is written to point to the leaf node L i and L s The child node pointer of Pointing to leaf node L i The child node pointer is modified to point to The child node pointer of Release the leaf node L through RDMA FAA operation i Write lock.

4. The hybrid indexing method according to claim 3, characterized in that: Also includes: Find operation; The search operation includes: (S1) For the key k to be searched s , execute the pathfinding algorithm and get the key k s The target node, if it is a leaf node L s , then go to step (S2); if it is an internal node N s , it is determined that the reading fails and the process goes to step (S5); (S2) From the leaf node L s Search the key array Keys[n] for the key k stored in s If the search is successful, go to step (S3); otherwise, go to step (S4); (S3) Read the value from the corresponding slot of the value array Values[n] through the RDMA READ operation and then return, and go to step (S5); (S4) According to the leaf node L s The parent node pointer rev_ptr traces back to its parent node P s , according to the key range from P s Find the child node that stores key k s The leaf node L s ′, from the leaf node L s ′’s key array Keys[n] searches for the key k stored in it s The RDMA READ operation reads the value from the corresponding slot of the value array Values[n] and returns the result, and the process goes to step (S5); (S5) The read operation ends.

5. The hybrid indexing method according to claim 3, characterized in that: Also includes: Range query operations; The range query operation includes: (SC1) Access the memory index and obtain the pointers of all nodes within the query range; (SC2) grouping node pointers pointing to nodes located in the same memory server into the same node pointer group; (SC3) For each node pointer group, read the nodes pointed to by each node pointer to the computing server through batch RDMA READ; (SC4) For a node read into the computing server, if it is a leaf node, read the key-value pair data within the query range from it; if it is an internal node, read the node pointer within the query range; (SC5) Repeat steps (SC2) to (SC4) until all leaf nodes within the query range have been read.

6. The hybrid indexing method according to claim 4 or 5, characterized in that: In an insert operation, if the value v i If the size of the space occupied is larger than the size of a cache line, an RDMA WRITE operation is used to write the value v i When writing to the corresponding slot in the value array Values[n], it also includes: adding a version field in each cache line; Furthermore, in the search operation and the range query operation, if the space occupied by the read value is larger than the size of a cache line, after reading the content of the value, verify whether the version numbers in the cache line are equal. If they are not equal, reread the content of the value until the version numbers in the cache line are equal.

7. The hybrid indexing method according to claim 3, characterized in that: Also includes: Update operation; The update operation includes: (U1) For the key-value pair data to be updated [k u ,v u ], execute the path-finding algorithm, and get the key k u The target node, if it is a leaf node L u , then go to step (U2); if it is an internal node N u , then the update is determined to have failed, and the process goes to step (U5); (U2) From the leaf node L u Search the key array Keys[n] for the key k stored in u If the search is successful, go to step (U3); otherwise, go to step (U4); (U3) Set the corresponding slot of the value array Values[n] to v through the RDMA WRITE operation u , go to step (U5); (U4) According to the leaf node L u The parent node pointer rev_ptr traces back to its parent node P u , according to the key range from P u Find the child node that stores key k u The leaf node L u ′, from the leaf node L u ′’s key array Keys[n] searches for the key k stored in it u The leaf node L is written to the slot by RDMA WRITE operation. u The corresponding slot of the value array Values[n] of ′ is set to v u , go to step (U5); (U5) The update operation is completed.

8. The hybrid indexing method according to claim 3, characterized in that: Also includes: Deletion operation; the deletion operation includes: (D1) For the key k to be deleted d , execute the pathfinding algorithm, get the key k d The target node, if it is a leaf node L d , then go to step (D2); if it is an internal node N d , then the deletion is determined to have failed, and the process goes to step (D5); (D2) From leaf node L d Search the key array Keys[n] for the key k stored in d If the search is successful, go to step (D3); otherwise, go to step (D4); (D3) Set the corresponding slots of the key array Keys[n] and the value array Values[n] to empty through the RDMA WRITE operation, and go to step (D5); (D4) According to the leaf node L d The parent node pointer rev_ptr traces back to its parent node P d , according to the key range from P d Find the child node that stores key k d The leaf node L d ′, from the leaf node L d ′’s key array Keys[n] searches for the key k stored in it d The leaf node L is written to the slot by RDMA WRITE operation. d The corresponding slots of the key array Keys[n] and the value array Values[n] of ′ are set to empty, and the process goes to step (D5); (D5) The update operation is completed.

9. A controller based on the split memory system according to claim 1, characterized in that: include: A computer-readable storage medium for storing a computer program; and a processor, configured to read the computer program in the computer-readable storage medium and execute the hybrid indexing method according to any one of claims 2 to 8.

10. A distributed storage system, characterized in that: include: The split memory system of claim 1, and the controller of claim 9.

Citation Information

Patent Citations

  • Self-adaptive prefix tree construction method and system based on NVM hybrid memory and medium

    CN112732725A

  • Cache-conscious concurrency control scheme for database systems

    US20030033328A1

Cited By

  • ZNS SSD-based B + tree index construction method for dynamic placement of cold and hot data

    CN120215825A

  • System operation parameter safety management method

    CN121070743A