CN112162698A - Cache partition reconstruction method, device, equipment and readable storage medium - Google Patents

Cache partition reconstruction method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN112162698A
CN112162698A CN202010980334.5A CN202010980334A CN112162698A CN 112162698 A CN112162698 A CN 112162698A CN 202010980334 A CN202010980334 A CN 202010980334A CN 112162698 A CN112162698 A CN 112162698A
Authority
CN
China
Prior art keywords
node
cluster
cache partition
value
flag bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010980334.5A
Other languages
Chinese (zh)
Other versions
CN112162698B (en
Inventor
侯红生
刘文志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN202010980334.5A priority Critical patent/CN112162698B/en
Publication of CN112162698A publication Critical patent/CN112162698A/en
Application granted granted Critical
Publication of CN112162698B publication Critical patent/CN112162698B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

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)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The application discloses a method, a device, equipment and a computer readable storage medium for reconstructing a cache partition, wherein the method comprises the following steps: when a second node joins the cluster, judging whether the second node exits the cluster and joins the cluster under the condition that the first node exits the cluster; if the second node is determined to exit the cluster and join the cluster under the condition that the first node exits the cluster, judging whether a flag bit preset in the second node is an invalid value or not; and if the flag bit is determined to be an invalid value, creating a cache partition corresponding to the second node according to the running information of the cluster, and creating a cache partition corresponding to the first node on the second node. According to the technical scheme, when the second node accords with the condition of backing up and advancing, the creation of the cache partition corresponding to the second node and the creation of the cache partition corresponding to the first node can be carried out even if the first node is not in the cluster, so that the acceleration function of the SSD can be normally used.

Description

