CN108241684B - Data updating method and cluster system - Google Patents

Data updating method and cluster system Download PDF

Info

Publication number
CN108241684B
CN108241684B CN201611220018.8A CN201611220018A CN108241684B CN 108241684 B CN108241684 B CN 108241684B CN 201611220018 A CN201611220018 A CN 201611220018A CN 108241684 B CN108241684 B CN 108241684B
Authority
CN
China
Prior art keywords
data
nodes
node
notification information
cluster system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611220018.8A
Other languages
Chinese (zh)
Other versions
CN108241684A (en
Inventor
曹召换
解军伟
赵飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisino Corp filed Critical Aisino Corp
Priority to CN201611220018.8A priority Critical patent/CN108241684B/en
Publication of CN108241684A publication Critical patent/CN108241684A/en
Application granted granted Critical
Publication of CN108241684B publication Critical patent/CN108241684B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/273Asynchronous replication or reconciliation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data updating method and a cluster system, when an application accesses a certain node, the data of the local storage of the certain node is obtained, if the data does not exist, the data is obtained from a database connected with the cluster system and then is put into the local storage of the certain node. When any node learns that the data in the database connected with the cluster system is modified, the node generates notification information that the data is modified, so that all nodes in the cluster system can delete the locally stored data, and any application accesses the data by reading the data from the database and then putting the data into a certain node in the accessed cluster system for use, thereby achieving the technical effect of indirectly synchronizing the data of each node in the cluster system without occupying bandwidth among the nodes, and improving the efficiency of data access by the application.

Description

Data updating method and cluster system
Technical Field
The present invention relates to the field of computers, and in particular, to a data updating method and a cluster system.
Background
With the continuous launch of applications, the access amount of applications is continuously increased, and in order to increase the access efficiency, a data storage technology or a cache technology is used in the applications. The frequently used data is placed in the memory, so that the frequently used data is not obtained through IO operation or database access during access, network access or hard disk access can be reduced, the data is obtained from the memory, and the access efficiency is improved.
However, with the increase of the access amount, one application server cannot meet the requirement of the application concurrency amount, and further, the application needs to be deployed in a cluster environment, so that the application concurrency amount can be greatly increased. With the advent of clusters, caching or storage that we have previously used to improve access efficiency, synchronization problems of data, i.e., the problem of mismatch between local data and database data or the latest file content, can arise. At present, a scheme exists, in which after node data is changed, the changed data is synchronously copied to other nodes, and under the condition of a large access amount, bandwidth among the nodes is occupied, and finally, problems of reduced concurrency amount, reduced efficiency and the like are caused.
The prior art has the following technical problems: when a user modifies application data, local data in the cluster system is not matched with the application data or the latest file content in a database connected with the cluster system, and after data of a certain node in the cluster system is changed, the changed data is synchronously copied to other nodes, so that bandwidth among the nodes is occupied, concurrency is reduced, and data access efficiency is reduced.
Disclosure of Invention
The invention provides a data updating method and a cluster system, which are used for solving the technical problems that after data of a certain node in the cluster system is changed, the changed data is synchronously copied to other nodes, bandwidth among the nodes is occupied, concurrency is reduced, and data access efficiency is reduced in the prior art.
The first aspect of the present invention provides a data updating method, applied to a cluster system, including:
detecting whether a prompt message for representing that first data in a database connected with the cluster system is modified is obtained by an ith node in the cluster system; the cluster system comprises M nodes including 1 master node and M-1 slave nodes, wherein the ith node is any one of the M nodes, the first data is obtained by modifying a user side in the database through the ith node, and M is an integer greater than or equal to 2;
and when the prompt information is detected and obtained, the ith node generates notification information for enabling the M nodes to execute the deleting operation of deleting the first data.
Preferably, after the ith node generates a notification message for enabling the M nodes to perform a deletion operation for deleting the first data, the method further includes:
when the ith node is determined to be the master node, the ith node sends the notification information to the M-1 slave nodes so that the M nodes can execute the deletion operation based on the notification information.
Preferably, after the ith node generates a notification message for enabling the M nodes to perform a deletion operation for deleting the first data, the method further includes:
when the ith node is determined to be one of the M-1 slave nodes, the ith node sends the notification information to the master node, and the master node sends the notification information to the M-1 slave nodes except the master node, so that the M nodes can execute the deletion operation based on the notification information;
or, when it is determined that the ith node is one of the M-1 slave nodes, the ith node sends the notification information to the master node and can perform the deletion operation based on the notification information, and the master node sends the notification information to M-2 slave nodes except the master node and the ith node, so that the M-1 slave nodes except the ith node can perform the deletion operation based on the notification information.
Preferably, the notification message includes a first identity characterizing an identity of the first data in the database, so that the M nodes can recognize the first data, so that the M nodes can perform the deletion operation for the first data based on the notification information.
Preferably, N nodes of the M nodes store the first data, where N is a positive integer less than or equal to M.
A second aspect of the present invention provides a cluster system comprising M nodes including 1 master node and M-1 slave nodes:
the ith node in the cluster system is used for detecting whether prompt information for representing that first data in a database connected with the cluster system is modified is obtained; the ith node is any one of the M nodes, the first data is modified in the database by the user side through the ith node, and M is an integer greater than or equal to 2;
when the prompt information is detected and obtained, the ith node is configured to generate notification information for enabling the M nodes to perform a deletion operation of deleting the first data.
Preferably, the system further comprises:
when the ith node is determined to be the master node, the ith node is configured to send the notification information to the M-1 slave nodes, so that the M nodes can perform the deletion operation based on the notification information.
Preferably, the system further comprises:
when the ith node is determined to be one of the M-1 slave nodes, the ith node is used for sending the notification information to the master node, and the master node is used for sending the notification information to the M-1 slave nodes except the master node, so that the M nodes can execute the deletion operation based on the notification information;
or, when it is determined that the ith node is one of the M-1 slave nodes, the ith node is configured to send the notification information to the master node and be capable of performing the deletion operation based on the notification information, and the master node is configured to send the notification information to M-2 slave nodes other than the master node and the ith node, so that the M-1 slave nodes other than the ith node are capable of performing the deletion operation based on the notification information.
Preferably, the notification message includes a first identity characterizing an identity of the first data in the database, so that the M nodes can recognize the first data, so that the M nodes can perform the deletion operation for the first data based on the notification information.
Preferably, N nodes of the M nodes store the first data, where N is a positive integer less than or equal to M.
One or more embodiments of the invention include at least the following technical effects or advantages: the invention provides a data updating method and a cluster system, wherein an ith node in the cluster system detects whether prompt information for representing that first data in a database connected with the cluster system is modified is obtained; the cluster system comprises M nodes including 1 master node and M-1 slave nodes, wherein the ith node is any one of the M nodes, the first data is obtained by modifying a user side in the database through the ith node, and M is an integer greater than or equal to 2; when the prompt information is detected to be obtained, the ith node generates notification information for notifying M-1 nodes except the ith node of executing the deletion operation of the first data, so that the M nodes can execute the deletion operation based on the notification information.
Specifically, for example, when an application accesses a certain node, data stored locally in the certain node is acquired, and if the data does not exist, the data is acquired from a database connected to the cluster system and then placed in the local storage of the certain node. When any node learns that the data in the database connected with the cluster system is modified, the node generates notification information that the data is modified, so that all nodes in the cluster system can delete the locally stored data, and any application accesses the data by reading the data from the database and then putting the data into a certain node in the accessed cluster system for use. By adopting the technical scheme, the invention solves the technical problems that after data of a certain node in the cluster system is changed, the changed data is synchronously copied to other nodes, the bandwidth among the nodes is occupied, the concurrency is reduced, and the data access efficiency is reduced in the prior art, achieves the aim of indirectly synchronizing the data of the nodes in the cluster system, does not occupy the bandwidth among the nodes, and accordingly improves the technical effect of improving the data access efficiency of application.
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, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flow chart of a data updating method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a data delete operation in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart illustrating a process for performing a data storage operation according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a data updating method, which is applied to a cluster system, wherein an ith node in the cluster system detects whether prompt information for representing that first data in a database connected with the cluster system is modified is obtained; the cluster system comprises M nodes including 1 master node and M-1 slave nodes, wherein the ith node is any one of the M nodes, the first data is obtained by modifying a user side in the database through the ith node, and M is an integer greater than or equal to 2; when the prompt information is detected to be obtained, the ith node generates notification information for enabling the M nodes to execute deletion operation for deleting the first data when the prompt information is detected to be obtained. By adopting the technical scheme, the invention solves the technical problems that after the data of a certain node in the cluster system is changed, the changed data is synchronously copied to other nodes, the bandwidth among the nodes is occupied, the concurrency is reduced and the data access efficiency is reduced in the prior art, achieves the aim of indirectly synchronizing the data of the nodes in the cluster system, does not occupy the bandwidth among the nodes, and further improves the technical effect of improving the data access efficiency of the application.
As shown in fig. 1, a first embodiment of the present invention provides a data updating method applied to a cluster system, including:
s101, detecting whether prompt information used for representing that first data in a database connected with the cluster system is modified is obtained by an ith node in the cluster system; the cluster system comprises M nodes including 1 master node and M-1 slave nodes, wherein the ith node is any one of the M nodes, the first data is obtained by modifying a user side in the database through the ith node, and M is an integer greater than or equal to 2;
s102, when the prompt information is detected and obtained, the ith node generates notification information used for enabling the M nodes to execute deletion operation of deleting the first data.
Specifically, for example, there are 10 nodes in the cluster system in total, when the application accesses the 5 th node in the cluster system to obtain the first data locally stored by the node, if the 5 th node does not have the first data, the first data is obtained from the database connected to the cluster system and is stored in the node, and the storage mode is preferably cached in the memory of the node. The same execution mode is adopted for other nodes of the cluster system when being accessed by the application. When an application modifies first data in a database connected with a cluster system by accessing a 2 nd node (which may also be any other node in the cluster system) in the cluster system, the 2 nd node generates notification information for enabling 10 nodes in the cluster system to perform a deletion operation for deleting the first data when obtaining that the first data in the database connected with the cluster system is modified. Therefore, all nodes in the cluster system can delete the first data stored locally, so that any application accesses the first data, reads the data from the database and then places the data into a certain node in the accessed cluster system for use. The first data is preferably stored in the memory of the node in a mode of being stored in the node, and the data which accords with the use of the cache is data which has high access rate and is relatively stable in the application running process.
After the ith node generates a notification message for enabling the M nodes to perform a delete operation to delete the first data, the method further includes:
when the ith node is determined to be the master node, the ith node sends the notification information to the M-1 slave nodes so that the M nodes can execute the deletion operation based on the notification information.
Specifically, following the foregoing example, for example, the 2 nd node in the cluster system generates a notification message that the first data is modified, and if the 2 nd node is the master node, the 2 nd node sends the notification message to the remaining 9 slave nodes, so that 10 nodes in the cluster system can all perform the deletion operation of deleting the first data stored in each node based on the notification message.
After the ith node generates a notification message for enabling the M nodes to perform a delete operation to delete the first data, the method further includes:
when the ith node is determined to be one of the M-1 slave nodes, the ith node sends the notification information to the master node, and the master node sends the notification information to the M-1 slave nodes except the master node, so that the M nodes can execute the deletion operation based on the notification information;
or, when it is determined that the ith node is one of the M-1 slave nodes, the ith node sends the notification information to the master node and can perform the deletion operation based on the notification information, and the master node sends the notification information to M-2 slave nodes except the master node and the ith node, so that the M-1 slave nodes except the ith node can perform the deletion operation based on the notification information.
Specifically, following the foregoing example, for example, the 2 nd node in the cluster system generates notification information that the first data is modified, and if the 2 nd node is a slave node, the 2 nd node sends the notification information to the master node, and the master node sends the notification information to the 9 slave nodes except the master node, so that the 10 nodes in the cluster system can all execute a deletion operation of deleting the first data stored in each node based on the notification information.
Or, for example, the 2 nd node in the cluster system generates notification information that the first data is modified, if the 2 nd node is a slave node, the 2 nd node sends the notification information to a master node and can perform the deletion operation based on the notification information, and the master node sends the notification information to 8 slave nodes other than the master node and the 2 nd node, so that 9 nodes other than the 2 nd node in the cluster system can perform the deletion operation of deleting the first data stored in each node based on the notification information, and thus 10 nodes in the cluster system can perform the deletion operation of deleting the first data stored in each node based on the notification information.
The notification message includes a first identity characterizing an identity of the first data in the database to enable the M nodes to identify the first data so that the M nodes can perform the delete operation for the first data based on the notification information.
A specific flow diagram is shown in fig. 2. For example, the ith node learns that the data of the database is modified, the ith node generates a notification message including an identity tag of the modified data, if the ith node is a master node, the ith node notifies the rest of nodes of the notification message, and if the ith node is a slave node, the ith node notifies the master node, and the master node notifies the rest of nodes of the notification message. For example, when an application accesses the first data, the application accesses the first data through a primary key or a self-defined value, and the primary key or the self-defined value is used as a first identity mark of the first data; the notification message includes a first identity token characterizing an identity of the first data in the database, such that all nodes in the cluster system are able to identify the first data based on the notification message, thereby performing the delete operation for the first data.
N nodes in the M nodes store the first data, wherein N is a positive integer less than or equal to M.
A flow chart of a specific data storage is as shown in fig. 3. For example, an application requests to access first data, if an ith node in the cluster system is accessed by the application for the first time and the ith node does not store the first data, the ith node reads the first data from a hard disk or the database, stores the first data locally and returns the first data; and if the ith node is requested by the application to access first data before, directly returning the first data. The first data may be stored in a memory of the ith node as cache data, where the ith node is any node in the cluster system.
Continuing with the foregoing example, when an application accesses such data, for example, it accesses it via a primary key or a self-defined value that serves as the first identity token for the first data. When this data is accessed for the first time, any node in the cluster environment, for example, the 4 th node, reads the first data corresponding to the first identity token from a hard disk or a database connected to the cluster environment, and then stores the first data corresponding to the first identity token in the 4 th node, preferably in a memory of the node. When the first data is accessed through the node next time, the first data is directly obtained from the node through the first identity mark, and the first data is preferably obtained from a memory of the node, so that the access efficiency of the application is improved. In order to save the access bandwidth between clusters, cached data is not transmitted to each node in a network transmission manner, but when a user accesses any node for the first time, the data is acquired in the same manner and is stored in the node, preferably stored in a memory of the node, and the access efficiency of the application is improved by storing the data in the memory. For example, if the 4 th node and the 5 th node in the cluster system have accessed the first data in the database, the 4 th node and the 5 th node in the cluster system have stored the first data.
By the technical scheme of the embodiment, all messages in the cluster system are transmitted through one main node, so that long connection among nodes can be reduced, and network bandwidth is saved. After the stored data of any node is modified, the identity tag of the data is transmitted to the master node, the master node distributes the message to other nodes, informs all the nodes to delete the data corresponding to the identity tag from the local, so as to ensure that when the node is accessed, the latest data is obtained from a hard disk or a database connected with the cluster system and then put into the accessed node for standby, optionally, the data is stored in a memory of the node, thereby reducing the mesh communication among all the nodes in the cluster system, achieving the aim of indirectly synchronizing the data of all the nodes in the cluster system, not occupying the bandwidth among all the nodes, and further improving the technical effect of the efficiency of data access by application.
In any application, as long as the deployment mode of the cluster is used, the scheme of the invention can be used for updating the data. The scheme provided by the invention can solve the technical problems that after the data of a certain node in the cluster system is changed, the changed data is synchronously copied to other nodes, the bandwidth among the nodes is occupied, the concurrency is reduced, and the data access efficiency is reduced in the prior art, and achieves the technical effects of indirectly synchronizing the data of the nodes in the cluster system, not occupying the bandwidth among the nodes, and further improving the data access efficiency of the application.
A second embodiment of the present invention provides a cluster system, where the cluster system includes M nodes including 1 master node and M-1 slave nodes, and an ith node in the cluster system is configured to detect whether prompt information for indicating that first data in a database connected to the cluster system has been modified is obtained; the ith node is any one of the M nodes, the first data is modified in the database by the user side through the ith node, and M is an integer greater than or equal to 2;
when the prompt information is detected and obtained, the ith node is configured to generate notification information for enabling the M nodes to perform a deletion operation of deleting the first data.
Specifically, for example, there are 10 nodes in the cluster system in total, when the application accesses the 5 th node in the cluster system to obtain the first data locally stored by the node, if the 5 th node does not have the first data, the first data is obtained from the database connected to the cluster system and is stored in the node, and the storage mode is preferably cached in the memory of the node. The same execution mode is adopted for other nodes of the cluster system when being accessed by the application. When an application modifies first data in a database connected with a cluster system by accessing a 2 nd node (which may also be any other node in the cluster system) in the cluster system, the 2 nd node generates notification information for enabling 10 nodes in the cluster system to perform a deletion operation for deleting the first data when obtaining that the first data in the database connected with the cluster system is modified. Therefore, all nodes in the cluster system can delete the first data stored locally, so that any application accesses the first data, reads the data from the database and then places the data into a certain node in the accessed cluster system for use. The first data is preferably stored in the memory of the node in a mode of being stored in the node, and the data which accords with the use of the cache is data which has high access rate and is relatively stable in the application running process.
When the ith node is determined to be the master node, the ith node is configured to send the notification information to the M-1 slave nodes, so that the M nodes can perform the deletion operation based on the notification information.
Specifically, following the foregoing example, for example, the 2 nd node in the cluster system generates a notification message that the first data is modified, and if the 2 nd node is the master node, the 2 nd node sends the notification message to the remaining 9 slave nodes, so that 10 nodes in the cluster system can all perform the deletion operation of deleting the first data stored in each node based on the notification message.
When the ith node is determined to be one of the M-1 slave nodes, the ith node is used for sending the notification information to the master node, and the master node is used for sending the notification information to the M-1 slave nodes except the master node, so that the M nodes can execute the deletion operation based on the notification information;
or, when it is determined that the ith node is one of the M-1 slave nodes, the ith node is configured to send the notification information to the master node and be capable of performing the deletion operation based on the notification information, and the master node is configured to send the notification information to M-2 slave nodes other than the master node and the ith node, so that the M-1 slave nodes other than the ith node are capable of performing the deletion operation based on the notification information.
Specifically, following the foregoing example, for example, the 2 nd node in the cluster system generates notification information that the first data is modified, and if the 2 nd node is a slave node, the 2 nd node sends the notification information to the master node, and the master node sends the notification information to the 9 slave nodes except the master node, so that the 10 nodes in the cluster system can all execute a deletion operation of deleting the first data stored in each node based on the notification information.
Or, for example, the 2 nd node in the cluster system generates notification information that the first data is modified, if the 2 nd node is a slave node, the 2 nd node sends the notification information to a master node and can perform the deletion operation based on the notification information, and the master node sends the notification information to 8 slave nodes other than the master node and the 2 nd node, so that 9 nodes other than the 2 nd node in the cluster system can perform the deletion operation of deleting the first data stored in each node based on the notification information, and thus 10 nodes in the cluster system can perform the deletion operation of deleting the first data stored in each node based on the notification information.
The notification message includes a first identity characterizing an identity of the first data in the database to enable the M nodes to identify the first data so that the M nodes can perform the delete operation for the first data based on the notification information.
In particular, following the foregoing example, for example, when an application accesses the first data, the application accesses the first data through a primary key or a self-defined value, and the primary key or the self-defined value is used as the first identity token of the first data; the notification message includes a first identity token characterizing an identity of the first data in the database, such that all nodes in the cluster system are able to identify the first data based on the notification message, thereby performing the delete operation for the first data.
N nodes in the M nodes store the first data, wherein N is a positive integer less than or equal to M.
In particular, following the previous example, when an application accesses such data, it accesses the data through a primary key or a self-defined value, which is used as the first identity token of the first data. When this data is accessed for the first time, any node in the cluster environment, for example, the 4 th node, reads the first data corresponding to the first identity token from a hard disk or a database connected to the cluster environment, and then stores the first data corresponding to the first identity token in the 4 th node, preferably in a memory of the node. When the first data is accessed through the node next time, the first data is directly obtained from the node through the first identity mark, and the first data is preferably obtained from a memory of the node, so that the access efficiency of the application is improved. In order to save the access bandwidth between clusters, cached data is not transmitted to each node in a network transmission manner, but when a user accesses any node for the first time, the data is acquired in the same manner and is stored in the node, preferably stored in a memory of the node, and the access efficiency of the application is improved by storing the data in the memory. For example, if the 4 th node and the 5 th node in the cluster system have accessed the first data in the database, the 4 th node and the 5 th node in the cluster system have stored the first data.
For any node in the cluster, the local cache is used for storing the first data, so that the efficiency can be improved, and the network transmission can be reduced.
By the technical scheme of the embodiment, all messages in the cluster system are transmitted through one main node, so that long connection among nodes can be reduced, and network bandwidth is saved. After the stored data of any node is modified, the identity tag of the data is transmitted to the master node, the master node distributes the message to other nodes, informs all the nodes to delete the data corresponding to the identity tag from the local, so as to ensure that when the node is accessed, the latest data is obtained from a hard disk or a database connected with the cluster system and then put into the accessed node for standby, optionally, the data is stored in a memory of the node, thereby reducing the mesh communication among all the nodes in the cluster system, achieving the aim of indirectly synchronizing the data of all the nodes in the cluster system, not occupying the bandwidth among all the nodes, and further improving the technical effect of the efficiency of data access by application.
In any application, as long as the deployment mode of the cluster is used, the scheme of the invention can be used for updating the data. The scheme provided by the invention can solve the technical problems that after the data of a certain node in the cluster system is changed, the changed data is synchronously copied to other nodes, the bandwidth among the nodes is occupied, the concurrency is reduced, and the data access efficiency is reduced in the prior art, and achieves the technical effects of indirectly synchronizing the data of the nodes in the cluster system, not occupying the bandwidth among the nodes, and further improving the data access efficiency of the application.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A data updating method is applied to a cluster system and is characterized by comprising the following steps:
detecting whether a prompt message for representing that first data in a database connected with the cluster system is modified is obtained by an ith node in the cluster system; the cluster system comprises M nodes including 1 master node and M-1 slave nodes, wherein the ith node is any one of the M nodes, the first data is obtained by modifying a user side in the database through the ith node, and M is an integer greater than or equal to 2;
when the prompt information is detected and obtained, the ith node generates notification information used for enabling the M nodes to execute deletion operation of the first data;
and according to the notification information, the M nodes delete the first data in the local database corresponding to the M nodes.
2. The method of claim 1, wherein after the ith node generates a notification message for enabling the M nodes to perform a delete operation to delete the first data, the method further comprises:
when the ith node is determined to be the master node, the ith node sends the notification information to the M-1 slave nodes so that the M nodes can execute the deletion operation based on the notification information.
3. The method of claim 1, wherein after the ith node generates a notification message for enabling the M nodes to perform a delete operation to delete the first data, the method further comprises:
when the ith node is determined to be one of the M-1 slave nodes, the ith node sends the notification information to the master node, and the master node sends the notification information to the M-1 slave nodes except the master node, so that the M nodes can execute the deletion operation based on the notification information;
or, when it is determined that the ith node is one of the M-1 slave nodes, the ith node sends the notification information to the master node and can perform the deletion operation based on the notification information, and the master node sends the notification information to M-2 slave nodes except the master node and the ith node, so that the M-1 slave nodes except the ith node can perform the deletion operation based on the notification information.
4. A method according to any of claims 1-3, characterized by:
the notification information includes a first identity characterizing an identity of the first data in the database to enable the M nodes to identify the first data so that the M nodes can perform the delete operation for the first data based on the notification information.
5. The method of claim 1, wherein N of the M nodes store the first data, wherein N is a positive integer less than or equal to M.
6. A cluster system comprising M nodes including 1 master node and M-1 slave nodes, characterized by:
the ith node in the cluster system is used for detecting whether prompt information for representing that first data in a database connected with the cluster system is modified is obtained; the ith node is any one of the M nodes, the first data is modified in the database by the user side through the ith node, and M is an integer greater than or equal to 2;
when the prompt information is detected and obtained, the ith node is used for generating notification information for enabling the M nodes to execute deletion operation of deleting the first data;
and the M nodes are used for deleting the first data in the local database corresponding to the M nodes according to the notification information.
7. The system of claim 6, wherein the system further comprises:
when the ith node is determined to be the master node, the ith node is configured to send the notification information to the M-1 slave nodes, so that the M nodes can perform the deletion operation based on the notification information.
8. The system of claim 6, wherein the system further comprises:
when the ith node is determined to be one of the M-1 slave nodes, the ith node is used for sending the notification information to the master node, and the master node is used for sending the notification information to M-1 slave nodes except the master node, so that the M nodes can execute the deletion operation based on the notification information;
or, when it is determined that the ith node is one of the M-1 slave nodes, the ith node is configured to send the notification information to the master node and be capable of performing the deletion operation based on the notification information, and the master node is configured to send the notification information to M-2 slave nodes other than the master node and the ith node, so that the M-1 slave nodes other than the ith node are capable of performing the deletion operation based on the notification information.
9. The system of any of claims 6-8, wherein the notification information includes a first identity characterizing an identity of the first data in the database to enable the M nodes to identify the first data so that the M nodes can perform the delete operation for the first data based on the notification information.
10. The system of claim 6, wherein N of the M nodes store the first data, wherein N is a positive integer less than or equal to M.
CN201611220018.8A 2016-12-26 2016-12-26 Data updating method and cluster system Active CN108241684B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611220018.8A CN108241684B (en) 2016-12-26 2016-12-26 Data updating method and cluster system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611220018.8A CN108241684B (en) 2016-12-26 2016-12-26 Data updating method and cluster system

Publications (2)

Publication Number Publication Date
CN108241684A CN108241684A (en) 2018-07-03
CN108241684B true CN108241684B (en) 2021-08-24

Family

ID=62702125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611220018.8A Active CN108241684B (en) 2016-12-26 2016-12-26 Data updating method and cluster system

Country Status (1)

Country Link
CN (1) CN108241684B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127045A (en) * 2007-09-25 2008-02-20 中兴通讯股份有限公司 Database repeatable reading implement method, device and database management system
CN101540726A (en) * 2009-04-27 2009-09-23 华为技术有限公司 Method, client, server and system of synchronous data
CN101610276A (en) * 2008-06-16 2009-12-23 华为技术有限公司 Data soft delete, recovery and method for synchronous and terminal and system
CN102360359A (en) * 2011-09-29 2012-02-22 用友软件股份有限公司 Data management device and data management method
CN104750738A (en) * 2013-12-30 2015-07-01 中国移动通信集团公司 Data information updating method, data node, management node and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI251756B (en) * 2004-05-05 2006-03-21 Rdc Semiconductor Co Ltd Data updating method for embedded system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127045A (en) * 2007-09-25 2008-02-20 中兴通讯股份有限公司 Database repeatable reading implement method, device and database management system
CN101610276A (en) * 2008-06-16 2009-12-23 华为技术有限公司 Data soft delete, recovery and method for synchronous and terminal and system
CN101540726A (en) * 2009-04-27 2009-09-23 华为技术有限公司 Method, client, server and system of synchronous data
CN102360359A (en) * 2011-09-29 2012-02-22 用友软件股份有限公司 Data management device and data management method
CN104750738A (en) * 2013-12-30 2015-07-01 中国移动通信集团公司 Data information updating method, data node, management node and system

Also Published As

Publication number Publication date
CN108241684A (en) 2018-07-03

Similar Documents

Publication Publication Date Title
CN112260876B (en) Dynamic gateway route configuration method, platform, computer equipment and storage medium
CN108418900B (en) Caching method, write-in point client and read client in server cluster system
CN106878376B (en) Configuration management method and system
WO2017050014A1 (en) Data storage processing method and device
CN108804234B (en) Data storage system and method of operation thereof
CN105426321A (en) RDMA friendly caching method using remote position information
US20170153909A1 (en) Methods and Devices for Acquiring Data Using Virtual Machine and Host Machine
CN103152390A (en) Method and device and nodes and system for node configuration of distributed storage system
US11288237B2 (en) Distributed file system with thin arbiter node
CN113010549A (en) Data processing method based on remote multi-active system, related equipment and storage medium
KR101175505B1 (en) System for providing user data storage enviroment using network based file system in n-screen
KR20210040864A (en) File directory traversal method, apparatus, device, and medium
US20180121531A1 (en) Data Updating Method, Device, and Related System
CN111831221B (en) Distributed storage method and system based on cloud storage
CN108241684B (en) Data updating method and cluster system
CN108400884B (en) Method, system and device for improving stability of website service
CN103327026A (en) Data updating method and updating system
CN114896215A (en) Metadata storage method and device
CN110058790B (en) Method, apparatus and computer program product for storing data
CN106790458B (en) Cross-local area network Memcache data sharing method and system
CN113742376A (en) Data synchronization method, first server and data synchronization system
CN111488324A (en) Distributed network file system based on message middleware and working method thereof
CN110879774B (en) Network element performance data alarming method and device
CN114745281B (en) Data processing method and device
US11463535B1 (en) Using forensic trails to mitigate effects of a poisoned cache

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