CN109669927A - A kind of data source switch method and system - Google Patents

A kind of data source switch method and system Download PDF

Info

Publication number
CN109669927A
CN109669927A CN201811426317.6A CN201811426317A CN109669927A CN 109669927 A CN109669927 A CN 109669927A CN 201811426317 A CN201811426317 A CN 201811426317A CN 109669927 A CN109669927 A CN 109669927A
Authority
CN
China
Prior art keywords
data source
switching
data
former
write
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.)
Pending
Application number
CN201811426317.6A
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.)
Nanjing Suning Yifubao Network Technology Co Ltd
Original Assignee
Nanjing Suning Yifubao Network Technology Co Ltd
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 Nanjing Suning Yifubao Network Technology Co Ltd filed Critical Nanjing Suning Yifubao Network Technology Co Ltd
Priority to CN201811426317.6A priority Critical patent/CN109669927A/en
Publication of CN109669927A publication Critical patent/CN109669927A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of data source switch method and system, it can be achieved that data source switches online, the correctness of online verification switch data, to improve the accuracy of data source switching.The data source switch method, comprising: it is direct-connected former data source that server data source, which is switched switchgear distribution, and gray scale business configuration is sky, will be in the former data source of full dose data write-in;Configuration server data source switching switch, it is double in data source after former data source and switching to write data;It is data source after direct-connected switching by server data source switching switchgear distribution, by data source after the write-in switching of full dose data, completes data source switching.

Description

