CN107402872A - A kind of method and apparatus for being used to determine database data synchronic delay - Google Patents
A kind of method and apparatus for being used to determine database data synchronic delay Download PDFInfo
- Publication number
- CN107402872A CN107402872A CN201710198883.5A CN201710198883A CN107402872A CN 107402872 A CN107402872 A CN 107402872A CN 201710198883 A CN201710198883 A CN 201710198883A CN 107402872 A CN107402872 A CN 107402872A
- Authority
- CN
- China
- Prior art keywords
- database
- information
- current time
- source database
- delay
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3409—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The purpose of the application is to provide a kind of method and apparatus for being used to determine database data synchronic delay.Specifically, target database obtain on database data synchronic delay test instruction after target database described in periodic logging current time information;Read the synchrodata information of corresponding source database;Delay relevant information is provided to application corresponding to the test instruction.Compared with prior art, the application records current time information when source database obtains the test instruction on database data synchronic delay, and it is synchronized to target database, the synchrodata information of corresponding source database is read in target database and correlation time is recorded in target database, delay relevant information is provided to application corresponding to the test instruction, it is used to calculate database data synchronic delay so as to directly obtain the correlation time recorded on the database, lifts data syn-chronization time delay accuracy between test database.
Description
Technical field
The application is related to computer realm, more particularly to a kind of technology for being used to determine database data synchronic delay.
Background technology
With the development of cybertimes, the application of database is increasing, and database data synchronic operation also gradually increases
Add, limited by hardware or network environment, database data synchronic operation often postpones with data syn-chronization, for test
Database data synchronic postpones, and prior art often sends test instruction to source data in physical machine or by control machine
Storehouse, source database receive instruction after carry out data syn-chronization, by physical machine or control machine at regular intervals be spaced check and remember
Whether record target database receives synchrodata, most at last physical machine or control machine recorded send same pacing to source database
The time difference that examination order and detected target database receive synchrodata postpones to survey as database data synchronic
The result of examination.
However, prior art database data synchronic delayed test under applied to cloud computing or other cross-region environment
When, database and control machine be not often on same physical equipment, therefore, can be caused due to the difference of network environment control machine with
There is also time delay between database, so as to cause control machine inaccurate in the temporal information collected by database, meanwhile, it is existing
There is target database in technology can not record the exact time of source database information arrival, above-mentioned factor is ultimately resulted between database
The accuracy of synchronization delay test is relatively low.
The content of the invention
The purpose of the application is to provide a kind of method and apparatus for being used to determine database data synchronic delay, uses
To solve the problems, such as to be lifted data syn-chronization time delay accuracy between test database.
To achieve the above object, according to the one side of the application, it is used for this application provides one kind at source database end
The method for determining database data synchronic delay, data syn-chronization time delay is accurate between this method solve lifting test database
The problem of true property, wherein, this method includes:
Record current time information when source database obtains the test instruction on database data synchronic delay;
The record information for the current time information for recording the source database is synchronized to corresponding target database.
According to further aspect of the application, it is used at target database end determining this application provides one kind between database
Data syn-chronization delay method, this method solve lifting test database between data syn-chronization time delay accuracy the problem of,
Wherein, this method includes:
The target described in periodic logging after target database is obtained on the test instruction of database data synchronic delay
The current time information of database;
The synchrodata information of corresponding source database is read, wherein, the synchrodata information of the source database includes note
Record the record information of the current time information of the source database;
Delay relevant information is provided to application corresponding to the test instruction, wherein, the delay relevant information is corresponding
The synchrodata information of the source database is being read in the current time information of the source database and the target database
Shi Jilu current time information.
According to further aspect of the application, it is used to determine database data synchronic delay this application provides a kind of
Source database, the equipment solve the problems, such as data syn-chronization time delay accuracy between lifting test database, wherein, the equipment
Including:
Source database time recording device, the survey postponed on database data synchronic is obtained for recording source database
Current time information during examination instruction;
Synchronizing information device between database, the record information for will record the current time information of the source database are same
Walk to corresponding target database.
According to further aspect of the application, it is used to determine database data synchronic delay this application provides a kind of
Target database, the equipment solve the problems, such as data syn-chronization time delay accuracy between lifting test database, wherein, this sets
It is standby to include:
Target database time recording device, the test on database data synchronic delay is obtained in target database
The current time information of target database described in periodic logging after instruction;
Source database information read device, for reading the synchrodata information of corresponding source database, wherein, the source number
The record information for including recording the current time information of the source database according to the synchrodata information in storehouse;
Postpone relevant information and device be provided, applied for delay relevant information to be provided to described test corresponding to instruction,
Wherein, the delay relevant information corresponds to the current time information of the source database and the target database is reading institute
The current time information recorded during the synchrodata information for stating source database.
According to the another further aspect of the application, a kind of equipment for being used to determine database data synchronic delay is additionally provided,
Including:
Processor;
And it is arranged to store the memory of computer executable instructions, the executable instruction makes institute when executed
State processor:
Record current time information when source database obtains the test instruction on database data synchronic delay;
The record information for the current time information for recording the source database is synchronized to corresponding target database.
According to the another further aspect of the application, a kind of equipment for being used to determine database data synchronic delay is additionally provided,
Including:
Processor;
And it is arranged to store the memory of computer executable instructions, the executable instruction makes institute when executed
State processor:
The target described in periodic logging after target database is obtained on the test instruction of database data synchronic delay
The current time information of database;
The synchrodata information of corresponding source database is read, wherein, the synchrodata information of the source database includes note
Record the record information of the current time information of the source database;
Delay relevant information is provided to application corresponding to the test instruction, wherein, the delay relevant information is corresponding
The synchrodata information of the source database is being read in the current time information of the source database and the target database
Shi Jilu current time information.
According to the another further aspect of the application, a kind of system for being used to determine database data synchronic delay is additionally provided,
Solve the problems, such as to be lifted data syn-chronization time delay accuracy between test database, wherein, the system includes root as previously described
According to a kind of source database for being used to determine database data synchronic delay of one aspect of the invention, and basis as previously described
A kind of target database for being used to determine database data synchronic delay of another aspect of the invention.
Compared with prior art, the application records source database and obtained and refers on the test of database data synchronic delay
Current time information when making, and target database is synchronized to, obtain in target database and prolong on database data synchronic
The current time information of target database described in periodic logging after slow test instruction, read the synchrodata of corresponding source database
Information, delay relevant information is provided to application corresponding to the test instruction, so as to directly obtain what is recorded on the database
Correlation time is used to calculate database data synchronic delay, lifts data syn-chronization time delay accuracy between test database.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 shows to coordinate a kind of use realized according to the source database end of the application one side and target database end
In it is determined that the method flow diagram of database data synchronic delay;
Fig. 2 shows to coordinate the one kind realized according to the source database end of the application other side and target database end
For determining the method flow diagram of database data synchronic delay;
Fig. 3 shows a kind of side for being used to determine that database data synchronic postpones according to another preferred embodiment of the application
Step S21 flow charts in method;
Fig. 4 shows to coordinate the one kind realized to be used for according to the source database and target database of the application other side
Determine the equipment schematic diagram of database data synchronic delay;
Fig. 5 shows to coordinate the one kind realized to be used for according to the source database and target database of the application other side
Determine the equipment schematic diagram of database data synchronic delay;
Fig. 6 shows to be used to determining that what database data synchronic postponed to set according to a kind of of the application another preferred embodiment
Standby middle target database time recording device schematic diagram;
Fig. 7 shows a kind of side for being used to determine that database data synchronic postpones according to another preferred embodiment of the application
Method and equipment schematic;
Fig. 8 shows a kind of side for being used to determine that database data synchronic postpones according to another preferred embodiment of the application
Method flow chart.
Same or analogous reference represents same or analogous part in accompanying drawing.
Embodiment
The application is described in further detail below in conjunction with the accompanying drawings.
In one typical configuration of the application, terminal, the equipment of service network and trusted party include one or more
Processor (CPU), input/output interface, network interface and internal memory.
Internal memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flashRAM).Internal memory is showing for computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, magnetic disk storage or other magnetic storage apparatus or
Any other non-transmission medium, the information that can be accessed by a computing device available for storage.Defined according to herein, computer
Computer-readable recording medium does not include non-temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
Fig. 1 shows to coordinate a kind of use realized according to the source database end of the application one side and target database end
In it is determined that the method flow diagram of database data synchronic delay.Wherein, the source database end includes step S11, step
S12;The target database end includes step S21, step S22, step S23.
Wherein, source database record source database obtains the survey on database data synchronic delay in step s 11
Current time information during examination instruction;Target database is obtained on data between database in target database in the step s 21
The current time information of target database described in periodic logging after the test instruction of synchronization delay;Source database in step s 12
The record information for the current time information for recording the source database is synchronized to corresponding target database;In step S22
Target database reads the synchrodata information of corresponding source database, wherein, the synchrodata information of the source database includes
Record the record information of the current time information of the source database;Target database will postpone relevant information in step S23
There is provided to it is described test instruction corresponding to apply, wherein, it is described delay relevant information correspond to the source database it is current when
Between the current time information that is recorded when reading the synchrodata information of the source database of information and the target database.
Specifically, source database record source database is obtained on database data synchronic delay in step s 11
Current time information during test instruction.Wherein, the source database refers to for carrying out in database synchronization delayed test
A side in two party databases, to send the database of synchrodata, such as the cloud database A in Fig. 7.Number between the database
Refer to the time between two databases spent by data transfer according to synchronization delay.It is described to prolong on database data synchronic
Slow test instruction refers to the instruction synchronization delay test beginning the database, wherein, the instruction can be by the source
Database timing is initiated, or by being initiated with third party in one network as control machine, this third party's control
Machine can directly access the database the physical equipment at place in the case of conditions permit, can cloth in the distributed environment of cloud computing
Put on other physical equipment, " control machine " in " high in the clouds environment " as shown in Figure 7 is such a situation.Therefore, it is described
Current time information when source database obtains the test instruction on database data synchronic delay is recorded, is referred to described
After source database is acquired, record obtains the temporal information during test instruction for test instruction, i.e., described current time letter
Breath refers to that source database gets the current time of test instruction, here, the acquisition mode of the temporal information is complete including record
Net unified time, or the system time but not limited to this of record source database, any two side are tested the available unification of database
Time, it may be incorporated for gathering, such as the time point T3 recorded on Fig. 7 medium cloud databases A.The record source database, which obtains, to close
The process of current time information when the test instruction of database data synchronic delay is illustrated as shown in the P3 in Fig. 8,
Arrival source cloud database A is instructed, current time stamp T3 is recorded in database.By recording the survey in the source database
Examination instruction arrival time, avoid under cloud computing distributed environment by the source database feed back to test instruction send mould
Control machine in block, such as Fig. 7, then the situation for sending module record current time is instructed by the test, eliminate in source number
The network delay sent caused by module is not at same physical equipment is instructed to influence with test according to storehouse so that the source data recorded
The current time information that storehouse is obtained when being instructed on the test of database data synchronic delay is more accurate, final so as to be lifted
The accuracy of time delay result between acquired database.
Those skilled in the art will be understood that above-mentioned record source database obtains the mode of the test instruction current time
It is only for example, other record source databases that are existing or being likely to occur from now on obtain the mode of the test instruction current time
The application is such as applicable to, should be also included within the application protection domain, and be incorporated herein by reference herein.
Then, target database is obtained on database data synchronic delay in target database in the step s 21
The current time information of target database described in periodic logging after test instruction.Wherein, the target database refer to be used for into
The side in two party databases in the test of row database synchronization delay, to read the database of synchrodata, such as in Fig. 7
Cloud database B.Therefore, the periodic logging institute after target database is obtained on the test instruction of database data synchronic delay
State the current time information of target database, refer to reach the target database in the test instruction, such as P7 in Fig. 8 and
Shown in Fig. 7, instruction reaches target cloud database B, obtains current time stamp T4, or the target database obtains the finger
When making, the temporal information in presently described target database is recorded, and institute is recorded every certain time interval since current
The temporal information in target database is stated, for example, every 5 milliseconds of current times recorded in the target database.When described
Between information acquisition mode include record the whole network unified time, or record target database system time but not limited to this, appoint
What two side is tested database available unified time, may be incorporated for gathering.Here, obtained in target database on data
The current time information of target database described in periodic logging after the test instruction that data syn-chronization postpones between storehouse so that the data
Data syn-chronization delayed test, which starts the rear target database, between storehouse to receive the data message of the source database transmission
Afterwards, matched with the immediate temporal information recorded at that time, synchrodata information is obtained so as to obtain target database
Time, the time interval of the periodic logging is shorter, resulting target database obtain synchrodata information time get over
Accurately.Eliminate simultaneously and instruct the network delay sent caused by module is not at same physical equipment in target database and test
Influence so that the target database recorded obtains the current time during test instruction on database data synchronic delay
Information is more accurate, so as to lift the accuracy of time delay result between final acquired database.
Those skilled in the art will be understood that above-mentioned record target database obtains periodic logging after the test instructs and worked as
The mode of preceding time is only for example, and other record target databases that are existing or being likely to occur from now on obtain the test instruction
The mode of regular current time is such as applicable to the application afterwards, should also be included within the application protection domain, and herein to draw
It is incorporated herein with mode.
Then, in step s 12 source database will record the current time information of the source database record information it is same
Walk to corresponding target database;Target database reads the synchrodata information of corresponding source database in step S22, its
In, the synchrodata information of the source database includes the record information for recording the current time information of the source database.Its
In, the record information refer to by source database be synchronized to corresponding to target database to synchronization delay between test database
Test data.The record information of the current time information for recording the source database refers to, between test database
The test data of synchronization delay has included the time at that time of source database when test data is sent from the source database
Information, for example, the time that source database sends record information is T3, then the T3 times be recorded in one in transmitted information
It is same to be sent to target database, when target database checks the current target data storehouse of institute's periodic logging when receiving the record information
Between in nearest time T4, it is both differences to compare the synchronization delay time that T3 and T4 are obtained between database.Or note
Record information contains test instruction and reaches the temporal information at that time recorded during source database, i.e., previously described source database
The current time information during test instruction on database data synchronic delay is obtained, and as described in source database in acquisition
After test instruction, with the record information of the temporal information will be contained as testing the data syn-chronization of synchronization delay to described
Target database.The source database is synchronous and the target database obtains circulation process such as Fig. 7 of the record information
Shown in medium cloud database A to cloud database B arrow, and for example the record of timestamp shown in P4 T3 is synchronized to target cloud number in Fig. 8
According to storehouse B, and the time stamp T 3 for being synchronized to cloud database B is obtained shown in P8.This process so that target database is in the source of acquisition
The time that the data are sent from source database is obtained while the data of database synchronization, so as to obtain the number with target database
According to time compare, and then accurate synchronization delay time is obtained, for example, target data institute is periodically when inquiry obtains the data
The nearest time of record obtains the time of the synchrodata as target database, subtracts its recorded in the synchrodata
The time sent from source database, so as to obtain the synchronization delay time.
Those skilled in the art will be understood that above-mentioned synchronization and acquisition record the current time information of the source database
The mode of record information is only for example, and other synchronizations and acquisition existing or be likely to occur from now on record the source database
The mode of the record information of current time information is such as applicable to the application, should also be included within the application protection domain, and
It is incorporated herein by reference herein.
Then, target database provides delay relevant information to application corresponding to the test instruction in step S23,
Wherein, the delay relevant information corresponds to the current time information of the source database and the target database is reading institute
The current time information recorded during the synchrodata information for stating source database.Wherein, application corresponding to the test instruction refers to
Send test instruction so as to need obtain database between synchronization delay information application, for example, in Fig. 7 where control machine should
With, or application with source database in same physical machine itself, but not limited to this.The delay relevant information refers to by one
Devise a stratagem, which is calculated or inferred, can obtain the information of synchronization delay time or other necessary datas between database, or be to have calculated
Database between the data such as synchronization delay time, the relevant information corresponds to the synchrodata letter sent from source database
The time of source data place record during breath, and the information arrive at time corresponding during target database, i.e. target data
Storehouse periodic logging current time, and the time of the source database in synchrodata is read simultaneously.So delay relevant information is carried
It is supplied in application process i.e. such as Fig. 8 corresponding to the test instruction shown in step P9, time stamp T 3 and T4 is returned into control machine,
Wherein T3 is time for being sent from source database of synchrodata information, T4 be target database receive synchrodata information when
Between.
Preferably, the delay relevant information includes any one of following:The current time information of the source database and institute
State the current time information that target database records when reading the synchrodata information of the source database;The source database
Current time information and the target database recorded when reading the synchrodata information of the source database it is current when
Between information time difference;The average value of multiple time differences.
Wherein, the current time information of the source database and the target database are reading the same of the source database
The current time information recorded during step data information.The current time of the source database refers to that the source database is same by needed for
The current time information recorded during step data delivering, such as a data message is sent as synchrodata information,
The time of source database record at that time is T3 when sending.The target database is reading the synchrodata letter of the source database
The current time information recorded during breath, refer to synchrodata from source database be sent to target database when, target data place
The corresponding current time of periodic logging, such as read the data-message as synchrodata information with the T3 times, mesh
The current time now for marking data place periodic logging is T4.
The current time information of the source database and the target database are reading the same step number of the source database
It is believed that the time difference of the current time information recorded during breath.T3 and T4 as exemplified above difference are connect, i.e., such as institute in Fig. 7
The T4 shown subtracts T3 value.
The average value of the multiple time difference, refer to for the resulting more accurate synchronization delay time, together
Multiple data messages are walked as test, and record corresponding multiple T3 and T4, and take the flat of difference between each pair T3 and T4
Test result of the average as synchronization delay between database.
Preferably, the delay relevant information includes the current time information of the source database and the target database
The time difference of the current time information recorded when reading the synchrodata information of the source database;Wherein, the target
Database includes step S24 (not shown), and target database determines the current time information of the source database in step s 24
And time difference of current time information that the target database records when reading the synchrodata information of the source database
Value.Here, the time difference refers to the time that the synchrodata information is sent from source database, read with target database
To the difference of synchrodata information time, for example, the time that Fig. 7 medium cloud databases A sends synchrodata information is T3, cloud data
The time that B reads the synchrodata information for containing T3 is T4, as target database periodic logging current time T4, and together
When read synchrodata in source database time T3, then the time difference is that T3 subtracts T4 or T4 subtracts T3, or two
The absolute value of the difference of person, so as to obtain the synchronization delay time between two databases.This process is to be collected into correlation to prolong
The process of rear its time delay of calculating in slow relevant information, such as shown in P11 in Fig. 8, data syn-chronization delay time is calculated,
So as to further, target database is by the current time information of the source database and the target in step S23
The time difference for the current time information that database records when reading the synchrodata information of the source database is provided to institute
State and applied corresponding to test instruction, such as the control machine in Fig. 7, after test instruction is sent, obtain corresponding delayed test knot
Fruit.
Those skilled in the art will be understood that the mode of the above-mentioned determination time difference is only for example, other it is existing or
The mode of time difference is such as applicable to the application described in the determination being likely to occur from now on, should also be included in the application protection domain
Within, and be incorporated herein by reference herein.
Fig. 2 shows to coordinate the one kind realized according to the source database end of the application other side and target database end
For determining the method flow diagram of database data synchronic delay.The source database end includes step S11, step S12, step
Rapid S13, step S14;The target database end includes step S21, step S22, step S23.
Wherein, source database record source database obtains the survey on database data synchronic delay in step s 11
Current time information during examination instruction;Target database is obtained on data between database in target database in the step s 21
The current time information of target database described in periodic logging after the test instruction of synchronization delay;Source database in step s 12
The record information for the current time information for recording the source database is synchronized to corresponding target database;In step s 13
Source database detects whether the trigger condition for meeting stop recording temporal information;If source database does not meet institute in step S14
Trigger condition is stated, records the current time information of the source database, and the current time information that the source database will be recorded
Record information be synchronized to the target database;Target database reads the multiple same of the source database in step S22
Step data information, wherein, each synchrodata information includes the record information for recording the current time information of the source database;
Target database is reading each current time information and the target database with the source database in step S23
The corresponding delay relevant information of the current time information that is recorded during each synchrodata information is provided to the test instruction pair
The application answered.
Here, in Fig. 2 step S11, step S12, step S21 it is identical with step S11, step S12, step S21 in Fig. 1 or
It is similar, repeat no more.
Specifically, source database detects whether the trigger condition for meeting stop recording temporal information in step s 13.That is source
Database root is according to certain rule, such as each certain time interval sends current time information when containing transmission
Synchrodata is used to test synchronization delay, in order to control the time of this transmission synchrodata, is detected after each send current
Whether the trigger condition of stop recording temporal information is met.Wherein, the trigger condition refers to be used to control source database to send
Synchrodata number or the means of time, and then the time for a synchronization delay of controlling database.Such as judgement is shown in P5 in Fig. 8
No stop recording timestamp, if logging timestamp stops, continuing to obtain T3 if not returning to P3.
Preferably, the trigger condition includes following at least any one:Between the record of the current time of the source database
Every equal to or more than predetermined time interval threshold value, for example, being arranged to the current minimum time interval 5 that can reach of system in the least
Second, if sending synchrodata information less than 5 milliseconds apart from last time source database, without sending, restart if reaching
Send.When being applied in combination, whether the judgement of this trigger condition can be placed on is more than or waits time amount threshold or time duration
Behind threshold value, so that after judging that need not terminate synchrodata information sends, it is determined that the time sent again.
The record quantity of the current time of the source database is equal to or more than predetermined time amount threshold, for example, setting
Put at most send 720000 times, so as to reach or surpass this number opisthogenesis database i.e. stop transmission carrying delivery time when
Between information synchrodata information.
The record total duration of the current time of the source database is equal to or more than predetermined time duration threshold value, for example,
The time for setting maximum test synchronization delay is 1 hour, so as to which after this time is reached or surpassed, source database stops
Only send the synchrodata information with delivery time temporal information.
More than, trigger condition can be applied in combination, so that the time of test synchronization delay is controlled well, its
The minimum interval that middle time interval threshold value can be reached using system as far as possible, it is enough so as within a short period of time, obtain
Delay relevant information.
Then, if source database does not meet the trigger condition in step S14, record the source database it is current when
Between information, and the record information for the current time information for recording the source database is synchronized to the target database.I.e. such as
When judging whether that stop recording timestamp is no shown in P5 in Fig. 8, then return to P3 and continue to synchronize data letter by source database
The transmission of breath, wherein the temporal information of source database when having transmission in record, so that source database is in trigger condition
Multiple synchrodata information are sent in the case of satisfaction to the target database, so that the sample of delayed data is richer
Richness, to lift the accuracy of the synchronization delay test result finally obtained.
Those skilled in the art will be understood that the above-mentioned mode for judging whether to meet trigger condition is only for example, and other are existing
Or the mode for judging whether to meet trigger condition that is likely to occur from now on be such as applicable to the application, should also be included in the application
Within protection domain, and it is incorporated herein by reference herein.
Then, target database reads multiple synchrodata information of the source database in step S22, wherein, often
Individual synchrodata information includes the record information for recording the current time information of the source database.Wherein, because source database
, can be per at regular intervals before not meeting that trigger condition stops test synchronization delay because the reason for judgment mechanism be present
Interval sends the synchrodata information for including delivery time information, therefore target database also reads multiple same step numbers
It is believed that cease and the time that each corresponding synchrodata information reaches is recorded, and with included in corresponding synchrodata
The time pair record sent from source database get off, further to be calculated and averaged or other can be obtained
Obtain the processing of synchronization delay test result.That is target database periodic logging current time, and same step number is read or obtained simultaneously
The time of source database in, accordingly computable number according to time difference between storehouse so as to obtaining synchronization delayed time between database.Here,
When the time interval of target database periodic logging is short enough, arrived at reading the synchrodata information transmitted by source database
The time of target data is more accurate.
Then, in step S23 target database by each current time information and the mesh with the source database
The corresponding delay relevant information of the current time information that is recorded when reading each synchrodata information of mark database provide to
Applied corresponding to the test instruction.Will repeatedly the synchrodata between source database and target database relevant information hair
Deliver to send test instruction corresponding application or program, for example, every time from source database send recorded time T3n and
Reach the time T4n of the periodic logging corresponding to target database every time, represent some integer in this n, these data are sent out
Deliver to the control machine in Fig. 7 or need the other application or module of synchronization delay data result between acquisition database.Or for example
Time stamp T 3 and T4 are returned to control machine by P9 in Fig. 8, or are said as shown in P12 in final delay result input database.
Preferably, Fig. 3 shows to be used to determine database data synchronic according to one kind of the application another preferred embodiment
Step S21 flow charts in the method for delay.The step S21 includes step S211, step S212.
Wherein, target database is obtained on database data synchronic delay in target database in step S211
Whether periodic detection meets the trigger condition of stop recording temporal information after test instruction;If the target database in step S212
Do not meet the trigger condition, record the current time information of the target database.
Specifically, target database is obtained on database data synchronic delay in target database in step S211
Test instruction after periodic detection whether meet the trigger condition of stop recording temporal information.I.e. for example shown in Fig. 8, sentence in P10
It is disconnected whether to stop obtaining timestamp.Preferably, the trigger condition in the trigger condition genbank database, including:Target data
The intra-record slack byte of the current time in storehouse is equal to or more than predetermined time interval threshold value, for example, being arranged to system can currently reach
5 milliseconds of the minimum time interval arrived, then target database is to carry out detecting whether to receive the source database hair every 5 milliseconds
The synchrodata information sent simultaneously records, i.e., the time can be recorded every 5 milliseconds herein, and receiving synchrodata information
Nearest record time point is found afterwards as the time for receiving synchrodata.Also include:The current time of the target database
Record quantity be equal to or more than predetermined time amount threshold, at most read synchrodata information 720000 times for example, setting,
So as to it stop reading the synchrodata letter with delivery time temporal information reaching or surpassing this number opisthogenesis database
Breath.Also include:The record total duration of the current time of the source database is equal to or more than predetermined time duration threshold value, example
Such as, the time for setting the test synchronization delay of maximum is 1 hour, so that after this time is reached or surpassed, target data
Storehouse is to stop reading the synchrodata information with delivery time temporal information.
More than, trigger condition can be applied in combination, so that the time of test synchronization delay is controlled well, its
The minimum interval that middle time interval threshold value can be reached using system as far as possible, it is enough so as within a short period of time, obtain
Delay relevant information.And it is used in conjunction with judging whether clockwork spring part meets that stopping synchronizes delayed test with source database
Mechanism, effectively the related data of database delayed test can be controlled and lift the accurate of acquired related data
Property.
Then, if target database does not meet the trigger condition in step S212, the target database is recorded
Current time information.I.e. as shown in P10 in Fig. 8 if it is otherwise, it returns to P7 obtain synchrodata information reach target database when
Between information, i.e., in interval record current time at regular intervals, most connect so as to being found when the synchrodata information reaches
The near record time is as the time for getting the synchrodata information.
Those skilled in the art will be understood that the above-mentioned mode for judging whether to meet trigger condition is only for example, and other are existing
Or the mode for judging whether to meet trigger condition that is likely to occur from now on be such as applicable to the application, should also be included in the application
Within protection domain, and it is incorporated herein by reference herein.
Fig. 4 shows to coordinate the one kind realized to be used for according to the source database and target database of the application other side
Determine the equipment schematic diagram of database data synchronic delay.Wherein, the source database includes source database time record dress
Put synchronizing information device 112 between 111, database;The target database includes target database time recording device 121, source
Database information reading device 122, delay relevant information provide device 123.
Wherein, source database time recording device 111 records source database and obtained and postpones on database data synchronic
Test instruction when current time information;Target database time recording device 121 is obtained on data in target database
The current time information of target database described in periodic logging after the test instruction that data syn-chronization postpones between storehouse;Information between database
The record information for the current time information for recording the source database is synchronized to corresponding target database by sychronisation 112;
Source database information read device 122 reads the synchrodata information of corresponding source database, wherein, the synchronization of the source database
Data message includes recording the record information of the current time information of the source database;Postpone relevant information and device 123 is provided
Delay relevant information is provided to application corresponding to the test instruction, wherein, the delay relevant information corresponds to the source
What the current time information of database and the target database recorded when reading the synchrodata information of the source database
Current time information.
Specifically, source database time recording device 111 records source database and obtained and prolongs on database data synchronic
Current time information when slow test instructs.Wherein, the source database refers to be used to carry out database synchronization delayed test
In two party databases in a side, to send the database of synchrodata, such as the cloud database A in Fig. 7.The database
Between data syn-chronization delay refer to time between two databases spent by data transfer.It is described same on data between database
The test of step delay instructs the instruction referred to synchronization delay test starts the database, wherein, the instruction can be by institute
Source database timing is stated to initiate, or by being initiated with third party in one network as control machine, this third party
Control machine can directly access the database the physical equipment at place in the case of conditions permit, in the distributed environment of cloud computing
It may be arranged on other physical equipment, " control machine " in " high in the clouds environment " as shown in Figure 7 is such a situation.Therefore,
The record source database obtains the current time information during test instruction on database data synchronic delay, refers to
The test instruction is after source database is acquired, and record obtains the temporal information during test instruction, i.e., when described current
Between information refer to source database get test instruction current time, here, the acquisition mode of the temporal information include note
Record the whole network unified time, or the system time but not limited to this of record source database, it is available that any two side is tested database
Unified time, it may be incorporated for gathering, such as the time point T3 recorded on Fig. 7 medium cloud databases A.The record source database obtains
The process of the current time information during test instruction on database data synchronic delay is taken to illustrate such as institute in the P3 in Fig. 8
Show, instruct arrival source cloud database A, current time stamp T3 is recorded in database.By recording institute in the source database
Test instruction arrival time is stated, avoids and test instruction hair is fed back to by the source database under cloud computing distributed environment
The control machine gone out in module, such as Fig. 7, then the situation for sending module record current time is instructed by the test, eliminate
The network delay that source database sends caused by module is not at same physical equipment with test instruction influences so that the source recorded
The current time information that database is obtained when being instructed on the test of database data synchronic delay is more accurate, so as to be lifted
The accuracy of time delay result between final acquired database.
Those skilled in the art will be understood that above-mentioned record source database obtains the mode of the test instruction current time
It is only for example, other record source databases that are existing or being likely to occur from now on obtain the mode of the test instruction current time
The application is such as applicable to, should be also included within the application protection domain, and be incorporated herein by reference herein.
Then, target database time recording device 121 is obtained in target database and prolonged on database data synchronic
The current time information of target database described in periodic logging after slow test instruction.Wherein, the target database refers to use
In carrying out the side in two party databases in database synchronization delayed test, to read the database of synchrodata, such as Fig. 7
In cloud database B.Therefore, periodically remember after target database is obtained on the test instruction of database data synchronic delay
The current time information of the target database is recorded, refers to reach the target database in the test instruction, such as P7 in Fig. 8
And shown in Fig. 7, instruction reaches target cloud database B, current time stamp T4 is obtained, or the target database obtains institute
When stating instruction, the temporal information in presently described target database is recorded, and remember since current every certain time interval
The temporal information in the target database is recorded, for example, every 5 milliseconds of current times recorded in the target database.Institute
Stating the acquisition mode of temporal information includes record the whole network unified time, or records the system time of target database but be not limited to
This, any two side is tested database available unified time, may be incorporated for gathering.Closed here, being obtained in target database
The current time information of target database described in periodic logging after the test instruction of database data synchronic delay so that institute
State database data synchronic delayed test start the rear target database can be in the number that receiving the source database and send
It is believed that after breath, matched with the immediate temporal information recorded at that time, same step number is obtained so as to obtain target database
It is believed that the time of breath, the time interval of the periodic logging is shorter, and resulting target database obtains synchrodata information
Time is more accurate.Eliminate simultaneously and instruct the net sent caused by module is not at same physical equipment in target database and test
Network delayed impact so that the working as when target database recorded obtains the test instruction on database data synchronic delay
Preceding temporal information is more accurate, so as to lift the accuracy of time delay result between final acquired database.
Those skilled in the art will be understood that above-mentioned record target database obtains periodic logging after the test instructs and worked as
The mode of preceding time is only for example, and other record target databases that are existing or being likely to occur from now on obtain the test instruction
The mode of regular current time is such as applicable to the application afterwards, should also be included within the application protection domain, and herein to draw
It is incorporated herein with mode.
Then, synchronizing information device 112 will record the record letter of the current time information of the source database between database
Breath is synchronized to corresponding target database;Source database information read device 122 reads the synchrodata letter of corresponding source database
Breath, wherein, the synchrodata information of the source database includes recording the record letter of the current time information of the source database
Breath.Wherein, the record information refer to by source database be synchronized to corresponding to target database to same between test database
Walk the test data of delay.The record information of the current time information for recording the source database refers to, to test number
Source database when test data is sent from the source database had been included according to the test data of synchronization delay between storehouse at that time
Temporal information, for example, the time that source database sends record information is T3, then the T3 times be recorded in transmitted letter
Target database is together sent in breath, target database checks the current goal number of institute's periodic logging when receiving the record information
According to time T4 nearest in the time of storehouse, it is both differences to compare the synchronization delay time that T3 and T4 are obtained between database.Again
Or record information contains test instruction and reaches the temporal information at that time recorded during source database, i.e., previously described source
Database obtains the current time information during test instruction on database data synchronic delay, and is being obtained by source database
After taking the test instruction, with the record information of the temporal information will be contained as the data syn-chronization for testing synchronization delay
To the target database.The source database is synchronous and the target database obtains the circulation process of the record information
If Fig. 7 medium cloud database A are to shown in cloud database B arrow, and for example the record of timestamp shown in P4 T3 is synchronized to target in Fig. 8
Cloud database B, and the time stamp T 3 for being synchronized to cloud database B is obtained shown in P8.This process so that target database is obtaining
The time that the data are sent from source database is obtained while the data for taking source database synchronization, so as to be obtained with target database
The time of the data compares, and then obtains the accurate synchronization delay time, for example, target data institute when inquiry obtains the data
The nearest time of periodic logging obtains the time of the synchrodata as target database, subtracts recorded in the synchrodata
Its time sent from source database, so as to obtain the synchronization delay time.
Those skilled in the art will be understood that above-mentioned synchronization and acquisition record the current time information of the source database
The mode of record information is only for example, and other synchronizations and acquisition existing or be likely to occur from now on record the source database
The mode of the record information of current time information is such as applicable to the application, should also be included within the application protection domain, and
It is incorporated herein by reference herein.
Then, delay relevant information is provided to the test instruction is corresponding and answered by delay relevant information offer device 123
With, wherein, the delay relevant information corresponds to the current time information of the source database and the target database is being read
The current time information recorded during the synchrodata information for taking the source database.Wherein, applied corresponding to the test instruction
Refer to send test instruction so as to need to obtain the application of synchronization delay information between database, for example, in Fig. 7 where control machine
Using, or application with source database in same physical machine itself, but not limited to this.The delay relevant information refers to pass through
Certain calculating or deduction can obtain the information of synchronization delay time or other necessary datas between database, or be to be computed
The data such as synchronization delay time between the database gone out, the relevant information correspond to the synchrodata sent from source database
The time of source data place record during information, and it is corresponding time, i.e. number of targets that the information, which arrives at target database,
According to storehouse periodic logging current time, and the time of the source database in synchrodata is read simultaneously.So relevant information will be postponed
It is in such as Fig. 8 shown in step P9 to provide to application process corresponding to the test instruction, and time stamp T 3 and T4 are returned into control
Machine, wherein T3 are the time that synchrodata information is sent from source database, and T4 is that target database receives synchrodata information
Time.
Preferably, the delay relevant information includes any one of following:The current time information of the source database and institute
State the current time information that target database records when reading the synchrodata information of the source database;The source database
Current time information and the target database recorded when reading the synchrodata information of the source database it is current when
Between information time difference;The average value of multiple time differences.
Wherein, the current time information of the source database and the target database are reading the same of the source database
The current time information recorded during step data information.The current time of the source database refers to that the source database is same by needed for
The current time information recorded during step data delivering, such as a data message is sent as synchrodata information,
The time of source database record at that time is T3 when sending.The target database is reading the synchrodata letter of the source database
The current time information recorded during breath, refer to synchrodata from source database be sent to target database when, target data place
The corresponding current time of periodic logging, such as read the data-message as synchrodata information with the T3 times, mesh
The current time now for marking database periodic logging is T4.
The current time information of the source database and the target database are reading the same step number of the source database
It is believed that the time difference of the current time information recorded during breath.T3 and T4 as exemplified above difference are connect, i.e., such as institute in Fig. 7
The T4 shown subtracts T3 value.
The average value of the multiple time difference, refer to for the resulting more accurate synchronization delay time, together
Multiple data messages are walked as test, and record corresponding multiple T3 and T4, and take the flat of difference between each pair T3 and T4
Test result of the average as synchronization delay between database.
Preferably, the delay relevant information includes the current time information of the source database and the target database
The time difference of the current time information recorded when reading the synchrodata information of the source database;Wherein, the target
Database includes the (not shown) of time difference determining device 124, and the time difference determining device 124 determines the source database
Current time information and the target database recorded when reading the synchrodata information of the source database it is current when
Between information time difference.Here, the time difference refers to the time that the synchrodata information is sent from source database, with
Target database reads the difference of synchrodata information time, for example, Fig. 7 medium cloud databases A sends synchrodata information
Time is T3, and the time that cloud data B reads the synchrodata information for containing T3 is T4, as target database periodic logging
Current time T4, and read the time T3 of the source database in synchrodata simultaneously, then the time difference is that T3 subtracts T4
Or T4 subtracts T3, or both difference absolute value, so as to obtain the synchronization delay time between two databases.This process is
For the process for rear its time delay of calculating being collected into correlation delay relevant information, such as shown in P11 in Fig. 8, calculate number
According to the synchronizing relay time, so as to further, device 123 be provided by the source database by the delay relevant information
The current time that current time information and the target database record when reading the synchrodata information of the source database
The time difference of information is provided to application corresponding to the test instruction, such as the control machine in Fig. 7, is sending test instruction
Afterwards, corresponding delayed test result is obtained.
Those skilled in the art will be understood that the mode of the above-mentioned determination time difference is only for example, other it is existing or
The mode of time difference is such as applicable to the application described in the determination being likely to occur from now on, should also be included in the application protection domain
Within, and be incorporated herein by reference herein.
Fig. 5 shows to coordinate the one kind realized to be used for according to the source database and target database of the application other side
Determine the equipment schematic diagram of database data synchronic delay.The source database include source database time recording device 211,
Synchronizing information device 212, source database detection means 213, source database temporal information processing unit 214 between database;It is described
Target database includes target database time recording device 221, source database information read device 222, delay relevant information
Device 223 is provided.
Wherein, source database time recording device 211 records source database and obtained and postpones on database data synchronic
Test instruction when current time information;Target database time recording device 221 is obtained on data in target database
The current time information of target database described in periodic logging after the test instruction that data syn-chronization postpones between storehouse;Information between database
The record information for the current time information for recording the source database is synchronized to corresponding target database by sychronisation 212;
Source database detection means 213 detects whether the trigger condition for meeting stop recording temporal information;At source database temporal information
If reason device 214 does not meet the trigger condition, the current time information of the source database is recorded, and the source number will be recorded
The target database is synchronized to according to the record information of the current time information in storehouse;Source database information read device 222 is read
Multiple synchrodata information of the source database, wherein, each synchrodata information includes recording working as the source database
The record information of preceding temporal information;Postponing relevant information offer device 223 will be with each current time letter of the source database
Breath and the corresponding delay correlation of the current time information that is recorded when reading each synchrodata information of the target database
Information is provided to application corresponding to the test instruction.
Here, synchronizing information device 212, target database between source database time recording device 211, database in Fig. 5
Synchronizing information device 112, number of targets between source database time recording device 111, database in time recording device 221 and Fig. 4
It is same or similar according to storehouse time recording device 121, repeat no more.
Specifically, source database detection means 213 detects whether the trigger condition for meeting stop recording temporal information.That is source
Database root is according to certain rule, such as each certain time interval sends current time information when containing transmission
Synchrodata is used to test synchronization delay, in order to control the time of this transmission synchrodata, is detected after each send current
Whether the trigger condition of stop recording temporal information is met.Wherein, the trigger condition refers to be used to control source database to send
Synchrodata number or the means of time, and then the time for a synchronization delay of controlling database.Such as judgement is shown in P5 in Fig. 8
No stop recording timestamp, if logging timestamp stops, continuing to obtain T3 if not returning to P3.
Preferably, the trigger condition includes following at least any one:Between the record of the current time of the source database
Every equal to or more than predetermined time interval threshold value, for example, being arranged to the current minimum time interval 5 that can reach of system in the least
Second, if sending synchrodata information less than 5 milliseconds apart from last time source database, without sending, restart if reaching
Send.When being applied in combination, whether the judgement of this trigger condition can be placed on is more than or waits time amount threshold or time duration
Behind threshold value, so that after judging that need not terminate synchrodata information sends, it is determined that the time sent again.
The record quantity of the current time of the source database is equal to or more than predetermined time amount threshold, for example, setting
Put at most send 720000 times, so as to reach or surpass this number opisthogenesis database i.e. stop transmission carrying delivery time when
Between information synchrodata information.
The record total duration of the current time of the source database is equal to or more than predetermined time duration threshold value, for example,
The time for setting maximum test synchronization delay is 1 hour, so as to which after this time is reached or surpassed, source database stops
Only send the synchrodata information with delivery time temporal information.
More than, trigger condition can be applied in combination, so that the time of test synchronization delay is controlled well, its
The minimum interval that middle time interval threshold value can be reached using system as far as possible, it is enough so as within a short period of time, obtain
Delay relevant information.
Then, if source database temporal information processing unit 214 does not meet the trigger condition, the source database is recorded
Current time information, and the record information for the current time information for recording the source database is synchronized to the target data
Storehouse.When judging whether that stop recording timestamp is no i.e. as shown in P5 in Fig. 8, then return to P3 and continue to be synchronized by source database
The transmission of data message, wherein the temporal information of source database when having transmission in record, so that source database is triggering
Condition is to send multiple synchrodata information to the target database in the case of meeting, so that the sample of delayed data
It is more rich, to lift the accuracy of the synchronization delay test result finally obtained.
Those skilled in the art will be understood that the above-mentioned mode for judging whether to meet trigger condition is only for example, and other are existing
Or the mode for judging whether to meet trigger condition that is likely to occur from now on be such as applicable to the application, should also be included in the application
Within protection domain, and it is incorporated herein by reference herein.
Then, source database information read device 222 reads multiple synchrodata information of the source database, wherein,
Each synchrodata information includes the record information for recording the current time information of the source database.Wherein, because source data
Because there is the reason for judgment mechanism in storehouse, can be when certain before not meeting that trigger condition stops test synchronization delay
Between interval send and include the synchrodata information of delivery time information, therefore target database also reads multiple synchronizations
Data message is simultaneously recorded the time that each corresponding synchrodata information reaches, and is wrapped with corresponding synchrodata
The time pair record sent from source database contained is got off, so as to further calculated and averaged or it is other can be with
Obtain the processing of synchronization delay test result.That is target database periodic logging current time, and read or obtain simultaneously and be synchronous
The time of source database in data, accordingly computable number according to time difference between storehouse so as to obtaining synchronization delayed time between database.
This, when the time interval of target database periodic logging is short enough, is reading the synchrodata information transmitted by source database
The time for arriving at target data is more accurate.
Then, postpone relevant information provide device 223 by with each current time information of the source database and described
The corresponding delay relevant information of current time information that target database records when reading each synchrodata information provides
To application corresponding to the test instruction.Will the multiple synchrodata between source database and target database relevant information
Send to send test instruction corresponding application or program, for example, every time from source database send recorded time T3n with
And reach the time T4n of the periodic logging corresponding to target database every time, some integer is represented in this n, by these data
Send to the control machine in Fig. 7 or need the other application or module of synchronization delay data result between acquisition database.Or example
As time stamp T 3 and T4 are returned to control machine by P9 in Fig. 8, or said as shown in P12 in final delay result input database.
Preferably, Fig. 6 shows to be used to determine database data synchronic according to one kind of the application another preferred embodiment
Target database time recording device schematic diagram in the equipment of delay.The target database time recording device 221 includes mesh
Mark database detection unit 2211, target database time recording unit 2212.
Wherein, target database detection unit 2211 is obtained on database data synchronic delay in target database
Whether periodic detection meets the trigger condition of stop recording temporal information after test instruction;Target database time recording unit
If 2212 do not meet the trigger condition, the current time information of the target database is recorded.
Specifically, target database detection unit 2211 is obtained in target database and postponed on database data synchronic
Test instruction after periodic detection whether meet the trigger condition of stop recording temporal information.I.e. for example shown in Fig. 8, sentence in P10
It is disconnected whether to stop obtaining timestamp.Preferably, the trigger condition in the trigger condition genbank database, including:Target data
The intra-record slack byte of the current time in storehouse is equal to or more than predetermined time interval threshold value, for example, being arranged to system can currently reach
5 milliseconds of the minimum time interval arrived, then target database is to carry out detecting whether to receive the source database hair every 5 milliseconds
The synchrodata information sent simultaneously records, i.e., the time can be recorded every 5 milliseconds herein, and receiving synchrodata information
Nearest record time point is found afterwards as the time for receiving synchrodata.Also include:The current time of the target database
Record quantity be equal to or more than predetermined time amount threshold, at most read synchrodata information 720000 times for example, setting,
So as to it stop reading the synchrodata letter with delivery time temporal information reaching or surpassing this number opisthogenesis database
Breath.Also include:The record total duration of the current time of the source database is equal to or more than predetermined time duration threshold value, example
Such as, the time for setting the test synchronization delay of maximum is 1 hour, so that after this time is reached or surpassed, target data
Storehouse is to stop reading the synchrodata information with delivery time temporal information.
More than, trigger condition can be applied in combination, so that the time of test synchronization delay is controlled well, its
The minimum interval that middle time interval threshold value can be reached using system as far as possible, it is enough so as within a short period of time, obtain
Delay relevant information.And it is used in conjunction with judging whether clockwork spring part meets that stopping synchronizes delayed test with source database
Mechanism, effectively the related data of database delayed test can be controlled and lift the accurate of acquired related data
Property.
Then, if target database time recording unit 2212 does not meet the trigger condition, the target data is recorded
The current time information in storehouse.If it is otherwise, it returns to P7, which obtains synchrodata information, reaches target database i.e. as shown in P10 in Fig. 8
Temporal information, i.e., in interval record current time at regular intervals, so as to being found when the synchrodata information reaches
The immediate record time is as the time for getting the synchrodata information.
Those skilled in the art will be understood that the above-mentioned mode for judging whether to meet trigger condition is only for example, and other are existing
Or the mode for judging whether to meet trigger condition that is likely to occur from now on be such as applicable to the application, should also be included in the application
Within protection domain, and it is incorporated herein by reference herein.
In addition, a kind of equipment for being used to determine database data synchronic delay is additionally provided, including:
Processor;
And it is arranged to store the memory of computer executable instructions, the executable instruction makes institute when executed
State processor:
Record current time information when source database obtains the test instruction on database data synchronic delay;
The record information for the current time information for recording the source database is synchronized to corresponding target database.
In addition, a kind of equipment for being used to determine database data synchronic delay is additionally provided, including:
Processor;
And it is arranged to store the memory of computer executable instructions, the executable instruction makes institute when executed
State processor:
The target described in periodic logging after target database is obtained on the test instruction of database data synchronic delay
The current time information of database;
The synchrodata information of corresponding source database is read, wherein, the synchrodata information of the source database includes note
Record the record information of the current time information of the source database;
Delay relevant information is provided to application corresponding to the test instruction, wherein, the delay relevant information is corresponding
The synchrodata information of the source database is being read in the current time information of the source database and the target database
Shi Jilu current time information.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the application to the application
God and scope.So, if these modifications and variations of the application belong to the scope of the application claim and its equivalent technologies
Within, then the application is also intended to comprising including these changes and modification.
It should be noted that the application can be carried out in the assembly of software and/or software and hardware, for example, can adopt
With application specific integrated circuit (ASIC), general purpose computer or any other realized similar to hardware device.In one embodiment
In, the software program of the application can realize steps described above or function by computing device.Similarly, the application
Software program (including related data structure) can be stored in computer readable recording medium storing program for performing, for example, RAM memory,
Magnetically or optically driver or floppy disc and similar devices.In addition, some steps or function of the application can employ hardware to realize, example
Such as, coordinate as with processor so as to perform the circuit of each step or function.
In addition, the part of the application can be applied to computer program product, such as computer program instructions, when its quilt
When computer performs, by the operation of the computer, it can call or provide according to the present processes and/or technical scheme.
And the programmed instruction of the present processes is called, it is possibly stored in fixed or moveable recording medium, and/or pass through
Broadcast or the data flow in other signal bearing medias and be transmitted, and/or be stored according to described program instruction operation
In the working storage of computer equipment.Here, including a device according to one embodiment of the application, the device includes using
Memory in storage computer program instructions and processor for execute program instructions, wherein, when the computer program refers to
When order is by the computing device, method and/or skill of the plant running based on foregoing multiple embodiments according to the application are triggered
Art scheme.
It is obvious to a person skilled in the art that the application is not limited to the details of above-mentioned one exemplary embodiment, Er Qie
In the case of without departing substantially from spirit herein or essential characteristic, the application can be realized in other specific forms.Therefore, no matter
From the point of view of which point, embodiment all should be regarded as exemplary, and be nonrestrictive, scope of the present application is by appended power
Profit requires rather than described above limits, it is intended that all in the implication and scope of the equivalency of claim by falling
Change is included in the application.Any reference in claim should not be considered as to the involved claim of limitation.This
Outside, it is clear that the word of " comprising " one is not excluded for other units or step, and odd number is not excluded for plural number.That is stated in device claim is multiple
Unit or device can also be realized by a unit or device by software or hardware.The first, the second grade word is used for table
Show title, and be not offered as any specific order.
Claims (18)
1. a kind of method for being used to determine database data synchronic delay at source database end, including:
Record current time information when source database obtains the test instruction on database data synchronic delay;
The record information for the current time information for recording the source database is synchronized to corresponding target database.
2. according to the method for claim 1, wherein, methods described also includes:
Detect whether the trigger condition for meeting stop recording temporal information;
If not meeting the trigger condition, the current time information of the source database is recorded, and the source database will be recorded
The record information of current time information be synchronized to the target database.
3. according to the method for claim 2, wherein, the trigger condition includes following at least any one:
The intra-record slack byte of the current time of the source database is equal to or more than predetermined time interval threshold value;
The record quantity of the current time of the source database is equal to or more than predetermined time amount threshold;
The record total duration of the current time of the source database is equal to or more than predetermined time duration threshold value.
4. a kind of method for being used to determine database data synchronic delay at target database end, including:
The target data described in periodic logging after target database is obtained on the test instruction of database data synchronic delay
The current time information in storehouse;
The synchrodata information of corresponding source database is read, wherein, the synchrodata information of the source database includes record institute
State the record information of the current time information of source database;
Delay relevant information is provided to application corresponding to the test instruction, wherein, the delay relevant information corresponds to institute
The current time information and the target database for stating source database are remembered when reading the synchrodata information of the source database
The current time information of record.
5. according to the method for claim 4, wherein, the synchrodata information for reading corresponding source database includes:
Multiple synchrodata information of the source database are read, wherein, each synchrodata information includes recording the source number
According to the record information of the current time information in storehouse;
Wherein, described provide delay relevant information to application corresponding to the test instruction includes:
Each synchrodata information will be being read with each current time information and the target database of the source database
The delay relevant information that Shi Jilu current time information is corresponding is provided to application corresponding to the test instruction.
6. according to the method for claim 4, wherein, described obtained in target database is prolonged on database data synchronic
The current time information of target database described in periodic logging includes after slow test instruction:
Whether periodic detection meets to stop after target database is obtained on the test instruction of database data synchronic delay
The trigger condition of recording time information;
If not meeting the trigger condition, the current time information of the target database is recorded.
7. according to the method for claim 4, wherein, the delay relevant information includes any one of following:
The current time information of the source database and the target database are reading the synchrodata letter of the source database
The current time information recorded during breath;
The current time information of the source database and the target database are reading the synchrodata letter of the source database
The time difference of the current time information recorded during breath;
The average value of multiple time differences.
8. according to the method for claim 7, wherein, the delay relevant information includes the current time of the source database
The current time information that information and the target database record when reading the synchrodata information of the source database when
Between difference;
Wherein, methods described includes:
The current time information and the target database for determining the source database are reading the same step number of the source database
It is believed that the time difference of the current time information recorded during breath;
Wherein, described provide delay relevant information to application corresponding to the test instruction includes:
The current time information of the source database and the target database are being read into the synchrodata of the source database
The time difference of the current time information recorded during information is provided to application corresponding to the test instruction.
9. a kind of source database for being used to determine database data synchronic delay, including:
Source database time recording device, refer to for recording source database and obtaining on the test of database data synchronic delay
Current time information when making;
Synchronizing information device between database, for the record information for recording the current time information of the source database to be synchronized to
Corresponding target database.
10. equipment according to claim 9, wherein, the equipment also includes:
Source database detection means, for detecting whether meeting the trigger condition of stop recording temporal information;
Source database temporal information processing unit, if for not meeting the trigger condition, record the current of the source database
Temporal information, and the record information for the current time information for recording the source database is synchronized to the target database.
11. equipment according to claim 10, wherein, the trigger condition includes following at least any one:
The intra-record slack byte of the current time of the source database is equal to or more than predetermined time interval threshold value;
The record quantity of the current time of the source database is equal to or more than predetermined time amount threshold;
The record total duration of the current time of the source database is equal to or more than predetermined time duration threshold value.
12. a kind of target database for being used to determine database data synchronic delay, including:
Target database time recording device, for obtaining the test on database data synchronic delay in target database
The current time information of target database described in periodic logging after instruction;
Source database information read device, for reading the synchrodata information of corresponding source database, wherein, the source database
Synchrodata information include record the source database current time information record information;
Postpone relevant information and device is provided, applied for delay relevant information to be provided to described test corresponding to instruction, wherein,
The delay relevant information corresponds to the current time information of the source database and the target database is reading the source
The current time information recorded during the synchrodata information of database.
13. equipment according to claim 12, wherein, the source database information read device is used for:
Multiple synchrodata information of the source database are read, wherein, each synchrodata information includes recording the source number
According to the record information of the current time information in storehouse;
Wherein, the delay relevant information provides device and is used for:
Each synchrodata information will be being read with each current time information and the target database of the source database
The delay relevant information that Shi Jilu current time information is corresponding is provided to application corresponding to the test instruction.
14. equipment according to claim 12, wherein, the target database time recording device includes:
Target database detection unit, for obtaining the test instruction on database data synchronic delay in target database
Whether periodic detection meets the trigger condition of stop recording temporal information afterwards;
Target database time recording unit, if for not meeting the trigger condition, record the current of the target database
Temporal information.
15. equipment according to claim 12, wherein, the delay relevant information includes any one of following:
The current time information of the source database and the target database are reading the synchrodata letter of the source database
The current time information recorded during breath;
The current time information of the source database and the target database are reading the synchrodata letter of the source database
The time difference of the current time information recorded during breath;
The average value of multiple time differences.
16. equipment according to claim 15, wherein, the delay relevant information include the source database it is current when
Between information and the target database current time information that is recorded when reading the synchrodata information of the source database
Time difference;
Wherein, the equipment includes:
Time difference determining device, current time information and the target database for determining the source database are being read
The time difference of the current time information recorded during the synchrodata information of the source database;
Wherein, the delay relevant information provides device and is used for:
The current time information of the source database and the target database are being read into the synchrodata of the source database
The time difference of the current time information recorded during information is provided to application corresponding to the test instruction.
17. a kind of equipment for being used to determine database data synchronic delay, including:
Processor;
And it is arranged to store the memory of computer executable instructions, the executable instruction makes the place when executed
Manage device:
Record current time information when source database obtains the test instruction on database data synchronic delay;
The record information for the current time information for recording the source database is synchronized to corresponding target database.
18. a kind of equipment for being used to determine database data synchronic delay, including:
Processor;
And it is arranged to store the memory of computer executable instructions, the executable instruction makes the place when executed
Manage device:
The target data described in periodic logging after target database is obtained on the test instruction of database data synchronic delay
The current time information in storehouse;
The synchrodata information of corresponding source database is read, wherein, the synchrodata information of the source database includes record institute
State the record information of the current time information of source database;
Delay relevant information is provided to application corresponding to the test instruction, wherein, the delay relevant information corresponds to institute
The current time information and the target database for stating source database are remembered when reading the synchrodata information of the source database
The current time information of record.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610194479 | 2016-03-31 | ||
| CN2016101944796 | 2016-03-31 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN107402872A true CN107402872A (en) | 2017-11-28 |
Family
ID=60404341
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710198883.5A Pending CN107402872A (en) | 2016-03-31 | 2017-03-29 | A kind of method and apparatus for being used to determine database data synchronic delay |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107402872A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109189864A (en) * | 2018-08-09 | 2019-01-11 | 联动优势电子商务有限公司 | A kind of the determination method, apparatus and equipment of data synchronizing relay |
| CN109241165A (en) * | 2018-08-30 | 2019-01-18 | 联动优势科技有限公司 | A kind of the determination method, apparatus and equipment of database synchronization delay |
| WO2021189348A1 (en) * | 2020-03-26 | 2021-09-30 | 深圳市欢太科技有限公司 | Database synchronization test method and apparatus, and computer device and storage medium |
| CN113468215A (en) * | 2020-03-30 | 2021-10-01 | 阿里巴巴集团控股有限公司 | Data processing method and device, electronic equipment and computer storage medium |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101753609A (en) * | 2008-12-15 | 2010-06-23 | 中国移动通信集团公司 | Version control method, nodes and system of distributed system |
| US20130066829A1 (en) * | 2009-01-30 | 2013-03-14 | Apple Inc. | Synchronization of database changes among multiple devices |
| CN104376017A (en) * | 2013-08-15 | 2015-02-25 | 阿里巴巴集团控股有限公司 | Method and system for inter-database data synchronization |
-
2017
- 2017-03-29 CN CN201710198883.5A patent/CN107402872A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101753609A (en) * | 2008-12-15 | 2010-06-23 | 中国移动通信集团公司 | Version control method, nodes and system of distributed system |
| US20130066829A1 (en) * | 2009-01-30 | 2013-03-14 | Apple Inc. | Synchronization of database changes among multiple devices |
| CN104376017A (en) * | 2013-08-15 | 2015-02-25 | 阿里巴巴集团控股有限公司 | Method and system for inter-database data synchronization |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109189864A (en) * | 2018-08-09 | 2019-01-11 | 联动优势电子商务有限公司 | A kind of the determination method, apparatus and equipment of data synchronizing relay |
| CN109189864B (en) * | 2018-08-09 | 2021-03-16 | 联动优势电子商务有限公司 | Method, device and equipment for determining data synchronization delay |
| CN109241165A (en) * | 2018-08-30 | 2019-01-18 | 联动优势科技有限公司 | A kind of the determination method, apparatus and equipment of database synchronization delay |
| CN109241165B (en) * | 2018-08-30 | 2021-02-23 | 联动优势科技有限公司 | Method, device and equipment for determining database synchronization delay |
| WO2021189348A1 (en) * | 2020-03-26 | 2021-09-30 | 深圳市欢太科技有限公司 | Database synchronization test method and apparatus, and computer device and storage medium |
| CN113468215A (en) * | 2020-03-30 | 2021-10-01 | 阿里巴巴集团控股有限公司 | Data processing method and device, electronic equipment and computer storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107402872A (en) | A kind of method and apparatus for being used to determine database data synchronic delay | |
| CN110535864B (en) | Service abnormity detection method, device, equipment and storage medium | |
| CN104133691B (en) | Accelerate the method and device started | |
| US20080294769A1 (en) | Efficient synchronization of agents starting a task where the agents poll a server to learn the task start time | |
| CN110995811B (en) | Data updating method and device | |
| AU2016202094A1 (en) | Systems and methods for sentiment detection, measurement, and normalization over social networks | |
| US20170041126A1 (en) | Modeling a clock | |
| KR102498093B1 (en) | Method and system for user device identification | |
| US12021936B2 (en) | System and method for improved opt-out recognition for a mobile device preliminary class | |
| CN111737632B (en) | Queuing time determining method, queuing time determining device, server and computer readable storage medium | |
| CN107704997A (en) | Assess the method, apparatus and storage medium of client liveness | |
| US20150249589A1 (en) | Method and apparatus for determining automatic scanning action | |
| US20210192576A1 (en) | Method for in-stream aggregation of ad interaction data for a population of users viewing ad content | |
| CN107748790A (en) | A kind of online service system, data load method, device and equipment | |
| CN110377521A (en) | A kind of target object verification method and device | |
| CN104111970A (en) | Method and device for counting page average residence time and method and device for determining page user viscosity | |
| CN107193839A (en) | Data aggregation method and device | |
| CN106649056B (en) | A kind of data detection method and device | |
| CN113014347A (en) | Server time synchronization method and device, computer equipment and storage medium | |
| JP2018195099A (en) | Character analyzing device, device for generating model for character analysis, and character analyzing program | |
| US11683111B2 (en) | Time offset determination without synchronization | |
| CN105991744A (en) | Method and equipment used for synchronizing user application data | |
| CN112328463A (en) | Log monitoring method and device | |
| CN109740060B (en) | Frequency control method and device for pushing information | |
| Weiss et al. | A dataset and a comparison of out-of-order event compensation algorithms |
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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171128 |