Pre-write log-based configuration parameter synchronization method and storage medium

By writing configuration parameters to a write-ahead log and synchronizing them to slave nodes through the master node, the problem of cumbersome configuration parameter modification in database clusters is solved, achieving efficient and reliable configuration parameter synchronization and reducing the error rate.

CN117312450BActive Publication Date: 2025-11-07CETC JINCANG (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311270661.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2025-11-07
Estimated Expiration
2043-09-27

AI Technical Summary

Technical Problem

In database clusters, modifying configuration parameters is cumbersome and prone to errors, especially when there are many nodes, which increases the workload and makes it easy to make mistakes.

Method used

The master node writes configuration parameters to a write-ahead log and synchronizes them to the slave nodes, updating the slave nodes' configuration parameters through the write-ahead log.

Benefits of technology

It improves the efficiency of modifying configuration parameters, reduces the error rate, ensures the consistency of configuration parameters across nodes, and enhances the reliability and security of the database cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312450B_ABST
    Figure CN117312450B_ABST
Patent Text Reader

Abstract

The application provides a pre-write log-based configuration parameter synchronization method and a storage medium, which comprises the following steps: when a master node meets a preset condition, the master node writes a configuration parameter into a first pre-write log and synchronizes the first pre-write log to a slave node; and when the slave node receives the first pre-write log, the slave node updates the configuration parameter according to the first pre-write log. According to the application, the master node writes the configuration parameter into the pre-write log and synchronizes the pre-write log to the slave node, so that each slave node can be updated according to the first pre-write log synchronization, thereby solving the problem of complicated modification of configuration parameters in a database cluster and achieving the purpose of improving work efficiency. Moreover, since the modification of the configuration parameters on each slave node can be synchronized, even if there are multiple nodes in the database cluster, the problem of increased workload will not occur, and the phenomenon of errors in the modification of the configuration parameters is reduced, and the error rate of the modification is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of database cluster, in particular to a pre-write log-based configuration parameter synchronization method and a storage medium. BACKGROUND

[0002] At present, in a database, configuration parameters are used for global parameter configuration, for controlling database behaviors, such as security, performance and other purposes. In the prior art, configuration parameters are input and implemented on a single database, and when the configuration parameters are modified, only the single database is effective. In a database cluster, there are multiple nodes, each of which is a database. In order to ensure the synchronization of configuration parameters of each node, when the configuration parameters of one of the databases are modified, the configuration parameters of other nodes also need to be modified one by one. This will cause the problem of complicated modification of configuration parameters of the database cluster. Moreover, when the number of nodes in the database cluster increases, the workload of modifying the configuration parameters of each node increases, and the error rate of modifying the configuration parameters also increases. SUMMARY

[0003] In view of the above problems, the present application is proposed to provide a pre-write log-based configuration parameter synchronization method and a storage medium which can overcome the above problems or at least partially solve the above problems, and can solve the problem of complicated modification of configuration parameters in a database cluster, and achieve the purpose of improving work efficiency.

[0004] Specifically, the present application provides a pre-write log-based configuration parameter synchronization method, comprising:

[0005] When the master node meets a preset condition, the master node writes configuration parameters into a first pre-write log, and synchronizes the first pre-write log to a slave node.

[0006] When the slave node receives the first pre-write log, the slave node updates configuration parameters according to the first pre-write log.

[0007] Optionally, the preset condition includes starting of the master node.

[0008] The master node writes configuration parameters into a first pre-write log, comprising:

[0009] All configuration parameters registered to a parameter table or a parameter file in the master node are written into the first pre-write log.

[0010] Optionally, after the first pre-write log is synchronized to the slave node, the pre-write log-based configuration parameter synchronization method further comprises:

[0011] write the preset taking-effect instruction into a second pre-write log and synchronize the second pre-write log to the slave node;

[0012] The slave node updates the configuration parameter according to the first pre-write log, including:

[0013] When the preset taking-effect instruction is parsed from the second pre-write log received by the slave node, the configuration parameter of the slave node is updated.

[0014] Optionally, the slave node updates the configuration parameter according to the first pre-write log, including:

[0015] It is judged whether the configuration parameter of the slave node is consistent with the configuration parameter in the first pre-write log;

[0016] If not, the configuration parameter of the slave node is updated.

[0017] Optionally, the preset condition includes that the master node is in a running state and a configuration parameter is modified.

[0018] The master node writes the configuration parameter into the first pre-write log, including:

[0019] The master node writes the modified configuration parameter into the first pre-write log.

[0020] Optionally, after the first pre-write log is synchronized to the slave node, the configuration parameter synchronization method based on the pre-write log further includes:

[0021] The master node judges whether the modified configuration parameter needs to be taken effect;

[0022] If yes, the master node takes effect of the modified configuration parameter, writes a preset taking-effect instruction into a second pre-write log, and synchronizes the second pre-write log to the slave node;

[0023] When the preset taking-effect instruction is parsed from the second pre-write log received by the slave node, the corresponding configuration parameter is updated.

[0024] Optionally, the slave node updates the configuration parameter according to the first pre-write log, including:

[0025] The slave node judges whether the configuration parameter in the first pre-write log is consistent with the corresponding configuration parameter of the slave node;

[0026] If not, the corresponding configuration parameter of the slave node is updated.

[0027] Optionally, the master node writes the configuration parameter into the first pre-write log, including:

[0028] The master node obtains the configuration parameter according to a use scenario, and records the configuration parameter in the first pre-write log by using a parameter table or a parameter file.

[0029] Optionally, the master node writes the configuration parameter into the first pre-write log, including:

[0030] The master node writes an identifier of the configuration parameter into the first pre-write log, and the identifier includes a modification type of the configuration parameter and a parameter effective instruction.

[0031] According to another aspect of the present application, there is also provided a machine readable storage medium having stored thereon a machine executable program which, when executed by a processor, implements any of the above-mentioned pre-write log based configuration parameter synchronization methods.

[0032] In the pre-write log based configuration parameter synchronization method of the present application, the master node writes the configuration parameter into the first pre-write log, and then synchronizes the first pre-write log to the slave node, and the slave node updates the configuration parameter according to the synchronized pre-write log. Compared with the prior art in which each node modifies the configuration parameter independently when synchronizing the configuration parameter of the database cluster, the present application allows the master node to write the configuration parameter into the pre-write log and synchronize the pre-write log to the slave node, so that each slave node can be updated according to the first pre-write log synchronization, thereby solving the problem of complicated modification of the configuration parameter in the database cluster and achieving the purpose of improving work efficiency. Moreover, since the modification of the configuration parameter on each slave node can be synchronized, even if there are multiple nodes in the database cluster, the problem of increased workload will not occur, and the phenomenon of error in modification of the configuration parameter is also reduced, thereby reducing the error rate of modification.

[0033] The above and other objects, advantages and features of the present application will become more apparent from the following detailed description of some embodiments thereof, when taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0034] Some specific embodiments of the present application will be described in detail below with reference to the accompanying drawings, which are presented by way of illustration and not of limitation. Like reference numerals designate like parts or portions throughout the drawings. It should be understood that these drawings are not necessarily to scale. In the drawings:

[0035] Figure 1 is a schematic flow chart of a pre-write log based configuration parameter synchronization method according to an embodiment of the present application;

[0036] Figure 2is a schematic flow chart of a method for synchronizing configuration parameters based on prewritten logs when a master node is started according to an embodiment of the present application;

[0037] Figure 3 is a schematic flow chart of judging whether all configuration parameters of a slave node are consistent with configuration parameters in a first prewritten log according to an embodiment of the present application;

[0038] Figure 4 is a schematic flow chart of a method for synchronizing configuration parameters based on prewritten logs when a master node is running and configuration parameters are modified according to an embodiment of the present application;

[0039] Figure 5 is a schematic flow chart of judging whether configuration parameters in a first prewritten log are consistent with corresponding configuration parameters of a slave node according to an embodiment of the present application;

[0040] Figure 6 is a schematic structural diagram of a machine readable storage medium according to an embodiment of the present application. DETAILED DESCRIPTION

[0041] The method for synchronizing configuration parameters based on prewritten logs and the storage medium according to embodiments of the present application will be described below with reference to Figures 1 to 6 In the description of the embodiments of the present application, it should be understood that the terms "first", "second" are used only for the purpose of description, and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features, i.e. one or more of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example two, three, etc., unless otherwise specifically limited. When a certain feature "includes or contains" a certain or certain features, unless otherwise specifically described, it indicates that other features are not excluded and can further include other features.

