A data page disk flushing method, device, equipment and medium

By directly obtaining data page information on the first cluster node in the shared storage cluster and generating a disk flash request, the problem of low efficiency in data page flash disk flash operation is solved, and the effect of reducing the number of communications of global cache service is achieved, and the cluster performance is improved.

CN119759867APending Publication Date: 2025-04-04SHANGHAI DAMENG DATABASE
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411819653.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In a shared storage database cluster environment, data page disk flushing operation is low, mainly due to frequent communication between Global Cache Service (GBS) in the disk flushing process.

Method used

By introducing information acquisition module, generation module and data page brushing module into the shared storage cluster, data page information is directly obtained on the first cluster node and generated a brushing request, reducing dependence on GBS and reducing the number of communications.

Benefits of technology

It improves the efficiency of data page disk flushing, reduces the number of communications of global cache services in the disk flushing process, thereby improving the performance of the entire cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759867A_ABST
    Figure CN119759867A_ABST
Patent Text Reader

Abstract

The present invention discloses a data page disk flushing method, device, equipment and medium, which are applied to a shared storage cluster. The method includes: responding to a disk flushing request condition for a first current data page and obtaining the first data page information through a first cluster node; when determining that a request forwarding condition is met based on the first data page information, generating a first disk flushing request and sending it to a target cluster node; responding to a second disk flushing request for a second current data page through a second cluster node, determining the request source of the second disk flushing request and the corresponding second data page information; performing a disk flushing operation on the second current data page; after the disk flushing is completed, generating disk flushing feedback information corresponding to the request source and feeding it back to the request source. When the request forwarding condition is met, the first cluster node directly requests the target cluster node to perform a disk flushing, which reduces the number of communications of the global cache service in the disk flushing process, improves the disk flushing efficiency, and thus improves the performance of the entire cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of database technology, and in particular to a data page disk flushing method, device, equipment and medium. Background Art

[0002] In a shared storage database cluster environment, the same data page may be distributed in the caches of different nodes, and there is no guarantee that the content of the data page in the caches of each node is exactly the same. The latest content of the data page is only saved in the node that has modified the data page the most recently (i.e., Fresh EP), and the caches of other nodes save a historical version of the data page. The shared storage database cluster environment uses the Global Buffer Server (GBS) and the Local Buffer Server (LBS) to complete access control of data pages. The GBS records the data page information of the entire cluster, and the GBS information can usually be maintained by the control node in the cluster. Each node in the cluster maintains its own LBS information, which records local data page information. The LBS can upload local information to the GBS, and can also obtain information from the GBS.

[0003] During cluster operation, a node in the cluster may issue a data page flush request (that is, for a certain data page, requiring its Fresh EP to write the latest content of the data page in its own cache to the disk). At this time, the LBS of the node needs to send a flush request to the GBS. The GBS finds the Fresh EP of the data page and sends a flush request to the Fresh EP, notifying the Fresh EP to perform a flush operation on the specified data page. After the Fresh EP completes the flush, it sends a flush reply to the GBS to inform the GBS that the flush is complete. The GBS then sends a flush reply to the node that issued the flush request to inform it that the flush is complete.

[0004] As can be seen from the above, in the prior art, the data page disk flushing operation is completed under the centralized control of the GBS. During the disk flushing process, there is frequent communication between the LBS and the GBS, which results in poor data page disk flushing efficiency. Summary of the invention

[0005] The present invention provides a data page disk flushing method, device, equipment and medium to improve the efficiency of data page disk flushing.

[0006] According to a first aspect of the present invention, a data page flushing method is provided, which is applied to a shared storage cluster, wherein the shared storage cluster includes at least two cluster nodes and a global cache service, and the method includes:

[0007] In response to satisfying a disk flushing request condition for a first current data page, obtaining, by a first cluster node, first data page information of the first current data page, wherein the first data page information includes target node information of a target cluster node that has most recently modified the first current data page;

[0008] When it is determined based on the first data page information that the request forwarding condition is met, a first disk flushing request is generated and sent to the target cluster node;

