WO2019237543A1 - 一种数据库的切换方法及系统 - Google Patents

一种数据库的切换方法及系统 Download PDF

Info

Publication number
WO2019237543A1
WO2019237543A1 PCT/CN2018/105554 CN2018105554W WO2019237543A1 WO 2019237543 A1 WO2019237543 A1 WO 2019237543A1 CN 2018105554 W CN2018105554 W CN 2018105554W WO 2019237543 A1 WO2019237543 A1 WO 2019237543A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage
terminal
group
storage terminal
monitoring terminal
Prior art date
Application number
PCT/CN2018/105554
Other languages
English (en)
French (fr)
Inventor
林水明
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019237543A1 publication Critical patent/WO2019237543A1/zh

Links

Images

Classifications

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

Definitions

  • the present application belongs to the field of Internet technology, and in particular, relates to a method and system for database switching.
  • the implementation method is: divide the database into multiple partitions, and store the data of each partition in multiple storages by distributed deployment.
  • a corresponding monitoring terminal is configured for each storage terminal to monitor the completeness and operation of the storage terminal.
  • the data in that partition is switched to another storage. Terminal to ensure the completeness of the database.
  • the operation log of the partition data will also be transferred between the corresponding monitoring terminals, resulting in the monitoring data on the monitoring terminal not being changed. Continuous, reducing the accuracy and stability of abnormal monitoring.
  • the embodiments of the present application provide a database switching method and system to solve the existing database switching method, discontinuous monitoring data, and reduce the problems of accuracy and stability of abnormality monitoring.
  • a first aspect of the embodiments of the present application provides a database switching method, which is applied to a distributed database, where the distributed database includes at least two sets of storage systems deployed in a distributed manner; each set of the storage systems includes storage terminals and monitoring Terminal; the database switching method includes:
  • the monitoring terminal receives a first operation log uploaded by a storage terminal in the group, and identifies whether there is an abnormality in the storage terminal in the group based on the first operation log; the storage terminal in the group is deployed at the same location as the monitoring terminal Storage terminal of a storage system;
  • the monitoring terminal synchronizes the partition data on the distributed database stored in the storage terminal in the group to the storage terminal outside the group;
  • the partition data includes a partition identifier;
  • the storage terminal outside the group is a storage terminal of one of the storage systems in the distributed database except the storage system where the monitoring terminal is located;
  • the external storage terminal obtains a communication address of the monitoring terminal, and determines a correspondence between the communication address and the partition identifier;
  • the second operation log generated by the storage terminal outside the group includes the partition identifier, upload the second operation log to the monitoring terminal according to the corresponding relationship.
  • the monitoring terminal receives the first operation log uploaded by the storage terminals in the group, and then determines whether there is an abnormal situation in the storage terminals in the group; if an abnormal situation occurs in the storage terminals in the group, the storage terminals in the group store the The partition data is synchronized to any external storage terminal, and the partition identifier corresponding to the partition data is marked after sending; the external storage terminal constructs the corresponding relationship between the two according to the partition identifier and the communication address of the monitoring terminal. In order to ensure that the monitoring data is continuous when the second operation log corresponding to the partition identifier is received, it can be uploaded to the monitoring terminal corresponding to the partition identifier.
  • the storage terminal when the storage terminal stores partition data switched by other terminals, it can still feedback the operation log about the partition data to the corresponding monitoring terminal according to the partition identifier of the partition data.
  • the monitoring and maintenance of the running status ensures the continuity of the monitoring records, which can improve the stability of the database and the accuracy of abnormality monitoring.
  • FIG. 1 is an interaction flowchart of a database switching method provided by a first embodiment of the present application
  • FIG. 2 is a specific implementation flowchart of a database switching method S102 provided by a second embodiment of the present application
  • FIG. 3 is a specific implementation flowchart of a database switching method S103 provided by a third embodiment of the present application.
  • FIG. 4 is a detailed implementation flowchart of a database switching method S101 provided by a fourth embodiment of the present application.
  • FIG. 5 is a specific implementation flowchart of a database switching method provided by a fifth embodiment of the present application.
  • FIG. 6 is a structural block diagram of a database switching system according to an embodiment of the present application.
  • the execution subject of the process is a database switching system.
  • the database switching system is applied to a distributed database, including at least two sets of storage systems deployed in a distributed manner; each set of storage systems includes at least one storage terminal and a monitoring terminal, which is used to detect the operation of each storage terminal in order Data can be switched when an abnormality occurs in the storage terminal.
  • Each monitoring terminal is configured with a disaster recovery instance, and an abnormal situation is identified based on the disaster recovery instance.
  • FIG. 1 shows an interaction flowchart of a database switching method provided by the first embodiment of the present application, which is detailed as follows:
  • the monitoring terminal receives a first operation log uploaded by a storage terminal in the group, and identifies whether there is an abnormality in the storage terminal in the group based on the first operation log; the storage terminal in the group is connected with the monitoring Terminals are deployed on storage terminals in the same storage system.
  • a first running log is generated and sent to the monitoring terminal in its storage system.
  • the first running log is used to indicate the current running status of the storage terminal.
  • the first running log may include a storage occupancy rate of a storage terminal, an occupancy rate of a processing module, a request response rate, and the like.
  • the upload condition may be an upload cycle or multiple preset upload time nodes.
  • the storage device in the group detects that the current time reaches the preset upload cycle or upload time node, it sends a first operation log to the monitoring terminal.
  • the upload condition may be an upload trigger event. For example, after the received database storage amount reaches a preset threshold or responds to a certain storage request, the storage terminal will automatically report the first operation on the current operation status to the monitoring terminal. Log.
  • the monitoring terminal may import the first operation log into a preset abnormal situation recognition model to determine whether there is an abnormality in the storage terminals in the group. Situation, and when an abnormal situation is detected, switch the partition data of the distributed database to ensure the data integrity of the distributed database.
  • the manner in which the monitoring terminal determines whether there is an abnormality in the storage terminals in the group may be: after receiving the first operation log sent by the storage terminals in the group, the features in the first operation log are extracted Parameters, and compare them with the preset rated parameter range. If any of the characteristic parameters in the first operation log is outside the rated parameter range, identify the abnormality of the storage terminal in the group and perform the relevant operation of S102; otherwise, If all the characteristic parameters in the first operation log are within the range of the rated parameters, it is identified that the storage terminals in the group are in a normal state, and the partition data of the distributed database is continued to be stored.
  • the same storage system may include two or more storage terminals, and the two storage terminals internally synchronize database partition data of the storage system to which they belong and jointly respond to users in the storage system.
  • Storage requests initiated by the terminal implement load balancing. Therefore, the two storage terminals will generate a first operation log, and send the first operation log to a monitoring terminal, and then the monitoring terminal performs abnormality detection on all storage terminals in the system through the first operation log.
  • the first operation log in order to determine the storage terminal in the group to which the first operation log belongs, the first operation log also carries a terminal identifier of the storage terminal.
  • the terminal identifier may be a group number of a storage terminal in the group, or a communication address of the storage terminal in the group.
  • the monitoring terminal synchronizes the partition data on the distributed database stored in the storage terminal in the group to the storage terminal outside the group; the partition data includes Partition identification; the storage terminal outside the group is a storage terminal of one of the storage systems in the distributed database except the storage system where the monitoring terminal is located.
  • the monitoring terminal will control the storage terminal in the group to switch the partition data of the distributed database it stores into the storage terminal of another storage system. It should be noted that each storage terminal in the distributed database reserves a certain storage space to store the partition data switched by other storage terminals.
  • the monitoring terminal stores a data switching correspondence table, and the correspondence table records all storage terminals outside the group whose partition data of the storage terminals in the group can be switched. Based on the switching order of the storage terminals outside the group in the correspondence table, the monitoring terminal sends a switching request instruction to the storage terminals outside the group in order to confirm whether the reserved storage space of the storage terminals outside the group has been occupied. If the reserved storage space of the storage terminal outside the group is not occupied, a switching confirmation instruction can be returned to the monitoring terminal, the monitoring terminal recognizes the storage terminal outside the group as the target switching terminal, and partition data of the storage terminal in the group Synchronize to the reserved storage space of the target switching terminal to achieve the purpose of data switching.
  • the monitoring terminal controls the storage terminals in the group to establish a long connection with the storage terminals outside the group to synchronize the partition data, and sends the partition data of the distributed database to the storage terminals outside the group.
  • the reserved storage space is added to the partition identifier for the reserved storage space.
  • the partition identifier is used to indicate the partition number corresponding to the partition data in the distributed database. Since the storage terminal outside the group also stores partition data about the distributed database in the storage system to which it belongs, in order to distinguish the two partition data, it is necessary to add a partition identifier for the reserved storage block space.
  • the monitoring terminal replaces the target address of the storage request from the storage terminal in the group with the communication address corresponding to the storage terminal outside the group that performs the synchronization operation To respond to the storage request through the external storage terminal of the group after the synchronization is completed.
  • the storage terminal outside the group obtains a communication address of the monitoring terminal, and determines a correspondence between the communication address and the partition identifier.
  • the storage terminal outside the group after receiving the switched partition data, the storage terminal outside the group sends a communication address acquisition request to the monitoring terminal, and the monitoring terminal returns its own communication address to the storage terminal outside the group. After the storage terminal outside the group obtains the communication address of each monitoring terminal, it will establish the correspondence between the partition identifier and the communication address, so as to generate the second operation data corresponding to the partition identifier and return it to the corresponding monitor. terminal.
  • the storage terminal outside the group may configure the communication address at the gateway interface, and set the correspondence between the partition identifier and the communication address. That is, when the gateway interface receives a data packet, if it detects that the data packet carries the partition identifier, it will redirect the data packet and add the communication address of the monitoring device to the frame header of the data packet. It is implemented to send the second operation record to the monitoring terminal.
  • the partition data of the storage terminal in the group in addition to the partition data of the system to which the storage terminal belongs, other storage terminals are stored, that is, the partition data of the storage terminal in the group.
  • different partition data The running log needs to be uploaded to the corresponding monitoring terminal.
  • the storage terminal outside the group After generating an operation log, the storage terminal outside the group needs to identify the partition identifier contained in the partition data recorded in the operation log to determine whether it is uploaded to the monitoring terminal of the storage system to which it belongs, or to the switching data. Monitoring terminal for your storage system.
  • the external storage terminal of the group detects that the generated second operation log contains the partition identifier corresponding to the storage terminal in the group, then upload the second operation log to the monitoring terminal corresponding to the storage terminal in the group; otherwise, if the external When the storage terminal sees the partition ID of its own storage system included in the second operation log, it uploads the second operation log to the monitoring terminal of the storage system to which it belongs, so that the operation logs of different partition data can be uploaded to the corresponding monitoring.
  • the purpose of the terminal is not limited to the terminal.
  • a monitoring terminal receives a first operation log uploaded by a storage terminal in a group, and then determines whether there is an abnormality in the storage terminal in the group;
  • the partition data stored in the storage terminal in the group is synchronized to any external storage terminal, and the partition identifier corresponding to the partition data is marked after sending; the external storage terminal according to the partition identifier and the monitoring terminal ’s
  • the correspondence address is used to establish the correspondence between the two, so that when the second operation log corresponding to the partition identifier is received, it can be uploaded to the monitoring terminal corresponding to the partition identifier to ensure continuous monitoring data.
  • the storage terminal when the storage terminal stores partition data switched by other terminals, it can still feedback the operation log about the partition data to the corresponding monitoring terminal according to the partition identifier of the partition data. Monitoring and maintenance of operating status, thereby ensuring the continuity of monitoring records, which can improve the stability of the database and the accuracy of abnormality monitoring
  • FIG. 2 shows a specific interaction flowchart of a database switching method S102 provided by a second embodiment of the present application.
  • S102 includes: S1021 to S1023, and details are as follows:
  • the monitoring terminal broadcasts an operating parameter acquisition instruction to the distributed database to receive operating parameters uploaded by the storage terminals outside each group.
  • the distributed database includes multiple storage systems. Therefore, when the monitoring terminal finds that there is an abnormality in the storage terminals in the group and needs to perform the partition data switching operation, it is necessary to select the last external storage terminal in the operating state as the target storage terminal. Based on this, the monitoring terminal will broadcast an operating parameter acquisition instruction through the local area network of the distributed database, so that all storage systems in the distributed database can receive the broadcast instruction. It should be noted that the broadcast instruction can carry the communication address of the monitoring terminal. In this case, after each storage system obtains its own operating parameters, it will send the operating parameters to the monitoring device based on the communication address; of course, the The broadcast instruction does not need to carry the communication address of the monitoring terminal.
  • each storage system can broadcast the obtained operating parameters through the distributed database local area network to broadcast, so that all devices in the local area network can receive
  • the monitoring terminal monitors the broadcast information of the operation storage parameters in the local area network, and then collects and stores the information locally.
  • operating parameters include, but are not limited to, parameter information such as available storage space, storage occupancy rate, load value, network bandwidth, and signal-to-noise ratio.
  • the monitoring terminal imports operating parameters of each of the storage terminals outside the group into a priority calculation model, and calculates a switching priority of each of the storage terminals outside the group.
  • the priority calculation model is specifically:
  • Priority n (k) is the switching priority of the k-th external storage terminal
  • Priority n-1 (k) is the historical priority of the k-th external storage terminal
  • Work ik is the first k are the i-th operating parameters of the storage terminals outside the group
  • m is the total number of operating parameters
  • is a preset coefficient, and 0 ⁇ ⁇ 1
  • K is the total number of storage terminals outside the group.
  • the monitoring device after the monitoring device obtains the operating parameters returned by a plurality of external storage terminals, it will separately calculate the switching priority corresponding to each external storage terminal, and determine the current partition data switching based on the switching priority.
  • the target storage terminal for the operation First, the monitoring terminal will classify the collected operating parameters of the external storage terminals based on the types of different operating parameters, and divide them into multiple operating parameter groups. Each group is used to store one type of operating parameter. In each operation parameter group, an operation parameter with the largest parameter value is selected as a characteristic operation parameter of the operation parameter group, that is, Max (Work i1 , ..., Work iK ) described above.
  • the switching priority of the storage terminal outside the group calculated every time will be stored in the storage space of the monitoring terminal. Since the feedback storage parameters are only the corresponding parameter values at a certain moment, and the operating parameters may fluctuate, in order to improve the accuracy of the switching priority, the monitoring terminal will also consider the switching priority obtained from the history to determine the current Switching priority. Among them, Priority n (k) is the nth time, that is, the current corresponding switching priority; Priority n-1 (k) is the n-1th time, in other words, it is the out-of-group monitoring obtained in the previous time.
  • the terminal's handover priority is the above-mentioned historical priority.
  • the monitoring terminal selects the storage terminal outside the group with the highest switching priority as the target storage terminal, and synchronizes the partition data on the distributed database stored in the storage terminal in the group to the target storage terminal.
  • the monitoring terminal sorts the storage terminals outside each group based on the magnitude of the switching priority, and selects the outside group with the best switching priority.
  • the storage terminal serves as the target storage terminal, and then the partition data of the storage system described above is synchronized to the target storage terminal.
  • the monitoring terminal may send a synchronization request to the external storage terminal with the highest priority. If the external storage terminal returns a synchronization confirmation instruction, the partition data synchronization operation is performed; otherwise, if the external storage terminal with the highest priority is outside the group, The storage terminal does not return a synchronization confirmation instruction, then delete the external storage terminal from the switching priority list, select the external storage terminal with the next highest priority as the target storage terminal, and repeat the above operations until a synchronization confirmation is received Command, and then synchronize the partition data.
  • FIG. 3 shows a specific implementation flowchart of a database switching method S103 provided by a third embodiment of the present application.
  • S103 includes S1031 to S1032, and details are as follows:
  • the storage terminal outside the group sends a communication address acquisition instruction to the monitoring terminal;
  • the communication address acquisition instruction includes a storage system number.
  • the storage terminal outside the group in order to establish the correspondence between the partition identifier and the monitoring terminal, the storage terminal outside the group still needs to determine the communication address of the monitoring terminal after acquiring the partition identifier after synchronizing the partition data. Therefore, the storage terminal outside the group sends a communication address acquisition instruction to the monitoring terminal. It should be noted that, because the type of data transmitted during the synchronization process is partitioned data, the communication link may not be compatible with uploading operation logs. In order to determine the network address and corresponding operation logs received by the monitoring terminal, Port number, you need to send a communication address acquisition instruction to the monitoring terminal.
  • the storage terminal outside the group may send the communication address acquisition instruction to the distributed database through a broadcast signal, and the broadcast signal carries a partition identifier to which the partition data belongs. If the monitoring terminal detects that the partition identifier contained in the broadcast signal is consistent with the partition identifier of the storage system to which it belongs, it will receive and return its own communication address to the monitoring terminal.
  • a communication address acquisition instruction is also sent to the monitoring terminal, so in order to identify whether the communication address acquisition instruction is sent internally by the same system or by an external system,
  • the communication address acquisition instruction will include the number of the storage system described by itself. If the system number contained in the communication address acquisition instruction is consistent with the storage system number described by the monitoring terminal, the communication address based on the internal network of the storage system can be directly sent to the storage terminals in the group; otherwise, if the storage system number is in accordance with If the numbers of the storage systems where the monitoring terminals reside are inconsistent, perform related operations in S1032.
  • the storage terminal outside the group receives the running record frame template returned by the monitoring terminal to the storage terminal outside the group, and
  • the operation record frame template encapsulates the communication address and the partition identifier.
  • the monitoring terminal if the monitoring terminal detects that the storage system number is inconsistent with its own storage system number, the monitoring terminal will indicate that the communication address acquisition instruction is not sent by the storage terminal of the internal system, but a group of external storage terminals Sent, so the operation record frame template is sent to the group of external operation terminals, so that the external operation terminal of the group returns the operation record matching the monitoring terminal through the operation record frame template.
  • the communication address of the monitoring terminal is fixedly encapsulated in the running record frame template, that is, the communication address in the template is a read-only field and cannot be modified, and thus generated by the running record frame template.
  • the second running record can be directed to the monitoring terminal to ensure continuous monitoring data.
  • the storage terminal outside the group when the storage terminal outside the group receives the running record frame template, it will store it in a local storage unit. When it detects that a running record containing the partition identifier is generated, it passes the running The recording frame template encapsulates this running record. Because the running record frame template already contains the correspondence between the partition identifier and the communication address, the generated second running record can also be sent to the monitoring terminal described above. The storage terminal outside the group and the gateway device do not need to The destination address of the second run record is modified.
  • a running record frame template containing a correspondence between a communication address and a partition identifier is sent, so that the second running record generated based on the running record frame template can be directed to the monitoring terminal to ensure continuous monitoring data.
  • FIG. 4 shows a specific implementation flowchart of a database switching method S101 provided by a fourth embodiment of the present application.
  • S101 includes: S1011 to S1013, and details are as follows:
  • the monitoring terminal starts an abnormal response timer, and after the abnormal response timer starts, sends a running log acquisition instruction to the storage terminals in the group with a preset reporting period.
  • the monitoring terminal starts an abnormal response timer before sending the operation log acquisition instruction.
  • the abnormal response timer is used to detect whether the storage terminals in the group can return to the first operation log within a preset time, thereby identifying Obtain whether the communication link between the monitoring terminal and the storage terminal in the group is normal, and whether the storage terminal in the group is in a down state.
  • the monitoring terminal in order to ensure that the storage devices in the group operate normally, the monitoring terminal sends a log acquisition instruction to the storage terminal in the group at a preset reporting cycle. If the storage terminal in the group receives the log acquisition instruction, The first operation log will be returned to the monitoring terminal. Among them, after sending the log to get the value, the abnormal response timer will start to count.
  • the monitoring terminal if the first running log returned by the storage terminal in the group is received and the count value of the abnormal response timer at the current moment is less than the abnormal threshold value, the monitoring terminal resets the abnormal response timer And identifying whether there is an abnormality in the storage terminals in the group based on the first operation log.
  • the storage terminals in the group can normally respond to the request of the monitoring terminal, and are not in a down state. Based on this, the monitoring terminal resets the count value of the abnormal response timer and re-times the start of the abnormal response when the next run log acquisition instruction is sent.
  • the abnormal response timer when the first operation log returned by the storage terminal in the group is not received, the abnormal response timer continues to count, and when the count value of the abnormal response timer is greater than or equal to a preset abnormal threshold, The monitoring terminal will recognize that there is an abnormality in the storage terminal in the group, which may be the link is down or the storage terminal in the group is down, so it will perform an abnormal response operation.
  • abnormal detection is performed on the request response speed of the storage terminals in the group, so that it is possible to quickly determine whether an abnormal situation exists in the storage terminals in the group without analyzing the first operation log. , Which improves the efficiency of abnormality identification.
  • FIG. 5 shows a specific implementation flowchart of a database switching method provided by a fifth embodiment of the present application.
  • the monitoring terminal stores the After the partitioned data about the distributed database of the storage terminal in the group is synchronized to the storage terminal outside the group, the method further includes S501 and S502, which are detailed as follows:
  • the monitoring terminal synchronizes the partition data stored in the storage terminal outside the group to the storage terminal in the group at the current time.
  • the storage terminals in the group will send an abnormal recovery instruction to the monitoring high school section.
  • the storage terminals in this group can perform self-test operations after the abnormal conditions are repaired, that is, match each operating parameter of its own terminal with the rated operating parameter range, and determine whether each operating parameter falls within the rated operating parameter range. If it is, the abnormal repair is identified successfully; if any of the operating parameters falls outside the range of the rated operating parameters, it is identified as a repair failure and a repair operation needs to be performed again.
  • the monitoring terminal when it receives the abnormal recovery instruction, it sends a partition data synchronization instruction to the storage terminal outside the group, so that the storage terminal outside the group synchronizes the partition data stored at its current time to the storage terminal in the group.
  • this synchronization operation is an incremental synchronization process. Since the storage terminals in the group have already stored the partition data, the synchronization only needs to synchronize the changes in the partition data without the need for synchronization. All data is resent, reducing the time required for synchronization.
  • the storage terminal outside the group deletes the partition data and the corresponding relationship.
  • the partition data in the reserved storage space is deleted, so that when a subsequent abnormal situation occurs, the required switching can be stored by the reserved storage space. Partition the data, and delete the correspondence between the communication address and the partition identifier, so as to ensure that the operation logs of subsequent production of storage terminals outside the group are uploaded to the monitoring terminal of the storage system to which they belong.
  • the partition data is synchronized to ensure that the storage structure of the distributed database remains stable.
  • FIG. 6 shows a structural block diagram of a database switching system according to an embodiment of the present application.
  • Each device included in the database switching system is configured to execute steps in the embodiment corresponding to FIG. 1.
  • steps in the embodiment corresponding to FIG. 1 please refer to related descriptions in the embodiments corresponding to FIG. 1 and FIG. 1.
  • FIG. 6 For convenience of explanation, only the parts related to this embodiment are shown.
  • the database switching system is applied to a distributed database, and the distributed database includes at least two sets of storage systems 61 and 62 in a distributed deployment; the storage system 61 includes a monitoring terminal 611 and a storage terminal 612 in the group; The storage system 62 includes a monitoring terminal 621 and an external storage terminal 621
  • the monitoring terminal 611 is configured to receive a first operation log uploaded by the storage terminal 612 in the group, and identify whether there is an abnormality in the storage terminal 612 in the group based on the first operation log; the storage terminal 612 in the group is The monitoring terminal 611 is deployed in a storage terminal of the same storage system 61;
  • the monitoring terminal 611 is configured to synchronize the partition data on the distributed database stored in the storage terminal 612 in the group with the storage terminal 622 outside the group if there is an abnormality in the storage terminal 612 in the group;
  • the partition data includes a partition identifier;
  • the external storage terminal 622 is a storage terminal of one of the storage systems 62 in the distributed database except the storage system where the monitoring terminal is located;
  • the external storage terminal 622 is configured to obtain a communication address of the monitoring terminal 611, and determine a correspondence between the communication address and the partition identifier;
  • the second operation log is uploaded to the monitoring terminal 611 according to the corresponding relationship.
  • the monitoring terminal 611 is configured to synchronize the partitioned data about the distributed database stored in the storage terminal 612 in the group to the storage terminal 622 outside the group, including:
  • the monitoring terminal 611 is configured to broadcast an operating parameter acquisition instruction to the distributed database to receive operating parameters uploaded by the storage terminals 622 outside each group;
  • the monitoring terminal 611 is configured to import operating parameters of each of the external storage terminals 622 into a priority calculation model, and calculate a switching priority of each of the external storage terminals 622.
  • the priority calculation model is specifically:
  • Priority n (k) is the switching priority of the k-th external storage terminal 622;
  • Priority n-1 (k) is the historical priority of the k-th external storage terminal 622;
  • Work ik Is the i-th operating parameter of the k-th external storage terminal 622;
  • m is the total number of operating parameters;
  • is a preset coefficient and 0 ⁇ ⁇ 1;
  • K is the total number of external storage terminals 622 ;
  • the monitoring terminal 611 is configured to select the external storage terminal 622 with the highest switching priority as the target storage terminal, and synchronize the partition data on the distributed database stored in the storage terminal 612 in the group to the target. Storage terminal.
  • the external storage terminal 622 is configured to obtain a communication address of the monitoring terminal 611 and determine a correspondence between the communication address and the partition identifier, including:
  • the external storage terminal 622 is configured to send a communication address acquisition instruction to the monitoring terminal 611; the communication address acquisition instruction includes a storage system number;
  • the out-of-group storage terminal 622 is configured to receive a running record frame template returned by the monitoring terminal to the out-of-group storage terminal 622 if the storage system number does not match the number of the storage system in which the monitoring terminal 611 is located.
  • the operation record frame template encapsulates the communication address and the partition identifier;
  • the out-of-group storage terminal 622 is configured to store the running record frame template, so as to generate the second running record by using the running record frame template when the running record about the partition data is detected.
  • the monitoring terminal 611 is configured to receive a first operation log uploaded by the storage terminal 612 in the group, and identify whether there is an abnormality in the storage terminal 612 in the group based on the first operation log, including:
  • the monitoring terminal 611 is configured to start an abnormal response timer, and send a running log acquisition instruction to the storage terminal 612 in the group at a preset reporting period after the abnormal response timer starts;
  • the monitoring terminal 611 is configured to reset the abnormal response timer if the first operation log returned by the storage terminal 612 in the group is received and the count value of the abnormal response timer at the current moment is less than the abnormal threshold. And identify whether there is an abnormality in the storage terminal 612 in the group based on the first operation log;
  • the monitoring terminal 611 is configured to identify that there is an abnormality in the storage terminal 612 in the group if the count value of the abnormal response timer is greater than or equal to an abnormal threshold.
  • all the The monitoring terminal 611 and the external storage terminal 622 are further configured to:
  • the monitoring terminal 611 is configured to synchronize the partition data stored in the storage terminal 622 outside the group to the storage terminal 612 in the group if the abnormal recovery instruction sent by the storage terminal 612 in the group is received;
  • the external storage terminal 622 is configured to delete the partition data and the corresponding relationship.
  • the operation log about the partition data can still be fed back to the corresponding monitoring according to the partition identifier of the partition data.
  • the terminal monitors and maintains the running status, thereby ensuring the continuity of monitoring records, which can improve the stability of the database and the accuracy of abnormality monitoring.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.

