CN111628895B - Configuration data synchronization method, device, equipment and readable storage medium - Google Patents
Configuration data synchronization method, device, equipment and readable storage medium Download PDFInfo
- Publication number
- CN111628895B CN111628895B CN202010470865.XA CN202010470865A CN111628895B CN 111628895 B CN111628895 B CN 111628895B CN 202010470865 A CN202010470865 A CN 202010470865A CN 111628895 B CN111628895 B CN 111628895B
- Authority
- CN
- China
- Prior art keywords
- configuration data
- memory
- data
- changed
- service module
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000001360 synchronised effect Effects 0.000 claims abstract description 7
- 230000008859 change Effects 0.000 claims description 66
- 238000004590 computer program Methods 0.000 claims description 11
- 230000007246 mechanism Effects 0.000 claims description 8
- 238000001514 detection method Methods 0.000 claims description 3
- 230000000694 effects Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/084—Configuration by using pre-existing information, e.g. using templates or copying from other elements
- H04L41/0846—Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/0816—Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method for synchronizing configuration data, which comprises the following steps: detecting whether the configuration data of the target business module is changed or not; the configuration data of each control node is stored in a memory pool of each control node; and if so, sending the changed configuration data to other control nodes so as to synchronize the configuration data stored in the memory pools of the other control nodes through the other control nodes according to the changed configuration data. Therefore, in the application, when the configuration data is synchronized, the original mode driven by an event is changed into the mode of synchronizing the data through the memory pool, so that the processing logic of the service module is separated from the configuration data, and the synchronization mode is more universal and is convenient for the expansion of the service module. The invention also discloses a configuration data synchronization device, equipment and a computer readable storage medium, which can also realize the technical effects.
Description
Technical Field
The present invention relates to the field of data synchronization technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for synchronizing configuration data.
Background
The cluster system in the storage system is a small distributed control node cluster system, the configuration data between the control nodes needs to be synchronized at any time along with the progress of the business process, and the synchronization is based on events, such as: when one of the control nodes receives a configuration command from a user, it needs to send an event to other nodes in the cluster to keep the configuration data synchronized among the control nodes in the cluster, where the configuration data includes: information configuring the data volumes, LBA (Logical Block Address) of each data volume, capacity size, status of each data volume, and the like. The synchronization of configuration data based on events is usually tightly coupled with the business logic, and new events need to be defined when new business modules are added, so that the expansion of the business modules is not facilitated.
Disclosure of Invention
The invention aims to provide a configuration data synchronization method, a configuration data synchronization device, configuration data synchronization equipment and a computer readable storage medium, so as to realize the synchronization of configuration data among different control nodes.
In order to achieve the above object, the present invention provides a method for synchronizing configuration data, including:
detecting whether the configuration data of the target business module is changed or not; the configuration data of each control node is stored in a memory pool of each control node;
and if so, sending the changed configuration data to other control nodes so as to synchronize the configuration data stored in the memory pools of the other control nodes through the other control nodes according to the changed configuration data.
Before the detecting whether the configuration data of the target service module is changed, the method further includes:
each control node divides a memory pool applied by the control node into memory blocks, each memory block has a unique corresponding memory block corresponding number, and the corresponding relation between each memory block corresponding number and a memory linear address is recorded; the memory pool is created through a macro page mechanism of a kernel and exists in the RAM;
the service module applies for the memory block from the memory pool of the control node and receives a memory block corresponding number and a corresponding memory linear address returned by the memory pool; the memory blocks distributed by the service module form the service data blocks of the service module, and different service data blocks have unique corresponding service data block corresponding numbers.
Wherein sending the changed configuration data to other control nodes comprises:
and sending the changed memory block data, the memory block corresponding number of the changed memory block, the service data block corresponding number, the change timestamp and the change serial number to other control nodes.
The other control nodes perform configuration data synchronization on the configuration data stored in the memory pools of the other control nodes according to the changed configuration data, and the configuration data synchronization method includes:
the other control node receives the configuration data;
caching the configuration data in the memory pools of other control nodes, and sending a change notification to the target service module according to the service data block corresponding number, the change timestamp and the change serial number in the configuration data;
and if the returned result of the target service module is that the data needs to be changed, performing data synchronization on the corresponding memory blocks in the memory pools of the other control nodes by using the changed memory block data and the memory block corresponding numbers of the changed memory blocks in the configuration data.
After caching the configuration data in the memory pools of the other control nodes, the method further includes:
judging whether the quantity of the cached configuration data reaches a preset threshold value or not;
and if so, executing the step of sending a change notification to the target service module according to the service data block corresponding number, the change timestamp and the change sequence number in the configuration data.
When sending a change notification to the target service module according to the service data block corresponding number, the change timestamp, and the change sequence number in the configuration data, the method further includes:
and if the quantity of the configuration data corresponding to the same service module is more than one, merging the change notifications of the configuration data corresponding to the same service module, and only sending one change notification to the corresponding service module.
Wherein, this scheme still includes: and backing up the data in the memory pool to a ROM or a hard disk.
To achieve the above object, the present invention further provides a configuration data synchronization apparatus, including:
the detection module is used for detecting whether the configuration data of the target service module is changed; the configuration data of each control node is stored in a memory pool of each control node;
and the sending module is used for sending the changed configuration data to other control nodes when the configuration data of the target service module is changed, so as to synchronize the configuration data stored in the memory pools of the other control nodes through the other control nodes according to the changed configuration data.
To achieve the above object, the present invention further provides an electronic device comprising:
a memory for storing a computer program; a processor for implementing the steps of the above-described configuration data synchronization method when executing the computer program.
To achieve the above object, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when being executed by a processor, implements the steps of the above-mentioned configuration data synchronization method.
According to the above scheme, the configuration data synchronization method provided by the embodiment of the invention comprises the following steps: detecting whether the configuration data of the target business module is changed or not; the configuration data of each control node is stored in a memory pool of each control node; and if so, sending the changed configuration data to other control nodes so as to synchronize the configuration data stored in the memory pools of the other control nodes through the other control nodes according to the changed configuration data.
Therefore, in the application, when the configuration data is synchronized, the original event-driven mode is changed into a data synchronization mode through the memory pool, so that the processing logic of the service module is separated from the configuration data, and the synchronization mode is more universal and is convenient for the expansion of the service module. The invention also discloses a configuration data synchronization device, equipment and a computer readable storage medium, which can also realize the technical effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a configuration data synchronization method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a configuration data synchronization apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
The embodiment of the invention discloses a method, a device and equipment for synchronizing configuration data and a computer readable storage medium, which are used for realizing the synchronization of the configuration data among different control nodes.
Referring to fig. 1, a method for synchronizing configuration data according to an embodiment of the present invention includes:
s101, detecting whether configuration data of a target service module is changed or not; the configuration data of each control node is stored in a memory pool of each control node;
if yes, executing S102; if not, continuing to execute S101;
before the detecting whether the configuration data of the target service module is changed, the method further includes:
each control node divides a memory pool applied by the control node into memory blocks, each memory block has a unique corresponding memory block corresponding number, and the corresponding relation between each memory block corresponding number and a memory linear address is recorded; the memory pool is created through a macro page mechanism of a kernel and exists in the RAM;
the service module applies for the memory block from the memory pool of the control node and receives a memory block corresponding number and a corresponding memory linear address returned by the memory pool; the memory blocks distributed by the service module form the service data blocks of the service module, and different service data blocks have unique corresponding service data block corresponding numbers.
In the application, the configuration data is data that needs to be synchronized by each control node in the cluster, and includes information of the data volumes, LBA of each data volume, and capacity size and state of each data volume; moreover, the service module in the present application is specifically a cache module, a protocol processing module, a raid module, and the like in the storage software system.
It should be noted that, in the present application, each control node is provided with a special memory POOL DATA POOL, and the configuration DATA of each control node is stored in the memory POOL of each control node. Specifically, when the DATA POOL is created, a kernel macro page mechanism is used and the DATA POOL is resident in a memory, so that the performance overhead caused by frequent swap switching is reduced. The DATA POOL applies for a large memory block from an OS (Operating System), and divides the large memory block into appropriate memory blocks in a page, where each memory block has a corresponding memory block corresponding number, and records a corresponding relationship between the memory block corresponding number and a linear address of the memory. Further, before the service module performs the operation, it needs to apply for a service DATA block (WORK DATA CHUNK) from the DATA POOL according to a specified size, and the DATA POOL will return a service DATA block corresponding number and a linear logical address. And the service module simultaneously registers data block change notification processing logic when applying for the service data block and is used for finely controlling the service flow.
The memory space allocated by the DATA POOL to the service module is composed of a plurality of memory blocks, and small block linear spaces forming the service DATA block are continuous. Because the data content and the data size needed by the service module need to be preset and the logics of all the control nodes in the cluster are basically the same, the corresponding relation between the service module and the corresponding number of the service data block can be preset.
And S102, sending the changed configuration data to other control nodes, and synchronizing the configuration data stored in the memory pools of the other control nodes through the other control nodes according to the changed configuration data.
Wherein sending the changed configuration data to other control nodes comprises: and sending the changed memory block data, the memory block corresponding number of the changed memory block, the service data block corresponding number, the change timestamp and the change serial number to other control nodes.
It should be noted that, in the present application, when the service module changes the configuration DATA, the DATA POOL is triggered to perform a synchronization action, and the DATA POOL synchronizes the changed configuration DATA (the memory block and other necessary DATA) to other control nodes in the cluster, so that the service module is not required to send a specific event to notify other control nodes, thereby reducing the complexity of the service module expansion.
Specifically, the DATA POOL itself in the present application does not maintain the cluster relationship, and when sending configuration DATA to other control nodes, the DATA POOL needs to acquire the cluster relationship, and then uses the ethernet or FC to spread the contents of the changed memory block DATA, the memory block corresponding number, the service DATA block corresponding number, the timestamp, the change sequence, and the like to other nodes in the cluster, and the other nodes synchronize the configuration DATA.
It can be seen that, in the present application, when the configuration data is synchronized, the original event-driven mode is changed to the data synchronization mode through the memory pool, so that the processing logic of the service module is separated from the configuration data.
Based on the foregoing embodiment, in this embodiment, when the other control node performs configuration data synchronization on the configuration data stored in the memory pool of the other control node according to the changed configuration data, the method specifically includes:
the other control node receives the configuration data;
caching the configuration data in the memory pools of other control nodes, and sending a change notification to the target service module according to the service data block corresponding number, the change timestamp and the change serial number in the configuration data;
and if the returned result of the target service module is that the data needs to be changed, performing data synchronization on the corresponding memory blocks in the memory pools of the other control nodes by using the changed memory block data and the memory block corresponding numbers of the changed memory blocks in the configuration data.
It should be noted that, in the present application, after receiving the notification of changing the configuration information, the other nodes do not directly cover the locally corresponding memory block according to the configuration information, but buffer the local corresponding memory block first, and then send a change notification to the corresponding service module, when the service logic processes the change notification, if it is determined that the changed data is repeated, the local corresponding memory block does not need to be covered again, otherwise, the memory block data needs to be covered, and the memory pool determines whether the corresponding memory block is covered by the return value, so that repeated covering of the memory block can be avoided, and the data synchronization time can be saved.
Further, in this application, after caching the configuration data in the memory pools of the other control nodes, the method further includes:
judging whether the quantity of the cached configuration data reaches a preset threshold value or not; and if so, executing the step of sending a change notification to the target service module according to the service data block corresponding number, the change timestamp and the change sequence number in the configuration data. And if the number of the configuration data corresponding to the same service module is more than one, merging the change notifications of the configuration data corresponding to the same service module, and sending only one change notification to the corresponding service module.
Specifically, all configuration data are cached, and if the number of cached configuration data reaches a certain number of times or reaches a predetermined processing period, a change notification can be sent to the corresponding service module. Moreover, if the application continuously receives the change of the memory blocks in the same service data block, the change is merged, and only one change notification is triggered, so that the condition of malicious attack is avoided. It should be noted that, if a new node joins the cluster, a data block request is sent to the existing node to quickly synchronize the latest configuration data.
It should be noted that, in the present application, data in the memory pool may also be backed up to the ROM or the hard disk. Namely: because the DATA POOL in the application exists in the RAM, the risk of power failure and loss can be caused, and the problem of DATA loss caused by complete extinguishment of cluster nodes can also be caused. The present application may therefore implement a configuration data synchronization mechanism with a ROM or hard disk in a timed or policy-based manner. The synchronization mechanism synchronizes the change to the hard disk according to the change record in the period of time, and also synchronizes the data to be updated which receives the change notification, thereby avoiding data loss caused by cache problems.
In summary, the scheme mainly changes the configuration data synchronization mode from the original event-driven synchronization mode to more universal synchronization based on the memory data block, and only needs to define the service data block corresponding numbers of different service modules and the occupied space of the configuration data of the service modules. The service logic processing is separated from the actual configuration data, and the data synchronization participated by the cluster service logic is reduced to the synchronization among the node configuration data, so that the risk of asynchronous phenomenon of the cluster is reduced. The developer is fully responsible for the logic of the business data block change, and the thought burden of the cluster needing to be considered is reduced.
The following describes a synchronization apparatus provided in an embodiment of the present invention, and the synchronization apparatus described below and the synchronization method described above may be referred to each other.
Referring to fig. 2, an apparatus for synchronizing configuration data according to an embodiment of the present invention includes:
a detection module 100, configured to detect whether there is a change in configuration data of a target service module; the configuration data of each control node is stored in a memory pool of each control node;
a sending module 200, configured to send the changed configuration data to another control node when the configuration data of the target service module is changed, so as to perform configuration data synchronization on the configuration data stored in the memory pool of the other control node through the other control node according to the changed configuration data.
Wherein, this device still includes:
the memory pool dividing module is used for dividing the memory pool applied by the control node into memory blocks by each control node, and each memory block has a unique corresponding memory block corresponding number;
the recording module is used for recording the corresponding relation between the corresponding number of each memory block and the linear address of the memory; the memory pool is created through a macro page mechanism of a kernel and exists in the RAM;
the memory block application module is used for receiving a memory block application from the service module to the memory pool of the control node and receiving a memory block corresponding number and a corresponding memory linear address returned by the memory pool; the memory blocks distributed by the service module form the service data blocks of the service module, and different service data blocks have unique corresponding service data block corresponding numbers.
Wherein, the sending module is specifically configured to: and sending the changed memory block data, the memory block corresponding number of the changed memory block, the service data block corresponding number, the change timestamp and the change serial number to other control nodes.
Wherein the other control nodes include a synchronization module comprising:
a receiving unit, configured to receive the configuration data;
the cache unit is used for caching the configuration data in the memory pools of the other control nodes;
a notification sending unit, configured to send a change notification to the target service module according to the service data block corresponding number, the change timestamp, and the change sequence number in the configuration data;
and a synchronization unit, configured to perform data synchronization on the corresponding memory blocks in the memory pools of the other control nodes by using the changed memory block data and the memory block corresponding number of the changed memory block in the configuration data when the returned result of the target service module is that the change is required.
Wherein, other control nodes still include:
the judging module is used for judging whether the quantity of the cached configuration data reaches a preset threshold value or not;
and if so, triggering the notification sending unit to send a change notification to the target service module according to the service data block corresponding number, the change timestamp and the change sequence number in the configuration data.
If the number of the configuration data corresponding to the same service module is more than one, the notification sending unit merges the change notifications of the configuration data corresponding to the same service module and only sends one change notification to the corresponding service module.
The device also comprises a backup module for backing up the data in the memory pool to the ROM or the hard disk.
Referring to fig. 3, an embodiment of the present invention further discloses an electronic device, including:
a memory for storing a computer program;
a processor for implementing the steps of the configuration data synchronization method according to the above method embodiments when executing the computer program.
In this embodiment, the device may be a PC (Personal Computer), or may be a terminal device such as a smart phone, a tablet Computer, a palmtop Computer, or a portable Computer.
The device may include a memory 11, a processor 12, and a bus 13.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the device, e.g. a hard disk of the device. The memory 11 may also be an external storage device of the device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the device. Further, the memory 11 may also include both an internal storage unit of the device and an external storage device. The memory 11 may be used not only to store application software installed in the device and various kinds of data such as program codes for performing a synchronization method, etc., but also to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as program codes for executing a synchronization method.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 3, but this does not mean only one bus or one type of bus.
Further, the device may further include a network interface 14, and the network interface 14 may optionally include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are generally used to establish a communication connection between the device and other electronic devices.
Optionally, the device may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the device and for displaying a visualized user interface.
Fig. 3 shows only the device with the components 11-14, and it will be understood by those skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the device, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
The embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the configuration data synchronization method of the embodiment of the method are realized.
Wherein the 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.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. 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 invention. Thus, the present invention 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 (7)
1. A method for synchronizing configuration data, comprising:
each control node divides a memory pool applied by the control node into memory blocks, each memory block has a unique corresponding memory block corresponding number, and the corresponding relation between each memory block corresponding number and a memory linear address is recorded; the memory pool is created through a macro page mechanism of a kernel and exists in the RAM;
the service module applies for the memory block from the memory pool of the control node and receives a memory block corresponding number and a corresponding memory linear address returned by the memory pool; the memory blocks distributed by the service module form service data blocks of the service module, and different service data blocks have unique corresponding numbers of the service data blocks;
detecting whether the configuration data of the target business module is changed or not; the configuration data of each control node is stored in a memory pool of each control node;
if so, sending the changed configuration data to other control nodes so as to synchronize the configuration data stored in the memory pools of the other control nodes through the other control nodes according to the changed configuration data;
wherein the sending the changed configuration data to other control nodes includes: sending the changed memory block data, the memory block corresponding number of the changed memory block, the service data block corresponding number, the change timestamp and the change serial number to other control nodes;
wherein the other control nodes perform configuration data synchronization on the configuration data stored in the memory pools of the other control nodes according to the changed configuration data, and the method includes:
the other control node receives the configuration data;
caching the configuration data in the memory pools of other control nodes, and sending a change notification to the target service module according to the service data block corresponding number, the change timestamp and the change serial number in the configuration data;
and if the returned result of the target service module is that the data needs to be changed, performing data synchronization on the corresponding memory blocks in the memory pools of the other control nodes by using the changed memory block data and the memory block corresponding numbers of the changed memory blocks in the configuration data.
2. The method according to claim 1, wherein after caching the configuration data in the memory pools of the other control nodes, the method further comprises:
judging whether the quantity of the cached configuration data reaches a preset threshold value or not;
and if so, executing the step of sending a change notification to the target service module according to the service data block corresponding number, the change timestamp and the change sequence number in the configuration data.
3. The method according to claim 2, wherein when sending a change notification to the target service module according to the service data block corresponding number, the change timestamp, and the change sequence number in the configuration data, the method further comprises:
and if the quantity of the configuration data corresponding to the same service module is more than one, merging the change notifications of the configuration data corresponding to the same service module, and only sending one change notification to the corresponding service module.
4. The configuration data synchronization method according to any one of claims 1 to 3, further comprising: and backing up the data in the memory pool to a ROM or a hard disk.
5. A configuration data synchronization apparatus, comprising:
the detection module is used for detecting whether the configuration data of the target service module is changed; the configuration data of each control node is stored in a memory pool of each control node;
the sending module is used for sending the changed configuration data to other control nodes when the configuration data of the target service module is changed, so that the configuration data stored in the memory pools of the other control nodes are synchronized through the other control nodes according to the changed configuration data;
the memory pool dividing module is used for dividing the memory pool applied by the control node into memory blocks by each control node, and each memory block has a unique corresponding memory block corresponding number;
the recording module is used for recording the corresponding relation between the corresponding number of each memory block and the linear address of the memory; the memory pool is created through a macro page mechanism of a kernel and exists in the RAM;
the memory block application module is used for receiving a memory block application from the service module to the memory pool of the control node and receiving a memory block corresponding number and a corresponding memory linear address returned by the memory pool; the memory blocks distributed by the service module form service data blocks of the service module, and different service data blocks have unique corresponding service data block corresponding numbers;
wherein, the sending module is specifically configured to: sending the changed memory block data, the memory block corresponding number of the changed memory block, the service data block corresponding number, the change timestamp and the change serial number to other control nodes;
wherein the other control nodes include a synchronization module comprising:
a receiving unit configured to receive the configuration data;
the cache unit is used for caching the configuration data in the memory pools of the other control nodes;
a notification sending unit, configured to send a change notification to the target service module according to the service data block corresponding number, the change timestamp, and the change sequence number in the configuration data;
and a synchronization unit, configured to perform data synchronization on the corresponding memory blocks in the memory pools of the other control nodes by using the changed memory block data and the memory block corresponding number of the changed memory block in the configuration data when the returned result of the target service module is that the change is required.
6. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the configuration data synchronization method according to any one of claims 1 to 4 when executing said computer program.
7. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the configuration data synchronization method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010470865.XA CN111628895B (en) | 2020-05-28 | 2020-05-28 | Configuration data synchronization method, device, equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010470865.XA CN111628895B (en) | 2020-05-28 | 2020-05-28 | Configuration data synchronization method, device, equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111628895A CN111628895A (en) | 2020-09-04 |
CN111628895B true CN111628895B (en) | 2022-06-17 |
Family
ID=72260845
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010470865.XA Active CN111628895B (en) | 2020-05-28 | 2020-05-28 | Configuration data synchronization method, device, equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111628895B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114650224B (en) * | 2020-12-21 | 2023-06-30 | 北京金山云网络技术有限公司 | Configuration method, device, electronic equipment and system of node function |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106528574A (en) * | 2015-09-14 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Data synchronization method and device |
CN109167810A (en) * | 2018-07-27 | 2019-01-08 | 阿里巴巴集团控股有限公司 | Monitoring, notice, method for refreshing and device calculate equipment and storage medium |
CN109586948A (en) * | 2018-10-16 | 2019-04-05 | 深圳壹账通智能科技有限公司 | Update method, apparatus, computer equipment and the storage medium of system configuration data |
CN109729129A (en) * | 2017-10-31 | 2019-05-07 | 华为技术有限公司 | Configuration modification method, storage cluster and the computer system of storage cluster |
CN110601868A (en) * | 2018-06-13 | 2019-12-20 | 阿里巴巴集团控股有限公司 | Distributed system, method and electronic equipment for distributing configuration information in real time |
-
2020
- 2020-05-28 CN CN202010470865.XA patent/CN111628895B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106528574A (en) * | 2015-09-14 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Data synchronization method and device |
CN109729129A (en) * | 2017-10-31 | 2019-05-07 | 华为技术有限公司 | Configuration modification method, storage cluster and the computer system of storage cluster |
CN110601868A (en) * | 2018-06-13 | 2019-12-20 | 阿里巴巴集团控股有限公司 | Distributed system, method and electronic equipment for distributing configuration information in real time |
CN109167810A (en) * | 2018-07-27 | 2019-01-08 | 阿里巴巴集团控股有限公司 | Monitoring, notice, method for refreshing and device calculate equipment and storage medium |
CN109586948A (en) * | 2018-10-16 | 2019-04-05 | 深圳壹账通智能科技有限公司 | Update method, apparatus, computer equipment and the storage medium of system configuration data |
Also Published As
Publication number | Publication date |
---|---|
CN111628895A (en) | 2020-09-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11531625B2 (en) | Memory management method and apparatus | |
US10929942B2 (en) | Screen capture method, terminal, and storage medium employing both parent application program and sub-application program | |
US11397648B2 (en) | Virtual machine recovery method and virtual machine management device | |
EP2840495B1 (en) | Container-based processing method and apparatus | |
CN104737137A (en) | Method and apparatus for compressing memory of electronic device | |
CN105874428B (en) | Technology for the operating system transformation in multiple operating system environments | |
CN102027453B (en) | System and method for optimizing interrupt processing in virtualized environments | |
CN107665098B (en) | Information processing method, storage device, and computer storage medium | |
US20200218573A1 (en) | Memory management method, electronic apparatus, and storage device | |
CN113778662B (en) | Memory recovery method and device | |
CN112051970A (en) | Dirty data management for hybrid drives | |
JP2021524104A (en) | Master / Standby Container System Switching | |
CN103218307A (en) | Memory management system and memory management method | |
WO2024007678A1 (en) | Storage space arrangement method and electronic device | |
EP4044015A1 (en) | Data processing method and apparatus | |
CN107408073B (en) | Reducing memory commit overhead using memory compression | |
CN111628895B (en) | Configuration data synchronization method, device, equipment and readable storage medium | |
CN109933435B (en) | Control method and device and computer equipment | |
CN111078407B (en) | Memory management method and device, storage medium and electronic equipment | |
CN116089049B (en) | Asynchronous parallel I/O request-based process synchronous scheduling method, device and equipment | |
CN115587049A (en) | Memory recovery method and device, electronic equipment and storage medium | |
CN109426563B (en) | Process management method and device | |
CN101008908B (en) | Synchronous data copy system and method | |
CN114328007B (en) | Container backup and restoration method, device and medium thereof | |
CN114860380A (en) | Data synchronization method and device, electronic equipment and computer readable storage medium |
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 |