[0042] In the description of the embodiments of the present application, the description of the terms "one embodiment", "some embodiments", "an exemplary embodiment", "an example", "a specific example", or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the exemplary description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0043] Figure 1is a schematic flow chart of a pre-write log based configuration parameter synchronization method according to an embodiment of the present application, which is applicable to a database cluster in which a master node and a slave node are arranged, and when a configuration parameter is modified, the configuration parameter is first modified on the master node, and then the modification of the configuration parameter is synchronized from the master node to the slave node.

[0044] As shown in Figure 1 The present application provides a pre-write log based configuration parameter synchronization method, which comprises the following steps:

[0045] Step S100: When the master node meets a preset condition, the master node writes the configuration parameter into a first pre-write log, and synchronizes the first pre-write log to the slave node.

[0046] Step S101: When the slave node receives the first pre-write log, the slave node updates the configuration parameter according to the first pre-write log.

[0047] Preferably, the preset condition is that the master node is started, or the preset condition is that the master node is in a running state and the configuration parameter is modified.

[0048] For example, when the master node meets the condition that the master node is started, the master node writes the configuration parameter into a first pre-write log, and then synchronizes the first pre-write log to each slave node in the database cluster. After the slave node receives the first pre-write log, the slave node updates the configuration parameter corresponding to the slave node according to the configuration parameter in the first pre-write log.

[0049] Through the configuration parameter synchronization method of the present embodiment, compared with the prior art in which each node modifies the configuration parameter independently when the configuration parameter of the database cluster is synchronized, the master node writes the configuration parameter into the pre-write log and synchronizes it to the slave node, so that each slave node can be updated according to the first pre-write log synchronization, thereby solving the problem of complicated modification of the configuration parameter in the database cluster, and achieving the purpose of improving work efficiency. Moreover, since the modification of the configuration parameter on each slave node can be synchronized, even if there are multiple nodes in the database cluster, the problem of increased workload will not occur, and the phenomenon of errors in the modification of the configuration parameter is also reduced, thereby reducing the error rate of the modification.

[0050] In some embodiments of the present application, the preset condition includes that the master node is started; and the master node writes the configuration parameter into the first pre-write log, which comprises writing all the configuration parameters registered in the parameter table or the parameter file in the master node into the first pre-write log.

[0051] In the embodiment, the preset condition in step S100 is that the master node is started, and the master node writes the configuration parameters into the first prewritten log, including writing all the configuration parameters registered in the parameter table or the parameter file in the master node into the first prewritten log, so that the configuration parameters of each slave node are compared with the configuration parameters in the first prewritten log, and the inconsistent configuration parameters in each slave node are changed.

[0052] By the configuration parameter synchronization method, when the master node is started, all the configuration parameters registered in the parameter table or the parameter file in the master node are written into the first prewritten log, so that the configuration parameters of each slave node of the database cluster are all updated, the configuration parameters of the database cluster are kept consistent, the inconsistent situation between the configuration parameters of the slave node and the configuration parameters of the master node is avoided, and the problem of failure of the database cluster during operation is avoided, and the reliability of the database cluster is improved.

[0053] In some embodiments of the application, the preset condition is that the master node is started, and after the master node synchronizes the first prewritten log to the slave node, the configuration parameter synchronization method based on the prewritten log further includes:

[0054] The master node writes a preset effective instruction into the second prewritten log and synchronizes the second prewritten log to the slave node.

[0055] Correspondingly, the slave node updates the configuration parameters according to the first prewritten log, including updating the configuration parameters of the slave node when the preset effective instruction is parsed from the second prewritten log received by the slave node.

[0056] The application mode of the embodiment is as shown in Figure 2 The dashed box 100 is the step executed by the master node, and the dashed box 200 is the step executed by the slave node; after the master node is started, the configuration parameter synchronization method based on the prewritten log includes the following steps:

[0057] Step S1: After the master node is started, the master node acquires the configuration parameters to be synchronized.

