CN112162698B - 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
CN112162698B
CN112162698B CN202010980334.5A CN202010980334A CN112162698B CN 112162698 B CN112162698 B CN 112162698B CN 202010980334 A CN202010980334 A CN 202010980334A CN 112162698 B CN112162698 B CN 112162698B
Authority
CN
China
Prior art keywords
node
cluster
cache partition
value
exits
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.)
Active
Application number
CN202010980334.5A
Other languages
Chinese (zh)
Other versions
CN112162698A (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

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 cache partition reconstruction method, a device, equipment and a computer readable storage medium, wherein the method comprises the following steps: when the 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 preset flag bit in the second node is an invalid value or not; if the flag bit is determined to be an invalid value, a cache partition corresponding to the second node is created according to the running information of the cluster, and the cache partition corresponding to the first node is created on the second node. According to the technical scheme, when the second node accords with the advanced backward condition, the second node can also establish the cache partition corresponding to the second node and the cache partition corresponding to the first node 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 disclosure relates to the field of multi-control storage devices, and more particularly, 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 iogroup (two nodes form an iogroup) exits the cluster, a node B at the opposite end of the node a creates a cache partition on the node a exiting the cluster so as 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, so that each node can store the own cache partition, thereby facilitating the realization of the acceleration function of the SSD (Solid State Disk).
At present, in the iogroup, when two nodes exit the cluster in sequence, if one node is added to the cluster again, since the other node is not in the cluster (the corresponding cache partition is also lost at the same time), the node added to the cluster cannot determine whether the node not in the cluster deletes the cache partition of the node added to the cluster, and the node not in the cluster cannot synchronize the cache partition of the node added to the cluster, that is, after one node is added to the cluster, since the other node is not in the cluster, the node not in the cluster cannot synchronize the cache partition to the node added to the cluster, so that even if one node is added to the cluster, the cache partition on the two nodes cannot be normally created back.
In summary, how to recreate the cache partition on both nodes is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the foregoing, it is an object of the present application to provide a method, apparatus, device, and computer readable storage medium for re-creating a cache partition on both nodes.
In order to achieve the above object, the present application provides the following technical solutions:
a cache partition reconstruction 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 preset flag bit in the second node is an invalid value or not;
if the flag bit is determined to be an invalid value, a cache partition corresponding to the second node is created according to the running information of the cluster, and the cache partition corresponding to the first node is created on the second node.
Preferably, after creating the cache partition corresponding to the first node on the second node, the method further includes:
and if the first node joins the cluster, deleting the cache partition corresponding to the first node on the second node, setting the flag bit as 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 if the first node exits the cluster, the method further comprises:
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 the flag bit is determined to be an invalid value and the first node is determined to be 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:
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; and if the node exists, setting the value of the corresponding node to be a valid value, and if the node does not exist, setting the value of the corresponding node to be an invalid value.
Preferably, setting the value of the corresponding belonging node to a valid value includes:
the value of the node to which it belongs is set as the ID of the corresponding node.
A cache partition rebuilding apparatus, comprising:
the first judging module is used for judging whether the second node exits the cluster and joins the cluster under the condition that the first node exits the cluster when the second node joins the cluster;
the second judging module is used for judging whether a preset flag bit in the second node is an invalid value or not if the second node is determined to exit the cluster and join the cluster under the condition that the first node exits the cluster;
and the creation module is used for creating a cache partition corresponding to the second node according to the running information of the cluster and creating the 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:
and the deleting module is used for deleting the cache partition corresponding to the first node on the second node if the first node joins the cluster after the cache partition corresponding to the first node is created on the second node, setting the zone bit in the second node as an effective value, synchronizing the zone bit to the first node, and creating the cache partition corresponding to the first node on the first node.
A cache partition rebuilding apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the cache partition reconstruction method as described in any one of the above when executing the computer program.
A computer readable storage medium having stored therein a computer program which when executed by a processor performs the steps of the cache partition reconstruction method as claimed in any one of the preceding claims.
The application provides a cache partition reconstruction method, a device, equipment and a computer readable storage medium, wherein the method comprises the following steps: when the 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 preset flag bit in the second node is an invalid value or not; if the flag bit is determined to be an invalid value, a cache partition corresponding to the second node is created according to the running information of the cluster, and the cache partition corresponding to the first node is created on the second node.
According to the technical scheme, when the second node is added into the cluster, if the second node is determined to exit the cluster and be added into the cluster under the condition that the first node exits the cluster, namely, the condition that the first node exits the cluster first, the second node exits the cluster later and is added into the cluster under the condition that the first node exits the cluster is determined, whether the preset zone bit in the second node is an invalid value can be judged, if the zone 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, and 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 performed even if the first node is not in the cluster, and the cache partitions corresponding to the second node and the first node are reconstructed back respectively can be realized, and therefore the acceleration function of the SSD can be used normally.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
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 device according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a cache partition reconstruction device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Referring to fig. 1, a flowchart of a method for reconstructing a cache partition according to an embodiment of the present application is shown, where the method for reconstructing a cache partition according to the embodiment of the present application may include:
s11: when the 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 firstly determined whether the second node exits the cluster and joins the cluster when the first node exits the cluster, that is, whether the first node exits the cluster first, the second node exits the cluster later, and the second node joins the cluster when the first node exits the cluster (that is, whether the second node accords with the advanced backward situation) is determined, if it is determined that the second node does not exit the cluster and joins the cluster when the first node exits the cluster, the cluster cannot normally work at this time, the cache partition is not re-performed, and if it is determined that the second node exits the cluster and joins the cluster when the first node exits the cluster, the cluster can normally work at this time, so step S12 can be executed.
S12: judging whether a preset flag bit in the second node is an invalid value or not; if yes, executing 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 conform to the advanced backward condition, whether the preset flag bit in the second node is an invalid value or not can be judged because the first node does not exist in the cluster at the moment, wherein the default value of the flag bit is the invalid value, and the fact that the flag bit is the invalid value when the first node is not in the cluster indicates that the second node does not need to rely on the step of deleting the cache partition by the first node for the creation of the cache partition.
S13: and creating a cache partition corresponding to the second node according to the running information of the cluster, and creating the 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, the cache partition corresponding to the first node may be created on the second node in combination with the operation information of the cluster and the information obtained when the first node creates the cache partition corresponding to the second node (such as the size of the cache partition, the attribute information of the cache partition, etc.) in advance (particularly when the second node is in the cluster), and the cache partition corresponding to the second node may be created in combination with the operation information of the cluster and the information obtained when the first node creates the cache partition corresponding to the first node (such as the size of the cache partition, the attribute information of the cache partition, etc.) in advance (particularly when the first node is in the cluster), that is, the cache partition of the second node is rebuilt by using the second node, and the cache partition of the first node is rebuilt, so that the creation of the cache partition corresponding to the second node and the cache partition corresponding to the first node may not be affected by the first node in the cluster.
According to the technical scheme, when the second node is added into the cluster, if the second node is determined to exit the cluster and be added into the cluster under the condition that the first node exits the cluster, namely, the condition that the first node exits the cluster first, the second node exits the cluster later and is added into the cluster under the condition that the first node exits the cluster is determined, whether the preset zone bit in the second node is an invalid value can be judged, if the zone 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, and 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 performed even if the first node is not in the cluster, and the cache partitions corresponding to the second node and the first node are reconstructed back respectively can be realized, and therefore the acceleration function of the SSD can be used normally.
The method for reconstructing a cache partition provided in the embodiment of the present application may further include, after creating a cache partition corresponding to a first node on a second node:
if the first node joins the cluster, deleting the cache partition corresponding to the first node on the second node, setting the value of the flag bit as 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 at this time, 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 effective value, it indicates that the cache partition corresponding to the first node has been 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 the cache partition corresponding to itself, and the second node does not have the cache partition corresponding to the first node, so as to avoid causing repetition of the cache partition corresponding to the first node.
It should be noted that, after the buffer partition corresponding to the first node is created on the first node, if one of the first node and the second node exits the cluster, the buffer partition corresponding to the node exiting the cluster may be created on the node in the cluster, when the node exiting the cluster rejoins the cluster, the buffer partition corresponding to the node rejoining the cluster on the node in the cluster is deleted, the flag bit is set to the valid value, the value of the flag bit is synchronized to the node rejoining the cluster, and when the node rejoining the cluster receives the flag bit with the valid value, the buffer partition corresponding to itself is created on itself, specifically, taking the case that the second node exits the cluster after the buffer partition corresponding to the first node is created on the first node, at this time, the buffer partition corresponding to the second node may be created on the first node, and when the second node rejoins the cluster, the buffer partition corresponding to the second node is deleted, the flag bit is set to the valid value, the flag bit is synchronized to the second node, and the flag bit is set to the valid value, and the flag bit can be created on the second node after the second node receives the valid 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 succession and one node joins the cluster subsequently, steps similar to steps S11 to S13 may be executed, so that when the entering node accords with the advanced backward situation, the cache partitions corresponding to the two nodes may be created again.
The method for reconstructing a cache partition provided in the embodiment of the present application may further include, before determining whether the second node exits the cluster and joins the cluster when the first node exits the cluster:
if the flag bit is determined to be an invalid value and the first node is determined to be in the cluster, the cache partition corresponding to the second node is refused to be created according to the running information of the cluster.
In the application, after the second node joins the cluster and before judging whether the second node exits the cluster and joins the cluster again under the condition that the first node exits the cluster, if the flag bit is determined to be 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 running information of the cluster may be refused, so as to avoid the situation of repeatedly creating the cache partition of the second node.
The method for reconstructing a cache partition provided in the embodiment of the present application may further include, if it is determined that a flag bit is an invalid value and it is determined that a first node is in the cluster:
and sending out a prompt that the flag bit is an invalid value 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 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 on the first node, and the cache partition corresponding to the second node is created conveniently on the second node.
The method for reconstructing a cache partition provided in the embodiment of the present application may further include:
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; and if the node exists, setting the value of the corresponding node to be a valid value, and if the node does not exist, setting the value of the corresponding node to be an invalid value.
In this application, the value of the node to which the first node corresponds (which may exist in the cluster) may be set in advance, specifically, if the first node is located in the cluster, the value of the node to which the first node corresponds may be set to an effective value, if the first node is not located in the cluster, the value of the node to which the first node corresponds may be set to an invalid value, and the value of the node to which the second node corresponds (which may also exist in the cluster) may be set in advance in a manner similar to the value of the node to which the first node corresponds, that is, if the second node is located in the cluster, the value of the 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, the value of the node to which the second node corresponds may be set to an invalid value, so as to determine whether the first node and the second node exist in the cluster or not through the value of the node to which the first node corresponds, and the value of the second node to which the second node corresponds.
The method for reconstructing a cache partition provided in the embodiment of the present application, where the value of the corresponding node to which the cache partition belongs is set as an effective value, may include:
the value of the node to which it belongs is set as the ID of the corresponding node.
When the value of the node to which the node corresponds is set as the valid value, the value of the node to which the node corresponds may be specifically set as the ID (identification) of the corresponding node, that is, the ID of the corresponding node may be used as the valid value of the node to which the node belongs, specifically, the ID of the first node may be used as the valid value of the node to which the first node corresponds, and the ID of the second node may be used as the valid value of the node to which the second node corresponds, so as to facilitate the determination of whether the corresponding node exists in the cluster.
The embodiment of the application also provides a cache partition reconstruction device, referring to fig. 2, which shows a schematic structural diagram of the cache partition reconstruction device provided by the embodiment of the application, which may include:
a first judging module 21, configured to, when the second node joins the cluster, judge whether the second node exits the cluster and joins the cluster if the first node exits the cluster;
a second judging module 22, configured to judge whether a flag bit preset in the second node is an invalid value if it is determined that the second node exits the cluster and joins the cluster when the first node exits the cluster;
the creating module 23 is configured to create a 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 create the cache partition corresponding to the first node on the second node.
The embodiment of the application provides a cache partition reconstruction device, which 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 as 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 embodiment of the application provides a cache partition reconstruction device, which may further include:
and the refusing execution module is used for refusing to create a 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 embodiment of the application provides a cache partition reconstruction device, which may further include:
and the prompt sending module is used for sending out the prompt that the flag bit is the 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 embodiment of the application provides a cache partition reconstruction device, which 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; and if the node exists, setting the value of the corresponding node to be a valid value, and if the node does not exist, setting the value of the corresponding node to be an invalid value.
The embodiment of the application provides a cache partition rebuilding device, a setting module may include:
a setting unit configured to set a value of a corresponding belonging node as an ID of the node.
The embodiment of the application also provides a cache partition reconstruction device, referring to fig. 3, which shows a schematic structural diagram of the cache partition reconstruction device provided by the embodiment of the application, and 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 the 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 preset flag bit in the second node is an invalid value or not; if the flag bit is determined to be an invalid value, a cache partition corresponding to the second node is created according to the running information of the cluster, and the cache partition corresponding to the first node is created on the second node.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps can be realized:
when the 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 preset flag bit in the second node is an invalid value or not; if the flag bit is determined to be an invalid value, a cache partition corresponding to the second node is created according to the running information of the cluster, and the cache partition corresponding to the first node is created on the second node.
The computer readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The description of the relevant parts in the device, the device and the computer readable storage medium for reconstructing a cache partition provided in the embodiments of the present application may refer to the detailed description of the corresponding parts in the method for reconstructing a cache partition provided in the embodiments of the present application, which is not repeated here.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 is inherent to. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. In addition, the parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of the corresponding technical solutions in the prior art, are not described in detail, so that redundant descriptions are avoided.
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 (9)

1. The cache partition reconstruction method is characterized by comprising the following steps of:
when a second node joins a 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 preset flag bit in the second node is an invalid value or not;
if the flag bit is determined to be an invalid value, a cache partition corresponding to the second node is created according to the running information of the cluster, and the cache partition corresponding to the first node is created on the second node;
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; and if the node exists, setting the value of the corresponding node to be a valid value, and if the node does not exist, setting the value of the corresponding node to be an invalid value.
2. The cache partition rebuilding method according to claim 1, further comprising, after creating a cache partition corresponding to the first node on the second node:
and if the first node joins the cluster, deleting the cache partition corresponding to the first node on the second node, setting the flag bit as 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 according to claim 1, further comprising, before determining whether the second node exits the cluster and joins the cluster if the first node exits the cluster:
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 cache partition rebuilding method according to claim 3, wherein if the flag bit is determined to be an invalid value and the first node is determined to be in the cluster, further comprising:
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 reconstruction method according to claim 1, wherein setting the value of the corresponding belonging node to a valid value comprises:
the value of the node to which it belongs is set as the ID of the corresponding node.
6. A cache partition rebuilding apparatus, comprising:
the first judging module is used for judging whether the second node exits the cluster and joins the cluster under the condition that the first node exits the cluster when the second node joins the cluster;
the second judging module is used for judging whether a preset flag bit in the second node is an invalid value or not if the second node is determined to exit the cluster and join the cluster under the condition that the first node exits the cluster;
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 the cache partition corresponding to the first node on the second node if the flag bit is determined to be an invalid value;
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; and if the node exists, setting the value of the corresponding node to be a valid value, and if the node does not exist, setting the value of the corresponding node to be an invalid value.
7. The cache partition rebuilding apparatus according to claim 6, 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 joins the cluster after the cache partition corresponding to the first node is created on the second node, setting the zone bit in the second node as an effective value, synchronizing the zone bit to the first node, and creating the cache partition corresponding to the first node on the first node.
8. 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 5 when executing said computer program.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the cache partition reconstruction method according to any one of claims 1 to 5.
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 CN112162698A (en) 2021-01-01
CN112162698B true 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)