A kind of data source switch method and system
Technical field
The invention belongs to system stability maintenance areas, it particularly relates to a kind of data source switch method and system.
Background technique
On the basis of guaranteeing existing system capacity, payment receives list using technological innovation, data Layer adjustment and optimization, passes through High availability, large capacity support are realized in elastic dilatation.Adjust data Layer, be related to data source by DB2 data source steadily excessively to MySQL data source.
It in general, can be by the way of suspending operation when carrying out the switching of data source.Which technology realize it is simple, It is safe to execute, but there is also distinct disadvantages.It suspends operation and is tantamount to server delay machine.Time of suspending operation is longer, to company's band The loss come is bigger.As the core system of financial system, suspending 1 minute business is all huge loss.Secondly, for history The processing of data and huge challenge.How data are timely and effectively synchronized to data source after switching.It can not be timely and effectively Synchronization history data can bring very poor user experience.In financial system, this even can bring serious economic loss.
The more other known scheme for not shutting down switch data source, mainly by some time point or with uniqueness Sequence number is as switching point.When reaching the switching point, whole system service switching to new service logic.The switching mode is most Big difficult point is can not to execute rolling back action in time after switching goes wrong.This inevitably brings loss.Switching In journey and after switching, without whether there is abnormal data after the switching of effective monitoring data source.
Summary of the invention
For the defect and difficult point of the above prior art, the present invention provides a kind of data source switch method and system, can be real Existing data source switches online, the correctness of online verification switch data, to improve the accuracy of data source switching.
In order to solve the above technical problems, the following technical solution is employed for the embodiment of the present invention:
In a first aspect, the present embodiment provides a kind of data source switch methods, comprising:
It is direct-connected former data source by server data source switching switchgear distribution, gray scale business configuration is sky, by full dose data It is written in former data source;
Configuration server data source switching switch, it is double in data source after former data source and switching to write data;
It is data source after direct-connected switching by server data source switching switchgear distribution, by data after the write-in switching of full dose data Data source switching is completed in source.
With reference to first aspect, as the first enforceable technical solution, the configuration server data source switching is switched, It is double in data source after former data source and switching to write data, comprising:
Server data source is switched and writes former data source, the data source after writing switching based on switchgear distribution, gray scale business matches It is set to sky, full dose data are first written to former data source, data source after rear write-in switching.
With reference to first aspect or the first enforceable technical solution, described as second of enforceable technical solution Configuration server data source switching switch, it is double in data source after former data source and switching to write data, comprising:
It is that gray scale business master writes data source after switching, from writing former data source by server data source switching switchgear distribution, His business master writes former data source, the data source after writing switching, configures gray scale business;The gray scale business datum of configuration is first written and is cut Rear data source is changed, it is rear that former data source is written;Other business datums are first written to former data source, data source after rear write-in switching.
The enforceable technical solution of second with reference to first aspect, it is described as the third enforceable technical solution Configuration server data source switching switch, it is double in data source after former data source and switching to write data, comprising:
It is that business master writes data source after switching, from writing former data source by server data source switching switchgear distribution;By full dose Data source after switching is first written in business datum, rear that former data source is written.
The third enforceable technical solution with reference to first aspect, it is described as the 4th kind of enforceable technical solution Method, further includes:
Switch in the configuration server data source and switchs, after former data source writes data in data source after switching pairs, It compares the data in former data source and whether the data in data source after switching is consistent.
The 4th kind of enforceable technical solution with reference to first aspect, it is described as the 5th kind of enforceable technical solution It compares the data in former data source and whether the data in data source after switching is consistent, comprising:
When data after the data and switching in former data source in data source are inconsistent, it is rolled back to previous step;Or,
To inconsistent data, updated using main data of writing from writing data.
Second aspect, the embodiment of the present invention also provide a kind of data source switching system, comprising:
First configuration module: for being direct-connected former data source by server data source switching switchgear distribution, gray scale business is matched It is set to sky, full dose data are written in former data source;
Second configuration module: for configuration server data source switching switch, after former data source and switching in data source It is double to write data;
Third configuration module: for being data source after direct-connected switching by server data source switching switchgear distribution, by full dose Data source after data write-in switching, completes data source switching.
In conjunction with second aspect, as the first enforceable technical solution, second configuration module includes:
First pair is write submodule: for by server data source switch switchgear distribution based on write former data source, from write switching Data source afterwards, gray scale business configuration are sky, and full dose data are first written to former data source, data source after rear write-in switching;And/or
Second pair is write submodule: for by server data source switching switchgear distribution be gray scale business master write switching after data Source, from writing former data source, other business master writes former data source, the data source after writing switching, configures gray scale business;By the ash of configuration Data source after switching is first written in degree business datum, rear that former data source is written;Other business datums are first written to former data source, after write Enter data source after switching;And/or
Third is double to write submodule: for by server data source switching switchgear distribution be business master write data source after switching, From writing former data source;Full dose business datum is first written to data source after switching, it is rear that former data source is written.
It is described as second of enforceable technical solution in conjunction with the first enforceable technical solution of second aspect Data source switching system, further includes:
Data comparing module: for comparing in former data source after former data source writes data in data source after switching pairs Data and the data in data source after switching it is whether consistent.
It is described as the third enforceable technical solution in conjunction with second of enforceable technical solution of second aspect Data source switching system, further includes:
Roll-back module: it when inconsistent for the data after the data and switching in former data source in data source, is rolled back to Previous step;Or,
Update module: when inconsistent for the data after the data and switching in former data source in data source, using master Data are write to update from writing data.
Compared with prior art, the data source switch method of the embodiment of the present invention and system are, it can be achieved that data source is cut online It changes, the correctness of online verification switch data, to improve the accuracy of data source switching.A kind of data source of the embodiment of the present invention It is direct-connected former data source that switching method, which includes: by server data source switching switchgear distribution, and gray scale business configuration is sky, by full dose Data are written in former data source;Configuration server data source switching switch, it is double in data source after former data source and switching to write number According to;It is data source after direct-connected switching by server data source switching switchgear distribution, gray scale business configuration is sky, and full dose data are write Enter data source after switching, completes data source switching.In this method, after former data source is written in full dose data, increase Double the step of writing data in data source after former data source and switching.In this way, if exception occur in the data after switching in data source, It can be handled in time, full dose data is avoided all to be written after switching in data source, note abnormalities data, can not but execute rollback or more Newly.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to needed in the embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for ability For the those of ordinary skill of domain, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is the framework map of the embodiment of the present invention;
Fig. 2 is the flow chart of the method for the embodiment of the present invention;
Fig. 3 is the information flow chart of step S10 in the embodiment of the present invention;
Fig. 4 is the information flow chart of option A in the embodiment of the present invention;
Fig. 5 is the information flow chart of option b in the embodiment of the present invention;
Fig. 6 is the information flow chart of scheme C in the embodiment of the present invention;
Fig. 7 is the information flow chart of step S30 in the embodiment of the present invention;
Fig. 8 is the structural block diagram of the system in the embodiment of the present invention.
Specific embodiment
With reference to the accompanying drawing, technical solution of the present invention is described in detail.
The data source switch method of the present embodiment can be realized in framework as described in Figure 1.The framework includes server And data source.Server includes data source switching switch, comparison module, update module, roll-back module.Server can be set more Platform.Data source can be set in same server, can also be provided separately in other servers.Data source includes former number According to data source behind source and switching.Data source switching switch is connect with former data source with data source after switching respectively, is used for data Data are written in source.Comparison module is connect with former data source with data source after switching respectively, for reading the number in two data sources According to having analysed whether abnormal data.Update module is connect with former data source with data source after switching respectively, is used for a data source In data in a period update the data in another data source in the same period.Roll-back module respectively with former data source, Data source, data source switching switch connection repeat previous step for switch data source switching switch after switching.
As shown in Fig. 2, a kind of data source switch method of the embodiment of the present invention, comprising:
Server data source switching switchgear distribution is direct-connected former data source by S10, and gray scale business configuration is sky, by full dose number According in the former data source of write-in;
S20 configuration server data source switching switch, it is double in data source after former data source and switching to write data;
Server data source switching switchgear distribution is data source after direct-connected switching by S30, and gray scale business configuration is sky, will be complete Data source after data write-in switches is measured, data source switching is completed.
In the switching method of above-described embodiment, full dose data are written in former data source first, then in former data source and It is double in data source after switching to write data, finally by data source after the write-in switching of full dose data, complete data source switching.This method In, full dose data be not written in former data source, directly by data source after the write-in switching of full dose data, but are being increased Double the step of writing data in data source after former data source and switching.In this way, if exception occur in the data after switching in data source, It can be handled in time, full dose data is avoided all to be written after switching in data source, note abnormalities data, can not but execute rollback or more Newly.The switching method of the present embodiment improves the accuracy of switching.
Former data source refers to the data source before switching.Data source is the data source after switching after switching.The present embodiment is with DB2 It is illustrated for data source and Mysql data source.Wherein, DB2 data source is former data source, and Mysql data source is after switching Data source.The present embodiment is accomplished that data source is smoothly switched to MySQL from DB2 by application system.
As an embodiment, step S10 of the invention, as shown in figure 3, being straight by server data source switching switchgear distribution Even DB2 data source, gray scale business configuration are sky, and full dose data are written in DB2 data source.In the step, without in Mysql number According to data are written in source.
In the step S20 of above-mentioned switching method, after former data source and switching in data source double methods for writing data have it is more Kind.The preferred following scheme of the present embodiment:
Option A: by server data source switch switchgear distribution based on write former data source, from write switching after data source, gray scale Business configuration is sky, and full dose data are first written to former data source, data source after rear write-in switching.
In option A, first full dose data are first written in former data source, are then written again after switching in data source.This reality Show data double in data source after former data source and switching to write.The company of verifying MySQL write-in data may be implemented in this method The accuracy of DB2 and MySql data language, verifying MySQL and DB2 number is written in the general character and stability, verifying application system simultaneously It is whether consistent according to table structure.
As an example, as shown in figure 4, first full dose data are first written in DB2 data source, Mysql number is then written again According in source.When needing to detect DB2 data source and whether the data in Mysql data source consistent, respectively read DB2 data source and Data in Mysql data source compare the data in two data sources of reading, if consistent.If it is inconsistent, It can choose and be rolled back to previous step, that is, be rolled back to step S10, modification data source switching switch is direct-connected former data source, again Execute step S10.It is also possible to select to carry out data synchronization updating, for there are abnormal data, the time can choose Section.The period includes the abnormal data.Whole updating is carried out to the data in the period.As shown in figure 4, reading The data of the period in DB2 data source are written in Mysql data source, to update the period in Mysql data source Data.Otherwise method less for abnormal data, can executing data synchronization updating executes rollback step.
Option b: being that gray scale business master writes data source after switching, from writing former data by server data source switching switchgear distribution Source, other business master write former data source, the data source after writing switching, configure gray scale business;The gray scale business datum of configuration is first Data source after write-in switching, it is rear that former data source is written;Other business datums are first written to former data source, data after rear write-in switching Source.
In option b, the gray scale business datum of configuration is first first written to data source after switching, it is rear that former data source is written;It will Former data source, data source after rear write-in switching is first written in other business datums.Gray scale business is the service class chosen according to rule Type.For example, the business of operation system access has very much, it can be ranked up according to quantity accounting or amount of money accounting, choose it In carry out gray scale switching from small to large in the top.Gray scale business refers in the type of service of all accesses of system, such as red Packet business, wilful pair and personal payment transaction etc. of doing shopping, the type of service chosen according to certain rule.These gray scale business exist There is certain representativeness in all business, cover the most payment behavior of user.
This method may be implemented with database after different business write-in switching, and as portfolio gradually increases, analysis is cut The stability and respective performances for changing rear database can retract if any abnormal, in time to upstream business unaware, also without shadow It rings.
As an example, as shown in figure 5, being that gray scale business master writes Mysql number by server data source switching switchgear distribution According to source, from writing DB2 data source, other business master writes DB2 data source, from Mysql data source is write, and configures gray scale business;It will configuration Gray scale business datum Mysql data source is first written, it is rear that DB2 data source is written;DB2 data are first written into other business datums Source, it is rear that Mysql data source is written.Either gray scale business or other business, as long as write-in Mysql data source and DB2 data In source, require to detect the consistency of data.It is double write data after, read DB2 data source and Mysql data respectively Data in source compare the data in two data sources of reading.One is rolled back to if it is inconsistent, can choose Step.If executing this programme B after executing step S10, then it is rolled back to step S10, modification data source switching switch is straight Even former data source, re-execute the steps S10.If executing this programme B after executing aforementioned schemes A, being then rolled back to option A, Former data source, the data source after writing switching are write based on modification data source switching switch, re-executes option A.It is also possible to select Carry out data synchronization updating is selected, for there are abnormal data, can choose a period.The period includes described abnormal Data.Whole updating is carried out to the data in the period.As shown in figure 5, being read if gray scale business datum is inconsistent The data of the period in Mysql data source are written in DB2 data source, to update the number of the period in DB2 data source According to.If other business datums are inconsistent, the data of the period in DB2 data source are read, MySQL data source is written In, to update the data of the period in MySQL data source.It is less for abnormal data, data synchronization updating can be executed Otherwise method executes rollback step.
Option b and option A can exist simultaneously, and option b is located at execution after option A.By first carrying out option A, then Carry into execution a plan B.This can verify whether MySQL data source can operate normally, and whether double to write database language correct.Pass through gray scale Business verifying, further verifies the stability and performance of MySQL data source.
Scheme C: being that business master writes data source after switching, from writing former data source by server data source switching switchgear distribution; Full dose business datum is first written to data source after switching, it is rear that former data source is written.
In scheme C, full dose business datum is first written to data source after switching, it is rear that former data source is written, guaranteeing business It is successional simultaneously, further demonstrate switching after data source stability and performance, it is ensured that on upstream business without influence.If any Data exception can be retracted in time to previous step.
As an example, as shown in fig. 6, by server data source switching switchgear distribution be business master write Mysql data source, From writing DB2 data source.To judge whether there is abnormal data, one is carried out to the data in write-in Mysql data source and DB2 data source The detection of cause property.It is double write data after, the data in DB2 data source and Mysql data source are read respectively, to two numbers of reading It is compared according to the data in source.Previous step is rolled back to if it is inconsistent, can choose.If execute step S10 it Afterwards, this programme C is executed, then is rolled back to step S10, modification data source switching switch is direct-connected former data source, is re-execute the steps S10.If executing this programme C after executing aforementioned schemes B, being then rolled back to option b, modification data source switching switch for Purchase of property business is main to write data source after switching, from former data source is write, and re-executes option b.If held after executing aforementioned schemes A Row this programme C, then be rolled back to option A, re-execute option A.It is also possible to select to carry out data synchronization updating, for going out Now abnormal data, can choose a period.The period includes the abnormal data.To the data in the period into Row whole updating.As shown in fig. 6, reading the data of the period in Mysql data source, be written in DB2 data source, with more The data of the period in new DB2 data source.Method less for abnormal data, that data synchronization updating can be executed, otherwise Execute rollback step.
Step S20 also can may include two methods of option b and scheme C only with the method for scheme C.Preferably, Option A, option b and scheme C are existed simultaneously, and option A, option b and scheme C are successively executed.For full dose service request quantity How many or amount of money size, according to sorting from large to small, gray scale business is chosen in sequence, and there is certain representative business to carry out Gray scale switch MySQL, realize switching MySQL master write business from scratch, it is progressive, step by step demonstrate switching The stability and response performance of MySQL data source afterwards.Especially after full dose business master writes switch data source, MySQL is tested Card is the most comprehensively, by running monitoring for a long time, to assess whether the operation of completely compatible all business.By passing layer by layer The verifying returned thoroughly solves the influence in handoff procedure to business, realizes smooth unaware switching.
As an embodiment, step S30 of the invention, as shown in fig. 7, being straight by server data source switching switchgear distribution Mysql data source is written in full dose data by even Mysql data source, completes data source switching.At this point, gray scale business configuration is sky. When there is abnormal data, step 30) retracts to previous step.In Fig. 7, the previous step of step S30 is above scheme C, i.e., Server data source switching switchgear distribution is that business master writes data source after switching, from writing former data source.
Preferably, in the step S20 of above-described embodiment switching method, further includes: compare the data in former data source and cut Whether the data changed in rear data source are consistent.By comparing the data in data source after the data and switching in former data source It is right, abnormal data is detected whether, to improve the accuracy of switch data.Due in handoff procedure, it may occur however that data damage It is bad, so the data of switching front and back are compared, the accuracy of data can be improved.
When data after the data and switching in former data source in data source are inconsistent, following methods can be used: rollback To previous step, previous step is re-executed;Alternatively, the synchronized update between data source after former data source and switching.It is online to return It is rolled to previous step, so that data switching front and back is consistent, then re-executes this step, and detected whether abnormal number According to.For serious abnormal data, above-mentioned rolling back action can be executed.But for less abnormal data, can execute same Walk update method.By include in former data source abnormal data a period in data, when updating after switching in data source this Between data in section;Or by the data in the period in data source after switching comprising abnormal data, update former data source In data in the period.As shown in Fig. 4-Fig. 6, option A, the data switching signal in B, C are given.
Variance data after comparing former data source and switching in data source, including the inconsistent order information of data, data Quantitative different information etc..When such as there is abnormal data, rolling back action is executed, modification data source switching switch is previous step Switchgear distribution.For example, carry into execution a plan A when, there is abnormal data in detection, then executes rolling back action, and modification data source switching is opened Closing is direct-connected former data source.
The data source switch method of the present embodiment is correctly run by support online verification data, and switched back into online Rolling reduces in generation data source handoff procedure and the risk of abnormal data occurs.The data source switch method of the present embodiment realizes Data source switching it is easy to operate, can gray scale, can full dose, can retract.When carrying out the failure of data source handover operation, that is, occur different Regular data supports online data rollback, realization to support in handoff procedure reversible.
In the data source switch method of the present embodiment, comparing passes through data source after the former data source data of reading, switching Data compare data, data volume.Count the inconsistent data of data content, the difference of data bulk.Pass through even numbers Extract and compare according to source data, can during supervisory control system running, data are double writes it is whether correct.This improves business continuance and system Stability.
Using the method for the present embodiment, during realizing that single high availability, large capacity support are received in payment, data source is cut Change that realize 0 abnormal traffic data, 0 accident online.It ensure that data source switching in business normal operation.Avoid data The processing of historical data caused by source switches, the maintenance of abnormal data.Safely and efficiently complete switching task.
As shown in figure 8, the embodiment of the present invention also provides a kind of data source switching system, comprising:
First configuration module: for being direct-connected former data source by server data source switching switchgear distribution, gray scale business is matched It is set to sky, full dose data are written in former data source;
Second configuration module: for configuration server data source switching switch, after former data source and switching in data source It is double to write data;
Third configuration module: for being data source after direct-connected switching by server data source switching switchgear distribution, by full dose Data source after data write-in switching, completes data source switching.
In the switching system of above-described embodiment, full dose data are written in former data source first with the first configuration module, Then double in data source after former data source and switching using the second configuration module to write data, it finally will using third configuration module Data source after the write-in switching of full dose data, completes data source switching.In the system, former data source be not written into full dose data In, directly by data source after the write-in switching of full dose data, but the second configuration module is increased, the number after former data source and switching Data are write according to double in source.In this way, can be handled in time if exception occur in the data after switching in data source, avoiding full dose number According in data source after all write-in switchings, note abnormalities data, can not but execute rollback or update.The switching system of the present embodiment mentions The high accuracy of switching.
As preference, second configuration module includes:
First pair is write submodule: for by server data source switch switchgear distribution based on write former data source, from write switching Data source afterwards, gray scale business configuration are sky, and full dose data are first written to former data source, data source after rear write-in switching;And/or
Second pair is write submodule: for by server data source switching switchgear distribution be gray scale business master write switching after data Source, from writing former data source, other business master writes former data source, the data source after writing switching, configures gray scale service scripts;It will configuration Gray scale business datum data source after switching is first written, it is rear that former data source is written;Other business datums are first written to former data source, Data source after write-in switching afterwards;And/or
Third is double to write submodule: for by server data source switching switchgear distribution be business master write data source after switching, From writing former data source;Full dose business datum is first written to data source after switching, it is rear that former data source is written.
As preference, the data source switching system, further includes:
Data comparing module: for comparing in former data source after former data source writes data in data source after switching pairs Data and the data in data source after switching it is whether consistent.
As preference, the data source switching system, further includes:
Roll-back module: it when inconsistent for the data after the data and switching in former data source in data source, is rolled back to Previous step;Or,
Update module: when inconsistent for the data after the data and switching in former data source in data source, using master Data are write to update from writing data.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for equipment reality For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method Part explanation.
Those skilled in the art should know, realize the method or system of above-described embodiment, can pass through computer journey Sequence instructs to realize.The computer program instructions are loaded into programmable data processing device, such as computer, thus that can compile Corresponding instruction is executed on journey data processing equipment, for realizing the function of method or the system realization of above-described embodiment.
Those skilled in the art can carry out non-creative technological improvement according to above-described embodiment to the application, without It is detached from Spirit Essence of the invention.These improvement still should be regarded as within the protection scope of the claim of this application.