Landscapes

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

Abstract

一种数据库的切换方法及系统,适用于互联网技术领域,包括:监控终端接收组内存储终端上传的第一运行日志,并基于所述第一运行日志识别组内存储终端是否存在异常(S101);若组内存储终端存在异常,则将存储于分区数据同步至组外存储终端(S102);所述组外存储终端获取监控终端的通信地址,并确定通信地址与分区标识之间的对应关系(S103);若生成的第二运行日志中包含分区标识,则根据对应关系将第二运行日志上传至监控终端(S104)。当存储终端存储有其他终端切换的分区数据时,依然可以将关于该分区数据的运行日志反馈到对应的监控终端,进行运行状态的监控以及维护,保证了监控记录的连续性,从而能够提高数据库的稳定性以及异常监测的准确性。

Description

一种数据库的切换方法及系统
本申请申明享有2018年06月11日递交的申请号为201810592810.9、名称为“一种数据库的切换方法及系统”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请属于互联网技术领域,尤其涉及一种数据库的切换方法及系统。
背景技术
由于分布式存储具有较优的抗灾性以及稳定性,常常作为数据库的搭建框架,实现的方式为;将数据库划分为多个分区,通过分布式部署的方式将各个分区的数据存储于多个存储终端内,并为每个存储终端配置对应的监控终端,以监测该存储终端的完备性以及运行情况,当监测到某一分区的存储终端异常时,会将该分区的数据切换到另一存储终端,以保证数据库的完备性。
然而现有的数据库的切换方法,在分区数据从一个存储终端切换到另一个存储终端后,分区数据的运行日志也会在对应的监控终端之间进行转移,从而导致监控终端上的监控数据不连续,降低了异常监控的准确性以及稳定性。
技术问题
有鉴于此,本申请实施例提供了一种数据库的切换方法及系统,以解决解决现有的数据库的切换方法,监控数据不连续,降低了异常监控的准确性以及稳定性的问题。
技术解决方案
本申请实施例的第一方面提供了一种数据库的切换方法,应用于分布式数据库,所述分布式数据库包括分布式部署的至少两组存储系统;每组所述存储系统包括存储终端以及监控终端;所述数据库的切换方法包括:
所述监控终端接收组内存储终端上传的第一运行日志,并基于所述第一运行日志识别所述组内存储终端是否存在异常;所述组内存储终端为与所述监控终端部署于同一存储系统的存储终端;
若所述组内存储终端存在异常,则所述监控终端将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端;所述分区数据包括分区标识;所述组外存储终端为所述分布式数据库中除所述监控终端所在存储系统外的其中一个存储系统的存储终端;
所述组外存储终端获取所述监控终端的通信地址,并确定所述通信地址与所述分区标识之间的对应关系;
若所述组外存储终端生成的第二运行日志中包含所述分区标识,则根据所述对应关系将所述第二运行日志上传至所述监控终端。
有益效果
本申请实施例中,监控终端接收组内存储终端上传的第一运行日志,继而判定组内存储终端是否存在异常情况;若该组内存储终端发生异常情况,则将该组内存储终端存储的分区数据同步到任一组外存储终端内,并在发送后标记该分区数据对应的分区标识;组外存储终端根据该分区标识以及监控终端的通信地址,构建上述两者之间的对应关系,以便在接收到该分区标识对应的第二运行日志时,能够上传至该分区标识对应的监控终端,以保证监控数据连续。与现有的数据库的切换技术相比,当存储终端存储有其他终端切换的分区数据时,依然可以根据该分区数据的分区标识,将关于该分区数据的运行日志反馈到对应的监控终端,进行运行状态的监控以及维护,从而保证了监控记录的连续性,从而能够提高数据库的稳定性以及异常监测的准确性。
附图说明
图1是本申请第一实施例提供的一种数据库的切换方法的交互流程图;
图2是本申请第二实施例提供的一种数据库的切换方法S102具体实现流程图;
图3是本申请第三实施例提供的一种数据库的切换方法S103具体实现流程图;
图4是本申请第四实施例提供的一种数据库的切换方法S101具体实现流程图;
图5是本申请第五实施例提供的一种数据库的切换方法具体实现流程图;
图6是本申请一实施例提供的一种数据库的切换系统的结构框图。
本发明的实施方式
在本申请实施例中,流程的执行主体为数据库的切换系统。该数据库的切换系统应用于分布式数据库,包括分布式部署的至少两组存储系统;每组存储系统包括至少一个存储终端以及一个监控终端,该监控终端用于检测各个存储终端的运行情况,以便在存储终端出现异常时能够进行数据切换,每个监控终端配置有一容灾实例,基于该容灾实例进行异常情况的识别。图1示出了本申请第一实施例提供的数据库的切换方法的交互流程图,详述如下:
在S101中,所述监控终端接收组内存储终端上传的第一运行日志,并基于所述第一运行日志识别所述组内存储终端是否存在异常;所述组内存储终端为与所述监控终端部署于同一存储系统的存储终端。
在本实施例中,组内存储终端当检测到当前时刻满足预设的上传条件时,则会生成一个第一运行日志,并发送给其存储系统内的监控终端。该第一运行日志用于表示存储终端当前 的运行情况。举例性地,该第一运行日志可以包括有存储终端的存储占用率、处理模块的占用率、请求响应速率等。其中,该上传条件可以为一上传周期或预设的多个上传时间节点,当组内存储设备检测到当前时刻到达预设的上传周期或上传时间节点时,则向监控终端发送第一运行日志;或者,该上传条件可以为一上传触发事件,例如接收到的数据库的存储量到达预设阈值或响应某一存储请求后,存储终端则会自动向监控终端汇报关于当前运行状态的第一运行日志。
在本实施例中,监控终端在接收到组内存储终端上传的第一运行日志后,可以将该第一运行日志导入到预设的异常情况识别模型内,确定其组内存储终端是否存在异常情况,并在检测到异常情况时,进行分布式数据库的分区数据的切换操作,以保证分布式数据库的数据完整性。
可选地,在本实施例中,监控终端判断组内存储终端是否存在异常情况的方式可以为:接收到组内存储终端发送的第一运行日志后,会提取该第一运行日志中的特征参数,并与预设的额定参数范围进行比对,若第一运行日志中任一特征参数在该额定参数范围外,则识别该组内存储终端存在异常,并执行S102的相关操作;反之,若该第一运行日志内所有特征参数均在额定参数范围内,则识别该组内存储终端处于正常状态,继续对该分布式数据库的分区数据进行存储。
可选地,在本实施例中,同一存储系统中可以包含两个或以上的存储终端,上述两个存储终端之间对所属存储系统的数据库分区数据进行内同步,并共同响应存储系统内用户终端发起的存储请求,实现负载均衡。因此,上述两个存储终端均会生成第一运行日志,并将上述第一运行日志发送给监控终端,继而监控终端通过第一运行日志对系统内的所有组内存储终端进行异常检测。在该情况下,为了确定第一运行日志所属的组内存储终端,第一运行日志还携带有存储终端的终端标识。该终端标识可以为组内存储终端的组内编号,或者该组内存储终端的通信地址。
在S102中,若所述组内存储终端存在异常,则所述监控终端将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端;所述分区数据包括分区标识;所述组外存储终端为所述分布式数据库中除所述监控终端所在存储系统外的其中一个存储系统的存储终端。
在本实施例中,若第一运行日志表示组内存储终端存在异常,则监控终端会控制组内存储终端将其所存储的分布式数据库的分区数据切换另一存储系统的存储终端内。需要说明的是,分布式数据库内的各个存储终端均预留了一定的存储空间来存储其他存储终端切换过来的分区数据。
可选地,监控终端存储有数据切换对应关系表,该对应关系表中记录有组内存储终端的分区数据可切换的所有组外存储终端。基于该对应关系表中各个组外存储终端的切换次序,监控终端依次向各个组外存储终端发送切换请求指令,以确认该组外存储终端的预留存储空间是否已经被占用。若组外存储终端的预留存储空间并未被占用,则可以向监控终端返回一个切换确认指令,则监控终端将该组外存储终端识别为目标切换终端,并将组内存储终端的分区数据同步到该目标切换终端的预留存储空间内,实现数据切换的目的。
在本实施例中,监控终端会控制组内存储终端与组外存储终端建立一条用于对分区数据进行同步的长连接,并将该分布式数据库的分区数据同步发送到该组外存储终端的预留存储空间内,并为该预留的存储空间添加到分区标识。该分区标识用于表示该分区数据在分布式数据库内所对应的分区编号。由于组外存储终端还存储有自身所属存储系统内关于分布式数据库的分区数据,为了对两个分区数据进行区分,需要为预留存储块空间添加分区标识。
可选地,若在分区数据同步的过程中接收到用户终端发起的存储请求,则监控终端将存储请求的目标地址由组内存储终端替换为该进行同步操作的组外存储终端对应的通信地址,以通过该组外存储终端在同步完成后响应该存储请求。
在S103中,所述组外存储终端获取所述监控终端的通信地址,并确定所述通信地址与所述分区标识之间的对应关系。
在本实施例中,组外存储终端在接收完成切换的分区数据后,会向监控终端发送一个通信地址获取请求,监控终端会把自身的通信地址返回给该组外存储终端。组外存储终端获取了该监控各终端的通信地址后,则会建立分区标识与该通信地址之间的对应关系,以在生成关于该分区标识对应的第二运行数据时,返回给对应的监控终端。
可选地,在本实施例中,组外存储终端可以将该通信地址配置于网关接口处,并设置分区标识与通信地址的对应关系。即当该网关接口接收到一数据包时,若检测到该数据包携带有该分区标识,则会对该数据包进行重定向,将监控设备的通信地址添加到该数据包的帧头,以实现将第二运行记录发送给监控终端。
在S104中,若所述组外存储终端生成的第二运行日志中包含所述分区标识,则根据所述对应关系将所述第二运行日志上传至所述监控终端。
在本实施例中,组外存储终端除了存储自身所属系统的分区数据外,还存储有其他存储终端,即上述的组内存储终端的分区数据,而为了确保监控数据的连续性,不同分区数据的运行日志需要上传至对应的监控终端。基于此,组外存储终端在生成一个运行日志后,需要对该运行日志记录有的分区数据包含的分区标识进行识别,以判断是上传至本身所属存储系统的监控终端,抑或是上传至切换数据的存储系统的监控终端。
若组外存终端检测到生成的第二运行日志内包含所述组内存储终端对应的分区标识,则把该第二运行日志上传至组内存储终端对应的监控终端;反之,若该组外存储终端见到该第二运行日志包含的自身存储系统所属的分区标识,则将第二运行日志上传至自身所属存储系统的监控终端内,从而能够实现不同分区数据的运行日志上传到对应的监控终端的目的。
以上可以看出,本申请实施例提供的一种数据库的切换方法中,监控终端接收组内存储终端上传的第一运行日志,继而判定组内存储终端是否存在异常情况;若该组内存储终端发生异常情况,则将该组内存储终端存储的分区数据同步到任一组外存储终端内,并在发送后标记该分区数据对应的分区标识;组外存储终端根据该分区标识以及监控终端的通信地址,构建上述两者之间的对应关系,以便在接收到该分区标识对应的第二运行日志时,能够上传至该分区标识对应的监控终端,以保证监控数据连续。与现有的数据库的切换技术相比,当存储终端存储有其他终端切换的分区数据时,依然可以根据该分区数据的分区标识,将关于该分区数据的运行日志反馈到对应的监控终端,进行运行状态的监控以及维护,从而保证了监控记录的连续性,从而能够提高数据库的稳定性以及异常监测的准确性
图2示出了本申请第二实施例提供的一种数据库的切换方法S102的具体交互流程图。参见图2所示,相对于图1述实施例,本实施例提供的一种数据库的切换方法中S102包括:S1021~S1023,具体详述如下:
在S1021中,所述监控终端向所述分布式数据库内广播运行参数获取指令,以接收各个组外存储终端上传的运行参数。
在本实施例中,分布式数据库包含多个存储系统,因此当监控终端发现组内存储终端存在异常需要进行分区数据切换操作时,需要选取运行状态最后的一个组外存储终端作为目标存储终端。基于此,监控终端会通过分布式数据库的局域网络广播一个运行参数获取指令,以使分布式数据库内的所有存储系统能够接收到广播指令。需要说明的是,该广播指令可携带有监控终端的通信地址,在该情况下,各个存储系统在获取了自身的运行参数后,会基于该通信地址向监控设备发送该运行参数;当然,该广播指令中也可以不携带有监控终端的通信地址,在该情况下,各个存储系统可以将获取得到的运行参数通过分布式数据库的局域网进行广播发送,以使局域网内的所有设备均能够接收到该运存参数,监控终端监听到局域网内存在运存参数的广播信息,则会进行采集并存储于本地。
在本实施例中,分布式数据库内各个存储系统在接收到该运存参数获取指令后,组外的监控终端会获取其对应的存储终端当前时刻对应的运行参数,并生成一个运行参数反馈信息,并返回给该监控终端。其中,运行参数包括但不限于:可用存储空间、存储占用率、负载值、网络带宽以及信噪比等参数信息。
在S1022中,所述监控终端将各个所述组外存储终端的运行参数导入优先级计算模型,计算各个所述组外存储终端的切换优先级;所述优先级计算模型具体为:
Figure PCTCN2018105554-appb-000001
其中,Priority n(k)为第k个所述组外存储终端的所述切换优先级;Priority n-1(k)为第k个所述组外存储终端的历史优先级;Work ik为第k个所述组外存储终端第i个运行参数;m为运行参数的总个数;α为预设系数,且0<α<1;K为组外存储终端的总个数。
在本实施例中,监控设备获取得到多个组外存储终端返回的运行参数后,会分别计算各个组外存储终端所对应的切换优先级,并基于该切换优先级确定本次分区数据的切换操作的目标存储终端。首先,监控终端会基于不同运行参数的类型,对采集得到的各个组外存储终端的运行参数进行分类,划分为多个运行参数组,每一组用于存储一种类型的运行参数,并从每个运行参数组中选取参数值最大的一个运行参数,作为该运行参数组的特征运行参数,即上述的Max(Work i1,…,Work iK)。
需要说明的是,每一次计算得到的组外存储终端的切换优先级均会存储于监控终端的存储空间内。由于反馈得到的运存参数只是某一时刻对应的参数值,而运行参数会存在波动的情况,因此为了提高切换优先级的准确性,监控终端还会考虑历史获取得到的切换优先级来判定当前的切换优先级。其中,Priority n(k)为第n次,即当前对应的切换优先级;而Priority n-1(k)为第n-1次,换而言之,则是上一次获取得到的组外监控终端的切换优先级,即上述的历史优先级。
在S1023中,所述监控终端选取所述切换优先级最高的组外存储终端作为目标存储终端,并将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至目标存储终端。
在本实施例中,监控终端在确定了各个组外存储终端的切换优先级后,会基于该切换优先级的大小对各个组外存储终端进行排序,并选取切换优先级最好的一个组外存储终端作为目标存储终端,继而将自身所述存储系统的分区数据同步至该目标存储终端内。
可选地,监控终端可以向该优先级最高的组外存储终端发送一个同步请求,若该组外存储终端返回同步确认指令,则进行分区数据同步操作;反之,若该优先级最高的组外存储终端并没有返回同步确认指令,则将该组外存储终端从切换优先级列表中删除,选取优先级次高的组外存储终端作为目标存储终端,并重复执行上述操作,直到接收到同步确认指令,再进行分区数据的同步操作。
在本申请实施例中,在组外存储终端存在多个的情况下,通过计算各个组外存储终端的 切换优先级,选取优先级最高的一个组外存储终端作为目标存储终端,从而能够有效地保证分区数据切换后不会导致组外存储终端的业务压力过大而导致连锁异常情况的发生,提高了分布式数据库的稳定性。
图3示出了本申请第三实施例提供的一种数据库的切换方法S103的具体实现流程图。参见图3所示,相对于图1所述实施例,本实施例提供的一种数据库的切换方法中S103包括S1031~S1032,具体详述如下:
在S1031中,所述组外存储终端向所述监控终端发送通信地址获取指令;所述通信地址获取指令包括存储系统编号。
在本实施例中,为了建立分区标识与监控终端之间的对应关系,组外存储终端在同步分区数据后获取了分区标识之后,仍然需要确定监控终端的通信地址。因此,组外存储终端会向监控终端发送一个通信地址获取指令。需要说明的是,由于进行同步的过程中,其传输数据的类型为分区数据,因此该通信链路并不一定能够兼容运行日志的上传操作,为了确定监控终端接收运行日志对应的网络地址以及对应的端口号,需要向监控终端发送一个通信地址获取指令。
可选地,组外存储终端可以向分布式数据库通过广播信号发送该通信地址获取指令,并且该广播信号携带有分区数据所属的分区标识。若监控终端检测到该广播信号中包含的分区标识与自身所属存储系统的分区标识一致,则会接收并向该监控终端返回自身的通信地址。
在本实施例中,由于存储系统中添加入新的存储终端时同样会向监控终端发送一个通信地址获取指令,因此为了识别该通信地址获取指令是同一系统内部发送的抑或是外部系统发送的,该通信地址获取指令将包含自身所述存储系统的编号。若该通信地址获取指令中包含的系统编号与监控终端所述的存储系统的编号相一致,则可以直接发送基于存储系统内部网络的通信地址给组内存储终端;反之,若该存储系统编号与监控终端所在的存储系统编号不一致,则执行S1032的相关操作。
在S1032中,若所述存储系统编号与所述监控终端所在的存储系统的编号不一致,则所述组外存储终端接收所述监控终端向所述组外存储终端返回的运行记录帧模板,所述运行记录帧模板中封装有所述通信地址与所述分区标识。
在本实施例中,若监控终端检测到存储系统编号与自身所在的存储系统编号不一致,则监控终端会表示该通信地址获取指令并非由内部系统的存储终端发送的,而是一组外存储终端发送的,因此会将运行记录帧模板发送给该组外运行终端,以便该组外运行终端通过该运行记录帧模板返回与该监控终端匹配的运行记录。
在本实施例中,该运行记录帧模板中固定封装有该监控终端的通信地址,即在该模板中 该通信地址是一个只读的字段,无法进行修改,从而通过该运行记录帧模板生成的第二运行记录均能够定向发送给该监控终端,保证监控数据连续。
可选地,在本实施例中,当组外存储终端接收到该运行记录帧模板后,会存储于本地的存储单元内,在检测到包含该分区标识的运行记录生成时,会通过该运行记录帧模板对该运行记录进行封装。由于该运行记录帧模板中已经包含了分区标识以及通信地址之间的对应关系,因此生成的第二运行记录也能够发送给上述的监控终端,组外存储终端以及所在的网关设备无需在对该第二运行记录的目的地址进行修改。
在本申请实施例中,通过发送包含通信地址与分区标识对应的关系的运行记录帧模板,从而基于该运行记录帧模板所生成的第二运行记录均能定向发送给监控终端,保证监控数据连续。
图4示出了本申请第四实施例提供的一种数据库的切换方法S101的具体实现流程图。参见图4所示,相对于图1-图3所述实施例,本实施例提供的一种数据库的切换方法中S101包括:S1011~S1013,具体详述如下:
在S1011中,所述监控终端启动异常响应计时器,并在所述异常响应计时器启动后,以预设的上报周期向所述组内存储终端发送运行日志获取指令。
在本实施例中,监控终端在发送运行日志获取指令之前,会启动异常响应计时器,该异常响应计时器用于检测组内存储终端是否在预设的时间内能够返回第一运行日志,从而识别得到监控终端与组内存储终端之间的通信链路是否正常,以及组内存储终端是否处于宕机状态。
在本实施例中,监控终端为了确保组内存储设备的运行状态是否正常,会以预设的上报周期向组内存储终端发送日志获取指令,若组内存储终端接收到该日志获取指令后,会向监控终端返回第一运行日志。其中,在发送日志获取值后,异常响应计时器则会开始计时。
在S1012中,若接收到所述组内存储终端返回的所述第一运行日志且当前时刻所述异常响应计时器的计数值小于异常阈值,则所述监控终端重置所述异常响应计时器,并基于所述第一运行日志识别所述组内存储终端是否存在异常。
在本实施例中,若在异常响应计时器的计数值到达异常阈值之前接收到组内存储终端返回的第一运行日志,则识别监控终端与组内存储终端之间的通信链路并无异常,且组内存储终端可以正常应答监控终端的请求,并未处于宕机状态。基于此,监控终端会重置异常响应计时器的计数值,并在下一次发送运行日志获取指令时,再重新对开始异常响应计时。
在S1013中,若所述异常响应计时器的计数值大于或等于异常阈值,所述监控终端识别所述组内存储终端存在异常。
在本实施例中,当没有接收到组内存储终端返回的第一运行日志时,异常响应计时器会持续进行计时,并当异常响应计时器的计数值大于或等于预设的异常阈值时,监控终端则会识别该组内存储终端存在异常,可能是链路中断或组内存储终端处于宕机状态,因此会执行异常响应操作。
在本申请实施例中,通过设置异常响应计时器,来对组内存储终端的请求响应速度进行异常检测,从而能够快速确定组内存储终端是否存在异常情况,而无需对第一运行日志进行分析,提高了异常识别的效率。
图5示出了本申请第五实施例提供的一种数据库的切换方法的具体实现流程图。参见图5所示,相对于图1-图3所述实施例,本实施例提供的一种数据库的切换方法中在所述若所述组内存储终端存在异常,则所述监控终端将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端之后,还包括:S501以及S502,具体详述如下:
在S501中,若接收到所述组内存储终端发送的异常恢复指令,则所述监控终端将当前时刻组外存储终端存储的所述分区数据同步至组内存储终端。
在本实施例中,若组内存储终端的异常情况已被修复,则该组内存储终端会向监控高中段发送一个异常恢复指令。特别地,该组内存储终端在异常情况被修复后可以进行自检操作,即将自身终端的各个运行参数与额定的运行参数范围进行匹配,判断各个运行参数是否均落入额定运行参数范围内,若是,则识别异常修复成功;若任一运行参数落入到额定运行参数范围外,则识别为修复失败,需要重新进行修复操作。
在本实施例中,当监控终端接收到异常恢复指令后,会向组外存储终端发送一个分区数据同步指令,以使该组外存储终端将其当前时刻存储的分区数据同步至组内存储终端内。需要说明的是,本次同步操作是一个增量同步的过程,由于组内存储终端原本已经存储有分区数据,因此,本次同步中只需对分区数据中存在变更的内容进行同步,而无需全部数据重新进行发送,从而减少了同步所需的时间。
在S502中,所述组外存储终端删除所述分区数据以及所述对应关系。
在本实施例中,组外存储终端在对分区数据同步完成后,会将预留存储空间中的分区数据进行删除,从而能在后续出现异常情况时,通过预留存储空间存储所需切换的分区数据,并删除通信地址与分区标识的对应关系,从而保证组外存储终端后续生产的运行日志均上传至其所属存储系统的监控终端内。
在本申请实施例中,在组内存储终端的异常情况修复完毕后,进行分区数据同步,从而保证分布式数据库的存储结构保持稳定。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执 行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
图6示出了本申请一实施例提供的一种数据库的切换系统的结构框图,该数据库的切换系统包括的各设备用于执行图1对应的实施例中的各步骤。具体请参阅图1与图1所对应的实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。
参见图6,所述数据库的切换系统应用于分布式数据库,所述分布式数据库包括分布式部署的至少两组存储系统61以及62;存储系统61包括:监控终端611以及组内存储终端612;存储系统62包括:监控终端621以及组外存储终端621
所述监控终端611,用于接收组内存储终端612上传的第一运行日志,并基于所述第一运行日志识别所述组内存储终端612是否存在异常;所述组内存储终端612为与所述监控终端611部署于同一存储系统61的存储终端;
所述监控终端611,用于若所述组内存储终端612存在异常,则将存储于所述组内存储终端612的关于所述分布式数据库的分区数据同步至组外存储终端622;所述分区数据包括分区标识;所述组外存储终端622为所述分布式数据库中除所述监控终端所在存储系统外的其中一个存储系统62的存储终端;
所述组外存储终端622,用于获取所述监控终端611的通信地址,并确定所述通信地址与所述分区标识之间的对应关系;
若所述组外存储终端622,用于生成的第二运行日志中包含所述分区标识,则根据所述对应关系将所述第二运行日志上传至所述监控终端611。
可选地,所述监控终端611,用于将存储于所述组内存储终端612的关于所述分布式数据库的分区数据同步至组外存储终端622,包括:
所述监控终端611,用于向所述分布式数据库内广播运行参数获取指令,以接收各个组外存储终端622上传的运行参数;
所述监控终端611,用于将各个所述组外存储终端622的运行参数导入优先级计算模型,计算各个所述组外存储终端622的切换优先级;所述优先级计算模型具体为:
Figure PCTCN2018105554-appb-000002
其中,Priority n(k)为第k个所述组外存储终端622的所述切换优先级;Priority n-1(k)为第k个所述组外存储终端622的历史优先级;Work ik为第k个所述组外存储终端622第i个运行参数;m为运行参数的总个数;α为预设系数,且0<α<1;K为组外存储终端622的总个数;
所述监控终端611,用于选取所述切换优先级最高的组外存储终端622作为目标存储终端,并将存储于所述组内存储终端612的关于所述分布式数据库的分区数据同步至目标存储终端。
可选地,所述组外存储终端622,用于获取所述监控终端611的通信地址,并确定所述通信地址与所述分区标识之间的对应关系,包括:
所述组外存储终端622,用于向所述监控终端611发送通信地址获取指令;所述通信地址获取指令包括存储系统编号;
所述组外存储终端622,用于若所述存储系统编号与所述监控终端611所在的存储系统的编号不一致,则接收所述监控终端向所述组外存储终端622返回的运行记录帧模板,所述运行记录帧模板中封装有所述通信地址与所述分区标识;
所述组外存储终端622,用于存储所述运行记录帧模板,以当检测到所述生成关于所述分区数据的运行记录时,通过所述运行记录帧模板生成所述第二运行记录。
可选地,所述监控终端611,用于接收组内存储终端612上传的第一运行日志,并基于所述第一运行日志识别所述组内存储终端612是否存在异常,包括:
所述监控终端611,用于启动异常响应计时器,并在所述异常响应计时器启动后,以预设的上报周期向所述组内存储终端612发送运行日志获取指令;
所述监控终端611,用于若接收到所述组内存储终端612返回的所述第一运行日志且当前时刻所述异常响应计时器的计数值小于异常阈值,则重置所述异常响应计时器,并基于所述第一运行日志识别所述组内存储终端612是否存在异常;
所述监控终端611,用于若所述异常响应计时器的计数值大于或等于异常阈值,识别所述组内存储终端612存在异常。
可选地,在所述若所述组内存储终端存在异常,则所述监控终端将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端之后,所述监控终端611以及所述组外存储终端622还用于:
所述监控终端611,用于若接收到所述组内存储终端612发送的异常恢复指令,则将当前时刻组外存储终端622存储的所述分区数据同步至组内存储终端612;
所述组外存储终端622,用于删除所述分区数据以及所述对应关系。
因此,本申请实施例提供的数据库的切换系统中,当存储终端存储有其他终端切换的分区数据时,依然可以根据该分区数据的分区标识,将关于该分区数据的运行日志反馈到对应的监控终端,进行运行状态的监控以及维护,从而保证了监控记录的连续性,从而能够提高数据库的稳定性以及异常监测的准确性。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种数据库的切换方法,应用于分布式数据库,其特征在于,所述分布式数据库包括分布式部署的至少两组存储系统;每组所述存储系统包括存储终端以及监控终端;所述数据库的切换方法包括:
    所述监控终端接收组内存储终端上传的第一运行日志,并基于所述第一运行日志识别所述组内存储终端是否存在异常;所述组内存储终端为与所述监控终端部署于同一存储系统的存储终端;
    若所述组内存储终端存在异常,则所述监控终端将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端;所述分区数据包括分区标识;所述组外存储终端为所述分布式数据库中除所述监控终端所在存储系统外的其中一个存储系统的存储终端;
    所述组外存储终端获取所述监控终端的通信地址,并确定所述通信地址与所述分区标识之间的对应关系;
    若所述组外存储终端生成的第二运行日志中包含所述分区标识,则根据所述对应关系将所述第二运行日志上传至所述监控终端。
  2. 根据权利要求1所述的切换方法,其特征在于,所述监控终端将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端,包括:
    所述监控终端向所述分布式数据库内广播运行参数获取指令,以接收各个组外存储终端上传的运行参数;
    所述监控终端将各个所述组外存储终端的运行参数导入优先级计算模型,计算各个所述组外存储终端的切换优先级;所述优先级计算模型具体为:
    Figure PCTCN2018105554-appb-100001
    其中,Priority n(k)为第k个所述组外存储终端的所述切换优先级;Priority n-1(k)为第k个所述组外存储终端的历史优先级;Work ik为第k个所述组外存储终端第i个运行参数;m为运行参数的总个数;α为预设系数,且0<α<1;K为组外存储终端的总个数;
    所述监控终端选取所述切换优先级最高的组外存储终端作为目标存储终端,并将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至目标存储终端。
  3. 根据权利要求1所述的切换方法,其特征在于,所述组外存储终端获取所述监控终 端的通信地址,并确定所述通信地址与所述分区标识之间的对应关系,包括:
    所述组外存储终端向所述监控终端发送通信地址获取指令;所述通信地址获取指令包括所述组外存储终端对应的存储系统编号;
    若所述存储系统编号与所述监控终端所在的存储系统的编号不一致,则所述组外存储终端接收所述监控终端向所述组外存储终端返回的运行记录帧模板,所述运行记录帧模板中封装有所述通信地址与所述分区标识。
  4. 根据权利要求1-3任一项所述的切换方法,其特征在于,所述监控终端接收组内存储终端上传的第一运行日志,并基于所述第一运行日志识别所述组内存储终端是否存在异常,包括:
    所述监控终端启动异常响应计时器,并在所述异常响应计时器启动后,以预设的上报周期向所述组内存储终端发送运行日志获取指令;
    若接收到所述组内存储终端返回的所述第一运行日志且当前时刻所述异常响应计时器的计数值小于异常阈值,则所述监控终端重置所述异常响应计时器,并基于所述第一运行日志识别所述组内存储终端是否存在异常;
    若所述异常响应计时器的计数值大于或等于异常阈值,所述监控终端识别所述组内存储终端存在异常。
  5. 根据权利要求1-3任一项所述的切换方法,其特征在于,在所述若所述组内存储终端存在异常,则所述监控终端将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端之后,还包括:
    若接收到所述组内存储终端发送的异常恢复指令,则所述监控终端将当前时刻组外存储终端存储的所述分区数据同步至组内存储终端;
    所述组外存储终端删除所述分区数据以及所述对应关系。
  6. 一种数据库的切换系统,其特征在于,应用于分布式数据库,其特征在于,所述分布式数据库包括分布式部署的至少两组存储系统;每组所述存储系统包括存储终端以及监控终端:
    所述监控终端,用于接收组内存储终端上传的第一运行日志,并基于所述第一运行日志识别所述组内存储终端是否存在异常;所述组内存储终端为与所述监控终端部署于同一存储系统的存储终端;
    所述监控终端,用于若所述组内存储终端存在异常,则将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端;所述分区数据包括分区标识;所述组外存储终端为所述分布式数据库中除所述监控终端所在存储系统外的其中一个存储系 统的存储终端;
    所述组外存储终端,用于获取所述监控终端的通信地址,并确定所述通信地址与所述分区标识之间的对应关系;
    若所述组外存储终端,用于生成的第二运行日志中包含所述分区标识,则根据所述对应关系将所述第二运行日志上传至所述监控终端。
  7. 根据权利要求6所述的切换系统,其特征在于,所述监控终端,用于将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端,包括:
    所述监控终端,用于向所述分布式数据库内广播运行参数获取指令,以接收各个组外存储终端上传的运行参数;
    所述监控终端,用于将各个所述组外存储终端的运行参数导入优先级计算模型,计算各个所述组外存储终端的切换优先级;所述优先级计算模型具体为:
    Figure PCTCN2018105554-appb-100002
    其中,Priority n(k)为第k个所述组外存储终端的所述切换优先级;Priority n-1(k)为第k个所述组外存储终端的历史优先级;Work ik为第k个所述组外存储终端第i个运行参数;m为运行参数的总个数;α为预设系数,且0<α<1;K为组外存储终端的总个数;
    所述监控终端,用于选取所述切换优先级最高的组外存储终端作为目标存储终端,并将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至目标存储终端。
  8. 根据权利要求6所述的切换系统,其特征在于,所述组外存储终端,用于获取所述监控终端的通信地址,并确定所述通信地址与所述分区标识之间的对应关系,包括:
    所述组外存储终端,用于向所述监控终端发送通信地址获取指令;所述通信地址获取指令包括存储系统编号;
    所述组外存储终端,用于若所述存储系统编号与所述监控终端所在的存储系统的编号不一致,则接收所述监控终端向所述组外存储终端返回的运行记录帧模板,所述运行记录帧模板中封装有所述通信地址与所述分区标识。
  9. 根据权利要求6-8任一项所述的切换系统,其特征在于,所述监控终端,用于接收组内存储终端上传的第一运行日志,并基于所述第一运行日志识别所述组内存储终端是否存在异常,包括:
    所述监控终端,用于启动异常响应计时器,并在所述异常响应计时器启动后,以预设的上报周期向所述组内存储终端发送运行日志获取指令;
    所述监控终端,用于若接收到所述组内存储终端返回的所述第一运行日志且当前时刻 所述异常响应计时器的计数值小于异常阈值,则重置所述异常响应计时器,并基于所述第一运行日志识别所述组内存储终端是否存在异常;
    所述监控终端,用于若所述异常响应计时器的计数值大于或等于异常阈值,识别所述组内存储终端存在异常。
  10. 根据权利要求6-8任一项所述的切换系统,其特征在于,在所述若所述组内存储终端存在异常,则所述监控终端将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端之后,所述监控终端以及所述组外存储终端还用于:
    所述监控终端,用于若接收到所述组内存储终端发送的异常恢复指令,则将当前时刻组外存储终端存储的所述分区数据同步至组内存储终端;
    所述组外存储终端,用于删除所述分区数据以及所述对应关系。
  11. 一种数据库的切换系统,其特征在于,所述数据库的切换系统包括:分布式部署的至少两组存储系统;每组所述存储系统包括存储终端以及监控终端;所述监控终端包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述监控终端的处理器执行所述计算机可读指令时实现如下步骤:
    所述监控终端,用于接收组内存储终端上传的第一运行日志,并基于所述第一运行日志识别所述组内存储终端是否存在异常;所述组内存储终端为与所述监控终端部署于同一存储系统的存储终端;
    所述监控终端,用于若所述组内存储终端存在异常,则将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端;所述分区数据包括分区标识;所述组外存储终端为所述分布式数据库中除所述监控终端所在存储系统外的其中一个存储系统的存储终端;
    所述组内存储终端包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述组内存储终端的处理器执行所述计算机可读指令时实现如下步骤:
    所述组外存储终端,用于获取所述监控终端的通信地址,并确定所述通信地址与所述分区标识之间的对应关系;
    所述组外存储终端,用于若生成的第二运行日志中包含所述分区标识,则根据所述对应关系将所述第二运行日志上传至所述监控终端。
  12. 根据权利要求11所述的切换系统,其特征在于,所述监控终端,用于将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端,包括:
    所述监控终端,用于向所述分布式数据库内广播运行参数获取指令,以接收各个组外存储终端上传的运行参数;
    所述监控终端,用于将各个所述组外存储终端的运行参数导入优先级计算模型,计算各个所述组外存储终端的切换优先级;所述优先级计算模型具体为:
    Figure PCTCN2018105554-appb-100003
    其中,Priority n(k)为第k个所述组外存储终端的所述切换优先级;Priority n-1(k)为第k个所述组外存储终端的历史优先级;Work ik为第k个所述组外存储终端第i个运行参数;m为运行参数的总个数;α为预设系数,且0<α<1;K为组外存储终端的总个数;
    所述监控终端,用于选取所述切换优先级最高的组外存储终端作为目标存储终端,并将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至目标存储终端。
  13. 根据权利要求11所述的切换系统,其特征在于,所述组外存储终端,用于获取所述监控终端的通信地址,并确定所述通信地址与所述分区标识之间的对应关系,包括:
    所述组外存储终端,用于向所述监控终端发送通信地址获取指令;所述通信地址获取指令包括所述组外存储终端对应的存储系统编号;
    所述组外存储终端,用于若所述存储系统编号与所述监控终端所在的存储系统的编号不一致,则接收所述监控终端向所述组外存储终端返回的运行记录帧模板,所述运行记录帧模板中封装有所述通信地址与所述分区标识。
  14. 根据权利要求11-13所述的切换系统,其特征在于,所述监控终端,用于接收组内存储终端上传的第一运行日志,并基于所述第一运行日志识别所述组内存储终端是否存在异常,包括:
    所述监控终端,用于启动异常响应计时器,并在所述异常响应计时器启动后,以预设的上报周期向所述组内存储终端发送运行日志获取指令;
    所述监控终端,用于若接收到所述组内存储终端返回的所述第一运行日志且当前时刻所述异常响应计时器的计数值小于异常阈值,则重置所述异常响应计时器,并基于所述第一运行日志识别所述组内存储终端是否存在异常;
    所述监控终端,用于若所述异常响应计时器的计数值大于或等于异常阈值,则识别所述组内存储终端存在异常。
  15. 根据权利要求11-13任一项所述的切换系统,其特征在于,所述组内存储终端以及所述监控终端的处理器执行所述计算机可读指令时还实现如下步骤:
    所述监控终端,用于若接收到所述组内存储终端发送的异常恢复指令,则将当前时刻 组外存储终端存储的所述分区数据同步至组内存储终端;
    所述组外存储终端,用于删除所述分区数据以及所述对应关系。
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:
    所述监控终端接收组内存储终端上传的第一运行日志,并基于所述第一运行日志识别所述组内存储终端是否存在异常;所述组内存储终端为与所述监控终端部署于同一存储系统的存储终端;
    若所述组内存储终端存在异常,则所述监控终端将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端;所述分区数据包括分区标识;所述组外存储终端为所述分布式数据库中除所述监控终端所在存储系统外的其中一个存储系统的存储终端;
    所述组外存储终端获取所述监控终端的通信地址,并确定所述通信地址与所述分区标识之间的对应关系;
    若所述组外存储终端生成的第二运行日志中包含所述分区标识,则根据所述对应关系将所述第二运行日志上传至所述监控终端。
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述监控终端将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端,包括:
    所述监控终端向所述分布式数据库内广播运行参数获取指令,以接收各个组外存储终端上传的运行参数;
    所述监控终端将各个所述组外存储终端的运行参数导入优先级计算模型,计算各个所述组外存储终端的切换优先级;所述优先级计算模型具体为:
    Figure PCTCN2018105554-appb-100004
    其中,Priority n(k)为第k个所述组外存储终端的所述切换优先级;Priority n-1(k)为第k个所述组外存储终端的历史优先级;Work ik为第k个所述组外存储终端第i个运行参数;m为运行参数的总个数;α为预设系数,且0<α<1;K为组外存储终端的总个数;
    所述监控终端选取所述切换优先级最高的组外存储终端作为目标存储终端,并将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至目标存储终端。
  18. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述组外存储终端获取所述监控终端的通信地址,并确定所述通信地址与所述分区标识之间的对应关系,包括:
    所述组外存储终端向所述监控终端发送通信地址获取指令;所述通信地址获取指令包 括所述组外存储终端对应的存储系统编号;
    若所述存储系统编号与所述监控终端所在的存储系统的编号不一致,则所述组外存储终端接收所述监控终端向所述组外存储终端返回的运行记录帧模板,所述运行记录帧模板中封装有所述通信地址与所述分区标识。
  19. 根据权利要求16-18所述的计算机可读存储介质,其特征在于,所述监控终端接收组内存储终端上传的第一运行日志,并基于所述第一运行日志识别所述组内存储终端是否存在异常,包括:
    所述监控终端启动异常响应计时器,并在所述异常响应计时器启动后,以预设的上报周期向所述组内存储终端发送运行日志获取指令;
    若接收到所述组内存储终端返回的所述第一运行日志且当前时刻所述异常响应计时器的计数值小于异常阈值,则所述监控终端重置所述异常响应计时器,并基于所述第一运行日志识别所述组内存储终端是否存在异常;
    若所述异常响应计时器的计数值大于或等于异常阈值,所述监控终端识别所述组内存储终端存在异常。
  20. 根据权利要求16-18任一项所述的计算机可读存储介质,其特征在于,在所述若所述组内存储终端存在异常,则所述监控终端将存储于所述组内存储终端的关于所述分布式数据库的分区数据同步至组外存储终端之后,所述计算机可读指令被处理器执行时还实现如下步骤:
    若接收到所述组内存储终端发送的异常恢复指令,则所述监控终端将当前时刻组外存储终端存储的所述分区数据同步至组内存储终端;
    所述组外存储终端删除所述分区数据以及所述对应关系。