Families Citing this family (1)

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

Citations (4)

* 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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10713096B2 (en) * 2018-10-18 2020-07-14 Beijing Jingdong Shangke Information Technology Co., Ltd. System and method for handling data skew at run time

Patent Citations (4)

* 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

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于VMware vSAN集群节点损坏的数据恢复研究;张宇;;电脑知识与技术(第01期);全文 *

Also Published As

Publication number Publication date
CN112162698A (en) 2021-01-01

Similar Documents

Publication Publication Date Title
CN107391628B (en) Data synchronization method and device
US9372908B2 (en) Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation
CN106933703B (en) Database data backup method and device and electronic equipment
CN110309161B (en) Data synchronization method and device and server
CN108509462B (en) Method and device for synchronizing activity transaction table
CN105159968A (en) Directory management method for file system and client
CN110597825B (en) Data processing method and device based on block chain and node equipment
CN107451013B (en) Data recovery method, device and system based on distributed system
WO2016177130A1 (en) Method and device for selecting communication node
CN112052264B (en) Business data query method and device, electronic equipment and readable storage medium
CN111221907B (en) Database added column synchronization method and device based on log analysis
CN106021468A (en) Updating method and system for distributed caches and local caches
CN112162698B (en) Cache partition reconstruction method, device, equipment and readable storage medium
CN105574026B (en) Method and device for supporting transaction of non-relational database
CN110096237B (en) Copy processing method, node, storage system, server and readable medium
CN112448883A (en) Message pushing method and device, computer equipment and storage medium
CN111309799A (en) Method, device and system for realizing data merging and storage medium
CN106354830B (en) Method and device for data synchronization between database cluster nodes
US9380109B2 (en) Resource synchronization control method, device, and system
CN111190768B (en) Database execution error recovery method, database access method and device
CN111045869B (en) Data backup method and device and readable storage medium
CN108271420A (en) Manage method, file system and the server system of file
CN110688387A (en) Data processing method and device
CN111966532A (en) Database management method and device, electronic equipment and medium
CN107153699B (en) Method and device for dynamically expanding cluster server

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