CN112261164B - Logic clock synchronization method and device and central time service cluster - Google Patents
Logic clock synchronization method and device and central time service cluster Download PDFInfo
- Publication number
- CN112261164B CN112261164B CN202011524511.5A CN202011524511A CN112261164B CN 112261164 B CN112261164 B CN 112261164B CN 202011524511 A CN202011524511 A CN 202011524511A CN 112261164 B CN112261164 B CN 112261164B
- Authority
- CN
- China
- Prior art keywords
- node
- logic clock
- standby
- main node
- standby node
- 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
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
The embodiment of the invention provides a logic clock synchronization method, a logic clock synchronization device and a central time service cluster, and relates to the technical field of distributed systems. The method is applied to the main node in the central time service cluster of the distributed system, and comprises the following steps: when the push times of the logic clock of the main node are increased by a preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the main node by using an asynchronous replication mode; when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target time length corresponding to the preset forced copying step length, controlling the standby node to copy the logic clock of the main node in a strong synchronous copying mode; and when the copy is successful, updating the recorded logic clock of the standby node into: the master node copies the logical clock to the standby node. Compared with the prior art, the method provided by the embodiment of the invention can avoid blocking tasks in the distributed system, thereby improving the performance of the distributed system.
Description
Technical Field
The invention relates to the technical field of distributed systems, in particular to a logic clock synchronization method and device and a central time service cluster.
Background
Currently, a central time service cluster is usually arranged in a distributed system to realize logic time advance of the distributed system so as to clearly and accurately mark the time sequence among tasks.
The central time service cluster can be provided with a main node and a standby node, so that when the main node fails, the standby node can take over the main node to carry out external time service. In addition, in order to ensure that the standby node takes over the time service from the main node to the outside and can meet the requirement of time non-rollback, the logic clock synchronization requirements of the main node and the standby node exist.
The logic clock synchronization method provided in the related art includes: when the logic clock propulsion times of the main node increase each preset forced replication step length, the logic clock of the main node is replicated to the standby node in a strong synchronous replication mode before responding to the latest received time service request. By the method, after the standby node is boosted, the logic clock provided outwards for the first time is as follows: the logic clock of the standby node adds: the forced copying step length is the time length pushed by the time service request, so that the time can be ensured not to return.
When the master node and the standby node are synchronized, the master node does not respond to the time service request before receiving the confirmation message about forced synchronous replication fed back by the standby node, so that in this case, a task in the distributed system is blocked, and the performance of the distributed system is affected.
Disclosure of Invention
The embodiment of the invention aims to provide a logic clock synchronization method, a logic clock synchronization device and a central time service cluster so as to reduce the blockage of clock synchronization to tasks in a distributed system, thereby improving the performance of the distributed system. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a logic clock synchronization method, which is applied to a master node in a central time service cluster of a distributed system, where the master node records a logic clock of a standby node in the central time service cluster; the method comprises the following steps:
when the pushing times of the logic clock of the main node increases a preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the main node by using an asynchronous replication mode; when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target long time corresponding to the preset forced copying step length, controlling the standby node to copy the logic clock of the main node in a strong synchronous copying mode;
and when the copy is successful, updating the recorded logic clock of the standby node into: the main node is copied to the logic clock of the standby node;
and the asynchronous copying step length is smaller than the forced copying step length, and the target time length is the time length pushed by the time service requests with the quantity of the forced copying step length.
Optionally, in a specific implementation manner, the step of controlling the standby node to copy the logic clock of the master node in an asynchronous copy manner when the number of times of pushing the logic clock of the master node increases by a preset asynchronous copy step length includes:
and when the pushing times of the logic clock of the main node increases a preset asynchronous copying step length, if the difference value between the logic clock of the main node and the recorded logic clock of the standby node does not reach a target time length corresponding to a preset forced copying step length, controlling the standby node to copy the logic clock of the main node by using an asynchronous copying mode.
Optionally, in a specific implementation manner, the step of controlling the standby node to copy the logic clock of the master node in an asynchronous copy manner includes:
sending an asynchronous replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the asynchronous replication instruction, and sends a first confirmation message to the main node;
indicating that the replication was successful upon receiving the first acknowledgement message;
the method further comprises the following steps:
when the push times of the logic clock of the main node are increased by a preset asynchronous copy step length, time is provided to the target party; wherein the target is a sender of a time service request which enables to push the logic clock of the main node for the last time.
Optionally, in a specific implementation manner, the step of controlling the standby node to copy the logic clock of the master node in a manner of strong synchronization copy includes:
sending a strong synchronization replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the strong synchronization replication instruction, and sends a second confirmation message to the main node;
indicating that the replication was successful upon receiving the second acknowledgement message;
the method further comprises the following steps:
after receiving the second confirmation message, time service is carried out to the outside of the target party; wherein the target is a sender of a time service request which enables to push the logic clock of the main node for the last time.
Optionally, in a specific implementation manner, the method further includes:
adding 1 to a count value for recording the advancing times when the logic clock of the main node advances;
after the recorded logic clock of the standby node is updated to the logic clock copied to the standby node by the main node, clearing the count value;
the step of controlling the standby node to copy the logic clock of the main node in an asynchronous copy mode when the push times of the logic clock of the main node increases by a preset asynchronous copy step length includes:
and when the count value is equal to the preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the main node by using an asynchronous replication mode.
The embodiment of the invention provides a central time service cluster applied to a distributed system, wherein the central time service cluster comprises a main node and at least one standby node; the main node stores logic clocks of all standby nodes;
the main node is used for controlling each standby node to copy the logic clock of the main node by using an asynchronous copying mode when the pushing times of the logic clock of the main node increases a preset asynchronous copying step length; when the difference value between the logic clock of the main node and the recorded logic clock of any standby node reaches the target long time corresponding to the preset forced copying step length, controlling the standby node to copy the logic clock of the main node in a strong synchronous copying mode; and when the copy is successful, updating the recorded logic clock of the standby node into: the main node is copied to the logic clock of the standby node; the asynchronous copying step length is smaller than the forced copying step length, and the target time length is the time length pushed by the time service requests of the quantity of the forced copying step length;
any standby node is used for copying the logic clock of the main node to the standby node under the control of the main node.
Optionally, in a specific implementation manner, when the number of times of pushing the logic clock of the master node increases by a preset asynchronous replication step length, the master node controls the standby node to replicate the logic clock of the master node in an asynchronous replication manner, which includes:
and when the pushing times of the logic clock of the main node increases a preset asynchronous copying step length, if the difference value between the logic clock of the main node and the recorded logic clock of the standby node does not reach a target time length corresponding to a preset forced copying step length, controlling the standby node to copy the logic clock of the main node by using an asynchronous copying mode.
Optionally, in a specific implementation manner, the controlling, by the master node, the standby node to copy the logic clock of the master node in an asynchronous copy manner includes:
sending an asynchronous replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the asynchronous replication instruction, and sends a first confirmation message to the main node; indicating that the replication was successful upon receiving the first acknowledgement message;
the main node is also used for giving time to the target party when the pushing times of the logic clock of the main node increases by a preset asynchronous copy step length;
wherein the target is a sender of a time service request which enables to push the logic clock of the main node for the last time.
Optionally, in a specific implementation manner, the step of controlling, by the master node, the standby node to copy the logic clock of the master node in a manner of strong synchronization copy includes:
sending a strong synchronization replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the strong synchronization replication instruction, and sends a second confirmation message to the main node; indicating that the replication was successful upon receiving the second acknowledgement message;
the master node is further used for giving time to the target party after receiving the second confirmation message;
wherein the target is a sender of a time service request which enables to push the logic clock of the main node for the last time.
Optionally, in a specific implementation manner, the master node is further configured to:
adding 1 to a count value for recording the advancing times when the logic clock of the main node advances;
after the recorded logic clock of the standby node is updated to the logic clock copied to the standby node by the main node, clearing the count value;
the method for controlling the standby node to copy the logic clock of the main node by using the asynchronous copying mode when the pushing times of the logic clock of the main node increases by a preset asynchronous copying step length includes the following steps:
and when the count value is equal to the preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the main node by using an asynchronous replication mode.
In a third aspect, an embodiment of the present invention provides a logic clock synchronization apparatus, which is applied to a master node in a central time service cluster of a distributed system, where the master node records a logic clock of a standby node in the central time service cluster; the device comprises:
the asynchronous replication module is used for controlling the standby node to replicate the logic clock of the main node in an asynchronous replication mode when the pushing times of the logic clock of the main node increases a preset asynchronous replication step length;
the forced copying module is used for controlling the standby node to copy the logic clock of the main node in a strong synchronous copying mode when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target long time corresponding to the preset forced copying step length;
a clock updating module, configured to update the recorded logic clock of the standby node to: the main node is copied to the logic clock of the standby node;
and the asynchronous copying step length is smaller than the forced copying step length, and the target time length is the time length pushed by the time service requests with the quantity of the forced copying step length.
Optionally, in a specific implementation manner, the asynchronous replication module is specifically configured to:
and when the pushing times of the logic clock of the main node increases a preset asynchronous copying step length, if the difference value between the logic clock of the main node and the recorded logic clock of the standby node does not reach a target time length corresponding to a preset forced copying step length, controlling the standby node to copy the logic clock of the main node by using an asynchronous copying mode.
Optionally, in a specific implementation manner, the asynchronous replication module is specifically configured to:
sending an asynchronous replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the asynchronous replication instruction, and sends a first confirmation message to the main node; indicating that the replication was successful upon receiving the first acknowledgement message;
the device further comprises:
the first time service module is used for providing time to the target party when the pushing times of the logic clock of the main node increases by a preset asynchronous copy step length; wherein the target is a sender of a time service request which enables to push the logic clock of the main node for the last time.
Optionally, in a specific implementation manner, the forced replication module is specifically configured to:
sending a strong synchronization replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the strong synchronization replication instruction, and sends a second confirmation message to the main node; indicating that the replication was successful upon receiving the second acknowledgement message;
the device further comprises:
the second time service module is used for carrying out time service to the outside of the target party after receiving the second confirmation message; wherein the target is a sender of a time service request which enables to push the logic clock of the main node for the last time.
Optionally, in a specific implementation manner, the apparatus further includes:
the counting updating module is used for adding 1 to a counting value used for recording the advancing times when the logic clock of the main node advances;
the count zero clearing module is used for resetting the count value after the recorded logic clock of the standby node is updated to the logic clock copied to the standby node by the main node;
the asynchronous replication module is specifically configured to: and when the count value is equal to the preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the main node by using an asynchronous replication mode.
In a fourth aspect, an embodiment of the present invention provides an electronic device, where the electronic device is a master node in a central time service cluster of a distributed system, and includes a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of any logic clock synchronization method provided by the first aspect when executing the program stored in the memory.
In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program, when executed by a processor, implements the steps of any one of the logic clock synchronization methods provided in the first aspect.
In a sixth aspect, an embodiment of the present invention provides a computer program product containing instructions, which when run on a computer, causes the computer to perform the steps of any of the logical clock synchronization methods provided in the first aspect.
The embodiment of the invention has the following beneficial effects:
as can be seen from the above, with the adoption of the scheme provided by the embodiment of the present invention, in order to meet the requirement of logic clock synchronization between the master node and the standby node in the central time service cluster of the distributed system, the master node in the central time service cluster can control the standby node to copy the logic clock of the master node in an asynchronous copy manner every time the push frequency of the own logic clock is increased by a preset asynchronous copy step length. And when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target time length corresponding to the preset forced copying step length, the main node can control the standby node to copy the logic clock of the main node in a strong synchronous copying mode.
Based on this, in the scheme provided in the embodiment of the present invention, when the number of times of pushing the logic clock of the master node increases by a preset asynchronous replication step, the standby node is controlled to replicate the logic clock of the master node in an asynchronous replication manner, so that task processing in the distributed system is not affected by synchronization of the logic clocks, that is, external time service of the master node is not affected. In addition, because the reliability problem of clock synchronization caused by an asynchronous replication mode is considered, the asynchronous replication step length is set to be smaller than the strong synchronous replication step length and the synchronization of the logic clock is carried out by combining the strong synchronous replication mode, so that when the master node fails at any time point, the first time of the master-up of the standby node is as follows: the target duration is added to the logic clock of the self, so that the time can be ensured not to back. Therefore, by applying the scheme provided by the embodiment of the invention, the blockage of the clock synchronization to the task in the distributed system can be reduced, and the performance of the distributed system is improved.
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 flowchart of a logic clock synchronization method according to an embodiment of the present invention;
fig. 2 is a signaling interaction diagram of an interaction process between a master node and a standby node in a logic clock synchronization method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a logic clock synchronization apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a central time service cluster applied to a distributed system according to an embodiment of the present invention;
fig. 5 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.
In order to meet the logic clock synchronization requirement of a master node and a standby node in a central time service cluster of a distributed system, a logic clock synchronization method provided in the related technology comprises the following steps: when the logic clock propulsion times of the main node increase each preset forced replication step length, the logic clock of the main node is replicated to the standby node in a strong synchronous replication mode before responding to the latest received time service request. When the master node and the standby node are synchronized, the master node does not respond to the time service request before receiving a confirmation message about forced synchronous replication fed back by the standby node, so that in this case, a task in the distributed system is blocked, and the performance of the distributed system is affected.
In order to solve the above technical problem, an embodiment of the present invention provides a logic clock synchronization method.
The logic clock synchronization method is applied to a main node in a central time service cluster of a distributed system, and the main node records a logic clock of a standby node in the central time service cluster.
The distributed system may be a distributed system applied to various application scenarios, and the master node and the slave node in the central time service cluster may be various types of electronic devices such as a desktop computer, a notebook computer, a server, and the like. Moreover, it should be noted that, according to the method provided by the embodiment of the present invention, when the master node fails, after the backup node is raised to master, the logic clock provided to the outside for the first time is: the logic clock of the standby node adds: the time length pushed by the time service request of the number of the step length is forcibly copied, so that the time can be ensured not to return. Further, the logic clock synchronization method may include the steps of:
when the pushing times of the logic clock of the main node increases a preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the main node by using an asynchronous replication mode; when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target long time corresponding to the preset forced copying step length, controlling the standby node to copy the logic clock of the main node in a strong synchronous copying mode;
and when the copy is successful, updating the recorded logic clock of the standby node into: the main node is copied to the logic clock of the standby node;
and the asynchronous copying step length is smaller than the forced copying step length, and the target time length is the time length pushed by the time service requests with the quantity of the forced copying step length.
As can be seen from the above, with the adoption of the scheme provided by the embodiment of the present invention, in order to meet the requirement of logic clock synchronization between the master node and the standby node in the central time service cluster of the distributed system, the master node in the central time service cluster can control the standby node to copy the logic clock of the master node in an asynchronous copy manner every time the push frequency of the own logic clock is increased by a preset asynchronous copy step length. And when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target time length corresponding to the preset forced copying step length, the main node can control the standby node to copy the logic clock of the main node in a strong synchronous copying mode.
Based on this, in the scheme provided in the embodiment of the present invention, when the number of times of pushing the logic clock of the master node increases by a preset asynchronous replication step, the standby node is controlled to replicate the logic clock of the master node in an asynchronous replication manner, so that task processing in the distributed system is not affected by synchronization of the logic clocks, that is, external time service of the master node is not affected. In addition, because the reliability problem of clock synchronization caused by an asynchronous replication mode is considered, the asynchronous replication step length is set to be smaller than the strong synchronous replication step length and the synchronization of the logic clock is carried out by combining the strong synchronous replication mode, so that when the master node fails at any time point, the first time of the master-up of the standby node is as follows: the target duration is added to the logic clock of the self, so that the time can be ensured not to back. Therefore, by applying the scheme provided by the embodiment of the invention, the blockage of the clock synchronization to the task in the distributed system can be reduced, and the performance of the distributed system is improved.
Hereinafter, a logic clock synchronization method according to an embodiment of the present invention will be specifically described with reference to the drawings.
Fig. 1 is a schematic flowchart of a logic clock synchronization method according to an embodiment of the present invention. As shown in fig. 1, the logic clock synchronization method may include the steps of:
s101: when the push times of the logic clock of the main node are increased by a preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the main node by using an asynchronous replication mode;
s102: when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target time duration corresponding to the preset forced copying step length, controlling the standby node to copy the logic clock of the main node in a strong synchronous copying mode;
the asynchronous copying step length is smaller than the forced copying step length, and the target time length is the time length pushed by the time service requests of the quantity of the forced copying step length.
S103: and when the copy is successful, updating the recorded logic clock of the standby node into: the master node copies the logical clock to the standby node.
In the asynchronous replication method and the strong synchronous replication method, the replication success is a confirmation message about the successful replication that the master node receives feedback from the standby node.
In the embodiment of the invention, when the master node controls the standby node to copy the logic clock of the master node in an asynchronous copying mode, the external time service of the master node is not influenced in the copying process, that is, in the asynchronous copying mode, the master node can respond to the time service request and execute the action of the external time service before receiving the confirmation message about the successful copying fed back by the standby node, so that the task in the distributed system is not blocked.
Correspondingly, when the master node controls the backup node to copy the logic clock of the master node in a strong synchronous copying manner, the copying process can affect the external time service of the master node, that is, in the strong synchronous copying manner, the master node cannot respond to the time service request and execute the external time service action before receiving the confirmation message about successful copying fed back by the backup node, and the master node can respond to the time service request and execute the external time service action only after receiving the confirmation message about successful copying fed back by the backup node, so that the task in the distributed system can be blocked.
Based on this, by applying the scheme provided by the embodiment of the invention, the occurrence frequency of the situation corresponding to the strong synchronous replication mode can be reduced through the asynchronous replication mode, so that the blockage of the clock synchronization to the task in the distributed system is reduced, and the performance of the distributed system is improved.
A distributed system may typically include a transaction manager for handling various distributed tasks and a resource manager for storing data. Therefore, when executing each distributed task, the transaction manager can send a time service request to the master node in the central time service cluster to obtain a logic clock for executing the task. Therefore, the master node in the central time service cluster can receive the time service request and push the logic clock of the master node according to the preset logic clock push duration after receiving the time service request. Furthermore, after pushing its own logic clock, the master node may respond to the receiving request to send the pushed logic clock to the sender of the timing request, so that the transaction manager obtains the logic clock of the task.
For example, the preset logic clock advance time length of each time is 1, the logic clock of the master node is 100, and further, after receiving the time service request, the master node may advance its own logic clock to 101 and transmit the logic clock 101 to the sender of the time service request. Or, the preset logic clock advance time length of each time is 2, the logic clock of the master node is 100, and further, after receiving the time service request, the master node may advance its own logic clock to 102 and send the logic clock 102 to the sender of the time service request.
The logic clock advance duration of 1 or 2 in the above example is only used for explaining the advance of the logic clock of the master node, but is not limited, and the embodiment of the present invention does not limit the specific value of the logic clock advance duration.
In order to solve the problem of the prior art, in the embodiment of the invention, the main node can record the times of pushing the logic clock by itself, so that the main node can control the standby node to copy the logic clock of the main node in an asynchronous copying mode when the pushing times are increased by a preset asynchronous copying step length. Therefore, after the backup node successfully copies the logic clock of the main node, the logic clock of the backup node is synchronous with the logic clock of the main node, and the main node can update the recorded logic clock of the backup node into the logic clock of the main node after the backup node successfully copies the logic clock of the main node. As can be appreciated by those skilled in the art, when clock replication is performed by using asynchronous replication, the master node can normally affect the timing request, so that task processing in the distributed system is not affected by the synchronization of the logical clocks.
For example, the preset asynchronous replication step length is 50, the preset logic clock advance duration is 1, the logic clock of the master node is 499, the logic clock of the standby node is 450, and at this time, the logic clock of the standby node is 450 recorded in the master node; after the master node receives a time service request and pushes the logic clock of the master node to 500, the master node determines that the incremental number of pushing times of the logic clock of the master node reaches 50 times, and then the backup node can be controlled to copy the logic clock 500 of the master node in an asynchronous copying mode. In this way, the logical clock of the standby node is updated to 500, and after the copy is successful, the master node updates the recorded logical clock 450 of the standby node to 500. After the logic clock of the master node is advanced to 500, the master node may directly perform an external time service to a sender of the received time service request, so as to send the logic clock 500 to the sender, without waiting for receiving an acknowledgement message about successful replication fed back by the standby node and then performing the external time service.
In addition, in some cases, due to a communication failure between the master node and the slave node, for example, a failure of the master node to control the slave node to copy the logic clock of the master node due to a network failure, the slave node may not copy the logic clock of the master node in time, and/or the master node may not update the recorded logic clock of the slave node in time. That is, the asynchronous copy method causes a problem of reliability of clock synchronization. Thus, the difference between the logic clock of the backup node recorded by the master node and the logic clock between the master nodes may reach or even exceed the duration advanced by the number of the time service requests of the asynchronous replication step.
For example, the preset asynchronous replication step length is 50, the preset logic clock advance duration is 1, the logic clock of the master node is 499, the logic clock of the standby node is 450, and at this time, the logic clock of the standby node is 450 recorded in the master node; after the master node receives a time service request and pushes the logic clock of the master node to 500, the master node determines that the incremental number of pushing times of the logic clock of the master node reaches 50 times, and then the backup node can be controlled to copy the logic clock 500 of the master node in an asynchronous copying mode. At this time, due to a communication fault between the standby node and the master node, although the logic clock of the standby node is updated to 500, the master node still records the logic clock of the standby node to be 450, and at this time, the difference value between the logic clock of the master node and the recorded logic clock of the standby node is 50, which is equal to the time length advanced by the time service requests of the number of asynchronous copying step lengths; further, when the master node determines that the incremental number of the self logic clock advances for 50 times again, the logic clock of the master node is updated to 550, and when the master node is controlled to copy the logic clock of the master node in an asynchronous copy mode again, due to a communication fault between the standby node and the master node, although the logic clock of the standby node is updated to 550, the master node still records the logic clock of the standby node to be 450, at this time, the difference between the logic clock of the master node and the recorded logic clock of the standby node is 100, which is greater than the time length advanced by the time service request with the number of asynchronous copy steps.
For another example, the preset asynchronous replication step length is 50, the preset logic clock advance duration is 1, the logic clock of the master node is 499, the logic clock of the standby node is 450, and at this time, the logic clock of the standby node is 450 recorded in the master node; after the master node receives a time service request and pushes the logic clock of the master node to 500, the master node determines that the incremental number of pushing times of the logic clock of the master node reaches 50 times, and then the backup node can be controlled to copy the logic clock 500 of the master node in an asynchronous copying mode. At this time, due to a communication fault between the standby node and the master node, the standby node fails to copy the logic clock of the master node successfully, so that the logic clock of the standby node is kept at 450, and the master node keeps the recorded logic clock of the standby node at 450, at this time, the difference between the logic clock of the master node and the recorded logic clock of the standby node is 50, which is equal to the time length advanced by the time service requests of the number of asynchronous copying steps; further, when the master node determines that the incremental number of the self logic clock advances for 50 times again, the logic clock of the master node is updated to 550, and when the backup node is controlled to copy the logic clock of the master node in an asynchronous copy mode again, the backup node still fails to copy the logic clock of the master node due to a communication fault between the backup node and the master node, so that the logic clock of the backup node still remains 450, and the master node still records the logic clock of the backup node to be 450, at this time, the difference between the logic clock of the master node and the recorded logic clock of the backup node is 100, which is greater than the advanced time length of the time service request of the number of asynchronous copy steps.
In the above situation, in order to ensure that the time of the logic clock granted to the outside for the first time does not fall back after the backup node is raised from the master no matter when the master node fails at any time point, then the strong synchronous copy may be performed based on the forced copy step size, and the forced copy step size is larger than the asynchronous copy step size. Specifically, the master node may monitor a difference between the logic clock of the master node and the recorded logic clock of the standby node, and determine whether the difference reaches a target duration corresponding to a preset forced copying step length, so that the master node may control the standby node to copy the logic clock of the master node in a strong synchronization copying manner when the difference between the logic clock of the master node and the recorded logic clock of the standby node reaches the target duration corresponding to the preset forced copying step length. Therefore, after the backup node successfully copies the logic clock of the main node, the logic clock of the backup node is synchronous with the logic clock of the main node, and the main node can update the recorded logic clock of the backup node into the logic clock of the main node after the backup node successfully copies the logic clock of the main node.
For example, if the preset forced replication step length is 500, the preset logic clock advance time length is 1, and the target time length corresponding to the preset forced replication step length is 500, then, when the master node detects that the difference between the logic clock of the master node and the recorded logic clock of the standby node reaches 500, the master node may control the standby node to replicate the logic clock of the master node in a strong synchronization replication manner, so that the logic clock of the standby node is synchronized with the logic clock of the master node.
For another example, if the preset forced replication step size is 500, the preset logic clock advance duration is 2, and the target duration corresponding to the preset forced replication step size is 500, then, when the master node detects that the difference between the own logic clock and the recorded logic clock of the standby node reaches 500, the master node may control the standby node to replicate the logic clock of the master node in a strong synchronization replication manner, so that the logic clock of the standby node is synchronized with the logic clock of the master node.
The logic clock advancing duration of 1 or 2 in the above example is only used for explaining the target duration corresponding to the preset forced copy step, but is not limited, and the embodiment of the present invention does not limit the specific value of the logic clock advancing duration.
For example, the asynchronous copy step size may be one tenth, one fifth, and so on of the forced copy step size, and for this reason, on the premise that the asynchronous copy step size is smaller than the forced copy step size, the embodiment of the present invention does not limit specific values of the asynchronous copy step size and the forced copy step size.
In the embodiment of the present invention, the preset forced copy step size is greater than the asynchronous copy step size, so that, when the requirement of strong synchronous copy is not met, that is, when the difference between the logic clock of the master node and the recorded logic clock of the standby node does not reach the target duration corresponding to the preset forced copy step size, if the master node fails, the logic clock for first time external service after the standby node is raised to the master is: the logic clock of the standby node is added with the time length pushed by the time service request with the quantity of the forced copying step length, so that the time for the standby node to time externally for the first time is ensured not to return. And when the strong synchronous replication requirement is met, namely the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target time length corresponding to the preset forced replication step length, the main node can ensure that the time of first external time service after the standby node is upgraded does not return in a strong synchronous replication mode.
In the following, with reference to an example, when a master node fails at different time points, a specific external time service clock of a standby node is introduced, so as to verify that the synchronization method provided by the embodiment of the present invention can ensure that the clock does not go back.
Assuming that the preset forced copy step size is 500, the asynchronous copy step size is 50, and the logic clock advance duration is 1, the target duration corresponding to the forced copy step size is 500.
Example one: the logic clock of the master node is 580, and the logic clock of the standby node recorded by the master node are both 550, and at this time, when the master node receives the time service request a and advances the logic clock of the master node to 581, the master node fails. Thus, after the backup node is upgraded, in order to respond to the time service request a, the logic clock for the backup node to time externally for the first time is as follows: 550+500=1050, so that the first externally clocked logic clock after the backup node is boosted is not backed off because 1050> 580.
Example two: when the logic clock of the master node is 580, the logic clock of the standby node described in the master node is 100, and the logic clock of the standby node is 550, the master node receives the time service request b and advances its own logic clock to 581, and the master node fails. Thus, after the backup node is upgraded, in order to respond to the time service request b, the logic clock for the backup node to time externally for the first time is as follows: 550+500=1050, so that the first externally clocked logic clock after the backup node is boosted is not backed off because 1050> 580.
Example three: when the master node receives the time service request c and advances its own logic clock to 581, the master node fails, where the logic clock of the master node is 580, the logic clock of the standby node described in the master node is 100, and the logic clock of the standby node is 100. Thus, after the backup node is upgraded, in order to respond to the time service request c, the logic clock for the backup node to time externally for the first time is as follows: 100+500=600, so the first outbound logic clock after the backup node is up-backed is not backed off because 600> 580.
Example four: the logic clock of the master node is 599, the logic clock of the standby node and the logic clock of the standby node recorded by the master node are both 550, and at this time, when the master node receives the time service request d and pushes the logic clock of the master node to 600, the master node fails. Thus, after the backup node is upgraded, in order to respond to the time service request d, the logic clock for the backup node to time externally for the first time is as follows: 550+500=1050, so that the first externally clocked logic clock after the backup node is boosted is not backed off because 1050> 599.
Example five: when the master node receives the time service request e and pushes the own logic clock to 600, the master node fails. Thus, after the backup node is upgraded, in order to respond to the time service request e, the logic clock for the backup node to time externally for the first time is as follows: 100+500=600, so that the first outbound logic clock after the backup node is boosted is not backed off because 600> 599.
Example six: the logic clock of the master node is 599, the logic clock of the standby node recorded by the master node is 100, and the logic clock of the standby node is 550, at this time, when the master node receives the time service request f and pushes the logic clock of the master node to 600, and further, the master node fails. Thus, after the backup node is upgraded, in order to respond to the time service request f, the logic clock for the backup node to time externally for the first time is as follows: 550+500=1050, so that the first externally clocked logic clock after the backup node is boosted is not backed off because 1050> 599.
Example seven: the logic clock of the main node is 599, the logic clock of the standby node recorded by the main node is 100, and the logic clock of the standby node is 550, at this time, when the main node receives the time service request g and pushes the logic clock of the main node to 600, and further, the main node does not have a fault, so that the main node can control the standby node to copy the logic clock of the standby node to 600 in a strong synchronization copying mode. If the master node still fails after the strong synchronous replication, the master node may update the logic clock of the standby node recorded by the master node to 600 after receiving a confirmation message about successful replication fed back by the standby node, and send the logic clock 600 to a sender of the time service request g in response to the time service request g. If the master node fails after the strong synchronous replication, the standby node is raised to the master node, and in order to respond to the time service request g, a logic clock for the standby node to time externally for the first time is as follows: 600+500=1100, so that the first outbound logic clock after the backup node is up-backed is not backed off because 1100> 599.
Example eight: the logic clock of the main node is 599, the logic clock of the standby node recorded by the main node is 100, and the logic clock of the standby node is 100, at this time, when the main node receives the time service request h and pushes the logic clock of the main node to 600, and further, the main node does not have a fault, so that the main node can control the standby node to copy the logic clock of the standby node to 600 in a strong synchronization copying mode. If the master node still fails after the strong synchronous replication, the master node may update the logic clock of the standby node recorded by the master node to 600 after receiving a confirmation message about successful replication fed back by the standby node, and send the logic clock 600 to a sender of the time service request g in response to the time service request g. If the master node fails after the strong synchronous replication, the standby node is raised to the master node, and in order to respond to the time service request g, a logic clock for the standby node to time externally for the first time is as follows: 600+500=1100, so that the first outbound logic clock after the backup node is up-backed is not backed off because 1100> 599.
Based on this, in the scheme provided in the embodiment of the present invention, when the number of times of pushing the logic clock of the master node increases by a preset asynchronous replication step, the standby node is controlled to replicate the logic clock of the master node in an asynchronous replication manner, so that task processing in the distributed system is not affected by synchronization of the logic clocks, that is, external time service of the master node is not affected. In addition, because the reliability problem of clock synchronization caused by an asynchronous replication mode is considered, the asynchronous replication step length is set to be smaller than the strong synchronous replication step length and the synchronization of the logic clock is carried out by combining the strong synchronous replication mode, so that when the master node fails at any time point, the first time of the master-up of the standby node is as follows: the target duration is added to the logic clock of the self, so that the time can be ensured not to back. Therefore, by applying the scheme provided by the embodiment of the invention, the blockage of the clock synchronization to the task in the distributed system can be reduced, and the performance of the distributed system is improved.
In some cases, when the number of times of pushing the logic clock of the master node is incremented by the preset asynchronous copy step length again, the difference between the logic clock obtained after the last pushing and the recorded logic clock of the standby node may reach the target time length corresponding to the preset forced copy step length, so that, in this case, the master node may use an asynchronous copy mode or a strong synchronous copy mode to control the standby node to copy the logic clock of the master node, thereby causing synchronization confusion.
Based on this, optionally, in a specific implementation manner, in the step S101, when the number of times of advancing the logic clock of the master node is increased by a preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the master node in an asynchronous replication manner may include the following step 1:
step 1: and when the pushing times of the logic clock of the main node increases the preset asynchronous copying step length, if the difference value between the logic clock of the main node and the recorded logic clock of the standby node does not reach the target time length corresponding to the preset forced copying step length, controlling the standby node to copy the logic clock of the main node by using an asynchronous copying mode.
In this specific implementation manner, when the number of times of pushing the logic clock of the master node increases by the preset asynchronous replication step length, before the backup node is controlled to replicate the logic clock of the master node in the asynchronous replication manner, the master node may further monitor whether a difference between the logic clock of the master node and the recorded logic clock of the backup node reaches a target time length corresponding to the preset forced replication step length.
Therefore, if the difference value between the logic clock of the main node and the recorded logic clock of the standby node does not reach the target duration corresponding to the preset forced copying step length, the main node can control the standby node to copy the logic clock of the main node in an asynchronous copying mode.
Based on this, in this specific implementation manner, when the number of times of pushing the logic clock of the master node increases by the preset asynchronous replication step length, it may be limited that the master node controls the standby node to replicate the logic clock of the master node in an asynchronous replication manner only when the difference between the logic clock of the master node and the recorded logic clock of the standby node does not reach the target time length corresponding to the preset forced replication step length. Furthermore, when the advance times of the logic clock of the master node increases by the preset asynchronous replication step length, if the difference value between the logic clock of the master node and the recorded logic clock of the standby node reaches the target time length corresponding to the preset forced replication step length, the master node may control the standby node to replicate the logic clock of the master node in a strong synchronous replication manner. Therefore, the situation that the master node can adopt an asynchronous replication mode or a strong synchronous replication mode to control the standby node to replicate the logic clock of the master node can be avoided, and further, synchronization confusion is avoided.
Optionally, in a specific implementation manner, in the step S101, when the number of times of advancing the logic clock of the master node increases by a preset asynchronous replication step length, controlling the backup node to replicate the logic clock of the master node in an asynchronous replication manner may include the following steps:
when the pushing times of the logic clock of the main node increases a preset asynchronous replication step length, sending an asynchronous replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the asynchronous replication instruction, and sending a first confirmation message to the main node; upon receipt of the first confirmation message, the replication is indicated as successful.
In this specific implementation manner, the master node may send an asynchronous replication instruction carrying the logic clock of the master node to the standby node every time the number of times of pushing the logic clock of the master node increases by a preset asynchronous replication step. Therefore, when the standby node receives the asynchronous replication instruction, the logic clock of the standby node can be updated to the logic clock carried in the asynchronous replication instruction.
Therefore, after the standby node finishes updating the logic clock, the logic clock of the standby node is synchronous with the logic clock of the main node, so that the standby node can send a first confirmation message to the main node to inform the main node that the logic clock of the standby node is copied successfully. Therefore, after receiving the first confirmation message, the master node may determine that the logical clock of the standby node is successfully copied, and further perform step S103 to update the recorded logical clock of the standby node to: the master node copies the logical clock to the standby node.
Optionally, the first Acknowledgement message may be an ACK (Acknowledgement character).
Correspondingly, in this specific implementation manner, the logic clock synchronization method provided in the embodiment of the present invention may further include the following step 2:
step 2: when the push times of the logic clock of the main node are increased by a preset asynchronous copy step length, time is provided to the target party;
wherein the target is a sender of a time service request which enables to promote the logic clock of the master node for the last time.
Since the last advance of the logical clock of the master node is made based on the last received time service request, the sender of the time service request that causes the last advance of the logical clock of the master node may be referred to as the target. Therefore, when the push times of the logic clock of the main node increases by the preset asynchronous copy step length, the main node can time the target party.
In this specific implementation manner, the master node may not need to wait for the first acknowledgement message sent by the standby node, but may time the external service to the target party before receiving the first acknowledgement message. For example, the primary node may provide time to the target party before sending the asynchronous replication instruction to the standby node, may provide time to the target party while sending the asynchronous replication instruction to the standby node, and may provide time to the target party after sending the asynchronous replication instruction to the standby node and before receiving the first acknowledgement message. This is all reasonable.
Optionally, in a specific implementation manner, in the step S102, when a difference between the logic clock of the master node and the recorded logic clock of the standby node reaches a target long time corresponding to a preset forced copy step, the standby node is controlled to copy the logic clock of the master node in a strong synchronization copy manner, which may include the following steps:
when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target time length corresponding to the preset forced copying step length, sending a strong synchronous copying instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node into the logic clock carried in the strong synchronous copying instruction, and sending a second confirmation message to the main node; upon receipt of the second confirmation message, the replication is indicated as successful.
In this specific implementation manner, when the difference between the logic clock of the master node and the recorded logic clock of the standby node reaches the target duration corresponding to the preset forced copy step length, the master node may send a strong synchronization copy instruction carrying the logic clock of the master node to the standby node. Therefore, when the standby node receives the strong synchronous replication instruction, the logic clock of the standby node can be updated to the logic clock carried in the strong synchronous replication instruction.
Therefore, after the standby node finishes updating the logic clock, the logic clock of the standby node is synchronous with the logic clock of the main node, so that the standby node can send a second confirmation message to the main node to inform the main node that the logic clock of the standby node is copied successfully. Therefore, after receiving the second confirmation message, the master node may determine that the logical clock of the standby node is successfully copied, and further perform step S103 to update the recorded logical clock of the standby node to: the master node copies the logical clock to the standby node.
Optionally, the second Acknowledgement message may be an ACK (Acknowledgement character).
Correspondingly, in this specific implementation manner, the logic clock synchronization method provided in the embodiment of the present invention may further include the following step 3:
and step 3: after receiving the second confirmation message, time service is carried out to the outside of the target party;
wherein the target is a sender of a time service request which enables to promote the logic clock of the master node for the last time.
Since the last advance of the logical clock of the master node is made based on the last received time service request, the sender of the time service request that causes the last advance of the logical clock of the master node may be referred to as the target.
Furthermore, in order to ensure that the standby node does not back off the logic clock for external time service for the first time after the standby node is upgraded, when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target time length corresponding to the preset forced replication step length, after the main node sends the strong synchronous replication instruction to the standby node, the main node needs to wait for a second confirmation message sent by the standby node, and can perform external time service to the target party after receiving the second confirmation message.
The master node may be provided with a count value for recording the number of advances, so that the master node may update the count value after each advance of the logical clock, so as to determine the incremental number of advances of the logical clock by using the count value.
Based on this, optionally, in a specific implementation manner, the logic clock synchronization method provided in the embodiment of the present invention may further include the following steps 4 and 5:
and 4, step 4: every time the logic clock of the master node advances, the count value for recording the number of advances is increased by 1
And 5: and after the recorded logic clock of the standby node is updated to the logic clock copied to the standby node by the main node, clearing the count value.
Accordingly, in this specific implementation manner, in step S101, when the number of times of advancing the logic clock of the master node increases by a preset asynchronous replication step length, the controlling the standby node to replicate the logic clock of the master node in an asynchronous replication manner may include the following steps:
and when the count value is equal to the preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the main node by using an asynchronous replication mode.
In this specific implementation manner, after receiving the time service request and advancing the logic clock of the master node, the master node may add 1 to the count value for recording the number of advances. Furthermore, when the count value is increased to be equal to the preset asynchronous replication step length, the increment number of the advancing times of the logic clock of the main node reaches the asynchronous replication step length, so that the main node can control the standby node to replicate the logic clock of the main node in an asynchronous replication mode. Furthermore, when the copy is successful, the recorded logic clock of the standby node is updated as follows: the master node copies the logical clock to the standby node.
Wherein, when the main node updates the recorded logic clock of the standby node as: after the master node copies the logic clock of the standby node, it indicates that the master node and the standby node have completed one logic clock synchronization, and therefore the master node needs to count the increment number of the pushing times of the own logic clock again, so as to perform the next asynchronous synchronization mode when the increment number reaches the asynchronous copy step length again. Therefore, the recorded logic clock of the standby node is updated to be: after the master node copies the logical clock of the standby node, the master node may clear the count value for recording the number of advances to be performed, so as to restart counting the number of increments of the number of advances of the logical clock.
To facilitate understanding of the interaction process between the master node and the standby node in the logic clock synchronization method provided in the embodiment of the present invention, an embodiment of the present invention provides a signaling interaction diagram of the interaction process between the master node and the standby node in the logic clock synchronization method, and as shown in fig. 2, the signaling interaction process may include the following steps:
s201: when the pushing times of the logic clock of the main node increases a preset asynchronous replication step length, the main node sends an asynchronous replication instruction carrying the logic clock of the main node to the standby node;
s202: when the push times of the logic clock of the main node are increased by a preset asynchronous copy step length, the main node gives time to the target party;
s203: after receiving the asynchronous replication instruction, the standby node updates the logic clock of the standby node to the logic clock carried in the asynchronous replication instruction;
s204: the standby node sends a first confirmation message to the main node;
s205: after receiving the first confirmation message, the master node updates the recorded logic clock of the standby node to: the main node is copied to the logic clock of the standby node;
s206: when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target time length corresponding to the preset forced copying step length, the main node sends a strong synchronous copying instruction carrying the logic clock of the main node to the standby node;
s207: after receiving the strong synchronous replication instruction, the standby node updates the logic clock of the standby node into the logic clock carried in the strong synchronous replication instruction;
s208: the standby node sends a second confirmation message to the main node;
s209: after receiving the second confirmation message, the master node updates the recorded logic clock of the standby node to: the main node is copied to the logic clock of the standby node;
s210: and after receiving the second confirmation message, the main node gives time to the target party.
Based on this, in the scheme provided in the embodiment of the present invention, when the number of times of pushing the logic clock of the master node increases by a preset asynchronous replication step, the standby node is controlled to replicate the logic clock of the master node in an asynchronous replication manner, so that task processing in the distributed system is not affected by synchronization of the logic clocks, that is, external time service of the master node is not affected. In addition, because the reliability problem of clock synchronization caused by an asynchronous replication mode is considered, the asynchronous replication step length is set to be smaller than the strong synchronous replication step length and the synchronization of the logic clock is carried out by combining the strong synchronous replication mode, so that when the master node fails at any time point, the first time of the master-up of the standby node is as follows: the target duration is added to the logic clock of the self, so that the time can be ensured not to back. Therefore, by applying the scheme provided by the embodiment of the invention, the blockage of the clock synchronization to the task in the distributed system can be reduced, and the performance of the distributed system is improved.
Corresponding to the logic clock synchronization method provided by the embodiment of the invention, the embodiment of the invention also provides a logic clock synchronization device.
The logic clock synchronization device is applied to a main node in a central time service cluster of a distributed system, and the main node records a logic clock of a standby node in the central time service cluster.
Fig. 3 is a schematic structural diagram of a logic clock synchronization apparatus according to an embodiment of the present invention, and as shown in fig. 3, the logic clock synchronization apparatus may include the following modules:
the asynchronous replication module 310 is configured to control the standby node to replicate the logic clock of the master node in an asynchronous replication manner when the number of times of advancement of the logic clock of the master node increases by a preset asynchronous replication step;
the forced replication module 320 is configured to control the standby node to replicate the logic clock of the master node in a strong synchronization replication manner when a difference between the logic clock of the master node and the recorded logic clock of the standby node reaches a target long time corresponding to a preset forced replication step length;
a clock updating module 330, configured to update the recorded logic clock of the standby node to: the main node is copied to the logic clock of the standby node;
and the asynchronous copying step length is smaller than the forced copying step length, and the target time length is the time length pushed by the time service requests with the quantity of the forced copying step length.
As can be seen from the above, with the adoption of the scheme provided by the embodiment of the present invention, in order to meet the requirement of logic clock synchronization between the master node and the standby node in the central time service cluster of the distributed system, the master node in the central time service cluster can control the standby node to copy the logic clock of the master node in an asynchronous copy manner every time the push frequency of the own logic clock is increased by a preset asynchronous copy step length. And when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target time length corresponding to the preset forced copying step length, the main node can control the standby node to copy the logic clock of the main node in a strong synchronous copying mode.
Based on this, in the scheme provided in the embodiment of the present invention, when the number of times of pushing the logic clock of the master node increases by a preset asynchronous replication step, the standby node is controlled to replicate the logic clock of the master node in an asynchronous replication manner, so that task processing in the distributed system is not affected by synchronization of the logic clocks, that is, external time service of the master node is not affected. In addition, because the reliability problem of clock synchronization caused by an asynchronous replication mode is considered, the asynchronous replication step length is set to be smaller than the strong synchronous replication step length and the synchronization of the logic clock is carried out by combining the strong synchronous replication mode, so that when the master node fails at any time point, the first time of the master-up of the standby node is as follows: the target duration is added to the logic clock of the self, so that the time can be ensured not to back. Therefore, by applying the scheme provided by the embodiment of the invention, the blockage of the clock synchronization to the task in the distributed system can be reduced, and the performance of the distributed system is improved.
Optionally, in a specific implementation manner, the asynchronous replication module 310 is specifically configured to:
and when the pushing times of the logic clock of the main node increases a preset asynchronous copying step length, if the difference value between the logic clock of the main node and the recorded logic clock of the standby node does not reach a target time length corresponding to a preset forced copying step length, controlling the standby node to copy the logic clock of the main node by using an asynchronous copying mode.
Optionally, in a specific implementation manner, the asynchronous replication module 310 is specifically configured to:
sending an asynchronous replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the asynchronous replication instruction, and sends a first confirmation message to the main node; indicating that the replication was successful upon receiving the first acknowledgement message;
the device further comprises:
the first time service module is used for providing time to the target party when the pushing times of the logic clock of the main node increases by a preset asynchronous copy step length; wherein the target is a sender of a time service request which enables to push the logic clock of the main node for the last time.
Optionally, in a specific implementation manner, the forced replication module 320 is specifically configured to:
sending a strong synchronization replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the strong synchronization replication instruction, and sends a second confirmation message to the main node; indicating that the replication was successful upon receiving the second acknowledgement message;
the device further comprises:
the second time service module is used for carrying out time service to the outside of the target party after receiving the second confirmation message; wherein the target is a sender of a time service request which enables to push the logic clock of the main node for the last time.
Optionally, in a specific implementation manner, the apparatus further includes:
the counting updating module is used for adding 1 to a counting value used for recording the advancing times when the logic clock of the main node advances;
the count zero clearing module is used for resetting the count value after the recorded logic clock of the standby node is updated to the logic clock copied to the standby node by the main node;
the asynchronous replication module 310 is specifically configured to: and when the count value is equal to the preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the main node by using an asynchronous replication mode.
Corresponding to the logic clock synchronization method provided by the embodiment of the invention, the embodiment of the invention also provides a central time service cluster applied to a distributed system.
Fig. 4 is a schematic structural diagram of a central time service cluster applied to a distributed system according to an embodiment of the present invention, and as shown in fig. 4, the central time service cluster includes a master node 410 and at least one standby node 420. The master node 410 records a logic clock of each standby node 420.
The master node 410 is configured to control each standby node 420 to copy the logic clock of the master node 410 in an asynchronous copy manner when the number of times of pushing the logic clock of the master node 410 increases by a preset asynchronous copy step length; and when the difference between the logic clock of the master node 410 and the recorded logic clock of any backup node 420 reaches the target long time corresponding to the preset forced copying step length, controlling the backup node 420 to copy the logic clock of the master node 410 in a strong synchronous copying manner; when the copy is successful, the recorded logic clock of the standby node 420 is updated as follows: the master node 410 copies the logic clock to the standby node 420; the asynchronous copying step length is smaller than the forced copying step length, and the target time length is the time length pushed by the time service requests of the quantity of the forced copying step length;
any standby node 420, configured to copy the logic clock of the master node 410 to the standby node 420 under the control of the master node 410.
As can be seen from the above, with the adoption of the scheme provided by the embodiment of the present invention, in order to meet the requirement of logic clock synchronization between the master node and the standby node in the central time service cluster of the distributed system, the master node in the central time service cluster can control the standby node to copy the logic clock of the master node in an asynchronous copy manner every time the push frequency of the own logic clock is increased by a preset asynchronous copy step length. And when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target time length corresponding to the preset forced copying step length, the main node can control the standby node to copy the logic clock of the main node in a strong synchronous copying mode.
Based on this, in the scheme provided in the embodiment of the present invention, when the number of times of pushing the logic clock of the master node increases by a preset asynchronous replication step, the standby node is controlled to replicate the logic clock of the master node in an asynchronous replication manner, so that task processing in the distributed system is not affected by synchronization of the logic clocks, that is, external time service of the master node is not affected. In addition, because the reliability problem of clock synchronization caused by an asynchronous replication mode is considered, the asynchronous replication step length is set to be smaller than the strong synchronous replication step length and the synchronization of the logic clock is carried out by combining the strong synchronous replication mode, so that when the master node fails at any time point, the first time of the master-up of the standby node is as follows: the target duration is added to the logic clock of the self, so that the time can be ensured not to back. Therefore, by applying the scheme provided by the embodiment of the invention, the blockage of the clock synchronization to the task in the distributed system can be reduced, and the performance of the distributed system is improved.
Optionally, in a specific implementation manner, when the number of times of pushing the logic clock of the master node 410 increases by a preset asynchronous replication step length, the master node 410 controls the standby node 420 to replicate the logic clock of the master node 410 in an asynchronous replication manner, which includes:
when the advance times of the logic clock of the master node 410 increases by a preset asynchronous replication step length, if the difference between the logic clock of the master node 410 and the recorded logic clock of the standby node 420 does not reach a target time length corresponding to a preset forced replication step length, the standby node 420 is controlled to replicate the logic clock of the master node 410 by using an asynchronous replication mode.
Optionally, in a specific implementation manner, the controlling, by the master node 410, the standby node 420 to copy the logic clock of the master node 410 in an asynchronous copy manner includes:
sending an asynchronous replication instruction carrying the logic clock of the master node 410 to the standby node 420, so that the standby node 420 updates the logic clock of itself to the logic clock carried in the asynchronous replication instruction, and sends a first acknowledgement message to the master node 410; indicating that the replication was successful upon receiving the first acknowledgement message;
the master node 410 is further configured to provide time to a target party when the number of times of pushing the logic clock of the master node 410 increases by a preset asynchronous copy step length;
wherein the target is a sender of a timing request that causes the last time the logic clock of the master node 410 is advanced.
Optionally, in a specific implementation manner, the step of controlling the standby node 420 to copy the logic clock of the master node 410 by the master node 410 through a strong synchronization copy manner includes:
sending a strong synchronization replication instruction carrying the logic clock of the master node 410 to the standby node 420, so that the standby node 420 updates the logic clock of itself to the logic clock carried in the strong synchronization replication instruction, and sends a second acknowledgement message to the master node 410; indicating that the replication was successful upon receiving the second acknowledgement message;
the host node 410 is further configured to time the external service to the target party after receiving the second confirmation message;
wherein the target is a sender of a timing request that causes the last time the logic clock of the master node 410 is advanced.
Optionally, in a specific implementation manner, the master node 410 is further configured to:
every time the logical clock of the master node 410 advances, 1 is added to the count value for recording the number of advances;
after the recorded logic clock of the standby node 420 is updated to the logic clock copied to the standby node 420 by the master node 410, clearing the count value;
when the number of times of advancing the logic clock of the master node 410 increases by a preset asynchronous replication step length, the master node 410 controls the standby node 420 to replicate the logic clock of the master node 410 by using an asynchronous replication method, including:
and when the count value is equal to the preset asynchronous replication step length, controlling the standby node 420 to replicate the logic clock of the main node 410 by using an asynchronous replication mode.
Corresponding to the logic clock synchronization method provided by the above embodiment of the present invention, an embodiment of the present invention further provides an electronic device, which is a master node in a central time service cluster of a distributed system, as shown in fig. 5, and includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502, and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501 is configured to implement the steps of any logic clock synchronization method provided in the above embodiments of the present invention when executing the program stored in the memory 503.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication 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, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the logic clock synchronization methods provided in the embodiments of the present invention.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer causes the computer to perform the steps of any of the logic clock synchronization methods provided by the embodiments of the present invention described above.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, the central time service cluster embodiment, the electronic device embodiment, the computer-readable storage medium embodiment, and the computer program product embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (13)
1. A logic clock synchronization method is characterized in that the method is applied to a main node in a central time service cluster of a distributed system, and the main node records a logic clock of a standby node in the central time service cluster; the method comprises the following steps:
when the pushing times of the logic clock of the main node increases a preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the main node by using an asynchronous replication mode; when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target long time corresponding to the preset forced copying step length, controlling the standby node to copy the logic clock of the main node in a strong synchronous copying mode;
and when the copy is successful, updating the recorded logic clock of the standby node into: the main node is copied to the logic clock of the standby node;
the asynchronous copying step length is smaller than the forced copying step length, and the target time length is the time length pushed by the time service requests of the quantity of the forced copying step length;
in the asynchronous replication mode, the main node can respond to a time service request and execute an action of time service to the outside before receiving a confirmation message about successful replication fed back by the standby node;
in the strong synchronous replication mode, the master node can respond to the time service request and execute an action of time service to the outside only after receiving a confirmation message about successful replication fed back by the standby node.
2. The method of claim 1, wherein the step of controlling the standby node to copy the logic clock of the primary node by using asynchronous copy every time the logic clock of the primary node advances by a preset asynchronous copy step length comprises:
and when the pushing times of the logic clock of the main node increases a preset asynchronous copying step length, if the difference value between the logic clock of the main node and the recorded logic clock of the standby node does not reach a target time length corresponding to a preset forced copying step length, controlling the standby node to copy the logic clock of the main node by using an asynchronous copying mode.
3. The method according to claim 1 or 2, wherein the step of controlling the standby node to copy the logic clock of the primary node by using asynchronous copy comprises:
sending an asynchronous replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the asynchronous replication instruction, and sends a first confirmation message to the main node;
indicating that the replication was successful upon receiving the first acknowledgement message;
the method further comprises the following steps:
when the push times of the logic clock of the main node are increased by a preset asynchronous copy step length, time is provided to the target party; wherein the target is a sender of a time service request which enables to push the logic clock of the main node for the last time.
4. The method according to claim 1 or 2, wherein the step of controlling the standby node to copy the logic clock of the primary node by means of strong synchronous copy comprises:
sending a strong synchronization replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the strong synchronization replication instruction, and sends a second confirmation message to the main node;
indicating that the replication was successful upon receiving the second acknowledgement message;
the method further comprises the following steps:
after receiving the second confirmation message, time service is carried out to the outside of the target party; wherein the target is a sender of a time service request which enables to push the logic clock of the main node for the last time.
5. The method of claim 1, further comprising:
adding 1 to a count value for recording the advancing times when the logic clock of the main node advances;
after the recorded logic clock of the standby node is updated to the logic clock copied to the standby node by the main node, clearing the count value;
the step of controlling the standby node to copy the logic clock of the main node in an asynchronous copy mode when the push times of the logic clock of the main node increases by a preset asynchronous copy step length includes:
and when the count value is equal to the preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the main node by using an asynchronous replication mode.
6. A central time service cluster applied to a distributed system is characterized in that the central time service cluster comprises a main node and at least one standby node; the main node stores logic clocks of all standby nodes;
the main node is used for controlling each standby node to copy the logic clock of the main node by using an asynchronous copying mode when the pushing times of the logic clock of the main node increases a preset asynchronous copying step length; when the difference value between the logic clock of the main node and the recorded logic clock of any standby node reaches the target long time corresponding to the preset forced copying step length, controlling the standby node to copy the logic clock of the main node in a strong synchronous copying mode; and when the copy is successful, updating the recorded logic clock of the standby node into: the main node is copied to the logic clock of the standby node; the asynchronous copying step length is smaller than the forced copying step length, and the target time length is the time length pushed by the time service requests of the quantity of the forced copying step length;
any standby node, which is used for copying the logic clock of the main node to the standby node under the control of the main node;
in the asynchronous replication mode, the main node can respond to a time service request and execute an action of time service to the outside before receiving a confirmation message about successful replication fed back by the standby node;
in the strong synchronous replication mode, the master node can respond to the time service request and execute an action of time service to the outside only after receiving a confirmation message about successful replication fed back by the standby node.
7. A logic clock synchronization device is characterized in that the logic clock synchronization device is applied to a main node in a central time service cluster of a distributed system, and the main node records a logic clock of a standby node in the central time service cluster; the device comprises:
the asynchronous replication module is used for controlling the standby node to replicate the logic clock of the main node in an asynchronous replication mode when the pushing times of the logic clock of the main node increases a preset asynchronous replication step length;
the forced copying module is used for controlling the standby node to copy the logic clock of the main node in a strong synchronous copying mode when the difference value between the logic clock of the main node and the recorded logic clock of the standby node reaches the target long time corresponding to the preset forced copying step length;
a clock updating module, configured to update the recorded logic clock of the standby node to: the main node is copied to the logic clock of the standby node;
the asynchronous copying step length is smaller than the forced copying step length, and the target time length is the time length pushed by the time service requests of the quantity of the forced copying step length;
in the asynchronous replication mode, the main node can respond to a time service request and execute an action of time service to the outside before receiving a confirmation message about successful replication fed back by the standby node;
in the strong synchronous replication mode, the master node can respond to the time service request and execute an action of time service to the outside only after receiving a confirmation message about successful replication fed back by the standby node.
8. The apparatus of claim 7, wherein the asynchronous replication module is specifically configured to:
and when the pushing times of the logic clock of the main node increases a preset asynchronous copying step length, if the difference value between the logic clock of the main node and the recorded logic clock of the standby node does not reach a target time length corresponding to a preset forced copying step length, controlling the standby node to copy the logic clock of the main node by using an asynchronous copying mode.
9. The apparatus of claim 7 or 8, wherein the asynchronous replication module is specifically configured to:
sending an asynchronous replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the asynchronous replication instruction, and sends a first confirmation message to the main node; indicating that the replication was successful upon receiving the first acknowledgement message;
the device further comprises:
the first time service module is used for providing time to the target party when the pushing times of the logic clock of the main node increases by a preset asynchronous copy step length; wherein the target is a sender of a time service request which enables to push the logic clock of the main node for the last time.
10. The apparatus according to claim 7 or 8, wherein the forced replication module is specifically configured to:
sending a strong synchronization replication instruction carrying the logic clock of the main node to the standby node, so that the standby node updates the logic clock of the standby node to the logic clock carried in the strong synchronization replication instruction, and sends a second confirmation message to the main node; indicating that the replication was successful upon receiving the second acknowledgement message;
the device further comprises:
the second time service module is used for carrying out time service to the outside of the target party after receiving the second confirmation message; wherein the target is a sender of a time service request which enables to push the logic clock of the main node for the last time.
11. The apparatus of claim 7, further comprising:
the counting updating module is used for adding 1 to a counting value used for recording the advancing times when the logic clock of the main node advances;
the count zero clearing module is used for resetting the count value after the recorded logic clock of the standby node is updated to the logic clock copied to the standby node by the main node;
the asynchronous replication module is specifically configured to: and when the count value is equal to the preset asynchronous replication step length, controlling the standby node to replicate the logic clock of the main node by using an asynchronous replication mode.
12. The electronic equipment is characterized in that the electronic equipment is a main node in a central time service cluster of a distributed system and comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory finish mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
13. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011524511.5A CN112261164B (en) | 2020-12-22 | 2020-12-22 | Logic clock synchronization method and device and central time service cluster |
PCT/CN2021/114760 WO2022134638A1 (en) | 2020-12-22 | 2021-08-26 | Logic clock synchronization method and apparatus, and central time service cluster |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011524511.5A CN112261164B (en) | 2020-12-22 | 2020-12-22 | Logic clock synchronization method and device and central time service cluster |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112261164A CN112261164A (en) | 2021-01-22 |
CN112261164B true CN112261164B (en) | 2021-03-19 |
Family
ID=74225870
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011524511.5A Active CN112261164B (en) | 2020-12-22 | 2020-12-22 | Logic clock synchronization method and device and central time service cluster |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112261164B (en) |
WO (1) | WO2022134638A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112261164B (en) * | 2020-12-22 | 2021-03-19 | 北京金山云网络技术有限公司 | Logic clock synchronization method and device and central time service cluster |
CN113900968B (en) * | 2021-12-09 | 2022-03-11 | 南湖实验室 | Method and device for realizing synchronous operation of multi-copy non-atomic write storage sequence |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102547969A (en) * | 2012-02-24 | 2012-07-04 | 电子科技大学 | High-accuracy wireless clock synchronization system for power system |
CN105245323A (en) * | 2015-08-27 | 2016-01-13 | 国电南瑞科技股份有限公司 | Distributed time-service and time-keeping method based on message synchronization |
CN109445272A (en) * | 2018-10-23 | 2019-03-08 | 全球能源互联网研究院有限公司 | The method and device of clock signal synchronization method, adjustment signal frequency |
EP3624389A1 (en) * | 2017-06-02 | 2020-03-18 | Sony Corporation | Wireless device and processing method for wireless device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7814360B2 (en) * | 2007-01-25 | 2010-10-12 | Oralce International Corporation | Synchronizing cluster time to a master node with a faster clock |
CN111211855B (en) * | 2020-01-03 | 2022-04-12 | 中国船舶重工集团公司第七0七研究所 | Mixed clock synchronization method for distributed processing system |
CN112261164B (en) * | 2020-12-22 | 2021-03-19 | 北京金山云网络技术有限公司 | Logic clock synchronization method and device and central time service cluster |
-
2020
- 2020-12-22 CN CN202011524511.5A patent/CN112261164B/en active Active
-
2021
- 2021-08-26 WO PCT/CN2021/114760 patent/WO2022134638A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102547969A (en) * | 2012-02-24 | 2012-07-04 | 电子科技大学 | High-accuracy wireless clock synchronization system for power system |
CN105245323A (en) * | 2015-08-27 | 2016-01-13 | 国电南瑞科技股份有限公司 | Distributed time-service and time-keeping method based on message synchronization |
EP3624389A1 (en) * | 2017-06-02 | 2020-03-18 | Sony Corporation | Wireless device and processing method for wireless device |
CN109445272A (en) * | 2018-10-23 | 2019-03-08 | 全球能源互联网研究院有限公司 | The method and device of clock signal synchronization method, adjustment signal frequency |
Also Published As
Publication number | Publication date |
---|---|
CN112261164A (en) | 2021-01-22 |
WO2022134638A1 (en) | 2022-06-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021180025A1 (en) | Message processing method and apparatus, electronic device and medium | |
JP6316211B2 (en) | Interval control replication | |
US10255343B2 (en) | Initialization protocol for a peer-to-peer replication environment | |
JP4594928B2 (en) | Flashback database | |
US9923967B2 (en) | Storage management system for preserving consistency of remote copy data | |
US8407688B2 (en) | Methods and apparatus for storing and transmitting historical configuration data associated with information technology assets | |
US10437788B2 (en) | Automatic detection, retry, and resolution of errors in data synchronization | |
US20130166505A1 (en) | Monitoring replication lag between geographically dispersed sites | |
CN112261164B (en) | Logic clock synchronization method and device and central time service cluster | |
US20170161313A1 (en) | Detection and Resolution of Conflicts in Data Synchronization | |
CN115599747B (en) | Metadata synchronization method, system and equipment of distributed storage system | |
CN111666134A (en) | Method and system for scheduling distributed tasks | |
CN108108126B (en) | Data processing method, device and equipment | |
CN106339176B (en) | Intermediate file processing method, client, server and system | |
CN115964436A (en) | Method and device for managing database cluster | |
CN114968656A (en) | Data rollback method, device, equipment and medium | |
CN113783666A (en) | Method and device for processing service | |
CN113986115A (en) | Method, electronic device and computer program product for copying data | |
CN113138881B (en) | Distributed file system backup method, device and system | |
WO2021259240A1 (en) | Distributed transaction processing method, terminal and computer readable storage medium | |
CN114356214B (en) | Method and system for providing local storage volume for kubernetes system | |
US11269922B2 (en) | Database server, database management method, and storage medium | |
CN114461453A (en) | Data recovery method and device from replica node, electronic equipment and readable medium | |
CN117369955A (en) | Transaction processing method and device and electronic equipment | |
JP5610532B2 (en) | Transaction history transmission apparatus, transaction management system, transaction history transmission method, and transaction history transmission program |
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 |