PCT/CN2018/105554 2018-06-11 2018-09-13 一种数据库的切换方法及系统 WO2019237543A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810592810.9A CN109086292B (zh) 2018-06-11 2018-06-11 一种数据库的切换方法及系统
CN201810592810.9 2018-06-11

Publications (1)

Publication Number Publication Date
WO2019237543A1 true WO2019237543A1 (zh) 2019-12-19

Family

ID=64839851

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/105554 WO2019237543A1 (zh) 2018-06-11 2018-09-13 一种数据库的切换方法及系统

Country Status (2)

Country Link
CN (1) CN109086292B (zh)
WO (1) WO2019237543A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114003622B (zh) * 2021-12-30 2022-04-08 天津南大通用数据技术股份有限公司 一种事务型数据库之间巨大事务增量同步方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120166390A1 (en) * 2010-12-23 2012-06-28 Dwight Merriman Method and apparatus for maintaining replica sets
CN106126652A (zh) * 2016-06-24 2016-11-16 武汉斗鱼网络科技有限公司 用于分布式数据库集群的故障数据库切换方法及系统
CN106202075A (zh) * 2015-04-29 2016-12-07 中兴通讯股份有限公司 一种数据库主备切换的方法及装置
CN107885758A (zh) * 2016-09-30 2018-04-06 华为技术有限公司 一种虚拟节点的数据迁移方法和虚拟节点

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8074107B2 (en) * 2009-10-26 2011-12-06 Amazon Technologies, Inc. Failover and recovery for replicated data instances
CN102693324B (zh) * 2012-01-09 2015-03-18 西安电子科技大学 一种分布式数据库同步系统、同步方法和节点管理方法
CN103049355B (zh) * 2012-12-25 2015-06-17 华为技术有限公司 一种数据库系统恢复方法及设备
CN103902617B (zh) * 2012-12-28 2017-06-09 华为技术有限公司 分布式数据库同步方法和系统
US9633051B1 (en) * 2013-09-20 2017-04-25 Amazon Technologies, Inc. Backup of partitioned database tables
CN105516263B (zh) * 2015-11-28 2019-02-01 华为技术有限公司 存储系统中数据分发方法、装置、计算节点及存储系统
CN105577756A (zh) * 2015-12-12 2016-05-11 天津南大通用数据技术股份有限公司 采用交叉备份的分布式数据库日志收集与负载调节系统及其方法
CN107870829B (zh) * 2016-09-24 2022-03-08 华为技术有限公司 一种分布式数据恢复方法、服务器、相关设备及系统
CN107656980B (zh) * 2017-09-07 2020-09-22 北京神州绿盟信息安全科技股份有限公司 应用于分布式数据库系统中的方法及分布式数据库系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120166390A1 (en) * 2010-12-23 2012-06-28 Dwight Merriman Method and apparatus for maintaining replica sets
CN106202075A (zh) * 2015-04-29 2016-12-07 中兴通讯股份有限公司 一种数据库主备切换的方法及装置
CN106126652A (zh) * 2016-06-24 2016-11-16 武汉斗鱼网络科技有限公司 用于分布式数据库集群的故障数据库切换方法及系统
CN107885758A (zh) * 2016-09-30 2018-04-06 华为技术有限公司 一种虚拟节点的数据迁移方法和虚拟节点