Cache partition reconstruction method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of multi-control storage device technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for reconstructing a cache partition.
Background
In the multi-control storage device, if a node a in an aggregate (two nodes form an aggregate) exits from a cluster, a node B at an opposite end of the cluster creates a cache partition on the node a exiting from the cluster to ensure that the cache partition is not lost, and when the node a rejoins the cluster, the node B deletes the cache partition of the node a and synchronizes the cache partition belonging to the node a into the node a, so that each node can store its own cache partition, thereby facilitating the acceleration function of an SSD (Solid State Disk).
At present, in an iogroup, when two nodes exit from a cluster successively, if one node joins the cluster again, because the other node is not in the cluster (and its corresponding cache partition is lost at the same time), the node joining the cluster cannot judge whether the node not in the cluster deletes the cache partition of the node joining the cluster, and the node not in the cluster cannot synchronize the cache partition of the node joining the cluster, that is, after one node joins the cluster, because the other node is not in the cluster, the node not in the cluster cannot synchronize the cache partition to the node joining the cluster, so that even if one node joins the cluster, the cache partitions on the two nodes cannot be normally created back.
In summary, how to recreate the cache partitions on the two nodes is a technical problem to be urgently solved by those skilled in the art.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method, an apparatus, a device and a computer-readable storage medium for reconstructing a cache partition, which are used to recreate the cache partitions on two nodes.
In order to achieve the above purpose, the present application provides the following technical solutions:
a cache partition rebuilding method comprises the following steps:
when a second node joins the cluster, judging whether the second node exits the cluster and joins the cluster under the condition that a first node exits the cluster;
if the second node is determined to exit the cluster and join the cluster under the condition that the first node exits the cluster, judging whether a flag bit preset in the second node is an invalid value or not;
and if the flag bit is determined to be an invalid value, creating a cache partition corresponding to the second node according to the running information of the cluster, and creating a cache partition corresponding to the first node on the second node.
Preferably, after the creating the cache partition corresponding to the first node on the second node, the method further includes:
if the first node is added into the cluster, deleting the cache partition corresponding to the first node on the second node, setting the flag bit to be an effective value, synchronizing the value of the flag bit to the first node, and creating the cache partition corresponding to the first node on the first node.
Preferably, before determining whether the second node exits the cluster and joins the cluster when the first node exits the cluster, the method further includes:
and if the flag bit is determined to be an invalid value and the first node is determined to be in the cluster, refusing to create a cache partition corresponding to the second node according to the running information of the cluster.
Preferably, if it is determined that the flag bit is an invalid value and it is determined that the first node is in the cluster, the method further includes:
and sending out a prompt that the flag bit is an invalid value and the first node is in the cluster.
Preferably, the method further comprises the following steps:
setting the value of the node to which the first node corresponds, and setting the value of the node to which the second node corresponds; if the node exists, the value of the corresponding node is set as an effective value, and if the node does not exist, the value of the corresponding node is set as an invalid value.
Preferably, the setting the value of the corresponding node to a valid value includes:
and setting the value of the node to be the ID of the corresponding node.
A cache partition reconstruction apparatus, comprising:
the first judging module is used for judging whether a second node exits the cluster and joins the cluster under the condition that a first node exits the cluster when the second node joins the cluster;
a second determining module, configured to determine whether a flag bit preset in the second node is an invalid value if it is determined that the second node exits from the cluster and joins the cluster under the condition that the first node exits from the cluster;
and the creating module is used for creating a cache partition corresponding to the second node according to the running information of the cluster and creating a cache partition corresponding to the first node on the second node if the flag bit is determined to be an invalid value.
Preferably, the method further comprises the following steps:
and the deleting module is used for deleting the cache partition corresponding to the first node on the second node if the first node is added into the cluster after the cache partition corresponding to the first node is created on the second node, setting the flag bit in the second node to be an effective value, synchronizing the flag bit to the first node, and creating the cache partition corresponding to the first node on the first node.
A cache partition reconstruction device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the cache partition reconstruction method according to any one of the preceding claims when executing said computer program.
A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the cache partition reconstruction method according to any one of the preceding claims.
The application provides a method, a device, equipment and a computer readable storage medium for reconstructing a cache partition, wherein the method comprises the following steps: when a second node joins the cluster, judging whether the second node exits the cluster and joins the cluster under the condition that the first node exits the cluster; if the second node is determined to exit the cluster and join the cluster under the condition that the first node exits the cluster, judging whether a flag bit preset in the second node is an invalid value or not; and if the flag bit is determined to be an invalid value, creating a cache partition corresponding to the second node according to the running information of the cluster, and creating a cache partition corresponding to the first node on the second node.
According to the technical scheme disclosed by the application, when the second node is added into the cluster, if the second node is determined to be added into the cluster after the first node exits the cluster, namely the first node exits the cluster first, the second node exits the cluster again after exiting the cluster, and the first node joins the cluster under exiting the cluster, whether a flag bit preset in the second node is an invalid value or not can be judged, if the flag bit is determined to be the invalid value, a cache partition corresponding to the second node can be created according to the running information of the cluster, the cache partition corresponding to the first node is created on the second node, so that the creation of the cache partition corresponding to the second node and the creation of the cache partition corresponding to the first node can be carried out even if the first node is not in the cluster, namely the respective corresponding cache partitions of the second node and the first node are all reconstructed, thereby facilitating normal use of the acceleration function of the SSD.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for reconstructing a cache partition according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a cache partition reconstruction apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a cache partition reconstruction device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, which shows a flowchart of a cache partition rebuilding method provided in an embodiment of the present application, a cache partition rebuilding method provided in an embodiment of the present application may include:
s11: when a second node joins the cluster, judging whether the second node exits the cluster and joins the cluster under the condition that the first node exits the cluster; if yes, go to step S12;
in the iogroup, if the situation that both the first node and the second node exit the cluster occurs, when the second node joins the cluster, it is first determined whether the second node exits the cluster and joins the cluster under the situation that the first node exits the cluster, i.e. it is determined whether the first node exits the cluster first, the second node exits the cluster later and the second node joins the cluster under the situation that the first node exits the cluster (i.e. it is determined whether the second node meets the condition of backward advancement), if it is determined that the second node does not exit the cluster and joins the cluster under the situation that the first node exits the cluster, the cluster cannot normally operate, the buffer partition is not re-operated, if it is determined that the second node exits the cluster and joins the cluster under the situation that the first node exits the cluster, the cluster can normally operate, therefore, step S12 may be performed.
S12: judging whether a flag bit preset in a second node is an invalid value or not; if yes, go to step S13;
when the second node is determined to exit the cluster and join the cluster under the condition that the first node exits the cluster, namely when the second node is determined to accord with the condition of backward advancement, because the first node does not exist in the cluster at the moment, whether a flag bit preset in the second node is an invalid value or not can be judged, wherein the default value of the flag bit is the invalid value, and when the first node is not in the cluster, the fact that the flag bit is the invalid value means that the creation of the cache partition by the second node does not need to depend on the step that the first node deletes the cache partition.
S13: and creating a cache partition corresponding to the second node according to the running information of the cluster, and creating a cache partition corresponding to the first node on the second node.
When it is determined that the flag bit preset in the second node is an invalid value and the first node is not added to the cluster (i.e., the first node is not in the cluster), at this time, a cache partition corresponding to the second node may be created in combination with the operation information of the cluster and information (e.g., the size of the cache partition, attribute information of the cache partition, etc.) obtained when a cache partition corresponding to the second node is created in an earlier stage (specifically, when the second node is in the cluster), and a cache partition corresponding to the first node may be created on the second node in combination with the operation information of the cluster and information (e.g., the size of the cache partition, attribute information of the cache partition, etc.) obtained when a cache partition corresponding to the first node is created in an earlier stage (specifically, when the first node is in the cluster), that is, the cache partition of the second node is reconstructed by using the second node, and the cache partition of the first node is reconstructed, therefore, the creation of the cache partition corresponding to the second node and the creation of the cache partition corresponding to the first node can be free from the influence of the first node not in the cluster.
According to the technical scheme disclosed by the application, when the second node is added into the cluster, if the second node is determined to be added into the cluster after the first node exits the cluster, namely the first node exits the cluster first, the second node exits the cluster again after exiting the cluster, and the first node joins the cluster under exiting the cluster, whether a flag bit preset in the second node is an invalid value or not can be judged, if the flag bit is determined to be the invalid value, a cache partition corresponding to the second node can be created according to the running information of the cluster, the cache partition corresponding to the first node is created on the second node, so that the creation of the cache partition corresponding to the second node and the creation of the cache partition corresponding to the first node can be carried out even if the first node is not in the cluster, namely the respective corresponding cache partitions of the second node and the first node are all reconstructed, thereby facilitating normal use of the acceleration function of the SSD.
After the cache partition corresponding to the first node is created on the second node, the method for reconstructing a cache partition provided in the embodiment of the present application may further include:
and if the first node is added into the cluster, deleting the cache partition corresponding to the first node on the second node, setting the value of the flag bit to be an effective value, synchronizing the flag bit to the first node, and creating the cache partition corresponding to the first node on the first node.
After the cache partition corresponding to the first node is created on the second node, if the first node joins the cluster, the cache partition corresponding to the first node on the second node may be deleted, the flag bit may be set to an effective value, and the value of the flag bit may be synchronized to the first node. When the first node receives the flag bit with the value of the effective value, it indicates that the cache partition corresponding to the first node is deleted on the second node, at this time, the first node may create the cache partition corresponding to itself on the first node, so that the first node may have its own cache partition, and the second node does not have the cache partition corresponding to the first node, so as to avoid causing the repetition of the corresponding cache partition on the first node.
It should be noted that, after creating a cache partition corresponding to a first node on the first node, if one of the first node and a second node exits from the cluster, a cache partition corresponding to the node that exits from the cluster may be created on a node that also exits from the cluster, when the node that exits from the cluster rejoins the cluster, the cache partition corresponding to the node that rejoins the cluster on the node that is always in the cluster is deleted, the flag bit is set to a valid value, and the value of the flag bit is synchronized to the node that rejoins the cluster, and when the node that rejoins the cluster receives the flag bit with the valid value, the cache partition corresponding to itself is created on itself, specifically, taking as an example that a second node exits from the cluster after creating the cache partition corresponding to the first node on the first node, at this time, the cache partition corresponding to the second node may be created on the first node, and deleting the cache partition corresponding to the second node on the first node when the second node rejoins the cluster, setting the flag bit to be an effective value, synchronizing the value of the flag bit to the second node, and creating the cache partition corresponding to the second node on the second node after the second node receives the flag bit with the effective value. In addition, after the cache partition corresponding to the first node is created on the first node, if the first node and the second node exit the cluster in sequence and a node subsequently joins the cluster, steps similar to steps S11 to S13 may be performed, so that when the entered node meets the condition of back-up and advance, the cache partitions corresponding to the two nodes may be created back again.
The method for reconstructing a cache partition provided in an embodiment of the present application, before determining whether the second node exits from the cluster and joins the cluster under the condition that the first node exits from the cluster, may further include:
and if the flag bit is determined to be an invalid value and the first node is determined to be in the cluster, refusing to create a cache partition corresponding to the second node according to the running information of the cluster.
In this application, after the second node joins the cluster and before the second node exits the cluster and joins the cluster under the condition that the first node exits the cluster, if it is determined that the flag bit is an invalid value and the first node is in the cluster, it indicates that the first node is in the cluster but does not delete the cache partition corresponding to the second node, at this time, the creation of the cache partition corresponding to the second node according to the operation information of the cluster may be rejected, so as to avoid the occurrence of a situation that the cache partition of the second node is repeatedly created.
In the method for reconstructing a cache partition provided in an embodiment of the present application, if it is determined that the flag bit is an invalid value and it is determined that the first node is in the cluster, the method may further include:
and sending out a prompt that the flag bit is invalid and the first node is in the cluster.
When the flag bit is determined to be an invalid value and the first node is in the cluster, the step of creating the cache partition corresponding to the second node according to the running information of the cluster is refused to be executed, and besides, a prompt that the flag bit is the invalid value and the first node is in the cluster can be sent out, so that a worker can check whether the flag bit is wrong or the first node is wrong, the flag bit and the first node can be in a normal state conveniently, the cache partition corresponding to the second node is prevented from being always located on the first node, and the cache partition corresponding to the second node is created on the second node conveniently.
The method for reconstructing the cache partition provided by the embodiment of the present application may further include:
setting the value of the node corresponding to the first node, and setting the value of the node corresponding to the second node; if the node exists, the value of the corresponding node is set as an effective value, and if the node does not exist, the value of the corresponding node is set as an invalid value.
In this application, a value of a node to which a first node corresponds (which may exist in a cluster) may be set in advance, specifically, if the first node is located in the cluster, a value of a node to which the first node corresponds may be set to an effective value, if the first node is not located in the cluster, a value of a node to which the first node corresponds may be set to an invalid value, and a value of a node to which a second node corresponds (which may also exist in the cluster) may be set in advance in a manner similar to the above-mentioned setting of the value of the node to which the first node corresponds, that is, if the second node is located in the cluster, a value of a node to which the second node corresponds may be set to an effective value, and if the second node is not located in the cluster, a value of a node to which the second node corresponds may be set to an invalid value, so that the value of the node to which the first node corresponds and the value of the node to which the second node corresponds to the first node corresponds may be determined by the value of, Whether the second node is present in the cluster.
The method for reconstructing the cache partition provided in the embodiment of the present application sets the value of the corresponding node to be an effective value, and may include:
and setting the value of the node to be the ID of the corresponding node.
When the value of the node to which the node belongs is set to be the effective value, specifically, the value of the node to which the node belongs may be set to be the ID (identity) of the corresponding node, that is, the ID of the corresponding node may be used as the effective value of the node to which the node belongs, specifically, the ID of the first node may be used as the effective value of the node to which the first node belongs, and the ID of the second node may be used as the effective value of the node to which the second node belongs, so as to facilitate the determination of whether the corresponding node exists in the cluster.
An embodiment of the present application further provides a cache partition reconstruction device, see fig. 2, which shows a schematic structural diagram of the cache partition reconstruction device provided in the embodiment of the present application, and the cache partition reconstruction device may include:
a first judging module 21, configured to, when a second node joins the cluster, judge whether the second node exits the cluster and joins the cluster under a condition that the first node exits the cluster;
a second determining module 22, configured to determine whether a flag bit preset in a second node is an invalid value if it is determined that the second node exits from the cluster and joins the cluster under the condition that the first node exits from the cluster;
and the creating module 23 is configured to create a cache partition corresponding to the second node according to the operation information of the cluster and create a cache partition corresponding to the first node on the second node if the flag bit is determined to be an invalid value.
The apparatus for reconstructing a cache partition provided in an embodiment of the present application may further include:
and the deleting module is used for deleting the cache partition corresponding to the first node on the second node if the first node is added into the cluster after the cache partition corresponding to the first node is created on the second node, setting the flag bit in the second node to be an effective value, synchronizing the flag bit to the first node, and creating the cache partition corresponding to the first node on the first node.
The apparatus for reconstructing a cache partition provided in an embodiment of the present application may further include:
and the execution refusing module is used for refusing to establish the cache partition corresponding to the second node according to the running information of the cluster if the flag bit is determined to be an invalid value and the first node is determined to be in the cluster before judging whether the second node exits the cluster and joins the cluster under the condition that the first node exits the cluster.
The apparatus for reconstructing a cache partition provided in an embodiment of the present application may further include:
and the prompt sending module is used for sending a prompt that the flag bit is an invalid value and the first node is in the cluster if the flag bit is determined to be the invalid value and the first node is determined to be in the cluster.
The apparatus for reconstructing a cache partition provided in an embodiment of the present application may further include:
the setting module is used for setting the value of the node to which the first node corresponds and setting the value of the node to which the second node corresponds; if the node exists, the value of the corresponding node is set as an effective value, and if the node does not exist, the value of the corresponding node is set as an invalid value.
In an embodiment of the present application, a cache partition rebuilding apparatus includes:
and the setting unit is used for setting the value of the corresponding affiliated node as the ID of the node.
An embodiment of the present application further provides a cache partition reconstruction device, see fig. 3, which shows a schematic structural diagram of a cache partition reconstruction device provided in an embodiment of the present application, and the cache partition reconstruction device may include:
a memory 31 for storing a computer program;
the processor 32, when executing the computer program stored in the memory 31, may implement the following steps:
when a second node joins the cluster, judging whether the second node exits the cluster and joins the cluster under the condition that the first node exits the cluster; if the second node is determined to exit the cluster and join the cluster under the condition that the first node exits the cluster, judging whether a flag bit preset in the second node is an invalid value or not; and if the flag bit is determined to be an invalid value, creating a cache partition corresponding to the second node according to the running information of the cluster, and creating a cache partition corresponding to the first node on the second node.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the following steps may be implemented:
when a second node joins the cluster, judging whether the second node exits the cluster and joins the cluster under the condition that the first node exits the cluster; if the second node is determined to exit the cluster and join the cluster under the condition that the first node exits the cluster, judging whether a flag bit preset in the second node is an invalid value or not; and if the flag bit is determined to be an invalid value, creating a cache partition corresponding to the second node according to the running information of the cluster, and creating a cache partition corresponding to the first node on the second node.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For a description of a relevant part in a cache partition reconstruction device, a device, and a computer-readable storage medium provided in the embodiments of the present application, reference may be made to the detailed description of the corresponding part in a cache partition reconstruction method provided in the embodiments of the present application, and details are not described here again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include elements inherent in the list. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A cache partition rebuilding method is characterized by comprising the following steps:
when a second node joins the cluster, judging whether the second node exits the cluster and joins the cluster under the condition that a first node exits the cluster;
if the second node is determined to exit the cluster and join the cluster under the condition that the first node exits the cluster, judging whether a flag bit preset in the second node is an invalid value or not;
and if the flag bit is determined to be an invalid value, creating a cache partition corresponding to the second node according to the running information of the cluster, and creating a cache partition corresponding to the first node on the second node.
2. The method of claim 1, wherein after the creating the cache partition corresponding to the first node on the second node, further comprising:
if the first node is added into the cluster, deleting the cache partition corresponding to the first node on the second node, setting the flag bit to be an effective value, synchronizing the value of the flag bit to the first node, and creating the cache partition corresponding to the first node on the first node.
3. The cache partition rebuilding method of claim 1, before determining whether the second node exits the cluster and joins the cluster if the first node exits the cluster, further comprising:
and if the flag bit is determined to be an invalid value and the first node is determined to be in the cluster, refusing to create a cache partition corresponding to the second node according to the running information of the cluster.
4. The method of claim 3, wherein if the flag bit is determined to be invalid and the first node is determined to be in the cluster, the method further comprises:
and sending out a prompt that the flag bit is an invalid value and the first node is in the cluster.
5. The cache partition rebuilding method of claim 1, further comprising:
setting the value of the node to which the first node corresponds, and setting the value of the node to which the second node corresponds; if the node exists, the value of the corresponding node is set as an effective value, and if the node does not exist, the value of the corresponding node is set as an invalid value.
6. The cache partition rebuilding method of claim 5, wherein setting the value of the corresponding home node to a valid value comprises:
and setting the value of the node to be the ID of the corresponding node.
7. A cache partition reconstruction apparatus, comprising:
the first judging module is used for judging whether a second node exits the cluster and joins the cluster under the condition that a first node exits the cluster when the second node joins the cluster;
a second determining module, configured to determine whether a flag bit preset in the second node is an invalid value if it is determined that the second node exits from the cluster and joins the cluster under the condition that the first node exits from the cluster;
and the creating module is used for creating a cache partition corresponding to the second node according to the running information of the cluster and creating a cache partition corresponding to the first node on the second node if the flag bit is determined to be an invalid value.
8. The apparatus of claim 7, further comprising:
and the deleting module is used for deleting the cache partition corresponding to the first node on the second node if the first node is added into the cluster after the cache partition corresponding to the first node is created on the second node, setting the flag bit in the second node to be an effective value, synchronizing the flag bit to the first node, and creating the cache partition corresponding to the first node on the first node.
9. A cache partition reconstruction device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the cache partition reconstruction method according to any one of claims 1 to 6 when executing said computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method of cache partition reconstruction according to any one of claims 1 to 6.
CN202010980334.5A 2020-09-17 2020-09-17 Cache partition reconstruction method, device, equipment and readable storage medium Active CN112162698B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010980334.5A CN112162698B (en) 2020-09-17 2020-09-17 Cache partition reconstruction method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010980334.5A CN112162698B (en) 2020-09-17 2020-09-17 Cache partition reconstruction method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112162698A true CN112162698A (en) 2021-01-01
CN112162698B CN112162698B (en) 2024-02-13