[0009] Determine, by the second cluster node, in response to a second disk flushing request for a second current data page, a request source of the second disk flushing request and second data page information of the second current data page, wherein the second request source is the global cache service or the first cluster node;

[0010] Performing a disk flushing operation on the second current data page based on the second data page information;

[0011] After the disk flushing is completed, disk flushing feedback information corresponding to the request source is generated and fed back to the request source.

[0012] According to a second aspect of the present invention, a data page flushing device is provided, which is applied to a shared storage cluster, wherein the shared storage cluster includes at least two cluster nodes and a global cache service, and the device includes:

[0013] An information acquisition module, configured to acquire, through a first cluster node, first data page information of the first current data page in response to satisfying a flush request condition for the first current data page, wherein the first data page information includes target node information of a target cluster node that has most recently modified the first current data page;

[0014] A first generating module, configured to generate a first disk flushing request and send it to the target cluster node when determining based on the first data page information that a request forwarding condition is met;

[0015] an information determination module, configured to determine, by a second cluster node, a request source of the second disk flushing request and second data page information of the second current data page in response to a second disk flushing request for the second current data page, wherein the second request source is the global cache service or the first cluster node;

[0016] A data page flushing module, configured to perform a flushing operation on the second current data page based on the second data page information;

[0017] The second generating module is used to generate disk flushing feedback information corresponding to the request source and feed it back to the request source after the disk flushing is completed.

[0018] According to a third aspect of the present invention, an electronic device is provided. The electronic device is used as a shared storage cluster according to any embodiment of the present invention. The electronic device includes:

[0019] at least one processor; and

[0020] a memory communicatively connected to the at least one processor; wherein,

[0021] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data page disk flushing method described in any embodiment of the present invention.

[0022] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data page disk flushing method described in any embodiment of the present invention when executed.

[0023] According to a fifth aspect of the present invention, an embodiment of the present invention further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the data page disk flushing method of any embodiment of the present invention is implemented.

[0024] The technical solution of the embodiment of the present invention is applied to a shared storage cluster, wherein the shared storage cluster includes at least two cluster nodes and a global cache service, and the method includes: obtaining the first data page information of the first current data page in response to a flushing request condition for the first current data page through the first cluster node, wherein the first data page information includes the target node information of the target cluster node that has most recently modified the first current data page; generating a first flushing request and sending it to the target cluster node when determining that the request forwarding condition is met based on the first data page information; determining the request source of the second flushing request and the second data page information of the second current data page in response to the second flushing request for the second current data page through the second cluster node, wherein the second request source is the global cache service or the first cluster node; performing a flushing operation on the second current data page based on the second data page information; after the flushing is completed, generating flushing feedback information corresponding to the request source and feeding it back to the request source. When the request forwarding condition is met, directly requesting the target cluster node to flush the disk through the first cluster node reduces the number of communications of the global cache service in the flushing process, improves the flushing efficiency, and thereby improves the performance of the entire cluster.

[0025] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 is a flow chart of a data page disk flushing method provided according to the first embodiment of the present invention;

[0028] Figure 2 This is an example flow chart of a first cluster node in a data page flushing method provided according to Embodiment 1 of the present invention;

[0029] Figure 3 This is an example flow chart of a second cluster node in a data page disk flushing method provided according to the first embodiment of the present invention;

[0030] Figure 4 is a structural schematic diagram of a data page disk flushing device provided according to Embodiment 2 of the present invention;

[0031] Figure 5 It is a schematic diagram of the structure of an electronic device implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Embodiment 1

[0035] Figure 1 A flowchart of a data page disk flushing method is provided for Embodiment 1 of the present invention. This embodiment is applicable to the case where a shared storage cluster performs data page disk flushing. The method is applied to a shared storage cluster, and the shared storage cluster includes at least two cluster nodes and a global cache service. The method can be executed by a data page disk flushing device, and the data page disk flushing device can be implemented in the form of hardware and / or software, and the data page disk flushing device can be configured in an electronic device.

[0036] like Figure 1 As shown, the method includes:

[0037] S110. In response to satisfying a disk flushing request condition for a first current data page, obtaining, by a first cluster node, first data page information of the first current data page, wherein the first data page information includes target node information of a target cluster node that has most recently modified the first current data page.

[0038] In this embodiment, the first cluster node can be understood as a cluster node that satisfies the disk flushing request condition. The first current data page can be understood as the data page corresponding to the disk flushing request issued by the first cluster node. The disk flushing request condition can be understood as a request to trigger a disk flushing of a data page. For example, if the first cluster node operates on the data page, the disk flushing request condition is satisfied. The first data page information can be understood as information used to characterize the state of the first current data page, for example, it may include a data page identifier, the latest modification node of the data page, whether the latest modification node has flushed the first current data page, and data page blocking information. The target cluster node can be understood as the cluster node that has made the latest modification to the first current data page. The target node information can be understood as identification information used to represent the target cluster node.

[0039] Specifically, in response to satisfying the disk flushing request condition for the first current data page, the first cluster node can obtain the first data page information of the first current data page from its own local cache service LBS, wherein the first data page information includes the target node information of the target cluster node that most recently modified the first current data page.

[0040] S120. When it is determined based on the first data page information that the request forwarding condition is met, generate a first disk flushing request and send it to the target cluster node.

[0041] It can be known that GBS records all data page information included in the shared storage cluster. The information recorded for each data page includes: data page identification, the latest modification node of the latest modified data page, whether the latest modification node has flushed the data page, and data page blocking information, etc. The data page blocking information includes whether the current data page is locked and the lock information. There may be multiple lock information, and the content of each lock information includes: lock ID, lock type and locked node number. LBS only records the data page information of the data page involved in the current node. The information recorded for each data page includes: data page identification, the latest modification node of the data page (i.e. Fresh EP), whether the latest modification node has flushed the current data page, and the data page blocking information of the current node, etc. The data page blocking information of the current node includes whether the current node has locked the data page, lock ID and lock type.

[0042] The request forwarding condition is as follows: the first current data page is locked, has not been flushed, and the first cluster node is not a target cluster node.

[0043] In this embodiment, the request forwarding condition can be understood as a condition for determining not to perform a data page disk flushing in the first cluster node. The first disk flushing request can be understood as a disk flushing request forwarded to the target cluster node by the first cluster node, that is, a disk flushing request between cluster nodes. Data page lock: used to control concurrent access to data pages. The lock types are divided into S lock (Share lock) and X lock (Exclusive lock). Before reading a data page, an S lock must be set on the data page, and before writing a data page, an X lock must be set on the data page.

[0044] Specifically, the first cluster node can determine whether the first cluster node has locked the first current data page based on the data page lock information included in the first data page information. If it has been locked, whether the first current data page has been flushed to disk can be determined through the whether to flush disk identifier in the first data page information. If it has not been flushed to disk, whether the first cluster node is the target cluster node can be determined through the target node information in the first data page information. If so, the request forwarding condition is met, that is, the first current data page has been locked, has not been flushed to disk, and the first cluster node is not the target cluster node. Then, the first cluster node can generate a first flush disk request and send it to the target cluster node, wherein the first flush disk request includes the node number of the first cluster node and the data page identifier of the first current data page.

[0045] S130. Determine, by the second cluster node, in response to a second disk flushing request for a second current data page, a request source of the second disk flushing request and second data page information of the second current data page, wherein the second request source is a global cache service or the first cluster node.

[0046] In this embodiment, the second cluster node can be understood as a node that performs a disk flushing operation. The second disk flushing request can be understood as a request that triggers a disk flushing operation. The request source can be understood as the source end that sends the second disk flushing request, which can be the first disk flushing request forwarded by the first cluster node in the above steps, or it can be a disk flushing request generated by a conventional global cache service. The global cache service can be understood as a mechanism for maintaining and coordinating data consistency and cache synchronization between multiple cluster nodes. The second current data page can be understood as the data page requested for disk flushing in the second disk flushing request, that is, determined by the data page identifier. The second data page information can be understood as information used to characterize the state of the second current data page.

