WO2023236629A1 - 数据访问方法、装置、存储系统及存储介质 - Google Patents

数据访问方法、装置、存储系统及存储介质 Download PDF

Info

Publication number
WO2023236629A1
WO2023236629A1 PCT/CN2023/083907 CN2023083907W WO2023236629A1 WO 2023236629 A1 WO2023236629 A1 WO 2023236629A1 CN 2023083907 W CN2023083907 W CN 2023083907W WO 2023236629 A1 WO2023236629 A1 WO 2023236629A1
Authority
WO
WIPO (PCT)
Prior art keywords
permission
data page
target data
computing node
access
Prior art date
Application number
PCT/CN2023/083907
Other languages
English (en)
French (fr)
Inventor
谭春华
王伟
曹宇
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023236629A1 publication Critical patent/WO2023236629A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Definitions

  • a storage system with separated storage and computing includes multiple computing nodes and multiple storage nodes deployed separately.
  • computing components such as analyzers, optimizers, and executors can be deployed in multiple computing nodes to implement database computing functions, and storage components can be deployed in multiple storage nodes to Implement database storage function.
  • multiple computing nodes can share access to multiple storage nodes.
  • Embodiments of the present application provide a path fault detection method, device, system, network equipment and storage medium to shorten the fault detection cycle and improve fault detection accuracy.
  • the technical solutions are as follows:
  • the permission request includes a page identifier of the target data page.
  • the implementation process for the storage node to determine whether a second computing node currently exists may include: searching for the target data page based on the page identifier of the target data page.
  • the access permission information of the target data page is used to indicate the computing node that currently has the access permission of the target data page; if the access permission information of the target data page is not found, determine the current The second computing node does not exist.
  • the storage node may also read the target data from the multiple data pages in its own persistent storage. Page.
  • the implementation process of the storage node allocating the first access permission of the target data page to the first computing node also includes: in the case that there is currently a second computing node with the access permission of the target data page, based on The second access permission of the target data page and the permission request possessed by the second computing node allocate the first access permission to the first computing node.
  • the permission request includes a page identifier of the target data page.
  • the implementation process for the storage node to determine whether a second computing node currently exists may include: searching for the target data page based on the page identifier of the target data page.
  • the access permission information of the target data page is used to indicate the computing node that currently has the access permission of the target data page; when the access permission information of the target data page is found, it is determined that there is currently The second computing node.
  • the storage node cancels the second computing node's permission.
  • the write operation permission of the target data page is assigned to the first computing node to ensure that there is only one computing node with the write operation permission of the target data page at the same time, thereby avoiding Write conflict.
  • the second computing node when the first access permission is a write operation permission and the permission identifier of the first access permission is different from the permission identifier of the second access permission, the second computing node The node identifier is updated to the node identifier of the first computing node, and the authority identifier of the second access authority is updated to the authority identifier of the first access authority, to obtain the updated access authority information.
  • the permission identifier of the first access permission and the permission identifier of the second access permission are the same, when accessing the target data page
  • the corresponding relationship between the page identifier of the target data page, the node identifier of the first computing node, and the permission identifier of the first access permission is added to the permission information to obtain the updated access permission information.
  • the storage node may also read the target data page from the second computing node.
  • the storage node after receiving the permission request from the first computing node, the storage node can read the target data page from the second computing node that currently has access permission to the target data page, and then use the storage node to read the target data page.
  • the node feeds back the read data page and the access rights assigned to the first computing node to the first computing node at once. There is no need for the storage node to feed back the node information of the second computing node to the first computing node.
  • the first computing node Interacting with the second computing node to obtain data pages reduces interactions between nodes, reduces network bandwidth consumption, and improves access efficiency.
  • the first computing node modifies the target data page after receiving the permission feedback information and the target data page.
  • a data access device which is applied to a storage node in a storage system.
  • the device includes at least one module, and the at least one module is used to implement the data access method described in the first aspect.
  • the at least one module includes a rights management module and a sending module.
  • the permission management module is configured to respond to the permission request sent by the first computing node and allocate the first access permission to the target data page for the first computing node.
  • the target data page is a plurality of data pages stored by the storage node. Any one of the data pages, the first computing node is any one of a plurality of computing nodes included in the storage system; a sending module, configured to send permission feedback information and the target data to the first computing node page, the permission feedback information is used to indicate that the first computing node is allowed to access the target data page based on the first access permission.
  • the storage node communicates with the multiple computing nodes through a network.
  • the rights management module is mainly configured to: when there is currently no second computing node with access rights to the target data page, allocate all the rights to the first computing node based on the rights request. Describe the first access rights.
  • the permission request includes a page identifier of the target data page
  • the permission management module is further configured to: find the access permission information of the target data page based on the page identifier of the target data page, the The access permission information of the target data page is used to indicate the computing node that currently has the access permission of the target data page; if the access permission information of the target data page is not found, it is determined that the second computing node currently does not exist node.
  • the permission request also includes the node identifier of the first computing node and the permission identifier of the first access permission; the permission management module is mainly used to: combine the page identifier of the target data page, the The node identifier of the first computing node and the permission identifier of the first access permission are stored correspondingly to obtain the access permission information of the target data page.
  • the device further includes: a reading module, configured to read the target data page from the plurality of data pages persistently stored by the storage node.
  • a reading module configured to read the target data page from the plurality of data pages persistently stored by the storage node.
  • the rights management module is mainly used to: in the case that there is currently a second computing node with access rights to the target data page, based on the third computing node of the target data page that the second computing node has. Two access rights and the rights request, allocating the first access rights to the first computing node.
  • the permission request includes a page identifier of the target data page
  • the permission management module is further configured to: find the access permission information of the target data page based on the page identifier of the target data page, the The access permission information of the target data page is used to indicate the computing node that currently has the access permission of the target data page; when the access permission information of the target data page is found, it is determined that the second computing node currently exists.
  • the rights management module is mainly configured to: based on the second access rights and the rights request of the target data page owned by the second computing node, access rights information of the target data page Update is performed to obtain updated access permission information, where the updated access permission information is used to indicate that the first computing node has the first access permission of the target data page.
  • the permission request also includes the node identification of the first computing node and the permission identification of the first access permission.
  • the access permission information of the target data page includes the page identification of the target data page, the The corresponding relationship between the node identifier of the second computing node and the permission identifier of the second access permission; the permission management module is mainly used to: when the first access permission is a write operation permission and the first access permission If the permission identification of the second access permission is the same as that of the second access permission, update the node identification of the second computing node to the node identification of the first computing node to obtain the updated access permission information.
  • the device further includes: a reading module, configured to read the target data page from the second computing node.
  • a reading module configured to read the target data page from the second computing node.
  • a storage node in a third aspect, includes a processor, a memory, and a hard disk.
  • the memory is used to store at least one program that supports a network device to execute the data access method provided in the first aspect. instructions or codes, and storage of data involved in implementing the data access method provided by the first aspect.
  • the processor is configured to execute program instructions or code stored in the memory.
  • the hard disk is used to persistently store data.
  • Figure 3 is a flow chart of another computing node in the related art accessing data pages through the main computing node;
  • Figure 4 is a schematic diagram of a computing node accessing a data page through a main computing node in related technologies
  • Figure 7 is a flow chart of a computing node accessing a data page through a storage node according to an embodiment of the present application
  • Figure 9 is a schematic structural diagram of a data access device provided by an embodiment of the present application.
  • the processor 1011 is also used for data calculation or processing, such as metadata management, deduplication, data compression, virtualized storage space, address translation, etc. Only one CPU 1011 is shown in Figure 1. In actual applications, there are often multiple CPUs 1011, and one CPU 1011 has one or more CPU cores. This embodiment does not limit the number of CPUs and CPU cores.
  • a computing program may be deployed in the computing node 101, and the computing program may also be called a computing component.
  • the computing node 101 may be deployed with a database analyzer, database optimizer, database executor, etc. in the database architecture.
  • the computing program deployed in the computing node 101 may also include a page client for processing read and write operations of data pages in the database. It should be noted that the above calculation program can be stored in the memory 1012 of the computing node 101 and executed by the processor 1011 to implement corresponding functions.
  • Memory 1012 refers to the internal memory that directly exchanges data with the processor 1011. It can read and write data at any time and very quickly, and serves as a temporary data storage for the operating system or other running programs.
  • Memory includes at least two types of memory.
  • memory can be either random access memory or read only memory (ROM).
  • ROM read only memory
  • random access memory is dynamic random access memory (DRAM) or storage class memory (SCM).
  • DRAM is a semiconductor memory that, like most random access memories (RAM), is a volatile memory. equipment.
  • SCM is a composite storage technology that combines the characteristics of traditional storage devices and memory. Storage-level memory can provide faster read and write speeds than hard disks, but is slower than DRAM in terms of access speed and cheaper than DRAM in cost. .
  • Any computing node 101 can access any storage node 102 through the network.
  • the storage system in the embodiment of the present application includes multiple storage nodes 102 (three storage nodes 102 are shown in Figure 1, but are not limited to three storage nodes 102).
  • a storage node 102 includes one or more controllers 1021, network cards 1022, and multiple hard disks 1023.
  • Network card 1022 is used to communicate with computing node 101.
  • the hard disk 1023 is used to store data and can be a magnetic disk or other types of storage media, such as a solid-state hard disk or a shingled magnetic recording hard disk.
  • the controller 1021 is configured to write data to the hard disk 1023 or read data from the hard disk 1023 according to the read/write data request sent by the computing node 101. During the process of reading and writing data, the controller 1021 needs to convert the address carried in the read/write data request into an address that the hard disk can recognize. It can be seen that the controller 1021 also has some simple calculation functions.
  • the functions of the controller 1021 can be offloaded to the network card 1022.
  • the storage node 102 does not have a controller 1021 inside, but the network card 1022 completes data reading and writing, address conversion and other computing functions.
  • network card 1022 is a smart network card. It can contain CPU and memory. The CPU is used to perform operations such as address translation and reading and writing data.
  • the memory 103 is used to temporarily store data to be written to the hard disk 1023, or data to be read from the hard disk 1023 and to be sent to the computing node 101. There is no ownership relationship between the network card 1022 and the hard disk 1023 in the storage node 102.
  • the network card 1022 can access any hard disk 1023 in the storage node 102. Therefore, it is more convenient to expand the hard disk when the storage space is insufficient.
  • the above is an exemplary system architecture of a storage system to which the data access method in the embodiment of the present application is applied.
  • the data access method can also be applied to other types of storage systems with separated storage and computing.
  • the computing nodes and storage nodes in the storage system may have more or less hardware or software structures than the above-mentioned computing nodes and storage nodes, which are not limited in the embodiments of this application.
  • a database can be deployed in the storage system where storage and computing are separated as described above.
  • computing programs such as database analyzers, database optimizers, and database executors in the database architecture can be deployed in computing nodes, and database storage programs can be deployed in storage nodes.
  • data can be persistently stored in storage nodes in the form of data pages.
  • computing nodes in the storage system can use cache fusion technology to achieve global shared access to data pages.
  • cache fusion technology actually refers to using the memory of each computing node as a shared cache.
  • each computing node when a computing node reads a certain data page from the storage node into the memory, each computing node can implement the shared cache through the shared cache. Shared access to this data page. Among them, during the process of shared access to the data page, the access rights management of the data page is also implemented by the computing node side.
  • the main computing node of the data page can be determined from multiple computing nodes through a consistent hashing algorithm.
  • the primary compute node is the node that manages access rights to the data page.
  • Computing node 1 sends a permission request to main computing node 0.
  • the main computing node 0 After receiving the permission request, the main computing node 0 determines that there is currently no computing node with access permission to the data page. That is, the data page is not in the memory of any compute node.
  • the main computing node 0 allocates the write operation permission of the data page to the computing node 1.
  • Primary computing node 0 returns a permission application success notification to computing node 1.
  • computing node 1 After receiving the notification of successful permission application, computing node 1 reads the data page from storage node 1 that persistently stores the data page.
  • Computing node 1 modifies the data page and records that the status of the data page is dirty.
  • computing node 1 after modifying the data page, saves the modified data page in the memory.
  • recording the status of the data page as dirty status can indicate that the data page has been modified, and the modified data page has not been persisted to storage node 1.
  • Computing node 2 sends a permission request to the main computing node 0.
  • the main computing node 0 After receiving the permission request, the main computing node 0 determines that the computing node 1 currently has the write operation permission for the data page based on the access permission information of the data page recorded by itself.
  • compute node 1 is the current owner of the data page.
  • Main computing node 0 returns the node information of computing node 1 to computing node 2.
  • Computing node 2 sends a read request for the data page to computing node 1 based on the node information of computing node 1.
  • computing node 1 modifies the status of the data page recorded by itself to the past dirty status.
  • the past dirty state is used to represent that the computing node 1 has modified the data page, but the data page has been subsequently modified by other nodes.
  • the computing node 1 does not need to persist the modified data page.
  • Computing node 1 sends the modified data page to computing node 2.
  • computing node 2 After receiving the modified data page, computing node 2 sends a permission registration request to main computing node 0.
  • the main computing node 0 After receiving the permission registration request, the main computing node 0 records the computing node 2 as the current owner of the data page.
  • the main computing node 0 registers that the computing node 2 currently has access rights to the data page.
  • the main computing node 0 returns information that the permission registration is successful to the computing node 2.
  • the access permission information and data pages in memory are migrated to the re-elected primary computing node.
  • the entire database will be unable to provide services, affecting the availability of the database.
  • it since it is necessary to re-determine the main computing node through a consistent hashing algorithm and perform a large amount of data migration, it takes a long time, that is, the failure recovery time is long.
  • embodiments of the present application provide a data access method, which offloads the permission management function of the data page from the computing node to the storage node that stores the data page. In this way, even if a computing node fails, it will no longer The primary computing node needs to be reselected, which improves system availability.
  • the permission management function of the data page is implemented by the storage node that stores the data page, the access permission and data page can be obtained from the storage node at one time, reducing the number of interactions between nodes and reducing the consumption of network bandwidth. Improve access efficiency.
  • Figure 5 is a flow chart of a data access method provided by an embodiment of the present application. This method can be applied to any storage node in the storage system with separated storage and computing introduced above. As shown in Figure 5, the method includes the following steps:
  • Step 501 In response to the permission request sent by the first computing node, the storage node allocates the first access permission of the target data page to the first computing node.
  • the first computing node in the storage system when the first computing node in the storage system wants to access the target data page stored in the storage node, the first computing node can send a permission request to the storage node to request the storage node to access the target data page. First access to the data page.
  • the first computing node is any one of a plurality of computing nodes included in the storage system
  • the target data page is any one of a plurality of data pages persistently stored by the storage node.
  • the permission request may also carry the node identifier of the first computing node to indicate that the permission request comes from the first computing node.
  • the storage node may combine the page identification of the target data page, the node identification of the first computing node and the first access The permission identification of the permission is stored correspondingly, thereby obtaining the access permission information of the target data page.
  • the storage node can also determine the node identifier of the first computing node through the port that receives the permission request, and then set the page identifier of the target data page to , the node identifier of the first computing node and the permission identifier of the first access permission are stored correspondingly, and the access permission information of the target data page is obtained.
  • the access rights information of the target data page may include the page identifier of the target data page, the node identifier of the second computing node, and the third computing node.
  • the storage node can obtain the node identifier of the first computing node and the permission identifier of the first access right based on the permission request, and then based on the node identifier of the first computing node, the permission identifier of the first access right and the above-mentioned corresponding relationship,
  • the access permission information of the target data page is updated, thereby obtaining updated access permission information.
  • the storage node obtains the node identifier of the first computing node and the permission identifier of the first access permission based on the permission request.
  • the implementation method can refer to the related implementation methods introduced above, and the embodiments of the present application will not be repeated here.
  • the storage node cancels the second computing node's permission.
  • the write operation permission of the target data page is assigned to the first computing node to ensure that there is only one computing node with the write operation permission of the target data page at the same time, thereby avoiding Write conflict.
  • the storage node may update the node identifier of the second computing node in the above correspondence relationship to the node identifier of the first computing node, and update the permission identifier of the second access permission to the permission identifier of the first access permission, Get updated access rights information.
  • the storage node cancels the second computing node's permission to read the target data page.
  • the first computing node is assigned the read operation permission of the target data page and the write operation permission of the target data page. In this way, in the first calculation When a computing node modifies the target data page, other computing nodes cannot read the target data page, thus avoiding read-write conflicts.
  • the storage node can modify one of the corresponding relationships through the above method and delete the remaining corresponding relationships, thereby obtaining updated access permission information.
  • the storage node adds the target data to the access permission information of the target data page.
  • the updated access permission information is obtained from the corresponding relationship between the page identifier of the page, the node identifier of the first computing node, and the permission identifier of the first access permission.
  • the updated access permission information can not only be used to indicate that the first computing node has the first access permission of the target data page, but can also indicate that the second computing node has the second access permission of the target data page, where the first The access rights are the same as the second access rights, which are read operation rights.
  • the storage node can do so without changing the second computing node. While the node has the read operation permission for the target data page, it also assigns the read operation permission for the target data page to the first computing node, so as to realize the shared reading of the target data page by the computing node.
  • the storage node will use the permission identifier of the second access permission in the above corresponding relationship.
  • Update to the permission identification of the first access permission and at the same time, add the corresponding relationship between the page identification of the target data page, the node identification of the first computing node and the permission identification of the first access permission in the access permission information of the target data page, thereby obtaining Updated access rights information.
  • the storage node can obtain the access permission information of the target data page based on the page identifier of the target data page carried in the permission request, and then determine whether there is currently a file with the target data page based on the access permission information of the target data page. Second compute node with access rights to the target data page.
  • the storage node may store the access permission information of the data page.
  • the access permission information of the data page may include the page identifier of the data page and the permission identifier corresponding to the node identifier of each computing node in the storage system.
  • the permission identifier is used to indicate whether the corresponding computing node has access permission to the data page.
  • the permission identification may include a first permission identification, a second permission identification, and a third permission identification. The first permission identification and the second permission identification indicate that the corresponding computing node has access permission to the data page, and the third permission identification indicates that the corresponding computing node has access permission to the data page. The node does not have access rights to this data page.
  • the first permission identifier is a read operation permission identifier
  • the second permission identifier is a write operation permission identifier
  • the first permission identifier is a write operation permission identifier
  • the second permission identifier is a read operation permission identifier.
  • the following description takes the first permission identifier as the write operation permission identifier and the second permission identifier as the read operation permission identifier as an example.
  • the storage node can obtain the access permission information including the page identifier of the target data page from the access permission information of each data page stored by itself, thereby obtaining the access permission information of the target data page. After that, the storage node searches the access permission information of the target data page to see whether there is a computing node corresponding to the first permission identifier or the second permission identifier. If there is a computing node corresponding to the first permission identifier or the second permission identifier, then It is determined that a second computing node that has access rights to the target data page currently exists. Wherein, the computing node with the first authority identification or the second authority identification is the second computing node.
  • the storage node can directly update the access rights information of the target data page based on the rights request to obtain the updated access rights. information.
  • the updated access permission information is used to indicate that the first computing node has the first access permission of the target data page.
  • the storage node may refer to the method introduced above to obtain the node identifier of the first computing node and the permission identifier of the first access permission based on the permission request. Afterwards, the storage node can search for the node identifier of the first computing node from the access permission information of the target data page, and modify the third permission identifier corresponding to the node identifier of the first computing node to the permission identifier of the first access permission, thereby obtaining Updated access rights information.
  • the permission identifier of the first access right is the first permission identifier
  • the permission identifier of the first access right is Second authority identifier.
  • the storage node may refer to the method introduced above to obtain the node identifier of the first computing node and the permission identifier of the first access permission based on the permission request.
  • the permission identification corresponding to the second computing node is obtained from the access permission information of the target data page.
  • the permission identification corresponding to the second computing node is the permission identification of the second access permission of the target data page owned by the second computing node. .
  • the storage node updates the access permission information of the target data page based on the node identifier of the first computing node, the permission identifier of the first access permission, and the permission identifier of the second access permission, to obtain updated access permission information.
  • the storage node can modify the permission identification of the second access permission corresponding to the second computing node in the access permission information of the target data page to a third permission identification, and modify the permission identification corresponding to the first computing node to the first access permission.
  • the permission ID is changed to the first permission ID.
  • the storage node if the second computing node currently has the write operation permission of the target data page, and the first computing node also requests the write operation permission of the target data page, the storage node will The node's permissions on the target data page are modified to have no access permissions, and then the write operation permissions of the target data page are assigned to the first computing node to ensure that calculations with write operation permissions on the target data page are performed at the same time. There is one node to avoid write conflicts.
  • the storage node can modify the permission identification corresponding to the second computing node in the access permission information of the target data page to the third permission identification, and modify the permission identification corresponding to the first computing node to the first access permission.
  • the permission identification that is, is modified to the first permission identification, thereby obtaining the updated access permission information.
  • the storage node will send the second computing node to the target data page.
  • the permission of the target data page is modified to have no access permission, and the first computing node is assigned the write operation permission of the target data page. In this way, during the process of the first computing node modifying the target data page, other computing nodes cannot read the target data page, thereby avoiding read and write conflicts.
  • the second computing node that currently has the read operation permission of the target data page may There are multiple second computing nodes, that is, there may be multiple second computing nodes sharing the reading of the target data page.
  • the storage node can modify the permission identification corresponding to each second computing node to the third permission identification. In this way, the read operation permission of each second computing node on the target data page is canceled.
  • the storage node may not include the second access permission information in the target data page.
  • the permission identification corresponding to the first computing node is modified to the identification of the first access permission, that is, to the second permission identification, thereby obtaining updated access permission information.
  • the updated access permission information can not only be used to indicate that the first computing node has the first access permission of the target data page, but can also indicate that the second computing node has the second access permission of the target data page, where the first The access rights are the same as the second access rights, which are read operation rights.
  • the storage node can do so without changing the second computing node. While the node has the read operation permission for the target data page, it also assigns the read operation permission for the target data page to the first computing node, so as to realize the shared reading of the target data page by the computing node.
  • the storage node can add the access permission information of the target data page to the second
  • the permission identification corresponding to the computing node is modified to the second permission identification
  • the permission identification corresponding to the first computing node is modified to the identification of the first access permission, that is, to the second permission identification, thereby obtaining updated access permission information. That is, in this embodiment of the present application, when the second access permission is a write operation permission and the first access permission applied for by the first computing node is a read operation permission, the storage node can allocate target data to the first computing node.
  • the read operation permission of the page, and at the same time, the write operation permission of the second computing node on the target data page is changed to the read operation permission. At this time, the first computing node and the second computing node share the reading of the target data page.
  • the storage node can read the modified data of the second computing node from the second computing node. target data page.
  • the storage node can also change the second access permission from the second computing node. While reading the target data page in the node, the second computing node is notified to change the second access right to the target data page.
  • the storage node changes the write operation permission of the second computing node to the target data page to the read operation permission, and then sends the second access permission to the second computing node.
  • Compute nodes send permission change notifications.
  • the permission change notification carries the permission identifier of the read operation permission to be changed.
  • the second computing node changes the write operation permission recorded by itself on the target data page to the read operation permission, so as to stop the modification operation on the target data page. Afterwards, the modified target data page is returned to the storage node.
  • the storage node sends a permission cancellation message to the second computing node after canceling the second computing node's read operation permission on the target data page. notify. After receiving the permission cancellation notification, the second computing node changes the write operation permission recorded by itself on the target data page to no operation permission, so as to delete the read operation permission of the target data page. Afterwards, the target data page is returned to the storage node.
  • Step 502 The storage node sends permission feedback information and the target data page to the first computing node, where the permission feedback information is used to indicate that the first computing node is allowed to access the target data page based on the first access permission.
  • the storage node may send the permission feedback information together with the target data page to the first computing node.
  • the first computing node may record information about its first access permission to the target data page, and then process the target data page based on the first access permission.
  • the first computing node may store the page identifier of the target data page and the permission identifier of the first access permission correspondingly, thereby recording that it currently has the first access permission of the target data page.
  • the first access permission is a read operation permission
  • the first computing node After the first computing node obtains the target data page, it can be considered that the first computing node has read the target data page. Afterwards, the first computing node can perform subsequent business processing based on the target data page, which is not limited in this embodiment of the present application.
  • Computing node 1 sends a permission request to storage node 1.
  • the permission request may carry the permission identifier of the write operation permission, the node identifier of the computing node 1, and the page identifier of the data page 1.
  • Storage node 1 determines that there is currently no computing node with access permission to data page 1 based on the permission request.
  • Storage node 1 allocates the write operation permission of data page 1 to the computing node 1, and reads data page 1 of its own persistent storage.
  • the storage node 1 can record the computing node 1 as the node that currently has the write operation permission of the data page 1. At this time, the computing node 1 is the owner (owner) of the data page 1.
  • Storage node 1 returns a permission application success notification and the data page 1 to computing node 1.
  • Computing node 1 records the write operation permission of data page 1, modifies data page 1, and records the status of data page 1 as dirty.
  • the computing node can access the data through one request. Access permissions and data pages can be obtained from the storage node, no other interaction is required.
  • the computing node first obtains access rights by interacting with the main computing node, and then obtains the data page by interacting with the storage node. It can be seen that the data access method provided by this application can reduce the number of interactions and improve access efficiency.
  • Computing node 2 sends a permission request to storage node 1.
  • the permission request may carry the permission identifier of the write operation permission, the node identifier of the computing node 2, and the page identifier of the data page 1.
  • storage node 1 determines that there is currently a computing node 1 with write operation permission for data page 1.
  • computing node 1 is the current owner of data page 1.
  • Storage node 1 sends a read request and permission cancellation notification for data page 1 to computing node 1.
  • the permission cancellation notification is used to notify computing node 1 to cancel the write operation permission of data page 1.
  • Computing node 1 deletes the write operation permission of data page 1 recorded by itself, and changes the status of data page 1 to past dirty status.
  • computing node 1 can modify the write operation permission corresponding to data page 1 to no operation permission, thereby realizing the deletion of the write operation permission.
  • Computing node 1 sends data page 1 to storage node 1.
  • Computing node 2 modifies data page 1 and records that the status of data page 1 is dirty.
  • the device 900 includes a rights management module 901 and a sending module 902.
  • Rights management module 901 used to perform step 501 in the previous embodiment
  • the sending module 902 is used to perform step 502 in the previous embodiment.
  • the data access device can be deployed on the storage node in the aforementioned storage system, for example, deployed in the controller of the storage node, and the controller implements the rights management module 901 and the sending module 902.
  • the permission request includes the page identifier of the target data page, and the permission management module 901 is also used to:
  • the access permission information of the target data page is used to indicate the computing node that currently has access permission to the target data page;
  • the permission request also includes the node identification of the first computing node and the permission identification of the first access permission;
  • the page identifier of the target data page, the node identifier of the first computing node, and the permission identifier of the first access permission are correspondingly stored to obtain the access permission information of the target data page.
  • the device 900 also includes:
  • the reading module is used to read target data pages from multiple data pages persistently stored in the storage node.
  • the first computing node is assigned a first access right based on the second access rights and the rights request of the target data page that the second computing node has.
  • the rights management module 901 is mainly used for:
  • the access permission information of the target data page is updated to obtain updated access permission information.
  • the updated access permission information is used to instruct the first calculation
  • the node has first access rights to the target data page.
  • the permission request also includes the node identification of the first computing node and the permission identification of the first access permission.
  • the access permission information of the target data page includes the page identification of the target data page, the node identification of the second computing node and the second access permission. Correspondence between permissions and permission identifiers;
  • the rights management module 901 is mainly used for:
  • the first access right is a write operation right and the permission identifier of the first access right and the permission identifier of the second access right are the same, update the node identifier of the second computing node to the node identifier of the first computing node, and obtain Updated access rights information.
  • the permission request also includes the node identification of the first computing node and the permission identification of the first access permission.
  • the access permission information of the target data page includes the page identification of the target data page, the node identification of the second computing node and the second access permission. Correspondence between permissions and permission identifiers;
  • the rights management module 901 is mainly used for:
  • the first access right is a write operation right and the permission identifier of the first access right is different from the permission identifier of the second access right, update the node identifier of the second computing node to the node identifier of the first computing node, and Update the permission identifier of the second access permission to the permission identifier of the first access permission to obtain updated access permission information.
  • the permission request also includes the node identification of the first computing node and the permission identification of the first access permission.
  • the access permission information of the target data page includes the page identification of the target data page, the node identification of the second computing node and the second access permission. Correspondence between permissions and permission identifiers;
  • the device 900 also includes:
  • the storage node in the storage system not only stores data pages, but can also receive permission requests from the computing node for the stored data pages, and allocate access permissions to the computing node. That is to say, in the embodiment of this application, the permission management function of the data page is offloaded from the computing node to the storage node that stores the data page. In this way, even if a computing node fails, there is no need to re-select the primary computing node. Other computing nodes can still apply for access permissions through the storage nodes in the storage system, which improves system availability.
  • the data access device provided in the above embodiment performs data access
  • only the division of the above functional modules is used as an example.
  • the above functions can be allocated to different functional modules as needed. into, that is, dividing the internal structure of the device into different functional modules to complete all or part of the functions described above.
  • the data access device provided by the above embodiments and the data access method embodiments belong to the same concept. Please refer to the method embodiments for the specific implementation process, which will not be described again here.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例公开了一种数据访问方法、装置、存储系统及存储介质,属于数据存储技术领域。在本申请实施例中,存储系统中的存储节点不仅存储有数据页,还可以接收计算节点对存储的数据页的权限请求,并为该计算节点分配访问权限。也即,在本申请实施例中,数据页的权限管理功能从计算节点卸载至存储该数据页的存储节点上,这样,即使某个计算节点发生了故障,也不需要重新选取主计算节点,其他计算节点依然可以通过该存储系统中的存储节点来申请访问权限,提高了系统的可用性。