Family

ID=73858328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010980334.5A Active CN112162698B (en) 2020-09-17 2020-09-17 Cache partition reconstruction method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112162698B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448512A (en) * 2021-05-23 2021-09-28 山东英信计算机技术有限公司 Takeover method, device and equipment for cache partition recovery and readable medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283906A (en) * 2013-07-02 2015-01-14 华为技术有限公司 Distributed storage system, cluster nodes and range management method of cluster nodes
CN108063782A (en) * 2016-11-08 2018-05-22 北京国双科技有限公司 Node is delayed machine adapting method and device, node group system
CN108205573A (en) * 2016-12-20 2018-06-26 中兴通讯股份有限公司 A kind of data distribution formula storage method and system
WO2018112805A1 (en) * 2016-12-21 2018-06-28 深圳前海达闼云端智能科技有限公司 Blockchain storage method and device, and node device
US20200125417A1 (en) * 2018-10-18 2020-04-23 Beijing Jingdong Shangke Information Technology Co., Ltd. System and method for handling data skew at run time

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283906A (en) * 2013-07-02 2015-01-14 华为技术有限公司 Distributed storage system, cluster nodes and range management method of cluster nodes
CN108063782A (en) * 2016-11-08 2018-05-22 北京国双科技有限公司 Node is delayed machine adapting method and device, node group system
CN108205573A (en) * 2016-12-20 2018-06-26 中兴通讯股份有限公司 A kind of data distribution formula storage method and system
WO2018112805A1 (en) * 2016-12-21 2018-06-28 深圳前海达闼云端智能科技有限公司 Blockchain storage method and device, and node device
US20200125417A1 (en) * 2018-10-18 2020-04-23 Beijing Jingdong Shangke Information Technology Co., Ltd. System and method for handling data skew at run time

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张宇;: "基于VMware vSAN集群节点损坏的数据恢复研究", 电脑知识与技术, no. 01 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448512A (en) * 2021-05-23 2021-09-28 山东英信计算机技术有限公司 Takeover method, device and equipment for cache partition recovery and readable medium
WO2022247583A1 (en) * 2021-05-23 2022-12-01 山东英信计算机技术有限公司 Takeover method and apparatus for cache partition recovery, and device and readable medium
US11994992B2 (en) 2021-05-23 2024-05-28 Shandong Yingxin Computer Technologies Co., Ltd. Takeover method and apparatus for cache partition recovery, device and readable medium