[0047] Specifically, in response to receiving the second flush request for the second current data page, the second cluster node can determine the request source through the second flush request, that is, the source node can be determined through the node number included therein, if there is no node number, it is from the global cache service GBS, and the flush source is registered, if it is from GBS, it is registered as GBS, if it is from other cluster nodes, the node number is registered. The second cluster node can determine the second current data page information from the data page information recorded in its own LBS.

[0048] S140: Perform a disk flushing operation on the second current data page based on the second data page information.

[0049] Specifically, since GBS determines whether the disk flushing is completed by receiving feedback after the disk flushing, there may be an inaccurate judgment problem. The second cluster node can determine whether the second current data page has been flushed based on the disk flushing identifier in the second data page information. If it has not been flushed, the second cluster node can perform a disk flushing operation on the second current data page. If it has not been flushed (since the disk flushing has not been completed, it is recorded as not being flushed) and the second cluster node is performing a disk flushing, the current disk flushing operation can continue.

[0050] S150: After the disk flushing is completed, disk flushing feedback information corresponding to the request source is generated and fed back to the request source.

[0051] In this embodiment, the disk flushing feedback information can be understood as information used to feed back the disk flushing result to the request source, so as to trigger different subsequent operations of different request sources.

[0052] Specifically, after the disk flushing is completed, the second cluster node can generate corresponding disk flushing feedback information based on the request source, and the disk flushing feedback information includes the node number of the second cluster node and the data page identifier of the second current data page. The second cluster node can feed back the disk flushing feedback information to the request source so that the request source confirms that the disk flushing is completed.

[0053] The technical solution of the embodiment of the present invention is applied to a shared storage cluster, wherein the shared storage cluster includes at least two cluster nodes and a global cache service, and the method includes: obtaining the first data page information of the first current data page in response to a flushing request condition for the first current data page through the first cluster node, wherein the first data page information includes the target node information of the target cluster node that has most recently modified the first current data page; generating a first flushing request and sending it to the target cluster node when determining that the request forwarding condition is met based on the first data page information; determining the request source of the second flushing request and the second data page information of the second current data page in response to the second flushing request for the second current data page through the second cluster node, wherein the second request source is the global cache service or the first cluster node; performing a flushing operation on the second current data page based on the second data page information; after the flushing is completed, generating flushing feedback information corresponding to the request source and feeding it back to the request source. When the request forwarding condition is met, directly requesting the target cluster node to flush the disk through the first cluster node reduces the number of communications of the global cache service in the flushing process, improves the flushing efficiency, and thereby improves the performance of the entire cluster.

[0054] Further, based on the above embodiment, the step of performing a disk flushing operation on the second current data page based on the second data page information may be refined as follows:

[0055] If the disk flushing identification information in the second data page information indicates that the disk has not been flushed, a disk flushing operation is performed on the second current data page; otherwise, disk flushing feedback information corresponding to the request source is generated and fed back to the request source.

[0056] In this embodiment, the disk flushing identification information can be understood as an identification used to indicate whether the second current data page has been flushed.

[0057] Specifically, if the disk flushing identification information in the second data page information indicates that the disk has not been flushed, it is determined whether a disk flushing operation is currently being performed on the second current data page. If so, the disk flushing operation continues to be performed; if not, the disk flushing operation begins to be performed. If the disk flushing identification information in the second data page information indicates that the disk has been flushed, disk flushing feedback information corresponding to the request source is generated and fed back to the request source.

[0058] Further, based on the above embodiment, the disk flushing feedback information includes a disk flushing reply and a disk flushing notification. The steps of generating disk flushing feedback information corresponding to the request source and feeding it back to the request source can be refined as follows:

[0059] The second data page information is updated; when the request source is the global cache service, a disk flush response is generated and fed back to the global cache service; when the request source is the first cluster node, a disk flush response is generated and fed back to the first cluster node, and a disk flush notification is generated and sent to the global cache service, so that the global cache service updates the data page information of the second current data page.