[0058] Step S2: The master node writes the configuration parameters into the first prewritten log and synchronizes the first prewritten log to the slave node.

[0059] Step S3: The slave node receives the first prewritten log.

[0060] Step S4: The slave node parses the configuration parameters in the first prewritten log.

[0061] Step S5: The slave node updates the configuration parameters.

[0062] Step S6: The master node determines whether the configuration parameters are written completely. If yes, step S7 is performed; if no, step S2 is performed.

[0063] Step S7: The master node writes the preset taking effect instruction into the second pre-write log and synchronizes the second pre-write log to the slave node.

[0064] Step S8: The slave node receives the second pre-write log.

[0065] Step S9: The slave node parses the preset taking effect instruction in the second pre-write log.

[0066] Step S10: The slave node executes the preset taking effect instruction to make all the configuration parameters in the slave node take effect.

[0067] In the embodiment, the slave node performs step S3 simultaneously when the master node performs step S2; and the master node performs step S6.

[0068] Through the configuration parameter synchronization method, after the master node completes writing all the configuration parameters registered in the parameter table or the parameter file into the first pre-write log, the master node writes the preset taking effect instruction into the second pre-write log and synchronizes the second pre-write log to the slave node, so that the slave node updates the configuration parameters according to the second pre-write log, that is, changes the state of the configuration parameters of the slave node, and makes the configuration parameters of the slave node take effect instantly, and further makes the database cluster put into use quickly.

[0069] In some embodiments of the present application, as shown in Figure 3 The preset condition is that the master node is started, and the slave node updates the configuration parameters according to the first pre-write log, including the following steps:

[0070] Step S299: The slave node acquires the configuration parameters in the first pre-write log and all the configuration parameters in the slave node.

[0071] Step S300: The slave node determines whether all the configuration parameters in the slave node are consistent with the configuration parameters in the first pre-write log. If no, step S301 is performed; if yes, step S302 is performed.

[0072] Step S301: The configuration parameters of the slave node are updated.

[0073] Step S302: The configuration parameters of the slave node remain unchanged.

[0074] By the configuration parameter synchronization method in the embodiment, when the master node is started, the values of all configuration parameters of the slave nodes are compared with the values of the corresponding configuration parameters in the first prewrite log, and the values are updated, so that the values of the configuration parameters of the master node are consistent with the values of the configuration parameters of each slave node, the problem of failure of the database cluster due to inconsistent values of the configuration parameters during running of the database cluster is avoided, and the reliability of the database cluster is improved.

[0075] In some embodiments of the application, the preset condition includes that the master node is in a running state and a configuration parameter is modified; and the writing of the configuration parameter into the first prewrite log by the master node includes: writing the modified configuration parameter into the first prewrite log by the master node.

[0076] In the embodiment, when the preset condition in step S100 is that the master node is in a running state and a configuration parameter is modified, the master node writes the modified configuration parameter into the first prewrite log, so that the master node synchronizes the configuration parameter that needs to be modified to each slave node through the first prewrite log.

[0077] By the configuration parameter synchronization method in the embodiment, when the master node is in a running state and part of the configuration parameters of the slave nodes need to be modified, the master node synchronizes the configuration parameters that need to be modified to each slave node through the first prewrite log; instead of synchronizing all configuration parameters registered in the parameter table or the parameter file in the master node to each slave node through the first prewrite log, the number of configuration parameters synchronized in the first prewrite log is reduced, and the time for modifying the configuration parameters by the slave nodes is saved, and the working efficiency of the slave nodes in modifying the configuration parameters is improved.

[0078] In some embodiments of the application, the preset condition is that the master node is in a running state and a configuration parameter is modified, and after the master node synchronizes the first prewrite log to the slave node, the configuration parameter synchronization method based on the prewrite log further includes:

[0079] The master node determines whether the modified configuration parameter needs to be validated.

[0080] If yes, the master node validates the modified configuration parameter, writes a preset validation instruction into the second prewrite log, and synchronizes the second prewrite log to the slave node.

[0081] When the preset validation instruction is parsed from the second prewrite log received by the slave node, the corresponding configuration parameter is updated.

