[go: up one dir, main page]

CN101192972A - Detection method for master/slave data consistency - Google Patents

Detection method for master/slave data consistency Download PDF

Info

Publication number
CN101192972A
CN101192972A CNA2006101456869A CN200610145686A CN101192972A CN 101192972 A CN101192972 A CN 101192972A CN A2006101456869 A CNA2006101456869 A CN A2006101456869A CN 200610145686 A CN200610145686 A CN 200610145686A CN 101192972 A CN101192972 A CN 101192972A
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.)
Withdrawn
Application number
CNA2006101456869A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE 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 ZTE Corp filed Critical ZTE Corp
Priority to CNA2006101456869A priority Critical patent/CN101192972A/en
Publication of CN101192972A publication Critical patent/CN101192972A/en
Withdrawn legal-status Critical Current

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: the data is classified; 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

Detection method for master/slave data consistency
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:
Detection method for master/slave data consistency, step is as follows:
(1) data is classified;
(2) consistency detection of startup master/slave data;
(3) suspend to data active and standby synchronously;
(4) main frame carries out the operation of consistency detection;
(5) standby host carries out the operation of consistency detection;
(6) recover active and standby synchronous.
Further, in the step (1), described master/slave data comprises static data or dynamic data.
Further, in the step (2), 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 (2),, forbid that configuration changes for static data; For dynamic data, main frame stops to standby host synchronous dynamic data.
Further, in the step (4), 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 (4), described checking data comprises data type or check value.
Further, step (5) is specially:
After standby host receives checking data, collect data according to data type, the calculation check value, 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; When master/slave data was inconsistent, main frame was alarmed or synchrodata arrives standby host.
Further, in the step (5), 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 (8)

1. detection method for master/slave data consistency, step is as follows:
(1) data is classified;
(2) consistency detection of startup master/slave data;
(3) suspend to data active and standby synchronously;
(4) main frame carries out the operation of consistency detection;
(5) standby host carries out the operation of consistency detection;
(6) 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), described master/slave data comprises static data or dynamic data.
3. detection method for master/slave data consistency according to claim 1 is characterized in that, in the step (2), the trigger condition that master/slave data consistency detect to start comprises: the size of traffic carrying capacity or by the webmaster manual activation.
4. detection method for master/slave data consistency according to claim 2 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.
5. detection method for master/slave data consistency according to claim 1 is characterized in that, in the step (4), 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.
6. detection method for master/slave data consistency according to claim 5 is characterized in that, in the step (4), described checking data comprises data type or check value.
7. detection method for master/slave data consistency according to claim 1 is characterized in that, step (5) is specially:
After standby host receives checking data, collect data according to data type, the calculation check value, 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; When master/slave data was inconsistent, main frame was alarmed or synchrodata arrives standby host.
8. detection method for master/slave data consistency according to claim 7 is characterized in that, in the step (5), the result that standby host sends to the consistency detection of main frame comprises: whether data type or master/slave data be consistent.
CNA2006101456869A 2006-11-23 2006-11-23 Detection method for master/slave data consistency Withdrawn CN101192972A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2006101456869A CN101192972A (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
CNA2006101456869A CN101192972A (en) 2006-11-23 2006-11-23 Detection method for master/slave data consistency

Publications (1)

Publication Number Publication Date
CN101192972A true CN101192972A (en) 2008-06-04

Family

ID=39487742

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2006101456869A Withdrawn CN101192972A (en) 2006-11-23 2006-11-23 Detection method for master/slave data consistency

Country Status (1)

Country Link
CN (1) CN101192972A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965769A (en) * 2014-07-28 2015-10-07 浙江大华技术股份有限公司 System, method and apparatus for on-line detecting consistency of memory data between primary and standby servers
CN112445127A (en) * 2019-08-27 2021-03-05 北京东土科技股份有限公司 Redundancy control method of master controller
CN116027705A (en) * 2022-12-21 2023-04-28 北京四方继保工程技术有限公司 Main-standby switching and data synchronizing system and method for programmable controller

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965769A (en) * 2014-07-28 2015-10-07 浙江大华技术股份有限公司 System, method and apparatus for on-line detecting consistency of memory data between primary and standby servers
CN112445127A (en) * 2019-08-27 2021-03-05 北京东土科技股份有限公司 Redundancy control method of master controller
CN112445127B (en) * 2019-08-27 2022-03-18 北京东土科技股份有限公司 Redundancy control method of master controller
CN116027705A (en) * 2022-12-21 2023-04-28 北京四方继保工程技术有限公司 Main-standby switching and data synchronizing system and method for programmable controller
CN116027705B (en) * 2022-12-21 2025-01-03 北京四方继保工程技术有限公司 Main-standby switching and data synchronizing system and method for programmable controller

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) Software compatibility pre-detection method and system thereof
CN102231161A (en) Method for synchronously verifying and monitoring databases
CN102779094A (en) Terminal and software exception test method
WO2016188100A1 (en) Information system fault scenario information collection method and system
CN104778102A (en) Master-slave switching method and system
CN102394914A (en) Cluster brain-split processing method and device
CN107153571A (en) A kind of dispositions method and device of virtual management node
CN105607973B (en) Method, device and system for processing equipment fault in virtual machine system
CN114978883B (en) Network wakeup management method and device, electronic equipment and storage medium
CN104360918B (en) A kind of intelligent Substation System self diagnosis and self-recovery method
CN101192972A (en) Detection method for master/slave data consistency
CN106911519A (en) A kind of data acquisition monitoring method and device
CN106055703A (en) Real-time log analysis method and system
CN103902401B (en) Virtual machine fault-tolerance approach and device based on monitoring
CN110209497B (en) Method and system for dynamically expanding and shrinking host resource
CN108011783B (en) A backup method and backup system for diagnosing a server
CN101237355B (en) Service monitoring method, and network monitoring device
CN110333973B (en) Multi-machine hot standby method and system
CN105955865A (en) Monitoring method and system aiming at K-DB database
CN218568024U (en) USB port detection device
CN106357425A (en) Network management agent method and system
CN117609294A (en) Data query method, device and equipment
CN100377105C (en) Automatic alarm testing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C04 Withdrawal of patent application after publication (patent law 2001)
WW01 Invention patent application withdrawn after publication