[0060] In this embodiment, the disk flushing reply can be understood as a message used to reply to the request source that the disk flushing has been completed. The disk flushing notification can be understood as a notification message used to instruct the global cache service to update the second data page information.

[0061] Specifically, the second cluster node can update the second data page information in the LBS of the second cluster node after the disk flushing is completed. For example, the second cluster node can find the corresponding second data page information in the LBS, clear the cluster node information of the second current data page that has been most recently modified (the information can be set to empty), and set the cluster node (i.e., Fresh EP) that has been most recently modified to "yes" for whether the current data page is flushed. When the request source is the global cache service, the second cluster node can generate a disk flushing reply and feed it back to the global cache service. When the request source is the first cluster node, a disk flushing reply is generated and fed back to the first cluster node, and a disk flushing notification is generated and sent to the global cache service to inform the GBS through the disk flushing notification which data pages the second cluster node has performed the disk flushing operation on. The disk flushing notification includes the node number of the second cluster node and the data page identifier of the second current data page, so that the global cache service updates the data page information of its own second current data page.

[0062] As a first optional embodiment of the first embodiment, the first data page information includes data page blocking information, and the method further includes:

[0063] In response to the data page locking information indicating that the data page is not locked, a third disk flushing request is sent to the global cache service.

[0064] In this embodiment, the third disk flushing request can be understood as a disk flushing request sent to the global cache service to trigger subsequent locking and disk flushing operations through the global cache service.

[0065] Specifically, the first cluster node responds to the data page blocking information that the data page is unlocked and the request forwarding condition is not met. The first cluster node may send a third flush request for the first current data page to the global cache service in a conventional manner.

[0066] The first optional embodiment of the first embodiment improves the step of performing a disk flushing operation through the global cache service when the request forwarding condition is not met because the data page is not locked.

[0067] As a second optional embodiment of the first embodiment, the first data page information includes data page blocking information and disk flushing identification information, and the method further includes:

[0068] In response to the data page locking information indicating that the data page is locked and the disk flushing identification information indicating that the disk has been flushed, no disk flushing request is generated.

[0069] Specifically, the first cluster node may respond to the data page blocking information indicating that the data page is locked and the disk flushing identification information indicating that the disk has been flushed, and does not need to flush the first current data page, and does not generate a disk flushing request.

[0070] The second optional embodiment of the first embodiment improves the operation of not generating a disk flushing request when the disk flushing is completed because the data page is locked and the disk flushing identification information indicates that the disk has been flushed and the request forwarding condition is not met.

[0071] As a third optional embodiment of the first embodiment, the first data page information includes data page blocking information and disk flushing identification information, and the method further includes:

[0072] In response to the data page locking information indicating that the data page is locked, the disk flushing identification information indicating that the disk has not been flushed, and the first cluster node being the target cluster node, a disk flushing operation is performed on the first current data page; after the disk flushing is completed, the first data page information is updated, and a disk flushing notification is generated and sent to the global cache service.

[0073] Specifically, the first cluster node can also respond to the data page locking information that the data page is locked, the disk flushing identification information that the disk has not been flushed, and the first cluster node is the target cluster node, that is, the first cluster node can perform a disk flushing operation on itself without generating a disk flushing request. Then the first cluster node can perform a disk flushing operation on the first current data page, and update the first data page information after the disk flushing is completed. For example, the first cluster node can find the corresponding first data page information in its own LBS, clear the information of the cluster node (i.e., Fresh EP) of the latest modified data page in the first data page information (this information can be set to empty), set the cluster node to "yes" for whether to flush the current data page, and generate a disk flushing notification to send to the global cache service to inform GBS which data pages the first cluster node has performed a disk flushing operation on. The disk flushing notification includes the first cluster node number and the data page identification of the first current data page.

[0074] The third optional embodiment of the first embodiment improves the operation of executing the disk flushing request through the first cluster node when the request forwarding condition is not met because the data page blocking information indicates that the data page is locked, the disk flushing identification information indicates that the disk has not been flushed, and the first cluster node is the target cluster node.