[0082] The application mode of the embodiment is as shown in Figure 4 The dashed box 100 is the step executed by the master node, and the dashed box 200 is the step executed by the slave node; when the master node is running, the configuration parameter synchronization method based on the prewrite log includes the following steps:

[0083] Step S21: In the process of running the master node, it is judged whether the master node has a configuration parameter modified; if yes, step S22 is executed.

[0084] Step S22: The master node acquires the modified configuration parameter.

[0085] Step S23: The master node writes the modified configuration parameter into the first prewrite log, and synchronizes the first prewrite log to the slave node.

[0086] Step S24: The slave node receives the first prewrite log.

[0087] Step S25: The slave node parses the configuration parameter in the first prewrite log.

[0088] Step S26: The slave node updates the configuration parameter.

[0089] Step S27: The master node determines whether to make the configuration parameter effective; if yes, step S28 is executed.

[0090] Step S28: The master node writes a preset effective instruction into the second prewrite log, and synchronizes the second prewrite log to the slave node.

[0091] Step S29: The slave node receives the second prewrite log.

[0092] Step S30: The slave node parses the preset effective instruction in the second prewrite log.

[0093] Step S31: The slave node executes the preset effective instruction to make the modified configuration parameter in the slave node effective.

[0094] Through the configuration parameter synchronization method of the embodiment, when the master node is in a running state and the master node has a configuration parameter modified, the master node judges whether to make the modified configuration parameter in each slave node effective, so as to confirm again whether the modified configuration parameter in each slave node needs to be applied.

[0095] Alternatively, when the master node is in a running state and the master node has a configuration parameter modified, the master node judges whether to make the modified configuration parameter in the master node and each slave node effective, so as to confirm again whether the modified configuration parameter in the master node and each slave node needs to be applied.

[0096] The above two judgment methods avoid the problem that when the modified configuration parameter in the slave node is wrong and the modified configuration parameter is immediately effective, the database cluster appears a fault, thereby improving the security of the running of the database cluster.

[0097] In some embodiments of the present application, as Figure 5As shown, the preset condition is that the master node is in a running state and a configuration parameter is modified, and the slave node updates the configuration parameter according to the first write-ahead log, including the following steps:

[0098] Step S400: The slave node acquires the configuration parameter in the first write-ahead log and the corresponding configuration parameter of the slave node.

[0099] Step S401: The slave node determines whether the configuration parameter in the first write-ahead log is consistent with the corresponding configuration parameter of the slave node. If not, step S402 is performed; if yes, step S403 is performed.

[0100] Step S402: The corresponding configuration parameter of the slave node is updated.

[0101] Step S403: The configuration parameter of the slave node remains unchanged.

[0102] According to the configuration parameter synchronization method, the configuration parameter of the slave node is changed according to the configuration parameter in the first write-ahead log, so that the configuration parameter of the slave node is consistent with the configuration parameter of the master node, thereby avoiding the problem of failure of the database cluster due to inconsistent configuration parameters during operation, and improving the security and reliability of the operation of the database cluster.

[0103] In some embodiments of the present application, the master node writes the configuration parameter into the first write-ahead log, including: the master node acquires the configuration parameter according to the use scenario, and records the configuration parameter in the first write-ahead log by using a parameter table or a parameter file.

[0104] In this embodiment, when the use scenario is the start of the master node, all configuration parameters in the master node are acquired, and then all are registered in the parameter table or the parameter file, and then the configuration parameter is recorded in the first write-ahead log according to the parameter table or the parameter file in the master node, so as to update the configuration parameters of all slave nodes in the database cluster, so that the configuration parameters of the database cluster are consistent.

[0105] Alternatively, when the use scenario is the operation of the database cluster, the master node is in a running state and a configuration parameter is modified, the parameter table or the parameter file corresponding to the configuration parameter is modified in the master node, and then the master node records the modified configuration parameter into the first write-ahead log according to the parameter table or the parameter file, so as to update the corresponding configuration parameter in each slave node, so that the configuration parameters of the database cluster are consistent.

[0106] Through the configuration parameter synchronization method, the user can set the effective time according to actual conditions in the master node, and the master node writes the preset effective instruction into the second prewritten log and synchronizes the second prewritten log to the slave node in a timing manner, so that the modified configuration parameter in the slave node is effective in a timing manner, and the controllability of the effective of the modified configuration parameter in the slave node is improved.