Claims (10)

1. a kind of data source switch method characterized by comprising
It is direct-connected former data source by server data source switching switchgear distribution, gray scale business configuration is sky, and full dose data are written In former data source;
Configuration server data source switching switch, it is double in data source after former data source and switching to write data;
It is data source after direct-connected switching by server data source switching switchgear distribution, data source after the write-in of full dose data is switched, Complete data source switching.
2. according to the method for claim 1, which is characterized in that the configuration server data source switching switch, in former number Data are write according to double in data source behind source and switching, comprising:
Server data source is switched and writes former data source, the data source after writing switching based on switchgear distribution, gray scale business configuration is Former data source, data source after rear write-in switching is first written in full dose data by sky.
3. method according to claim 1 or 2, which is characterized in that the configuration server data source switching switch, in original It is double in data source after data source and switching to write data, comprising:
It is that gray scale business master writes data source after switching, from writing former data source by server data source switching switchgear distribution, other industry Business is main to write former data source, the data source after writing switching, configures gray scale business;After switching is first written in the gray scale business datum of configuration Data source, it is rear that former data source is written;Other business datums are first written to former data source, data source after rear write-in switching.
4. according to the method for claim 3, which is characterized in that the configuration server data source switching switch, in former number Data are write according to double in data source behind source and switching, comprising:
It is that business master writes data source after switching, from writing former data source by server data source switching switchgear distribution;By full dose business Data source after switching is first written in data, rear that former data source is written.
5. according to the method for claim 4, which is characterized in that further include:
Switch in the configuration server data source and switchs, after former data source writes data in data source after switching pairs, comparison Whether the data in former data source and the data in data source after switching are consistent.
6. according to the method for claim 5, which is characterized in that data after the data and switching compared in former data source Whether the data in source are consistent, comprising:
When data after the data and switching in former data source in data source are inconsistent, it is rolled back to previous step;Or,
To inconsistent data, updated using main data of writing from writing data.
7. a kind of data source switching system characterized by comprising
First configuration module: for being direct-connected former data source by server data source switching switchgear distribution, gray scale business configuration is Full dose data are written in former data source sky;
Second configuration module: double in data source after former data source and switching to write for configuration server data source switching switch Data;
Third configuration module: for being data source after direct-connected switching by server data source switching switchgear distribution, by full dose data Data source after write-in switching completes data source switching.
8. data source switching system according to claim 7, which is characterized in that second configuration module includes:
First pair is write submodule: for by server data source switch switchgear distribution based on write former data source, from write switching after number According to source, gray scale business configuration is sky, and full dose data are first written to former data source, data source after rear write-in switching;And/or
Second pair is write submodule: for by server data source switching switchgear distribution be gray scale business master write switching after data source, From former data source is write, other business master writes former data source, the data source after writing switching, configures gray scale business;By the gray scale of configuration Data source after switching is first written in business datum, rear that former data source is written;Other business datums are first written to former data source, it is rear to be written Data source after switching;And/or
Third is double to write submodule: for being that business master writes data source after switching, from writing by server data source switching switchgear distribution Former data source;Full dose business datum is first written to data source after switching, it is rear that former data source is written.
9. data source switching system according to claim 8, which is characterized in that further include:
Data comparing module: for comparing the number in former data source after former data source writes data in data source after switching pairs According to whether consistent with the data in data source after switching.
10. data source switching system according to claim 9, which is characterized in that further include:
Roll-back module: when inconsistent for the data after the data and switching in former data source in data source, it is rolled back to one Step;Or,
Update module: when inconsistent for the data after the data and switching in former data source in data source, number is write using master According to updating from writing data.
CN201811426317.6A 2018-11-27 2018-11-27 A kind of data source switch method and system Pending CN109669927A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811426317.6A CN109669927A (en) 2018-11-27 2018-11-27 A kind of data source switch method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811426317.6A CN109669927A (en) 2018-11-27 2018-11-27 A kind of data source switch method and system