[0075] Furthermore, when GBS receives a disk flush notification, it can update the data page information based on the data page identifier and node number in the disk flush notification. The specific update steps may be: GBS finds the corresponding data page information according to the data page identifier, clears the node information of the cluster node (i.e., Fresh EP) of the latest modified data page in the data page information (the information can be set to empty), and sets the cluster node to "yes" for whether to flush the current data page.

[0076] For example, in order to understand the overall steps of flushing a data page according to the present invention, a specific example may be used for illustration. Figure 2 This is an example flow chart of a first cluster node in a data page flushing method provided in Embodiment 1 of the present invention, such as Figure 2 As shown, the steps of the first cluster node may include:

[0077] S201. Acquire, by a first cluster node, first data page information of a first current data page in a local cache service LBS in response to satisfying a disk flushing request condition for a first current data page;

[0078] S202, judging whether the first cluster node has locked the first current data page based on the first data page information, if so, jumping to step S203; if not, jumping to step S204;

[0079] S203, judging whether the first current data page has been flushed based on the first data page information; if so, ending; if not, jumping to step S205;

[0080] S204, sending a third disk flushing request to the global cache service through the first cluster node;

[0081] S205, judging whether the first cluster node is the target cluster node based on the first data page information; if so, jumping to step S207; if not, jumping to step S206;

[0082] S206: If the request forwarding condition is met, a first disk flushing request is generated by the first cluster node and sent to the target cluster node;

[0083] S207, performing a disk flushing operation on the first current data page through the first cluster node, and updating the first data page information after the disk flushing is completed;

[0084] S208: Generate a disk flush notification and send it to the global cache service.

[0085] For example, in order to understand the overall steps of flushing a data page according to the present invention, a specific example may be used for illustration. Figure 3 This is an example flow chart of a second cluster node in a data page flushing method provided in Embodiment 1 of the present invention, such as Figure 3As shown, the steps of the second cluster node may include:

[0086] S301, in response to a second disk flushing request for a second current data page, registering a request source of the second disk flushing request and acquiring second data page information of the second current data page through a second cluster node;

[0087] S302, based on the second data page information, determine whether the second current data page has been flushed; if so, jump to step S306; if not, jump to step S303;

[0088] S303, judging whether a disk flushing operation is being performed based on the second data page information; if so, jumping to step S304; if not, jumping to step S305;

[0089] S304, continue to perform the disk flushing operation on the second current data page;

[0090] S305, starting to execute the disk flushing operation on the second current data page;

[0091] S306: After the disk flushing is completed, determine whether the request source is a global cache service; if so, jump to step S307; if not, jump to step S308;

[0092] S307, sending a disk flushing reply to the global cache service;

[0093] S308: Send a disk flush response to the request source and send a disk flush notification to the global cache service.

[0094] Embodiment 2

[0095] Figure 4 The structure diagram of a data page flushing device provided in the second embodiment of the present invention is shown in FIG. The device is applied to a shared storage cluster, wherein the shared storage cluster includes at least two cluster nodes and a global cache service, such as Figure 4 As shown, the device comprises:

[0096] An information acquisition module 41 is configured to acquire, through a first cluster node, first data page information of the first current data page in response to satisfying a flush request condition for the first current data page, wherein the first data page information includes target node information of a target cluster node that has most recently modified the first current data page;

[0097] A first generating module 42 is configured to generate a first disk flushing request and send it to the target cluster node when determining that a request forwarding condition is met based on the first data page information;

[0098] An information determination module 43 is used to determine, by a second cluster node, a request source of the second disk flushing request and second data page information of the second current data page in response to a second disk flushing request for the second current data page, wherein the second request source is the global cache service or the first cluster node;

[0099] A data page flushing module 44, configured to perform a flushing operation on the second current data page based on the second data page information;

[0100] The second generating module 45 is used to generate disk flushing feedback information corresponding to the request source and feed it back to the request source after the disk flushing is completed.