Also Published As

Publication number Publication date
CN109086292B (zh) 2023-11-28
CN109086292A (zh) 2018-12-25

Similar Documents

Publication Publication Date Title
CN111131379B (zh) 一种分布式流量采集系统和边缘计算方法
WO2022007552A1 (zh) 处理节点的管理方法、配置方法及相关装置
CN107544839B (zh) 虚拟机迁移系统、方法及装置
CN110311831B (zh) 基于容器云的系统资源监控方法及相关设备
US10440136B2 (en) Method and system for resource scheduling
CN105471622B (zh) 一种基于Galera的控制节点主备切换的高可用方法及系统
CN106656682A (zh) 集群心跳检测方法、系统及装置
CN112003763B (zh) 网络链路的监测方法、监测装置、监测设备及存储介质
WO2017076256A1 (zh) 一种负载均衡方法及相关装置、系统
CN109584105B (zh) 一种服务响应的方法及系统
CN105790825B (zh) 一种分布式保护中控制器热备份的方法和装置
US11700182B2 (en) Automatic classification of network devices in a network
CN112118174A (zh) 软件定义数据网关
CN109522316A (zh) 日志处理方法、装置、设备和存储介质
CN109728981A (zh) 一种云平台故障监测方法及装置
CN112732756A (zh) 数据查询方法、装置、设备及存储介质
WO2017181430A1 (zh) 分布式系统的数据库复制方法及装置
US11218391B2 (en) Methods for monitoring performance of a network fabric and devices thereof
CN109245953A (zh) 一种网络配置方法和装置
CN113946559A (zh) 数据处理方法、目标数据库系统及数据处理系统
WO2019237543A1 (zh) 一种数据库的切换方法及系统
CN102739446B (zh) 选择网络时间协议服务器的方法和装置
JP2016527846A (ja) データフィードの管理
CN109510730B (zh) 分布式系统及其监控方法、装置、电子设备及存储介质
CN105490847A (zh) 一种私有云存储系统中节点故障实时检测及处理方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18922271

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18922271

Country of ref document: EP

Kind code of ref document: A1