CN101192971A - Detection method for master/slave data consistency - Google Patents
Detection method for master/slave data consistency Download PDFInfo
- Publication number
- CN101192971A CN101192971A CNA2006101456854A CN200610145685A CN101192971A CN 101192971 A CN101192971 A CN 101192971A CN A2006101456854 A CNA2006101456854 A CN A2006101456854A CN 200610145685 A CN200610145685 A CN 200610145685A CN 101192971 A CN101192971 A CN 101192971A
- Authority
- CN
- China
- Prior art keywords
- data
- master
- consistency
- slave
- slave data
- 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.)
- Granted
Links
Images
Landscapes
- Hardware Redundancy (AREA)
Abstract
The invention discloses a method for detecting the consistency of main data and stand-by data, which includes the following steps: consistency detection of the main data and the stand-by data is started; main and stand-by synchronization of the data is paused; the consistency detection is operated by a main engine; the consistency detection is operated by a stand-by engine; and the synchronized operation of main and stand-by engines is recovered. The invention can detect the main engine and the stand-by engine dynamically and real-timely, and can alarm timely and automatically recover the consistency of the main data and the stand-by data when the main data and stand-by data is inconsistent. Besides, the invention can record the inconsistent alarm of the main data and the stand-by data, which is convenient to locate an inconsistent fault and shorten the time of locating the fault.
Description
Technical field
The present invention relates to a kind of communication technology, specifically, relate to a kind of detection method for master/slave data consistency.
Background technology
In embedded communication equipment, in order to improve the reliability and security of system, the active and standby working method of master control borad often is provided, in the system of active and standby working method, under the normal condition, a master control borad is in normal operating state (being called main frame), another master control borad then is in stand-by state (being called standby host), satisfying under the situation of certain condition, originally the master control borad that was in stand-by state will transfer to be led with state (this process becomes masterslave switchover), thus the normal stable operation of assurance system.Before masterslave switchover took place, standby host kept data and the state consistent with main frame as far as possible, otherwise behind the masterslave switchover, system is easy to break down, and the very difficult location of this fault.In the process of handling test failure, engineering failure, often run into such problem, after through repeatedly analysis, test, finds that master/slave data was inconsistent after such fault was owing to the generation masterslave switchover to cause.
Embedded communication system adopts active and standby working method, and so active and standby working method helps to improve the stability of system.But in actual applications, active and standby control logic realizes complicated, active and standby function often more easily breaks down, and the fault relevant with active and standby function located, is difficult to resolve and determines than difficult, especially when masterslave switchover takes place, standby host is the correctly data and the state of master synchronization not, and causing switching the back system can't operate as normal even fault such as service disconnection.If can find in time and point out master/slave data inconsistent, not only can shorten the cycle that solves similar problem, and can just pinpoint the problems at the stage of testing oneself, test phase.
Summary of the invention
Technical problem solved by the invention provides a kind of detection method for master/slave data consistency, can in time alarm when master/slave data is inconsistent, and master/slave data can be synchronous again.
Technical scheme is as follows:
The detection method for master/slave data consistency step is as follows:
(1) consistency detection of startup master/slave data;
(2) suspend to data active and standby synchronously;
(3) main frame carries out the operation of consistency detection;
(4) standby host carries out the operation of consistency detection;
(5) recover active and standby synchronous.
Further, in the step (1), the trigger condition that master/slave data consistency detect to start comprises: the size of traffic carrying capacity or by the webmaster manual activation.
Further, in the step (1), described master/slave data comprises static data or dynamic data.
Further, step (1) further comprises: the data that need be consistent between active and standby are classified.
Further, in the step (2),, forbid that configuration changes for static data; For dynamic data, main frame stops to standby host synchronous dynamic data.
Further, in the step (3), for the consistency detection of static data and dynamic data, main frame is collected static data and dynamic data respectively, and the calculation check value sends to standby host with checking data respectively.
Further, in the step (3), described checking data comprises data type or check value.
Further, step (4) is specially:
After standby host receives checking data, collect data, calculation check value according to data type, and compare with the check value of main frame, if equate then think the master/slave data unanimity, if unequal then think that master/slave data is inconsistent, and standby host sends to main frame with the result of consistency detection.
Further, in the step (4), when master/slave data was inconsistent, main frame was alarmed or synchrodata arrives standby host.
Further, in the step (4), the result that standby host sends to the consistency detection of main frame comprises: whether data type or master/slave data be consistent.
The present invention can be in real time, dynamically to the detecting synchronously of active and standby machine, when master/slave data is inconsistent, can in time alarm, and recover the unanimity of master/slave data automatically.And the present invention can write down the inconsistent alarm of master/slave data, is convenient to inconsistent fault is positioned, and shortens fault location time.
Description of drawings
Fig. 1 is the flow chart of the preferred embodiment of the present invention.
Embodiment
The inventive method is to realize master/slave data consistency by synchrodata between the active and standby machine.
With reference to the accompanying drawings, the preferred embodiments of the present invention are described in detail.
As shown in Figure 1, the detection method for master/slave data consistency step is as follows:
Step S101: the data that need be consistent between active and standby are classified.
The data that need be consistent between active and standby are done classification, every type data are done consistency detection independently, make to help to reduce the complexity of master/slave data consistency detection property like this, and can provide more detailed master/slave data inconsistent reason.
In the present embodiment, data are divided into static data and dynamic data.Data are put in the static data assignment, must deposits, otherwise can influence the function of system.Dynamic data refers to can be by static data data that generate, that produced by service operation.
Static data is difficult for changing, and generally just change in configuration variation, and dynamic data changes frequently, constantly changes in the service operation process.Not labile static data and labile dynamic data are distinguished, help to reduce the complexity of master/slave data consistency detection property, and can provide more detailed master/slave data inconsistent reason.
According to the systemic-function demand, static data and dynamic data can further segment type respectively.
Step S102: the consistency detection of host-initiated master/slave data.
Main frame triggers under certain condition, starts the consistency detection of the type master/slave data.The user can set the condition of triggering as required, for example traffic carrying capacity can be set at trigger condition, according to the size triggering consistency detection of traffic carrying capacity.The size of this business that provides as the client of equipment is provided traffic carrying capacity, as the traffic carrying capacity of the traffic carrying capacity of making a phone call, online.
The consistency detection of master/slave data should avoid influencing the operation of regular traffic as far as possible, so the startup of consistency detection should just trigger under certain condition.The consistency detection of master/slave data should reduce the influence to regular traffic as far as possible, should just trigger startup under the less condition of traffic carrying capacity as far as possible.
In the present embodiment, the condition of triggering is as follows:
(1) for the consistency detection of static data, when traffic carrying capacity is less, triggers automatically, for example triggered less than 20% o'clock in the CPU occupation rate.
(2) for the consistency detection of dynamic data, fixed point triggers under the less condition of traffic carrying capacity, for example triggers during zero point every day.
(3) consistency detection of the consistency detection of static data and dynamic data can manually trigger by webmaster, detects the consistency of master/slave data immediately.
Step S103: after starting the consistency detection of master/slave data, the main frame time-out is active and standby synchronous to data.
Main frame is the detection starting point that assurance and standby host are consistent after the consistency detection that starts the type master/slave data, and main frame should suspend the active and standby synchronous of the type data.
For static data, it is unique approach that causes static data to change that configuration changes, and therefore in the process of doing the static data consistency detection, forbids that configuration changes.
For dynamic data, mainly be that service operation causes dynamic data to change, because can not forbid professional operation, in the process of doing the dynamic data consistency detection, main frame stops to standby host synchronous dynamic data, after consistency detection is finished, again with all dynamic datas to standby host synchronously once.
Step S104: main frame carries out the operation of consistency detection.
At the type data, main frame is collected data and calculation check value, and checking data (comprising data type, check value) is sent to standby host.
To the consistency detection of static data and dynamic data, main frame is collected static data and dynamic data respectively, calculates the CRC check value respectively, and checking data (comprising data type, CRC check value) is sent to standby host.
Step S105: standby host carries out the operation of consistency detection.
Standby host receives checking data, collects data according to data type, calculates the CRC check value equally, and compares with the CRC check value of main frame, if equate then think the master/slave data unanimity, otherwise thinks that master/slave data is inconsistent.Standby host sends to main frame with result's (comprising data type, active and standby whether consistent) of consistency detection.
Step S106: main frame is judged the consistency of master/slave data.
When master/slave data is consistent, execution in step S108; When master/slave data is inconsistent, execution in step S107.
Step S107: the main frame alarm, synchrodata is to standby host again.
Main frame is received the consistency detection result of standby host, if master/slave data is inconsistent, treatment measures comprise:
(1) alert to the webmaster report.
The inconsistent alarm of master/slave data has been arranged, before fault location, can check the current inconsistent alarm of master/slave data that whether has earlier, check whether the inconsistent alarm of master/slave data is arranged in the history alarm, if the inconsistent alarm of master/slave data is arranged, can check the master/slave data stationary problem earlier emphatically, to shorten fault location time.
(2) synchrodata again.
Standby host is again to main frame synchrodata again, and according to configuration, synchrodata also can continue to keep on-the-spot again.
Step S108: recover active and standby synchronous.
Main frame recovers the active and standby synchronous of related data, allows the active and standby synchronous of the type data again.
Claims (10)
1. detection method for master/slave data consistency, step is as follows:
(1) consistency detection of startup master/slave data;
(2) suspend to data active and standby synchronously;
(3) main frame carries out the operation of consistency detection;
(4) standby host carries out the operation of consistency detection;
(5) recover active and standby synchronous.
2. detection method for master/slave data consistency according to claim 1 is characterized in that, in the step (1), the trigger condition that master/slave data consistency detect to start comprises: the size of traffic carrying capacity or by the webmaster manual activation.
3. detection method for master/slave data consistency according to claim 1 is characterized in that, in the step (1), described master/slave data comprises static data or dynamic data.
4. detection method for master/slave data consistency according to claim 1 is characterized in that, step (1) further comprises: the data that need be consistent between active and standby are classified.
5. detection method for master/slave data consistency according to claim 1 is characterized in that, in the step (2), for static data, forbids that configuration changes; For dynamic data, main frame stops to standby host synchronous dynamic data.
6. detection method for master/slave data consistency according to claim 1 is characterized in that, in the step (3), consistency detection for static data and dynamic data, main frame is collected static data and dynamic data respectively, and the calculation check value sends to standby host with checking data respectively.
7. detection method for master/slave data consistency according to claim 6 is characterized in that, in the step (3), described checking data comprises data type or check value.
8. detection method for master/slave data consistency according to claim 1 is characterized in that, step (4) is specially:
After standby host receives checking data, collect data, calculation check value according to data type, and compare with the check value of main frame, if equate then think the master/slave data unanimity, if unequal then think that master/slave data is inconsistent, and standby host sends to main frame with the result of consistency detection.
9. detection method for master/slave data consistency according to claim 8 is characterized in that, in the step (4), when master/slave data was inconsistent, main frame was alarmed or synchrodata arrives standby host.
10. detection method for master/slave data consistency according to claim 8 is characterized in that, in the step (4), the result that standby host sends to the consistency detection of main frame comprises: whether data type or master/slave data be consistent.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2006101456854A CN101192971B (en) | 2006-11-23 | 2006-11-23 | Detection method for master/slave data consistency |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2006101456854A CN101192971B (en) | 2006-11-23 | 2006-11-23 | Detection method for master/slave data consistency |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101192971A true CN101192971A (en) | 2008-06-04 |
CN101192971B CN101192971B (en) | 2011-05-11 |
Family
ID=39487741
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2006101456854A Expired - Fee Related CN101192971B (en) | 2006-11-23 | 2006-11-23 | Detection method for master/slave data consistency |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101192971B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103077242A (en) * | 2013-01-11 | 2013-05-01 | 北京佳讯飞鸿电气股份有限公司 | Method for hot standby of dual database servers |
CN103164523A (en) * | 2013-03-19 | 2013-06-19 | 华为技术有限公司 | Inspection method, device and system of data consistency inspection |
CN103841210A (en) * | 2014-03-21 | 2014-06-04 | 上海富欣智能交通控制有限公司 | Adjustable main system and spare system data synchronization method |
CN104360916A (en) * | 2014-11-20 | 2015-02-18 | 上海富欣智能交通控制有限公司 | Main and spare synchronization method based on data synchronization |
CN105515876A (en) * | 2015-12-29 | 2016-04-20 | 国网浙江省电力公司 | Data link monitoring device and data link monitoring method |
WO2018157430A1 (en) * | 2017-02-28 | 2018-09-07 | Microsoft Technology Licensing, Llc. | Data consistency check in distributed system |
CN109417497A (en) * | 2016-04-12 | 2019-03-01 | 江森自控科技公司 | The device and method of system integrating for HVAC device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6301643B1 (en) * | 1998-09-03 | 2001-10-09 | International Business Machines Corporation | Multi-environment data consistency |
CN1260983C (en) * | 2003-06-24 | 2006-06-21 | 中兴通讯股份有限公司 | A method of disaster recovery for home location register (HLR) with zero-time service take-over |
CN100357901C (en) * | 2005-12-21 | 2007-12-26 | 华为技术有限公司 | Method for verifying data between main device and back-up device |
-
2006
- 2006-11-23 CN CN2006101456854A patent/CN101192971B/en not_active Expired - Fee Related
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103077242A (en) * | 2013-01-11 | 2013-05-01 | 北京佳讯飞鸿电气股份有限公司 | Method for hot standby of dual database servers |
CN103077242B (en) * | 2013-01-11 | 2016-03-09 | 北京佳讯飞鸿电气股份有限公司 | The method of a kind of fulfillment database server two-node cluster hot backup |
CN103164523A (en) * | 2013-03-19 | 2013-06-19 | 华为技术有限公司 | Inspection method, device and system of data consistency inspection |
CN103841210A (en) * | 2014-03-21 | 2014-06-04 | 上海富欣智能交通控制有限公司 | Adjustable main system and spare system data synchronization method |
CN103841210B (en) * | 2014-03-21 | 2017-03-15 | 上海富欣智能交通控制有限公司 | It is method of data synchronization that adjustable main is standby |
CN104360916A (en) * | 2014-11-20 | 2015-02-18 | 上海富欣智能交通控制有限公司 | Main and spare synchronization method based on data synchronization |
CN104360916B (en) * | 2014-11-20 | 2018-01-09 | 上海富欣智能交通控制有限公司 | Main standby synchronous method based on data syn-chronization |
CN105515876A (en) * | 2015-12-29 | 2016-04-20 | 国网浙江省电力公司 | Data link monitoring device and data link monitoring method |
CN109417497A (en) * | 2016-04-12 | 2019-03-01 | 江森自控科技公司 | The device and method of system integrating for HVAC device |
WO2018157430A1 (en) * | 2017-02-28 | 2018-09-07 | Microsoft Technology Licensing, Llc. | Data consistency check in distributed system |
US11481380B2 (en) | 2017-02-28 | 2022-10-25 | Microsoft Technology Licensing, Llc | Data consistency check in distributed system |
Also Published As
Publication number | Publication date |
---|---|
CN101192971B (en) | 2011-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101192971B (en) | Detection method for master/slave data consistency | |
CN101193001A (en) | Method for judging the master/slave computer consistent via static data or dynamic data | |
TWI608419B (en) | Method for pre-testing software compatibility and system thereof | |
CN102231161A (en) | Method for synchronously verifying and monitoring databases | |
WO2016188100A1 (en) | Information system fault scenario information collection method and system | |
CN102855163B (en) | A kind of memory database hot-standby method and main frame | |
CN102779094A (en) | Terminal and software exception test method | |
CN104036043A (en) | High availability method of MYSQL and managing node | |
CN114978883B (en) | Network wakeup management method and device, electronic equipment and storage medium | |
CN109144789A (en) | A kind of method, apparatus and system for restarting OSD | |
CN103488721A (en) | Database bisynchronous method and system for master and slave boards | |
CN106055703A (en) | Real-time log analysis method and system | |
CN101192972A (en) | Detection method for master/slave data consistency | |
CN110209497B (en) | Method and system for dynamically expanding and shrinking host resource | |
CN103902401B (en) | Virtual machine fault-tolerance approach and device based on monitoring | |
CN101237355B (en) | Service monitoring method, and network monitoring device | |
CN110333973B (en) | Multi-machine hot standby method and system | |
CN111984366A (en) | Method and system for deploying disaster recovery mechanism in containerization manner | |
CN110569303A (en) | MySQL application layer high-availability system and method suitable for various cloud environments | |
CN113849350B (en) | Ring-shaped two-place three-center topology switching method, device, system and medium | |
US20090055832A1 (en) | System, method and computer program product for evaluatng a test of an alternative system | |
CN100377105C (en) | Automatic alarm testing method | |
CN102521116A (en) | Fault monitoring software | |
CN101605052B (en) | Method and system for acquiring in-place information of extended sub-frame by main sub-frame of SDH equipment | |
CN112965865A (en) | Personal computer restart testing method, device and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20110511 Termination date: 20151123 |
|
CF01 | Termination of patent right due to non-payment of annual fee |