[0101] The technical solution of the embodiment of the present invention is applied to a shared storage cluster, wherein the shared storage cluster includes at least two cluster nodes and a global cache service, and the method includes: obtaining the first data page information of the first current data page in response to a flushing request condition for the first current data page through the first cluster node, wherein the first data page information includes the target node information of the target cluster node that has most recently modified the first current data page; generating a first flushing request and sending it to the target cluster node when determining that the request forwarding condition is met based on the first data page information; determining the request source of the second flushing request and the second data page information of the second current data page in response to the second flushing request for the second current data page through the second cluster node, wherein the second request source is the global cache service or the first cluster node; performing a flushing operation on the second current data page based on the second data page information; after the flushing is completed, generating flushing feedback information corresponding to the request source and feeding it back to the request source. When the request forwarding condition is met, directly requesting the target cluster node to flush the disk through the first cluster node reduces the number of communications of the global cache service in the flushing process, improves the flushing efficiency, and thereby improves the performance of the entire cluster.

[0102] The request forwarding condition is as follows: the first current data page is locked, has not been flushed, and the first cluster node is not the target cluster node.

[0103] Optionally, the device further includes: a request sending module.

[0104] The request sending module is used to send a third disk flushing request to the global cache service in response to the data page blocking information indicating that the data page is not locked.

[0105] Optionally, the device further includes: a request determination module.

[0106] The request determination module is configured to, in response to the data page locking information indicating that the data page is locked and the disk flushing identification information indicating that the disk has been flushed, not generate a disk flushing request.

[0107] Optionally, the device further includes: a disk brushing operation module.

[0108] The disk flushing operation module is used to perform a disk flushing operation on the first current data page in response to the data page locking information indicating that the data page is locked, the disk flushing identification information indicating that the disk has not been flushed, and the first cluster node being the target cluster node; after the disk flushing is completed, the first data page information is updated, and a disk flushing notification is generated and sent to the global cache service.

[0109] Furthermore, the data page flushing module 44 is specifically used for:

[0110] If the disk flushing identification information in the second data page information indicates that the disk has not been flushed, a disk flushing operation is performed on the second current data page;

[0111] Otherwise, disk flushing feedback information corresponding to the request source is generated and fed back to the request source.

[0112] Furthermore, the disk flushing feedback information includes a disk flushing reply and a disk flushing notification. Accordingly, the second generating module 45 is specifically used for:

[0113] Updating the second data page information;

[0114] When the request source is the global cache service, generating the disk flushing reply and feeding it back to the global cache service;

[0115] When the request source is the first cluster node, the disk flush response is generated and fed back to the first cluster node, and the disk flush notification is generated and sent to the global cache service, so that the global cache service updates the data page information of the second current data page.

[0116] A data page flushing device provided in an embodiment of the present invention can execute the data page flushing method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0117] Embodiment 3

[0118] Figure 5A schematic diagram of an electronic device 50 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0119] like Figure 5 As shown, the electronic device 50 includes at least one processor 51, and a memory connected to the at least one processor 51 in communication, such as a read-only memory (ROM) 52, a random access memory (RAM) 53, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 51 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 52 or the computer program loaded from the storage unit 58 to the random access memory (RAM) 53. In the RAM 53, various programs and data required for the operation of the electronic device 50 can also be stored. The processor 51, the ROM 52, and the RAM 53 are connected to each other via a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.

[0120] A number of components in the electronic device 50 are connected to the I / O interface 55, including: an input unit 56, such as a keyboard, a mouse, etc.; an output unit 57, such as various types of displays, speakers, etc.; a storage unit 58, such as a disk, an optical disk, etc.; and a communication unit 59, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 59 allows the electronic device 50 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0121] The processor 51 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 51 executes the various methods and processes described above, such as the data page disk flushing method.

[0122] In some embodiments, the data page flushing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 58. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 50 via the ROM 52 and / or the communication unit 59. When the computer program is loaded into the RAM 53 and executed by the processor 51, one or more steps of the data page flushing method described above may be performed. Alternatively, in other embodiments, the processor 51 may be configured to perform the data page flushing method in any other suitable manner (e.g., by means of firmware).