Description

数据访问方法、装置、存储系统及存储介质 技术领域
本申请涉及数据存储技术领域,特别涉及一种数据访问方法、装置、存储系统及存储介质。
背景技术
存算分离的存储系统包括分离部署的多个计算节点和多个存储节点。通常,在该类存储系统中部署数据库时,可以在多个计算节点中部署诸如分析器、优化器和执行器等计算组件,以实现数据库运算功能,在多个存储节点中部署存储组件,以实现数据库存储功能。其中,多个计算节点可以共享访问多个存储节点。
相关技术中,多个存储节点以数据页的形式进行数据存储。每个数据页均对应有一个主计算节点,用于管理相应数据页的访问权限。对于任一个数据页,当除该数据页的主计算节点之外的其他计算节点想要修改该数据页时,该计算节点首先向该数据页的主计算节点发送权限请求。主计算节点在接收到权限请求之后,为该计算节点分配访问权限。分配成功之后,该计算节点可以从存储该数据页的存储节点或者是最近一次修改该数据页的计算节点中获取该数据页,进而对该数据页进行修改。
在上述存储系统中,当多个计算节点中的任一计算节点发生故障时,对于以这个故障节点作为主计算节点的目标数据页,存储系统需要重新确定主计算节点。在未重新确定出主计算节点之前,该存储系统将无法对外提供服务。
发明内容
本申请实施例提供了一种路径故障检测方法、装置、系统、网络设备及存储介质,以缩短故障检测周期,提高故障检测准确性。所述技术方案如下:
第一方面,提供了一种数据访问方法,应用于存储系统中的存储节点,所述方法包括;响应于第一计算节点发送的权限请求,为所述第一计算节点分配目标数据页的第一访问权限,所述目标数据页为所述存储节点存储的多个数据页中的任一个,所述第一计算节点为所述存储系统包括的多个计算节点中的任一个;向所述第一计算节点发送权限反馈信息和所述目标数据页,所述权限反馈信息用于指示允许所述第一计算节点基于所述第一访问权限访问所述目标数据页。
在本申请实施例中,存储系统中的存储节点不仅存储有数据页,还可以接收计算节点对存储的数据页的权限请求,并为该计算节点分配访问权限。也即,在本申请实施例中,数据页的权限管理功能从计算节点卸载至存储该数据页的存储节点上,这样,即使某个计算节点发生了故障,也不需要重新选取主计算节点,其他计算节点依然可以通过该存储系统中的存储节点来申请访问权限,提高了系统的可用性。
可选地,上述存储节点与存储系统中的各个计算节点之间通过网络通信。也即,存储节点和计算节点为分离的。
可选地,所述为所述第一计算节点分配目标数据页的第一访问权限的实现过程可以包括:在当前不存在具有所述目标数据页的访问权限的第二计算节点的情况下,基于所述权限请求,为所述第一计算节点分配所述第一访问权限。
如果当前不存在具有目标数据页的访问权限的第二计算节点,则说明该目标数据页当前 不存在于任何一个计算节点的内存中,此时,存储节点可以直接为该第一计算节点分配访问权限。
可选地,所述权限请求包括所述目标数据页的页标识,存储节点判断当前是否存在第二计算节点的实现过程可以包括:基于所述目标数据页的页标识,查找所述目标数据页的访问权限信息,所述目标数据页的访问权限信息用于指示当前具有所述目标数据页的访问权限的计算节点;在未查找到所述目标数据页的访问权限信息的情况下,确定当前不存在所述第二计算节点。
可选地,所述权限请求在包括目标数据页的页标识的同时,还可以包括所述第一计算节点的节点标识和所述第一访问权限的权限标识;相应地,存储节点基于所述权限请求,为所述第一计算节点分配所述第一访问权限的实现过程可以为:将所述目标数据页的页标识、所述第一计算节点的节点标识和所述第一访问权限的权限标识对应存储,得到所述目标数据页的访问权限信息。这样,第一计算节点则成为了当前具有目标数据页的访问权限的节点。也即,第一计算节点为目标数据页的当前拥有者。
可选地,在基于所述权限请求,为所述第一计算节点分配所述第一访问权限之后,存储节点还可以从自身持久化存储的所述多个数据页中读取所述目标数据页。
由于在第一计算节点申请目标数据页的访问权限之前,该目标数据页不再其他计算节点的内存中,因此,存储节点可以直接读取自身持久化存储的目标数据页,以便后续将该目标数据页和权限反馈信息一次性返回给第一计算节点。由此可见,本申请实施例中由于存储节点同时具有存储目标数据页以及管理目标数据页的权限信息的功能,所以,在将目标数据页初次加载至计算节点的内存中时,计算节点通过与存储节点的一次交互即能够同时获得访问权限和目标数据页,降低了网络带宽消耗,提高了访问效率。
可选地,存储节点为所述第一计算节点分配目标数据页的第一访问权限的实现过程还包括:在当前存在具有所述目标数据页的访问权限的第二计算节点的情况下,基于所述第二计算节点具有的所述目标数据页的第二访问权限和所述权限请求,为所述第一计算节点分配所述第一访问权限。
如果当前存在具有目标数据页的访问权限的第二计算节点,则说明第二计算节点为该目标数据页的当前拥有者,此时,存储节点可以基于第二计算节点具有的目标数据页的第二访问权限和该权限请求来为该第一计算节点分配访问权限。
可选地,所述权限请求包括所述目标数据页的页标识,存储节点判断当前是否存在第二计算节点的实现过程可以包括:基于所述目标数据页的页标识,查找所述目标数据页的访问权限信息,所述目标数据页的访问权限信息用于指示当前具有所述目标数据页的访问权限的计算节点;在查找到所述目标数据页的访问权限信息的情况下,确定当前存在所述第二计算节点。
可选地,存储节点基于所述第二计算节点具有的所述目标数据页的第二访问权限和所述权限请求,为所述第一计算节点分配所述第一访问权限的实现过程可以包括:基于所述第二计算节点具有的所述目标数据页的所述第二访问权限和所述权限请求,对所述目标数据页的访问权限信息进行更新,得到更新后的访问权限信息,所述更新后的访问权限信息用于指示所述第一计算节点具有所述目标数据页的所述第一访问权限。
可选地,所述权限请求在包括目标数据页的页标识的同时,还可以包括所述第一计算节点的节点标识和所述第一访问权限的权限标识,所述目标数据页的访问权限信息包括所述目标数据页的页标识、所述第二计算节点的节点标识和所述第二访问权限的权限标识的对应关 系;在此基础上,存储节点基于所述第二计算节点具有的所述目标数据页的所述第二访问权限和所述权限请求,对所述目标数据页的访问权限信息进行更新,得到更新后的访问权限信息的实现过程可以分为以下几种情况:
第一种情况,在所述第一访问权限为写操作权限、且所述第一访问权限的权限标识和所述第二访问权限的权限标识相同的情况下,将所述第二计算节点的节点标识更新为所述第一计算节点的节点标识,得到所述更新后的访问权限信息。
也即,在本申请实施例中,如果第二计算节点当前具有目标数据页的写操作权限,且第一计算节点也请求的是目标数据页的写操作权限,则存储节点取消第二计算节点对该目标数据页的写操作权限,将该目标数据页的写操作权限分配给第一计算节点,以此来保证在同一时刻具有该目标数据页的写操作权限的计算节点为一个,从而避免写冲突。
第二种情况,在所述第一访问权限为写操作权限、且所述第一访问权限的权限标识和所述第二访问权限的权限标识不同的情况下,将所述第二计算节点的节点标识更新为所述第一计算节点的节点标识,并将所述第二访问权限的权限标识更新为所述第一访问权限的权限标识,得到所述更新后的访问权限信息。
也即,在本申请实施例中,如果第二计算节点当前具有目标数据页的读操作权限,而第一计算节点请求的是目标数据页的写操作权限,则存储节点取消第二计算节点对该目标数据页的读操作权限,为该第一计算节点分配该目标数据页的写操作权限。这样,在第一计算节点修改目标数据页的过程中,其他计算节点无法读取该目标数据页,从而避免了读写冲突。
第三种情况,在所述第一访问权限为读操作权限,且所述第一访问权限的权限标识和所述第二访问权限的权限标识相同的情况下,在所述目标数据页的访问权限信息中添加所述目标数据页的页标识、所述第一计算节点的节点标识和所述第一访问权限的权限标识的对应关系,得到所述更新后的访问权限信息。
也即,在本申请实施例中,在第二访问权限为读操作权限,且第一计算节点申请的第一访问权限也为读操作权限的情况下,存储节点可以在不改变该第二计算节点对目标数据页的读操作权限的同时,为第一计算节点分配目标数据页的读操作权限,以此来实现计算节点对该目标数据页的共享读。
在第四种情况中,如果第一访问权限为读操作权限,且第一访问权限的权限标识和第二访问权限的权限标识不同,则存储节点将第二访问权限的权限标识更新为第一访问权限的权限标识,同时,在目标数据页的访问权限信息中添加目标数据页的页标识、第一计算节点的节点标识和第一访问权限的权限标识的对应关系,从而得到更新后的访问权限信息。
也即,在本申请实施例中,如果第二计算节点当前具有目标数据页的写操作权限,而第一计算节点请求的是目标数据页的读操作权限,则存储节点为该第一计算节点分配该目标数据页的读操作权限,同时将第二计算节点对该目标数据页的写操作权限更改为读操作权限,此时,第一计算节点和第二计算节点共享读该目标数据页。
可选地,在通过上述四种情况中的任一种方式为第一计算节点分配访问权限的过程中,所述存储节点还可以从所述第二计算节点中读取所述目标数据页。
由此可见,在本申请实施例中,存储节点在接收到第一计算节点的权限请求之后,可以从当前具有目标数据页的访问权限的第二计算节点中读取目标数据页,进而由存储节点将读取到的数据页和为该第一计算节点分配的访问权限一次性反馈给第一计算节点,无需存储节点向第一计算节点反馈第二计算节点的节点信息,由第一计算节点和第二计算节点交互来获得数据页,减少了节点间的交互,降低了网络带宽消耗,提高了访问效率。
可选地,如果第一计算节点申请的第一访问权限为写操作权限,则第一计算节点在接收到权限反馈信息和目标数据页之后,对该目标数据页进行修改。
第二方面,提供了一种数据访问装置,应用于存储系统中的存储节点,所述装置包括至少一个模块,所述至少一个模块用于实现第一方面所述的数据访问方法。示例性地,所述至少一个模块包括权限管理模块和发送模块。
其中,权限管理模块,用于响应于第一计算节点发送的权限请求,为所述第一计算节点分配目标数据页的第一访问权限,所述目标数据页为所述存储节点存储的多个数据页中的任一个,所述第一计算节点为所述存储系统包括的多个计算节点中的任一个;发送模块,用于向所述第一计算节点发送权限反馈信息和所述目标数据页,所述权限反馈信息用于指示允许所述第一计算节点基于所述第一访问权限访问所述目标数据页。
可选地,所述存储节点与所述多个计算节点通过网络通信。
可选地,所述权限管理模块主要用于:在当前不存在具有所述目标数据页的访问权限的第二计算节点的情况下,基于所述权限请求,为所述第一计算节点分配所述第一访问权限。
可选地,所述权限请求包括所述目标数据页的页标识,所述权限管理模块还用于:基于所述目标数据页的页标识,查找所述目标数据页的访问权限信息,所述目标数据页的访问权限信息用于指示当前具有所述目标数据页的访问权限的计算节点;在未查找到所述目标数据页的访问权限信息的情况下,确定当前不存在所述第二计算节点。
可选地,所述权限请求还包括所述第一计算节点的节点标识和所述第一访问权限的权限标识;所述权限管理模块主要用于:将所述目标数据页的页标识、所述第一计算节点的节点标识和所述第一访问权限的权限标识对应存储,得到所述目标数据页的访问权限信息。
可选地,所述装置还包括:读取模块,用于从所述存储节点持久化存储的所述多个数据页中读取所述目标数据页。
可选地,所述权限管理模块主要用于:在当前存在具有所述目标数据页的访问权限的第二计算节点的情况下,基于所述第二计算节点具有的所述目标数据页的第二访问权限和所述权限请求,为所述第一计算节点分配所述第一访问权限。
可选地,所述权限请求包括所述目标数据页的页标识,所述权限管理模块还用于:基于所述目标数据页的页标识,查找所述目标数据页的访问权限信息,所述目标数据页的访问权限信息用于指示当前具有所述目标数据页的访问权限的计算节点;在查找到所述目标数据页的访问权限信息的情况下,确定当前存在所述第二计算节点。
可选地,所述权限管理模块主要用于:基于所述第二计算节点具有的所述目标数据页的所述第二访问权限和所述权限请求,对所述目标数据页的访问权限信息进行更新,得到更新后的访问权限信息,所述更新后的访问权限信息用于指示所述第一计算节点具有所述目标数据页的所述第一访问权限。
可选地,所述权限请求还包括所述第一计算节点的节点标识和所述第一访问权限的权限标识,所述目标数据页的访问权限信息包括所述目标数据页的页标识、所述第二计算节点的节点标识和所述第二访问权限的权限标识的对应关系;所述权限管理模块主要用于:在所述第一访问权限为写操作权限、且所述第一访问权限的权限标识和所述第二访问权限的权限标识相同的情况下,将所述第二计算节点的节点标识更新为所述第一计算节点的节点标识,得到所述更新后的访问权限信息。
可选地,所述权限请求还包括所述第一计算节点的节点标识和所述第一访问权限的权限 标识,所述目标数据页的访问权限信息包括所述目标数据页的页标识、所述第二计算节点的节点标识和所述第二访问权限的权限标识的对应关系;所述权限管理模块主要用于:在所述第一访问权限为写操作权限、且所述第一访问权限的权限标识和所述第二访问权限的权限标识不同的情况下,将所述第二计算节点的节点标识更新为所述第一计算节点的节点标识,并将所述第二访问权限的权限标识更新为所述第一访问权限的权限标识,得到所述更新后的访问权限信息。
可选地,所述权限请求还包括所述第一计算节点的节点标识和所述第一访问权限的权限标识,所述目标数据页的访问权限信息包括所述目标数据页的页标识、所述第二计算节点的节点标识和所述第二访问权限的权限标识的对应关系;所述权限管理模块主要用于:在所述第一访问权限为读操作权限,且所述第一访问权限的权限标识和所述第二访问权限的权限标识相同的情况下,在所述目标数据页的访问权限信息中添加所述目标数据页的页标识、所述第一计算节点的节点标识和所述第一访问权限的权限标识的对应关系,得到所述更新后的访问权限信息。
可选地,所述装置还包括:读取模块,用于从所述第二计算节点中读取所述目标数据页。
第三方面,提供了一种存储节点,所述存储节点的结构中包括处理器、存储器和硬盘,所述存储器用于存储支持网络设备执行上述第一方面所提供的数据访问方法的至少一条程序指令或代码,以及存储用于实现上述第一方面所提供的数据访问方法所涉及的数据。所述处理器被配置为用于执行所述存储器中存储的程序指令或代码。所述硬盘用于持久化存储数据。
第四方面,提供了一种存储系统,所述存储系统包括多个计算节点和多个存储节点,当所述多个计算节点中的任一计算节点用于向任一存储节点发送权限请求,所述权限请求用于请求目标数据页的第一访问权限,所述任一存储节点用于执行第一方面所述的数据访问方法,所述任一计算节点还用于接收所述任一存储节点发送的权限反馈信息和目标数据页,所述权限反馈信息用于指示允许所述任一计算节点基于所述第一访问权限访问所述目标数据页。
第五方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面所述的数据访问方法。
第六方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面所述的数据访问方法。
上述第二方面、第三方面、第四方面、第五方面和第六方面所获得的技术效果与第一方面中对应的技术手段获得的技术效果近似,在这里不再赘述。
本申请实施例提供的技术方案至少具有如下有益效果:
在本申请实施例中,存储系统中的存储节点不仅存储有数据页,还可以接收计算节点对存储的数据页的权限请求,并为该计算节点分配访问权限。也即,在本申请实施例中,数据页的权限管理功能从计算节点卸载至存储该数据页的存储节点上,这样,即使某个计算节点发生了故障,也不需要重新选取主计算节点,其他计算节点依然可以通过该存储系统中的存储节点来申请访问权限,提高了系统的可用性。
附图说明
图1是本申请实施例提供的一种存储系统的系统架构图;
图2是相关技术中的一种计算节点通过主计算节点访问数据页的流程图;
图3是相关技术中的另一种计算节点通过主计算节点访问数据页的流程图;
图4是相关技术中计算节点通过主计算节点访问数据页的示意图;
图5是本申请实施例提供的一种数据访问方法的流程图;
图6是本申请实施例提供的一种计算节点通过存储节点访问数据页的示意图;
图7是本申请实施例提供的一种计算节点通过存储节点访问数据页的流程图;
图8是本申请实施例提供的另一种计算节点通过存储节点访问数据页的流程图;
图9是本申请实施例提供的一种数据访问装置的结构示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在对本申请实施例进行详细的解释说明之前,先对本申请实施例的实施环境进行介绍。
图1是一种存算分离的存储系统的架构图,本申请实施例提供的数据访问方法即可以应用于该存储系统中。所谓存算分离是指将计算功能和存储功能分离,分别部署在不同的设备上。其中,将主要用于实现计算功能的设备称为计算节点,将主要提供数据存储功能的设备称为存储节点。如图1所示,该存储系统中可以包括多个计算节点101和多个存储节点102。其中,各个计算节点101之间可以通过网络相互通信,且每个计算节点101可以通过网络访问任一存储节点102。
计算节点101是一种计算设备,如服务器、台式计算机等。在硬件层面,如图1所示,计算节点101至少包括处理器1011、内存1012和网卡1013。其中,处理器1011是一个中央处理器(central processing unit,CPU),用于处理来自计算节点101外部的数据访问请求,或者计算节点101内部生成的请求。示例性的,处理器1011接收用户发送的写数据请求时,会将这些写数据请求中的数据暂时保存在内存1012中。当内存1012中的数据总量达到一定阈值时,处理器1011将内存1012中存储的数据发送给存储节点102进行持久化存储。除此之外,处理器1011还用于数据进行计算或处理,例如元数据管理、重复数据删除、数据压缩、虚拟化存储空间以及地址转换等。图1中仅示出了一个CPU 1011,在实际应用中,CPU 1011的数量往往有多个,其中,一个CPU 1011又具有一个或多个CPU核。本实施例不对CPU的数量,以及CPU核的数量进行限定。在软件层面,计算节点101中可以部署有计算程序,也可以将该计算程序称为计算组件。例如,该计算节点101中可以部署有数据库架构中的数据库分析器、数据库优化器和数据库执行器等。在本申请实施例中,该计算节点101中部署的计算程序还可以包括页面客户端,用于处理数据库中的数据页的读写操作。需要说明的是,上述的计算程序可以存储在计算节点101的内存1012中,并由处理器1011来执行以实现相应地功能。
内存1012是指与处理器1011直接交换数据的内部存储器,它可以随时读写数据,而且速度很快,作为操作系统或其他正在运行中的程序的临时数据存储器。内存包括至少两种存储器,例如内存既可以是随机存取存储器,也可以是只读存储器(read only memory,ROM)。举例来说,随机存取存储器是动态随机存取存储器(dynamic random access memory,DRAM),或者存储级存储器(storage class memory,SCM)。DRAM是一种半导体存储器,与大部分随机存取存储器(random access memory,RAM)一样,属于一种易失性存储器(volatile memory) 设备。SCM是一种同时结合传统储存装置与存储器特性的复合型储存技术,存储级存储器能够提供比硬盘更快速的读写速度,但存取速度上比DRAM慢,在成本上也比DRAM更为便宜。然而,DRAM和SCM在本实施例中只是示例性的说明,内存还可以包括其他随机存取存储器,例如静态随机存取存储器(static random access memory,SRAM)等。而对于只读存储器,举例来说,可以是可编程只读存储器(programmable read only memory,PROM)、可抹除可编程只读存储器(erasable programmable read only memory,EPROM)等。另外,内存1012还可以是双列直插式存储器模块或双线存储器模块(dual in-line memory module,简称DIMM),即由DRAM组成的模块,还可以是固态硬盘(solid state disk,SSD)。实际应用中,计算节点101中可配置多个内存1012,以及不同类型的内存1012。本实施例不对内存1012的数量和类型进行限定。此外,可对内存1012进行配置使其具有保电功能。保电功能是指系统发生掉电又重新上电时,内存1012中存储的数据也不会丢失。具有保电功能的内存被称为非易失性存储器。
网卡1013用于与存储节点102通信。例如,当内存1012中的数据总量达到一定阈值时,计算节点101可通过网卡1013向存储节点102发送请求以对数据进行持久化存储。另外,计算节点101还可以包括总线,用于计算节点101内部各组件之间的通信。在功能上,由于图1中的计算节点101的主要功能是计算业务,在存储数据时可以利用远程存储器来实现持久化存储,因此它具有比常规服务器更少的本地存储器,从而实现了成本和空间的节省。但这并不代表计算节点101不能具有本地存储器,在实际实现中,计算节点101也可以内置少量的硬盘,或者外接少量硬盘。
任意一个计算节点101可通过网络访问任意一个存储节点102。本申请实施例中的存储系统包括多个存储节点102(图1中示出了三个存储节点102,但不限于三个存储节点102)。一个存储节点102包括一个或多个控制器1021、网卡1022与多个硬盘1023。网卡1022用于与计算节点101通信。硬盘1023用于存储数据,可以是磁盘或者其他类型的存储介质,例如固态硬盘或者叠瓦式磁记录硬盘等。控制器1021用于根据计算节点101发送的读/写数据请求,往硬盘1023中写入数据或者从硬盘1023中读取数据。在读写数据的过程中,控制器1021需要将读/写数据请求中携带的地址转换为硬盘能够识别的地址。由此可见,控制器1021也具有一些简单的计算功能。
在实际应用中,控制器1021可具有多种形态。一种情况下,控制器1021包括CPU和内存。CPU用于执行地址转换以及读写数据等操作。内存用于临时存储将要写入硬盘1023的数据,或者从硬盘1023读取出来将要发送给计算节点101的数据。另一种情况下,上述的CPU可以由数据处理单元(data processing unit,DPU)来代替。DPU具有CPU的通用性和可编程性,但更具有专用性,可以在网络数据包,存储请求或分析请求上高效运行。DPU通过较大程度的并行性(需要处理大量请求)与CPU区别开来。可选地,这里的DPU也可以替换成图形处理单元(graphics processing unit,GPU)、嵌入式神经网络处理器(neural-network processing units,NPU)等处理芯片。通常情况下,控制器1021的数量可以是一个,也可以是两个或两个以上。当存储节点102包含至少两个控制器1021时,硬盘1023与控制器1021之间可具有归属关系。当硬盘1023与控制器1021之间具有归属关系时,每个控制器只能访问归属于它的硬盘,因此这往往涉及到在控制器1021之间转发读/写数据请求,导致数据访问的路径较长。另外,如果存储空间不足,在存储节点102中增加新的硬盘1023时需要重新绑定硬盘1023与控制器1021之间的归属关系,操作复杂,导致存储空间的扩展性较差。
因此在另一种实施方式中,控制器1021的功能可以卸载到网卡1022上。换言之,在图 1所示的实施方式中,存储节点102内部不具有控制器1021,而是由网卡1022来完成数据读写、地址转换以及其他计算功能。此时,网卡1022是一个智能网卡。它可以包含CPU和内存。CPU用于执行地址转换以及读写数据等操作。内存103用于临时存储将要写入硬盘1023的数据,或者从硬盘1023读取出来将要发送给计算节点101的数据。存储节点102中的网卡1022和硬盘1023之间没有归属关系,网卡1022可访问该存储节点102中任意一个硬盘1023,因此在存储空间不足时扩展硬盘会较为便捷。
另外,在本申请实施例中,在软件层面,存储节点102中可以部署有数据库架构中的存储程序,例如,该存储程序可以为一个页面服务端,该页面服务端用于提供数据库中的数据页访问以及访问权限管理等功能。需要说明的是,该存储程序可以存储于控制器1021的内存中,控制器1021的CPU可以执行该存储程序以实现页面服务端的功能。或者,该存储程序可以存储于网卡1022的内存中,网卡1022中的CPU可以执行该存储程序以实现页面服务端的功能。
上述是本申请实施例中的数据访问方法所应用的一种示例性的存储系统的系统架构,除此之外,该数据访问方法也可以应用于其他类型的存算分离的存储系统,在这种情况下,存储系统中的计算节点和存储节点可能具有比上述计算节点和存储节点更多或更少的硬件或软件结构,本申请实施例对此不做限定。
上述介绍的存算分离的存储系统中可以部署有数据库。由前述介绍可知,数据库架构中的数据库分析器、数据库优化器、数据库执行器等计算程序可以部署于计算节点中,数据库存储程序则可以部署于存储节点中。在部署有数据库的存储系统中,数据可以以数据页的形式在存储节点中进行持久化存储。目前,为了提高数据访问效率,存储系统中的计算节点可以通过缓存融合技术来实现数据页的全局共享访问。所谓缓存融合技术,实际上是指将各个计算节点的内存作为共享缓存,这样,当某个计算节点从存储节点中将某个数据页读入内存中后,各个计算节点可以通过该共享缓存实现对该数据页的共享访问。其中,在对该数据页进行共享访问的过程中,该数据页的访问权限管理也由计算节点侧来实现。
示例性地,目前,对于各个存储节点中持久化存储的每个数据页,可以通过一致性哈希算法从多个计算节点中确定出数据页的主计算节点。该主计算节点即为管理该数据页的访问权限的节点。接下来以任一数据页为例来对各个计算节点通过缓存融合技术对该数据页执行写操作的过程进行介绍。如图2所示,假设该数据页的主计算节点为计算节点0,且该数据页当前不存在与任何计算节点的内存中,则当计算节点1想要对该数据页执行写操作时,实现过程如下:
1.计算节点1向主计算节点0发送权限请求。
2.主计算节点0在接收到该权限请求之后,确定当前不存在具有该数据页的访问权限的计算节点。也即,该数据页不在任何计算节点的内存中。
3.该主计算节点0为该计算节点1分配该数据页的写操作权限。
此时,该计算节点1即为该数据页的拥有者(owner),也即具有该数据页的访问权限的节点。
4.主计算节点0向计算节点1返回权限申请成功通知。
5.计算节点1在接收到该权限申请成功通知之后,从持久化存储该数据页的存储节点1中,读取该数据页。
6.计算节点1对该数据页进行修改,并记录该数据页的状态为脏(dirty)状态。
其中,在对该数据页进行修改之后,计算节点1将修改后的数据页保存在内存中。另外,将数据页的状态记录为dirty状态,可以表征自身对该数据页进行过修改,且修改后的数据页还未持久化存储至存储节点1。
在计算节点1对数据页进行修改之后,假设计算节点2也想要修改该数据页,则可以通过图3所示的流程来实现:
1.计算节点2向主计算节点0发送权限请求。
2.主计算节点0接收到该权限请求之后,根据自身记录的该数据页的访问权限信息确定计算节点1当前具有该数据页的写操作权限。
也即,计算节点1为该数据页的当前拥有者。
3.主计算节点0向计算节点2返回计算节点1的节点信息。
4.计算节点2根据该计算节点1的节点信息,向计算节点1中发送该数据页的读请求。
5.计算节点1在接收到读请求之后,将自身记录的该数据页的状态修改为过去脏(past dirty)状态。
其中,该past dirty状态用于表征计算节点1修改过该数据页,但是该数据页后续又被其他节点做了修改,该计算节点1可以不必将修改后的数据页进行持久化存储。
6.计算节点1向计算节点2发送修改后的数据页。
7.计算节点2在接收到修改后的数据页之后,向主计算节点0发送权限登记请求。
8.主计算节点0在接收到该权限登记请求之后,记录计算节点2为该数据页的当前拥有者。
也即,主计算节点0登记该计算节点2当前具有该数据页的访问权限。
9.主计算节点0向计算节点2返回权限登记成功的信息。
10.计算节点2在接收到权限登记成功的信息之后,修改从计算节点1中读取到的修改后的数据页,并在修改之后,记录该数据页的状态为dirty状态。
由上述介绍可知,目前通过缓存融合技术实现数据页共享访问的过程中,数据页的访问权限管理需要通过数据页的主计算节点来实现。在这种情况下,一旦数据页的主计算节点发生故障,则相应地数据页将全部无法访问。例如,如图4所示,当计算节点0发生故障时,该计算节点0所管理的数据页0、数据页1、数据页8和数据页119将全部无法访问。此时,即需要通过一致性哈希算法分别为故障的节点所管理的数据页0、数据页1、数据页8和数据页119重新确定主计算节点,进而将计算节点0所管理的数据页的访问权限信息以及内存中的数据页迁移至重新选出的主计算节点。在这个过程中,整个数据库将无法提供服务,影响数据库的可用性。并且,由于需要通过一致性哈希算法来重新确定主计算节点并进行大量的数据迁移,因此,耗费时间较长,也即,故障恢复时间较长。
另外,由上述介绍的数据页访问流程可以看出,当某个计算节点想要访问数据页时,申请该数据页的访问权限以及读取该数据页需要通过多次请求来实现,消耗网络带宽且效率低。
基于此,本申请实施例提供了一种数据访问方法,将数据页的权限管理功能从计算节点卸载至存储该数据页的存储节点上,这样,即使某个计算节点发生了故障,也不再需要重新选取主计算节点,提高了系统的可用性。另外,由于数据页的权限管理功能由存储该数据页的存储节点来实现,所以,访问权限和数据页可以一次性从存储节点获得,减少了节点间的交互次数,降低了网络带宽的消耗,提高访问效率。
接下来对本申请实施例提供的数据访问方法进行介绍。
图5是本申请实施例提供的一种数据访问方法的流程图,该方法可以应用于前述介绍的存算分离的存储系统中的任一存储节点中。如图5所示,该方法包括以下步骤:
步骤501:存储节点响应于第一计算节点发送的权限请求,为第一计算节点分配目标数据页的第一访问权限。
在本申请实施例中,当存储系统中的第一计算节点想要访问存储节点中存储的目标数据页时,该第一计算节点可以向该存储节点发送权限请求,以向存储节点请求对目标数据页的第一访问权限。其中,第一计算节点为存储系统包括的多个计算节点中的任一个,该目标数据页为该存储节点持久化存储的多个数据页中的任一个。
该权限请求中可以携带有目标数据页的页标识,除此之外,该权限请求还可以用于指示所请求的第一访问权限。
例如,该权限请求中可以携带有第一访问权限的标识,其中,当该第一访问权限为写操作权限时,则该权限请求携带有写操作权限的权限标识,当该第一访问权限为读操作权限时,则该权限请求携带有读操作权限的权限标识。
或者,该权限请求可以携带有请求类型,通过请求类型来指示第一访问权限。例如,当该权限请求的请求类型为第一类型时,用于指示第一访问权限为写操作权限。当该权限请求的请求类型为第二类型时,用于指示第一访问权限为读操作权限。
可选地,该权限请求除了携带有目标数据页的页标识,还可以携带有第一计算节点的节点标识,以指示该权限请求来自第一计算节点。
存储节点在接收到该权限请求之后,可以为该第一计算节点分配目标数据页的第一访问权限。
示例性地,该存储节点可以检测当前是否存在具有该目标数据页的访问权限的第二计算节点,如果当前不存在具有目标数据页的访问权限的第二计算节点,则该存储节点直接基于该权限请求,为第一计算节点分配第一访问权限。如果当前存在具有该目标数据页的访问权限的第二计算节点,则基于该第二计算节点具有的目标数据页的第二访问权限和该权限请求,为第一计算节点分配第一访问权限。其中,目标数据页的访问权限可以包括读操作权限和写操作权限。读操作权限是指读取该目标数据页的权限,写操作权限是指修改该目标数据页的权限。
在一种可能的实现方式中,存储节点可以基于权限请求中携带的目标数据页的页标识,查找目标数据页的访问权限信息,该目标数据页的访问权限信息用于指示当前具有目标数据页的访问权限的计算节点。如果未查找到该目标数据页的访问权限信息,则确定当前不存在具有目标数据页的访问权限的第二计算节点。如果查找到该目标数据页的访问权限信息,则确定当前存在具有目标数据页的访问权限的第二计算节点。
需要说明的是,对于存储节点中持久化存储的数据页,如果该数据页当前存在于某个计算节点中的内存中,也即,某个计算节点具有该数据页的访问权限,则该存储节点的内存中将记录有该数据页的访问权限信息,并且,该数据页的访问权限信息中将包含有该数据页的页标识。基于此,在本申请实施例中,存储节点中可以从自身的内存中查找是否存在包含有目标数据页的页标识的访问权限信息。如果未查找到包含有目标数据页的页标识的访问权限信息,则说明未查找到该目标数据页的访问权限信息,也即当前不存在具有该目标数据页的访问权限的第二计算节点。如果查找到包含有目标数据页的页标识的访问权限信息,则说明查找到了该目标数据页的访问权限信息,也即,当前存在具有该目标数据页的访问权限的第二计算节点。
在通过上述方式确定当前不存在具有该目标数据页的访问权限的第二计算节点的情况下,存储节点可以直接基于该权限请求中携带的目标数据页的页标识以及该权限请求所指示的第一访问权限,生成该目标数据页的访问权限信息。此时,生成的目标数据页的访问权限信息即用于指示第一计算节点具有该目标数据页的第一访问权限。
示例性地,如果该权限请求中携带有第一访问权限的权限标识和第一计算节点的节点标识,则存储节点可以将目标数据页的页标识、第一计算节点的节点标识和第一访问权限的权限标识对应存储,从而得到目标数据页的访问权限信息。
可选地,如果该权限请求通过携带请求类型来指示第一访问权限,并且,该权限请求还携带有第一计算节点的节点标识,则存储节点可以根据该权限请求的请求类型获取第一访问权限的权限标识,进而将目标数据页的页标识、第一计算节点的节点标识和第一访问权限的权限标识对应存储,得到目标数据页的访问权限信息。
可选地,如果权限请求中未携带有第一计算节点的节点标识,则存储节点还可以通过接收该权限请求的端口来确定该第一计算节点的节点标识,进而将目标数据页的页标识、第一计算节点的节点标识和第一访问权限的权限标识对应存储,得到目标数据页的访问权限信息。
在通过上述方式确定当前存在具有该目标数据页的访问权限的第二计算节点的情况下,则存储节点可以基于第二计算节点具有的目标数据页的第二访问权限和该权限请求,对目标数据页的访问权限信息进行更新,得到更新后的访问权限信息。此时,该更新后的访问权限信息即用于指示第一计算节点具有目标数据页的第一访问权限。
示例性地,在当前存在具有该目标数据页的访问权限的第二计算节点的情况下,该目标数据页的访问权限信息可以包括目标数据页的页标识、第二计算节点的节点标识和第二访问权限的权限标识的对应关系。基于此,存储节点可以基于权限请求获取第一计算节点的节点标识和第一访问权限的权限标识,进而基于第一计算节点的节点标识、第一访问权限的权限标识和上述的对应关系,对该目标数据页的访问权限信息进行更新,从而得到更新后的访问权限信息。
其中,存储节点基于权限请求获取第一计算节点的节点标识和第一访问权限的权限标识的实现方式可以参考前述介绍的相关实现方式,本申请实施例在此不再赘述。
在获得第一计算节点的节点标识和第一访问权限的权限标识之后,在第一种情况中,如果第一访问权限为写操作权限,且第一访问权限的权限标识与第二访问权限的权限标识相同,则说明第二计算节点当前具有目标数据页的写操作权限,此时,存储节点可以将上述对应关系中第二计算节点的节点标识更新为第一计算节点的节点标识,从而得到更新后的访问权限信息。也即,在本申请实施例中,如果第二计算节点当前具有目标数据页的写操作权限,且第一计算节点也请求的是目标数据页的写操作权限,则存储节点取消第二计算节点对该目标数据页的写操作权限,将该目标数据页的写操作权限分配给第一计算节点,以此来保证在同一时刻具有该目标数据页的写操作权限的计算节点为一个,从而避免写冲突。
在第二种情况中,如果第一访问权限为写操作权限,且第一访问权限的权限标识和第二访问权限的权限标识不同,则说明第二计算节点当前具有目标数据页的读操作权限。在这种情况下,存储节点可以将上述对应关系中第二计算节点的节点标识更新为第一计算节点的节点标识,并将第二访问权限的权限标识更新为第一访问权限的权限标识,得到更新后的访问权限信息。也即,在本申请实施例中,如果第二计算节点当前具有目标数据页的读操作权限,而第一计算节点请求的是目标数据页的写操作权限,则存储节点取消第二计算节点对该目标数据页的读操作权限,为该第一计算节点分配该目标数据页的写操作权限。这样,在第一计 算节点修改目标数据页的过程中,其他计算节点无法读取该目标数据页,从而避免了读写冲突。
需要说明的是,在该种情况中,当前具有目标数据页的读操作权限的第二计算节点可能有多个,也即,可能存在多个第二计算节点共享读该目标数据页,在这种情况下,上述的对应关系也将有多条,这样,存储节点可以通过上述方法对其中一条对应关系进行修改,并将其余的对应关系删除,从而得到更新后的访问权限信息。
在第三种情况中,如果第一访问权限为读操作权限,且第一访问权限的权限标识和第二访问权限的权限标识相同,则存储节点在目标数据页的访问权限信息中添加目标数据页的页标识、第一计算节点的节点标识和第一访问权限的权限标识的对应关系,得到更新后的访问权限信息。此时,该更新后的访问权限信息不仅能够用于指示第一计算节点具有目标数据页的第一访问权限,还能够指示第二计算节点具有目标数据页的第二访问权限,其中,第一访问权限和第二访问权限相同,均为读操作权限。也即,在本申请实施例中,在第二访问权限为读操作权限,且第一计算节点申请的第一访问权限也为读操作权限的情况下,存储节点可以在不改变该第二计算节点对目标数据页的读操作权限的同时,为第一计算节点分配目标数据页的读操作权限,以此来实现计算节点对该目标数据页的共享读。
在第四种情况中,如果第一访问权限为读操作权限,且第一访问权限的权限标识和第二访问权限的权限标识不同,则存储节点将上述对应关系中第二访问权限的权限标识更新为第一访问权限的权限标识,同时,在目标数据页的访问权限信息中添加目标数据页的页标识、第一计算节点的节点标识和第一访问权限的权限标识的对应关系,从而得到更新后的访问权限信息。也即,在本申请实施例中,如果第二计算节点当前具有目标数据页的写操作权限,而第一计算节点请求的是目标数据页的读操作权限,则存储节点为该第一计算节点分配该目标数据页的读操作权限,同时将第二计算节点对该目标数据页的写操作权限更改为读操作权限,此时,第一计算节点和第二计算节点共享读该目标数据页。
在另一种可能的实现方式中,存储节点可以基于权限请求中携带的目标数据页的页标识,获取目标数据页的访问权限信息,进而基于该目标数据页的访问权限信息确定当前是否存在具有目标数据页的访问权限的第二计算节点。
示例性地,对于存储节点中持久化存储的每个数据页,该存储节点可以存储有该数据页的访问权限信息。其中,数据页的访问权限信息可以包括该数据页的页标识、存储系统中的每个计算节点的节点标识对应的权限标识,该权限标识用于指示相应计算节点是否具有该数据页的访问权限。例如,该权限标识可以包括第一权限标识、第二权限标识和第三权限标识,第一权限标识和第二权限标识指示相应计算节点具有该数据页的访问权限,第三权限标识指示相应计算节点不具有该数据页的访问权限。其中,第一权限标识为读操作权限标识、第二权限标识为写操作权限标识,或者,第一权限标识为写操作权限标识,第二权限标识为读操作权限标识。下文中以第一权限标识为写操作权限标识,第二权限标识为读操作为例进行介绍。
基于此,存储节点可以从自身存储的各个数据页的访问权限信息中,获取包含有目标数据页的页标识的访问权限信息,从而得到目标数据页的访问权限信息。之后,存储节点在该目标数据页的访问权限信息中查找是否存在对应有第一权限标识或第二权限标识的计算节点,如果存在对应有第一权限标识或第二权限标识的计算节点,则确定当前存在具有该目标数据页的访问权限的第二计算节点。其中,具有第一权限标识或第二权限标识的计算节点即为第二计算节点。如果在目标数据页的访问权限信息中不存在对应有第一权限标识和第二权 限标识的计算节点,也即,所有计算节点对应的权限标识均为第三权限标识,则确定当前不存在具有该目标数据页的访问权限的第二计算节点。
在通过上述方式确定当前不存在具有目标数据页的访问权限的第二计算节点的情况下,存储节点可以直接基于该权限请求对该目标数据页的访问权限信息进行更新,得到更新后的访问权限信息。此时,该更新后的访问权限信息用于指示第一计算节点具有目标数据页的第一访问权限。
示例性地,存储节点可以参考前述介绍的方法,基于权限请求获取第一计算节点的节点标识和第一访问权限的权限标识。之后,存储节点可以从目标数据页的访问权限信息中查找第一计算节点的节点标识,并将第一计算节点的节点标识对应的第三权限标识修改为第一访问权限的权限标识,从而得到更新后的访问权限信息。其中,当第一访问权限为写操作权限时,该第一访问权限的权限标识即为第一权限标识,当第一访问权限为读操作权限时,则该第一访问权限的权限标识即为第二权限标识。
可选地,在通过上述方式确定当前存在具有目标数据页的访问权限的第二计算节点的情况下,存储节点可以基于该权限请求和第二计算节点对应的权限标识,对该目标数据页的访问权限信息进行更新,从而得到更新后的访问权限信息。其中,该更新后的访问权限信息即能够用于指示第一计算节点具有目标数据页的第一访问权限。
示例性地,存储节点可以参考前述介绍的方法,基于该权限请求获取第一计算节点的节点标识和第一访问权限的权限标识。之后,从目标数据页的访问权限信息中获取第二计算节点对应的权限标识,该第二计算节点对应的权限标识即为该第二计算节点具有的目标数据页的第二访问权限的权限标识。之后,存储节点基于该第一计算节点的节点标识、第一访问权限的权限标识和第二访问权限的权限标识来对该目标数据页的访问权限信息进行更新,得到更新后的访问权限信息。
在第一种情况中,如果第一访问权限为写操作权限,第一访问权限的权限标识与第二访问权限的权限标识相同,则说明第二计算节点当前具有目标数据页的写操作权限。此时,存储节点可以将目标数据页的访问权限信息中第二计算节点对应的第二访问权限的权限标识修改为第三权限标识,将第一计算节点对应的权限标识修改为第一访问权限的权限标识,也即修改为第一权限标识。换句话说,在本申请实施例中,如果第二计算节点当前具有目标数据页的写操作权限,且第一计算节点也请求的是目标数据页的写操作权限,则存储节点将第二计算节点对该目标数据页的权限修改为无访问权限,之后,将该目标数据页的写操作权限分配给第一计算节点,以此来保证在同一时刻具有该目标数据页的写操作权限的计算节点为一个,从而避免写冲突。
在第二种情况中,如果第一访问权限为写操作权限,且第一访问权限的权限标识和第二访问权限的权限标识不同,则说明第二计算节点当前具有目标数据页的读操作权限。在这种情况下,存储节点可以将该目标数据页的访问权限信息中第二计算节点对应的权限标识修改为第三权限标识,并将第一计算节点对应的权限标识修改为第一访问权限的权限标识,也即,修改为第一权限标识,从而得到更新后的访问权限信息。也即,在本申请实施例中,如果第二计算节点当前具有目标数据页的读操作权限,而第一计算节点请求的是目标数据页的写操作权限,则存储节点将第二计算节点对该目标数据页的权限修改为无访问权限,并为该第一计算节点分配该目标数据页的写操作权限。这样,在第一计算节点修改目标数据页的过程中,其他计算节点无法读取该目标数据页,从而避免了读写冲突。
需要说明的是,在该种情况中,当前具有目标数据页的读操作权限的第二计算节点可能 有多个,也即,可能存在多个第二计算节点共享读该目标数据页,在这种情况下,存储节点可以将每个第二计算节点对应的权限标识均修改为第三权限标识,以此来取消每个第二计算节点对该目标数据页的读操作权限。
在第三种情况中,如果第一访问权限为读操作权限,且第一访问权限的权限标识和第二访问权限的权限标识相同,则存储节点可以不对目标数据页的访问权限信息中第二计算节点对应的权限标识进行修改,而是将第一计算节点对应的权限标识修改为第一访问权限的标识,也即修改为第二权限标识,从而得到更新后的访问权限信息。此时,该更新后的访问权限信息不仅能够用于指示第一计算节点具有目标数据页的第一访问权限,还能够指示第二计算节点具有目标数据页的第二访问权限,其中,第一访问权限和第二访问权限相同,均为读操作权限。也即,在本申请实施例中,在第二访问权限为读操作权限,且第一计算节点申请的第一访问权限也为读操作权限的情况下,存储节点可以在不改变该第二计算节点对目标数据页的读操作权限的同时,为第一计算节点分配目标数据页的读操作权限,以此来实现计算节点对该目标数据页的共享读。
在第四种情况中,如果第一访问权限为读操作权限,且第一访问权限的权限标识和第二访问权限的权限标识不同,则存储节点可以将目标数据页的访问权限信息中第二计算节点对应的权限标识修改为第二权限标识,并将第一计算节点对应的权限标识修改为第一访问权限的标识,也即修改为第二权限标识,从而得到更新后的访问权限信息。也即,在本申请实施例中,在第二访问权限为写操作权限,而第一计算节点申请的第一访问权限为读操作权限的情况下,存储节点可以为第一计算节点分配目标数据页的读操作权限,同时将第二计算节点对该目标数据页的写操作权限更改为读操作权限。此时,第一计算节点和第二计算节点共享读该目标数据页。
存储节点在为第一计算节点分配目标数据页的第一访问权限的过程中,该存储节点还可以获取目标数据页。
其中,如果当前不存在具有目标数据页的访问权限的第二计算节点,则存储节点可以直接从自身持久化存储的多个数据页中读取目标数据页。例如,当存储节点采用硬盘来持久化存储数据时,则可以从硬盘中存储的多个数据页中读取目标数据页。
如果当前存在具有目标数据页的访问权限的第二计算节点,且第二计算节点具有的第二访问权限为写操作权限,则存储节点可以从第二计算节点中读取第二计算节点修改后的目标数据页。
如果当前存在具有目标数据页的访问权限的第二计算节点,且第二计算节点具有的第二访问权限为读操作权限,则存储节点可以从第二计算节点中读取该目标数据页。或者,如果第二计算节点中存储的目标数据页已经持久化至该存储节点中,则存储节点也可以直接从持久化存储的多个数据页中读取该目标数据页,本申请实施例对此不做限定。
另外,在为第一计算节点分配第一访问权限的过程中,如果存储节点通过上述方式更改了第二计算节点对目标数据页的第二访问权限,则该存储节点还可以在从第二计算节点中读取目标数据页的同时,通知该第二计算节点更改对该目标数据页的第二访问权限。
例如,如果第二访问权限为写操作权限,第一访问权限也为写操作权限,则存储节点在取消第二计算节点对该目标数据页的写操作权限后,向第二计算节点发送权限取消通知。第二计算节点在接收到该权限取消通知后,将自身记录的对该目标数据页的写操作权限更改为无操作权限,以实现目标数据页的写操作权限的删除,从而停止对该目标数据页的修改操作。之后,第二计算节点还可以在自身内存中记录该目标数据页的状态为past dirty状态,并将 自身修改后的目标数据页返回至存储节点。
再例如,如果第二访问权限为写操作权限,第一访问权限为读操作权限,则存储节点在将第二计算节点对该目标数据页的写操作权限更改为读操作权限后,向第二计算节点发送权限更改通知。其中,该权限更改通知中携带有所要更改的读操作权限的权限标识。第二计算节点在接收到该权限更改通知后,将自身记录的对该目标数据页的写操作权限更改为读操作权限,以停止对该目标数据页的修改操作。之后,将自身修改后的目标数据页返回至存储节点。
再例如,如果第二访问权限为读操作权限,第一访问权限为写操作权限,则存储节点在取消第二计算节点对该目标数据页的读操作权限后,向第二计算节点发送权限取消通知。第二计算节点在接收到该权限取消通知后,将自身记录的对该目标数据页的写操作权限更改为无操作权限,以实现目标数据页的读操作权限的删除。之后,将目标数据页返回至存储节点。
步骤502:存储节点向第一计算节点发送权限反馈信息和目标数据页,该权限反馈信息用于指示允许第一计算节点基于第一访问权限访问目标数据页。
存储节点在为第一计算节点分配目标数据页的第一访问权限并获取到目标数据页之后,该存储节点可以将权限反馈信息和该目标数据页一起发送至第一计算节点。
其中,该权限反馈信息可以为权限申请成功通知,以通知该第一计算节点对该目标数据页的第一访问权限申请成功。示例性地,该权限申请成功通知还可以携带有第一访问权限的权限标识。
第一计算节点在接收到该权限反馈信息之后,可以记录自身对该目标数据页的第一访问权限的信息,之后,基于该第一访问权限来处理目标数据页。
示例性地,第一计算节点可以将目标数据页的页标识和该第一访问权限的权限标识对应存储,以此来记录自身当前具有该目标数据页的第一访问权限。
如果第一访问权限为写操作权限,则第一计算节点可以对该目标数据页进行修改,并将修改后的目标数据页存储在自身的内存中,以便后续其他计算节点申请该目标数据页的访问权限时将该目标数据页返回至存储节点,或者,后续第一计算节点可以将该修改后的数据页持久化至存储节点。另外,第一计算节点在修改该目标数据页之后,还可以记录该目标数据页的状态为dirty状态。例如,第一计算节点可以将目标数据页的页标识和状态对应存储。
如果第一访问权限为读操作权限,则第一计算节点在获取到目标数据页之后,即可以认为该第一计算节点读取到了目标数据页。之后,该第一计算节点可以基于该目标数据页进行后续的业务处理,本申请实施例对此不做限定。
在本申请实施例中,存储系统中的存储节点不仅存储有数据页,还可以接收计算节点对存储的数据页的权限请求,并为该计算节点分配访问权限。也即,在本申请实施例中,数据页的权限管理功能从计算节点卸载至存储该数据页的存储节点上,这样,即使某个计算节点发生了故障,也不需要重新选取主计算节点,其他计算节点依然可以通过该存储系统中的存储节点来申请访问权限,提高了系统的可用性。
另外,在本申请实施例中,计算节点在向存储节点发送权限请求后,存储节点在为该计算节点分配数据页的访问权限的过程中,可以获取数据页,后续将该数据页和权限反馈信息一起返回给计算节点。由此可见,本申请实施例中计算节点通过和存储节点之间的一次交互来一次性获得访问权限和数据页,减少了请求交互次数,降低了网络带宽消耗,提高了访问效率。
图6是本申请实施例提供的一种数据页管理功能卸载至存储节点后的效果图。如图6所 示,存储节点1和存储节点2各自管理自身持久化存储的数据页的访问权限。这样,计算节点0至3中的任一节点在访问存储节点1和2中的数据页时,均可以通过上述介绍的数据访问方法向相应的存储节点请求访问权限并获取数据页。在这种情况下,当某个计算节点发生故障后,例如,当计算节点0发生故障,其他计算节点仍然可以从存储节点请求访问权限,尤其是对于不存在于计算节点0的内存中的数据页,其他计算节点对这些数据页的访问并不会受到影响,提高了系统可用性。而对于存在于该计算节点0的内存中的数据页,则可以随机选择或者通过更为简单的方法选择某个正常运行计算节点来接管该这些数据页即可,无需通过一致性哈希算法来重新计算替代该计算节点0的主计算节点并进行大量的数据页的访问权限信息的迁移,缩短了故障恢复时间。
接下来通过两个示例来对上述介绍的数据访问方法进行举例说明。
参见图7,假设存储节点1中存储的数据页1当前不存在于任何一个计算节点的内存中,也即,当前不存在具有该数据页1的访问权限的计算节点。在这种情况下,当计算节点1想要申请数据页1的写操作权限时,实现过程如下:
1.计算节点1向存储节点1发送权限请求。
其中,该权限请求可以携带有写操作权限的权限标识、计算节点1的节点标识和数据页1的页标识。
2.存储节点1基于该权限请求确定当前不存在具有该数据页1的访问权限的计算节点。
其中,本步骤的实现过程可以参考前述介绍的存储节点判断当前是否存在具有目标数据页的访问权限的计算节点的实现方式。
3.存储节点1为该计算节点1分配数据页1的写操作权限,并读取自身持久化存储的数据页1。
也即,存储节点1可以将该计算节点1记录为当前具有该数据页1的写操作权限的节点,此时,该计算节点1即为该数据页1的拥有者(owner)。
4.存储节点1向计算节点1返回权限申请成功通知和该数据页1。
5.计算节点1记录对该数据页1的写操作权限,并对该数据页1进行修改,记录该数据页1的状态为dirty状态。
对比图7所示的实施流程和图2所示的实施流程可知,在将数据页初次加载至计算节点的内存的场景中,通过本申请实施例提供的数据访问方法,计算节点通过一次请求即可以从存储节点中获得访问权限和数据页,不需要其他交互。而在图2所示的流程中,计算节点首先通过与主计算节点交互获得访问权限,然后再通过与存储节点交互获得数据页。由此可见,本申请提供的数据访问方法能够减少交互次数,提高访问效率。
在计算节点1对数据页进行修改之后,假设计算节点2也想要修改该数据页1,基于本申请实施例提供的数据访问方法,实现过程可以如图8所示:
1.计算节点2向存储节点1发送权限请求。
其中,该权限请求可以携带有写操作权限的权限标识、计算节点2的节点标识和数据页1的页标识。
2.存储节点1基于该权限请求,确定当前存在具有该数据页1的写操作权限的计算节点1。
也即,计算节点1为该数据页1的当前拥有者。
3.存储节点1向计算节点1发送数据页1的读取请求和权限取消通知。
其中,该权限取消通知用于通知计算节点1取消数据页1的写操作权限。
4.计算节点1删除自身记录的数据页1的写操作权限,并修改数据页1的状态为past dirty状态。
其中,计算节点1可以将数据页1对应的写操作权限修改为无操作权限,以此实现对该写操作权限的删除。
5.计算节点1向存储节点1发送数据页1。
其中,该数据页1为经计算节点1修改后的最新的数据页1。
6.存储节点1为计算节点2分配数据页1的写操作权限。
也即,存储节点1记录计算节点2为当前具有数据页1的写操作权限,这样,计算节点2变成了数据页1的当前拥有者。
7.存储节点1向计算节点2返回权限申请成功通知和从计算节点1获得的数据页1。
8.计算节点2修改数据页1,并记录数据页1的状态为dirty状态。
对比图8所示的实施流程和图3所示的实施流程可知,在数据页1被计算节点1修改后,计算节点2再次申请修改该数据页1的场景中,通过本申请实施例提供的数据访问方法,存储节点在为计算节点2分配访问权限的同时,可以从计算节点1获取修改后的数据页,之后,将数据页1和分配的权限一次性返回至计算节点2。也即,整个过程需要存储节点和计算节点1交互一次,与计算节点2交互一次。而在图3所示的流程中,计算节点2首先通过与主计算节点之间交互一次以获得计算节点1的节点信息,然后再和计算节点1交互一次获取数据页。之后,再和主计算节点交互一次登记访问权限。由此可见,本申请提供的数据访问方法能够减少节点间的交互次数,提高访问效率。
参见图9,本申请实施例提供了一种数据访问装置900,该装置900包括权限管理模块901和发送模块902。
权限管理模块901,用于执行前述实施例中的步骤501;
发送模块902,用于执行前述实施例中的步骤502。
需要说明的是,该数据访问装置可以部署于前述介绍的存储系统中的存储节点上,例如,部署于存储节点的控制器中,由该控制器来实现权限管理模块901和发送模块902。
可选地,权限管理模块901主要用于:
在当前不存在具有目标数据页的访问权限的第二计算节点的情况下,基于权限请求,为第一计算节点分配第一访问权限。
可选地,权限请求包括目标数据页的页标识,权限管理模块901还用于:
基于目标数据页的页标识,查找目标数据页的访问权限信息,目标数据页的访问权限信息用于指示当前具有目标数据页的访问权限的计算节点;
在未查找到目标数据页的访问权限信息的情况下,确定当前不存在第二计算节点。
可选地,权限请求还包括第一计算节点的节点标识和第一访问权限的权限标识;
权限管理模块901主要用于:
将目标数据页的页标识、第一计算节点的节点标识和第一访问权限的权限标识对应存储,得到目标数据页的访问权限信息。
可选地,该装置900还包括:
读取模块,用于从存储节点持久化存储的多个数据页中读取目标数据页。
可选地,权限管理模块901主要用于:
在当前存在具有目标数据页的访问权限的第二计算节点的情况下,基于第二计算节点具有的目标数据页的第二访问权限和权限请求,为第一计算节点分配第一访问权限。
可选地,权限请求包括目标数据页的页标识,权限管理模块901还用于:
基于目标数据页的页标识,查找目标数据页的访问权限信息,目标数据页的访问权限信息用于指示当前具有目标数据页的访问权限的计算节点;
在查找到目标数据页的访问权限信息的情况下,确定当前存在第二计算节点。
可选地,权限管理模块901主要用于:
基于第二计算节点具有的目标数据页的第二访问权限和权限请求,对目标数据页的访问权限信息进行更新,得到更新后的访问权限信息,更新后的访问权限信息用于指示第一计算节点具有目标数据页的第一访问权限。
可选地,权限请求还包括第一计算节点的节点标识和第一访问权限的权限标识,目标数据页的访问权限信息包括目标数据页的页标识、第二计算节点的节点标识和第二访问权限的权限标识的对应关系;
权限管理模块901主要用于:
在第一访问权限为写操作权限、且第一访问权限的权限标识和第二访问权限的权限标识相同的情况下,将第二计算节点的节点标识更新为第一计算节点的节点标识,得到更新后的访问权限信息。
可选地,权限请求还包括第一计算节点的节点标识和第一访问权限的权限标识,目标数据页的访问权限信息包括目标数据页的页标识、第二计算节点的节点标识和第二访问权限的权限标识的对应关系;
权限管理模块901主要用于:
在第一访问权限为写操作权限、且第一访问权限的权限标识和第二访问权限的权限标识不同的情况下,将第二计算节点的节点标识更新为第一计算节点的节点标识,并将第二访问权限的权限标识更新为第一访问权限的权限标识,得到更新后的访问权限信息。
可选地,权限请求还包括第一计算节点的节点标识和第一访问权限的权限标识,目标数据页的访问权限信息包括目标数据页的页标识、第二计算节点的节点标识和第二访问权限的权限标识的对应关系;
权限管理模块901主要用于:
在第一访问权限为读操作权限,且第一访问权限的权限标识和第二访问权限的权限标识相同的情况下,在目标数据页的访问权限信息中添加目标数据页的页标识、第一计算节点的节点标识和第一访问权限的权限标识的对应关系,得到更新后的访问权限信息。
可选地,该装置900还包括:
读取模块,用于从第二计算节点中读取目标数据页。
可选地,上述的存储节点和各个计算节点之间通过网络通信。
综上所述,在本申请实施例中,存储系统中的存储节点不仅存储有数据页,还可以接收计算节点对存储的数据页的权限请求,并为该计算节点分配访问权限。也即,在本申请实施例中,数据页的权限管理功能从计算节点卸载至存储该数据页的存储节点上,这样,即使某个计算节点发生了故障,也不需要重新选取主计算节点,其他计算节点依然可以通过该存储系统中的存储节点来申请访问权限,提高了系统的可用性。
需要说明的是:上述实施例提供的数据访问装置在进行数据访问时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完 成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据访问装置与数据访问方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意结合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如:同轴电缆、光纤、数据用户线(digital subscriber line,DSL))或无线(例如:红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如:软盘、硬盘、磁带)、光介质(例如:数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如:固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述并不用以限制本申请实施例,凡在本申请实施例的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请实施例的保护范围之内。

Claims (22)

  1. 一种数据访问方法,其特征在于,所述方法包括;
    存储节点响应于第一计算节点发送的权限请求,为所述第一计算节点分配目标数据页的第一访问权限,所述目标数据页为所述存储节点存储的多个数据页中的任一个,所述第一计算节点为所述存储系统包括的多个计算节点中的任一个;
    所述存储节点向所述第一计算节点发送权限反馈信息和所述目标数据页,所述权限反馈信息用于指示允许所述第一计算节点基于所述第一访问权限访问所述目标数据页。
  2. 根据权利要求1所述的方法,其特征在于,所述存储节点与所述多个计算节点通过网络通信。
  3. 根据权利要求1或2所述的方法,其特征在于,所述为所述第一计算节点分配目标数据页的第一访问权限,包括:
    在当前不存在具有所述目标数据页的访问权限的第二计算节点的情况下,所述存储节点基于所述权限请求,为所述第一计算节点分配所述第一访问权限。
  4. 根据权利要求3所述的方法,其特征在于,所述权限请求包括所述目标数据页的页标识,所述方法还包括:
    所述存储节点基于所述目标数据页的页标识,查找所述目标数据页的访问权限信息,所述目标数据页的访问权限信息用于指示当前具有所述目标数据页的访问权限的计算节点;
    在未查找到所述目标数据页的访问权限信息的情况下,所述存储节点确定当前不存在所述第二计算节点。
  5. 根据权利要求4所述的方法,其特征在于,所述权限请求还包括所述第一计算节点的节点标识和所述第一访问权限的权限标识;
    所述存储节点基于所述权限请求,为所述第一计算节点分配所述第一访问权限,包括:
    所述存储节点将所述目标数据页的页标识、所述第一计算节点的节点标识和所述第一访问权限的权限标识对应存储,得到所述目标数据页的访问权限信息。
  6. 根据权利要求3至5任一所述的方法,其特征在于,所述存储节点基于所述权限请求,为所述第一计算节点分配所述第一访问权限之后,还包括:
    从所述存储节点持久化存储的所述多个数据页中读取所述目标数据页。
  7. 根据权利要求1或2所述的方法,其特征在于,所述为所述第一计算节点分配目标数据页的第一访问权限,包括:
    在当前存在具有所述目标数据页的访问权限的第二计算节点的情况下,所述存储节点基于所述第二计算节点具有的所述目标数据页的第二访问权限和所述权限请求,为所述第一计算节点分配所述第一访问权限。
  8. 根据权利要求7所述的方法,其特征在于,所述权限请求包括所述目标数据页的页标识,所述方法还包括:
    所述存储节点基于所述目标数据页的页标识,查找所述目标数据页的访问权限信息,所述目标数据页的访问权限信息用于指示当前具有所述目标数据页的访问权限的计算节点;
    在查找到所述目标数据页的访问权限信息的情况下,所述存储节点确定当前存在所述第二计算节点。
  9. 根据权利要求8所述的方法,其特征在于,所述存储节点基于所述第二计算节点具有的所述目标数据页的第二访问权限和所述权限请求,为所述第一计算节点分配所述第一访问权限,包括:
    所述存储节点基于所述第二计算节点具有的所述目标数据页的所述第二访问权限和所述权限请求,对所述目标数据页的访问权限信息进行更新,得到更新后的访问权限信息,所述更新后的访问权限信息用于指示所述第一计算节点具有所述目标数据页的所述第一访问权限。
  10. 根据权利要求7-9任一所述的方法,其特征在于,所述方法还包括:
    所述存储节点从所述第二计算节点中读取所述目标数据页。
  11. 一种数据访问装置,其特征在于,应用于存储系统中的存储节点,所述装置包括;
    权限管理模块,用于响应于第一计算节点发送的权限请求,为所述第一计算节点分配目标数据页的第一访问权限,所述目标数据页为所述存储节点存储的多个数据页中的任一个,所述第一计算节点为所述存储系统包括的多个计算节点中的任一个;
    发送模块,用于向所述第一计算节点发送权限反馈信息和所述目标数据页,所述权限反馈信息用于指示允许所述第一计算节点基于所述第一访问权限访问所述目标数据页。
  12. 根据权利要求11所述的装置,其特征在于,所述存储节点与所述多个计算节点通过网络通信。
  13. 根据权利要求11或12所述的装置,其特征在于,所述权限管理模块主要用于:
    在当前不存在具有所述目标数据页的访问权限的第二计算节点的情况下,基于所述权限请求,为所述第一计算节点分配所述第一访问权限。
  14. 根据权利要求13所述的装置,其特征在于,所述权限请求包括所述目标数据页的页标识,所述权限管理模块还用于:
    基于所述目标数据页的页标识,查找所述目标数据页的访问权限信息,所述目标数据页的访问权限信息用于指示当前具有所述目标数据页的访问权限的计算节点;
    在未查找到所述目标数据页的访问权限信息的情况下,确定当前不存在所述第二计算节点。
  15. 根据权利要求14所述的装置,其特征在于,所述权限请求还包括所述第一计算节点的节点标识和所述第一访问权限的权限标识;
    所述权限管理模块主要用于:
    将所述目标数据页的页标识、所述第一计算节点的节点标识和所述第一访问权限的权限 标识对应存储,得到所述目标数据页的访问权限信息。
  16. 根据权利要求13至15任一所述的装置,其特征在于,所述装置还包括:
    读取模块,用于从所述存储节点持久化存储的所述多个数据页中读取所述目标数据页。
  17. 根据权利要求11或12所述的装置,其特征在于,所述权限管理模块主要用于:
    在当前存在具有所述目标数据页的访问权限的第二计算节点的情况下,基于所述第二计算节点具有的所述目标数据页的第二访问权限和所述权限请求,为所述第一计算节点分配所述第一访问权限。
  18. 根据权利要求17所述的装置,其特征在于,所述权限请求包括所述目标数据页的页标识,所述权限管理模块还用于:
    基于所述目标数据页的页标识,查找所述目标数据页的访问权限信息,所述目标数据页的访问权限信息用于指示当前具有所述目标数据页的访问权限的计算节点;
    在查找到所述目标数据页的访问权限信息的情况下,确定当前存在所述第二计算节点。
  19. 根据权利要求18所述的装置,其特征在于,所述权限管理模块主要用于:
    基于所述第二计算节点具有的所述目标数据页的所述第二访问权限和所述权限请求,对所述目标数据页的访问权限信息进行更新,得到更新后的访问权限信息,所述更新后的访问权限信息用于指示所述第一计算节点具有所述目标数据页的所述第一访问权限。
  20. 根据权利要求17-19任一所述的装置,其特征在于,所述装置还包括:
    读取模块,用于从所述第二计算节点中读取所述目标数据页。
  21. 一种存储系统,其特征在于,所述存储系统包括多个计算节点和多个存储节点,当所述多个计算节点中的任一计算节点用于向任一存储节点发送权限请求,所述权限请求用于请求目标数据页的第一访问权限,所述任一存储节点用于执行前述权利要求1-10任一项所述的数据访问方法,所述任一计算节点还用于接收所述任一存储节点发送的权限反馈信息和目标数据页,所述权限反馈信息用于指示允许所述任一计算节点基于所述第一访问权限访问所述目标数据页。
  22. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行权利要求1-10任一项的数据访问方法。
PCT/CN2023/083907 2022-06-07 2023-03-25 数据访问方法、装置、存储系统及存储介质 WO2023236629A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210639666.6 2022-06-07
CN202210639666.6A CN117234409A (zh) 2022-06-07 2022-06-07 数据访问方法、装置、存储系统及存储介质

Publications (1)

Publication Number Publication Date
WO2023236629A1 true WO2023236629A1 (zh) 2023-12-14

Family

ID=89089839

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/083907 WO2023236629A1 (zh) 2022-06-07 2023-03-25 数据访问方法、装置、存储系统及存储介质

Country Status (2)

Country Link
CN (1) CN117234409A (zh)
WO (1) WO2023236629A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408519A (zh) * 2018-11-08 2019-03-01 上海达梦数据库有限公司 一种数据页的访问方法、装置、服务器及存储介质
CN111435943A (zh) * 2019-01-14 2020-07-21 阿里巴巴集团控股有限公司 数据处理方法、设备、系统及存储介质
CN113535656A (zh) * 2021-06-25 2021-10-22 中国人民大学 数据访问方法、装置、设备及存储介质
CN114328434A (zh) * 2021-12-28 2022-04-12 阿里巴巴(中国)有限公司 数据处理系统、方法、设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408519A (zh) * 2018-11-08 2019-03-01 上海达梦数据库有限公司 一种数据页的访问方法、装置、服务器及存储介质
CN111435943A (zh) * 2019-01-14 2020-07-21 阿里巴巴集团控股有限公司 数据处理方法、设备、系统及存储介质
CN113535656A (zh) * 2021-06-25 2021-10-22 中国人民大学 数据访问方法、装置、设备及存储介质
CN114328434A (zh) * 2021-12-28 2022-04-12 阿里巴巴(中国)有限公司 数据处理系统、方法、设备及存储介质

Also Published As

Publication number Publication date
CN117234409A (zh) 2023-12-15

Similar Documents

Publication Publication Date Title
JP7437117B2 (ja) ソリッドステートドライブ(ssd)及び分散データストレージシステム並びにその方法
US10374792B1 (en) Layout-independent cryptographic stamp of a distributed dataset
US10747673B2 (en) System and method for facilitating cluster-level cache and memory space
JP2019212330A (ja) スケーラブル分散ストレージアーキテクチャ
US8966188B1 (en) RAM utilization in a virtual environment
US10387275B2 (en) Resume host access based on transaction logs
CN114860163B (zh) 一种存储系统、内存管理方法和管理节点
JP2014530394A (ja) 不揮発性記憶装置セットの揮発メモリ表現
WO2019001020A1 (zh) 基于分布式系统的存储空间整理方法、装置及系统
WO2015085826A1 (zh) 一种访问共享资源的方法及装置
US10719240B2 (en) Method and device for managing a storage system having a multi-layer storage structure
CN107577733B (zh) 一种数据复制的加速方法及系统
WO2023236629A1 (zh) 数据访问方法、装置、存储系统及存储介质
WO2022257685A1 (zh) 存储系统、网卡、处理器、数据访问方法、装置及系统
WO2023035694A1 (zh) 业务系统、内存管理方法及装置
CN110447019B (zh) 存储器分配管理器及由其执行的用于管理存储器分配的方法
US11474938B2 (en) Data storage system with multiple-size object allocator for disk cache
US11741056B2 (en) Methods and systems for allocating free space in a sparse file system
US20220066664A1 (en) Storage system and data management method
WO2021088587A1 (zh) 数据访问方法、装置及存储介质
CN114518962A (zh) 内存的管理方法及装置
CN115509437A (zh) 存储系统、网卡、处理器、数据访问方法、装置及系统
KR100785774B1 (ko) 객체 기반 파일 입출력 시스템 및 방법
US11874767B2 (en) Memory partitions for processing entities
US11928336B2 (en) Systems and methods for heterogeneous storage systems

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23818797

Country of ref document: EP

Kind code of ref document: A1