[0107] In some embodiments of the application, the configuration parameter structure recorded in the parameter table or parameter file in the master node is shown in Table 1.

[0108] Table 1

[0109] Name ]]> ​ <![CDATA[ Parameter class ]]> Explanation ]]> ​

[0110] In one recording mode, the name is the name of the configuration parameter, the parameter type is the type of the configuration parameter, and the description is other content of the configuration parameter, such as the parameter value of the configuration parameter, whether it is modified, and the like.

[0111] In some embodiments of the application, the master node writes the configuration parameter into the first prewritten log, including the master node writing the identification of the configuration parameter into the first prewritten log, and the identification including the modification type of the configuration parameter and the parameter effective instruction.

[0112] In this embodiment, the information of the configuration parameter written into the first prewritten log includes the identification, the parameter name and the parameter value. The identification includes the modification type of the configuration parameter and the parameter effective instruction, wherein the modification type can be deletion, addition or modification; the parameter name is the name of the modified configuration parameter; and the parameter value is the value of the modified configuration parameter.

[0113] When the master node synchronizes the configuration parameter to the slave node through the first prewritten log, the information of the configuration parameter recorded in the first prewritten log includes the modification type and the parameter effective instruction. In this embodiment, when the slave node receives the first prewritten log, the identification of the configuration parameter is obtained from the first prewritten log, and then the modification type and the parameter effective instruction of the configuration parameter are obtained from the identification, and the corresponding configuration parameter of the slave node is modified according to the modification type of the configuration parameter. When the slave node parses the preset effective instruction from the received second prewritten log, the preset effective instruction can be compared with the parameter effective instruction in the identification of the configuration parameter to determine whether they are consistent; if they are consistent, the modified configuration parameter is effective in the slave node, so as to realize the update of the configuration parameter in the slave node.

[0114] According to the configuration parameter synchronization method of the embodiment, the slave node determines the modification type and parameter taking effect instruction of the configuration parameter according to the corresponding information of the identification of the configuration parameter in the pre-write log record, so as to facilitate the slave node to make corresponding modification to the configuration parameter and make the modified configuration parameter take effect, thereby improving the reliability of the configuration parameter modification. Further, the user can set the preset taking effect instruction in the second pre-write log according to the parameter taking effect instruction of the configuration parameter, and select to make the modified configuration parameter partially take effect, so as to improve the controllability of the configuration parameter update on the slave node.

[0115] The application also provides a machine readable storage medium. Figure 6 Fig. 4 is a schematic diagram of a machine readable storage medium 40 according to an embodiment of the application, the machine readable storage medium 40 storing a machine executable program 41 thereon, the machine executable program 41 being executed by a processor to implement the pre-write log based configuration parameter synchronization method of any of the above embodiments.

[0116] It should be noted that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a list of executable instructions for implementing logic functions, and can be specifically embodied in any machine readable storage medium for use by or in connection with an instruction execution system, apparatus or device, such as a computer-based system, a system including a processor or other system that can fetch the instructions from the instruction execution system, apparatus or device and execute the instructions, or in conjunction with these instruction execution systems, apparatus or devices.

[0117] For the description of the embodiment, the machine readable storage medium 40 can be any device that can contain, store, communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device, or in conjunction with these instruction execution systems, apparatus or devices. More specific examples (non-exhaustive list) of computer readable medium include the following: electrical connections having one or more wires (electronic devices), portable computer disk cartridges (magnetic devices), random access memories (RAM), read only memories (ROM), erasable programmable read only memories (EPROM or flash memory), fiber optic devices, and portable compact disk read only memories (CDROM). In addition, the computer readable medium 40 can even be paper or other suitable medium on which the program can be printed, because the program can be electronically obtained, for example, by optical scanning of the paper or other medium, followed by electronic conversion, interpretation or processing, if necessary, in other suitable manner, and then stored in a computer memory.

[0118] It should be understood that parts of the application can be realized by hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be realized by software or firmware stored in a memory and executed by a suitable instruction execution system.