Also Published As

Publication number Publication date
CN112162698B (en) 2024-02-13

Similar Documents

Publication Publication Date Title
CN110543386B (en) Data storage method, device, equipment and storage medium
WO2016026306A1 (en) Data backup method, system, node and computer storage media
US20210349784A1 (en) Data Replication Method, Apparatus, and System
CN107451013B (en) Data recovery method, device and system based on distributed system
WO2019076102A1 (en) Data rollback method and system, device, and computer readable storage medium
CN113204530B (en) Data writing method, device, equipment and medium of distributed file system
CN112162698A (en) Cache partition reconstruction method, device, equipment and readable storage medium
CN108173665B (en) Data backup method and device
CN114416883A (en) Block chain light node data synchronization method, device, equipment and readable storage medium
CN111290880A (en) OSD data recovery method, device, equipment and medium
CN112988777B (en) Object processing method and device, computer equipment and storage medium
CN111309799A (en) Method, device and system for realizing data merging and storage medium
CN107786650B (en) Storage medium and management strategy synchronization method, device and system
CN112437119B (en) Distributed system upgrading method, device and node
CN109669642B (en) Node joining method, system and device of storage system and readable storage medium
CN112448883A (en) Message pushing method and device, computer equipment and storage medium
CN111680040A (en) Data table processing method and device
CN107908370B (en) Data storage method and device
CN106354830B (en) Method and device for data synchronization between database cluster nodes
CN114265900A (en) Data processing method and device, electronic equipment and storage medium
CN111708780B (en) Distributed form system, partition master selection method, device, server and medium
CN114297182A (en) Industrial model data management method, device, equipment and readable storage medium
CN111190768B (en) Database execution error recovery method, database access method and device
CN110688387A (en) Data processing method and device
CN111147554A (en) Data storage method and device and computer system

Legal Events

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