Publications (1)

Publication Number Publication Date
CN109669927A true CN109669927A (en) 2019-04-23

Family

ID=66143238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811426317.6A Pending CN109669927A (en) 2018-11-27 2018-11-27 A kind of data source switch method and system

Country Status (1)

Country Link
CN (1) CN109669927A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113450114A (en) * 2021-07-14 2021-09-28 中国银行股份有限公司 Block chain-based data file acquisition method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106682021A (en) * 2015-11-09 2017-05-17 五八同城信息技术有限公司 Database migration method and device
CN107436898A (en) * 2016-05-27 2017-12-05 北京京东尚科信息技术有限公司 The method and system for the storehouse data that periodically clear data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106682021A (en) * 2015-11-09 2017-05-17 五八同城信息技术有限公司 Database migration method and device
CN107436898A (en) * 2016-05-27 2017-12-05 北京京东尚科信息技术有限公司 The method and system for the storehouse data that periodically clear data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113450114A (en) * 2021-07-14 2021-09-28 中国银行股份有限公司 Block chain-based data file acquisition method and device

Similar Documents

Publication Publication Date Title
US10411973B2 (en) Automatic microservice problem detection in enterprise applications
US9479395B2 (en) Model framework to facilitate robust programming of distributed workflows
CN108763076A (en) A kind of Software Automatic Testing Method, device, equipment and medium
CN105930259B (en) A kind of method and apparatus of WEB regression tests
EP3274838A1 (en) Technologies for application validation in persistent memory systems
CN107329870B (en) Performance test method for automatic ticket vending machine of urban rail transit
US9208006B2 (en) Recovery Maturity Model (RMM) for readiness-based control of disaster recovery testing
US8990158B2 (en) Copy of replication status for synchronization
Morovati et al. Bug characterization in machine learning-based systems
CN110516447A (en) A kind of method and apparatus of identification terminal simulator
CN107832208A (en) The automatic test approach and terminal device of software
CN110765004A (en) Testing method and device based on sandbox system and electronic equipment
CN105938446B (en) The data supported based on RDMA and hardware transactional memory replicate fault-tolerance approach
US11372837B2 (en) Transaction repair
CN109669927A (en) A kind of data source switch method and system
CN114817022A (en) Railway electronic payment platform test method, system, equipment and storage medium
CN110083488A (en) A kind of tolerant system of the fine granularity low overhead towards GPGPU
US11232019B1 (en) Machine learning based test coverage in a production environment
WO2024103977A1 (en) Metadata configuration method and apparatus, and nonvolatile readable storage medium
CN111459800B (en) Method, device, equipment and medium for verifying availability of service system
CN105447213A (en) Method and equipment for simulating circuit design
CN103823637B (en) A kind of data processing method and equipment
CN109374038B (en) Change test method of nuclear security level instrument control product based on application prototype
Xing Financial Big Data Reconciliation Method
CN107992290B (en) Background data processing method and system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190423

RJ01 Rejection of invention patent application after publication