[0119] The processor can be connected through the system interconnect (e.g., PCI, PCI-Express, etc.) to an I / O interface (input / output interface) adapted to connect the computer device to one or more I / O devices (input / output devices). The I / O devices can include, for example, a keyboard and a pointing device, where the pointing device can include a touchpad or a touchscreen, etc. The I / O devices can be built-in components of the computer device 50, or can be devices externally connected to the computing device.

[0120] The processor can also be linked through the system interconnect to a display interface adapted to connect the computer device to a display device. The display device can include a display screen that is a built-in component of the computer device. The display device can also include a computer monitor, a television, or a projector, etc. that is externally connected to the computer device. Further, a network interface controller (NIC) can be adapted to connect the computer device to a network through the system interconnect. In some embodiments, the NIC can use any suitable interface or protocol (such as Internet Small Computer System Interface, etc.) to transfer data. The network can be a cellular network, a radio network, a wide area network (WAN), a local area network (LAN), or the Internet, etc. Remote devices can be connected to the computing device through the network.

[0121] The flowcharts provided in the embodiments are not intended to indicate that the operations of the methods will be executed in any particular order, or that all of the operations included in the methods will be included in every implementation of the methods. Additionally, the methods can include additional operations. Additional changes can be made to the above-described methods within the scope of the technical ideas provided by the embodiments.

[0122] Up to now, those skilled in the art should recognize that, although the multiple exemplary embodiments of the present application have been shown and described in detail herein, many other variations and modifications that do not depart from the spirit and scope of the present application can be directly determined or deduced from the disclosure of the present application according to the technical ideas provided by the embodiments. Therefore, the scope of the present application should be understood and recognized as covering all such other variations or modifications.

Claims

1. A method for pre-write log-based configuration parameter synchronization, characterized in that, The method comprises the steps of: When the master node meets a preset condition, the master node writes a configuration parameter into a first pre-write log and synchronizes the first pre-write log to a slave node; wherein the master node writes an identifier of the configuration parameter into the first pre-write log, and the identifier comprises a modification type of the configuration parameter and a parameter taking effect instruction; When the slave node receives the first pre-write log, the slave node updates the configuration parameter according to the first pre-write log; The preset condition comprises that the master node is in a running state and a configuration parameter is modified. The master node writes the configuration parameter into the first pre-write log, comprising the steps of: The master node writes the modified configuration parameter into the first pre-write log; After the first pre-write log is synchronized to the slave node, the method further comprises the steps of: The master node judges whether the modified configuration parameter needs to be taken effect; If yes, the master node takes effect of the modified configuration parameter, writes a preset taking effect instruction into a second pre-write log, and synchronizes the second pre-write log to the slave node; When the slave node parses the preset taking effect instruction from the second pre-write log, the corresponding configuration parameter is updated.

2. The pre-write log based configuration parameter synchronization method according to claim 1, wherein, The preset condition comprises that the master node is started. The master node writes the configuration parameter into the first pre-write log, comprising the steps of: All configuration parameters registered in a parameter table or a parameter file in the master node are written into the first pre-write log.

3. The pre-write log based configuration parameter synchronization method according to claim 2, wherein, The slave node updates the configuration parameter according to the first pre-write log, comprising the steps of: It is judged whether the configuration parameter of the slave node is consistent with the configuration parameter in the first pre-write log; If no, the configuration parameter of the slave node is updated.

4. The pre-write log based configuration parameter synchronization method according to claim 1, wherein, The slave node updates the configuration parameter according to the first pre-write log, comprising the steps of: The slave node judges whether the configuration parameter in the first pre-write log is consistent with the corresponding configuration parameter of the slave node; If no, the corresponding configuration parameter of the slave node is updated.

5. The pre-write log based configuration parameter synchronization method according to claim 1, wherein, The master node writes the configuration parameter into the first pre-write log, comprising the steps of: The master node acquires the configuration parameter according to a use scenario, and records the configuration parameter in the first pre-write log by using a parameter table or a parameter file. 6.A machine readable storage medium, having stored thereon a machine executable program, the machine executable program being executed by a processor to implement the pre-write log based configuration parameter synchronization method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data synchronization method and device, equipment and storage medium

    CN116226284A

  • Parameter configuration system and method and server

    CN116339853A