[0123] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0124] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0125] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0126] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0127] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0128] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0129] In one embodiment, the embodiment of the present invention further includes a computer program product, the computer program product includes a computer program, and the computer program implements the data page disk flushing method of any embodiment of the present invention when executed by a processor.

[0130] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0131] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0132] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data page disk flushing method, characterized in that: Applied to a shared storage cluster, the shared storage cluster includes at least two cluster nodes and a global cache service, the method includes: In response to satisfying a flush request condition for a first current data page, obtaining, by a first cluster node, first data page information of the first current data page, wherein the first data page information includes target node information of a target cluster node that has most recently modified the first current data page; When it is determined based on the first data page information that the request forwarding condition is met, a first disk flushing request is generated and sent to the target cluster node; Determine, by the second cluster node, in response to a second disk flushing request for a second current data page, a request source of the second disk flushing request and second data page information of the second current data page, wherein the second request source is the global cache service or the first cluster node; Performing a disk flushing operation on the second current data page based on the second data page information; After the disk flushing is completed, disk flushing feedback information corresponding to the request source is generated and fed back to the request source.

2. The method according to claim 1, characterized in that: The request forwarding condition is: the first current data page is locked, has not been flushed to disk, and the first cluster node is not the target cluster node.

3. The method according to claim 1, characterized in that The first data page information includes data page blocking information, and the method further includes: In response to the data page locking information indicating that the data page is not locked, a third disk flushing request is sent to the global cache service.

4. The method according to claim 1, characterized in that: The first data page information includes data page blocking information and disk flushing identification information, and the method further includes: In response to the data page locking information indicating that the data page is locked and the disk flushing identification information indicating that the disk has been flushed, no disk flushing request is generated.

5. The method according to claim 1, characterized in that The first data page information includes data page blocking information and disk flushing identification information, and the method further includes: In response to the data page locking information indicating that the data page is locked, the disk flushing identification information indicating that the disk has not been flushed, and the first cluster node being the target cluster node, performing a disk flushing operation on the first current data page; After the disk flushing is completed, the first data page information is updated, and a disk flushing notification is generated and sent to the global cache service.

6. The method according to claim 1, characterized in that The performing a disk flushing operation on the second current data page based on the second data page information includes: If the disk flushing identification information in the second data page information indicates that the disk has not been flushed, a disk flushing operation is performed on the second current data page; Otherwise, disk flushing feedback information corresponding to the request source is generated and fed back to the request source.

7. The method according to claim 1, characterized in that The disk flushing feedback information includes a disk flushing reply and a disk flushing notification. Accordingly, the generating of the disk flushing feedback information corresponding to the request source and feeding it back to the request source includes: Updating the second data page information; When the request source is the global cache service, generating the disk flushing reply and feeding it back to the global cache service; When the request source is the first cluster node, the disk flush response is generated and fed back to the first cluster node, and the disk flush notification is generated and sent to the global cache service, so that the global cache service updates the data page information of the second current data page.

8. A data page flushing device, characterized in that: Applied to a shared storage cluster, the shared storage cluster includes at least two cluster nodes and a global cache service, the device includes: An information acquisition module, configured to acquire, through a first cluster node, first data page information of the first current data page in response to satisfying a flush request condition for the first current data page, wherein the first data page information includes target node information of a target cluster node that has most recently modified the first current data page; A first generating module, configured to generate a first disk flushing request and send it to the target cluster node when determining based on the first data page information that a request forwarding condition is met; an information determination module, configured to determine, by a second cluster node, a request source of the second disk flushing request and second data page information of the second current data page in response to a second disk flushing request for the second current data page, wherein the second request source is the global cache service or the first cluster node; A data page flushing module, configured to perform a flushing operation on the second current data page based on the second data page information; The second generating module is used to generate disk flushing feedback information corresponding to the request source and feed it back to the request source after the disk flushing is completed.

9. An electronic device, characterized in that: The electronic device, as a shared storage cluster according to any one of claims 1 to 7, comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data page flushing method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data page disk flushing method described in any one of claims 1-7 when executed.

Citation Information

Cited By

  • Disk refreshing method and system for database cache page

    CN121542299A