CN115269560A - System version upgrading method and device for double-cluster database - Google Patents

System version upgrading method and device for double-cluster database Download PDF

Info

Publication number
CN115269560A
CN115269560A CN202210988880.2A CN202210988880A CN115269560A CN 115269560 A CN115269560 A CN 115269560A CN 202210988880 A CN202210988880 A CN 202210988880A CN 115269560 A CN115269560 A CN 115269560A
Authority
CN
China
Prior art keywords
version
database
upgrading
processing
cluster database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210988880.2A
Other languages
Chinese (zh)
Inventor
李奇伟
黄坚
梁昊然
何思阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210988880.2A priority Critical patent/CN115269560A/en
Publication of CN115269560A publication Critical patent/CN115269560A/en
Pending legal-status Critical Current

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/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (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

The application provides a method and a device for upgrading system versions of a double-cluster database, relates to the technical field of databases, can also be used in the financial field, and comprises the following steps: scheduling the service to be processed to a standby cluster database which finishes system version upgrading for processing; detecting the processing performance of the corresponding system upgrade version in the processing process; and if the processing performance of the system upgrading version is detected to reach the standard, the system version of the standby cluster database is returned to the original system version, and then the system version of the main cluster database is upgraded by using the system upgrading version with the processing performance reaching the standard. According to the method and the device, when the system version is failed to be upgraded, service processing interruption caused by the fact that the system version needs to be backed off can be avoided.

Description

System version upgrading method and device for double-cluster database
Technical Field
The application relates to the technical field of databases, can be used in the financial field, and particularly relates to a method and a device for upgrading a system version of a double-cluster database.
Background
Upgrading system versions of databases has been a high risk practice. Database performance problems caused by upgrading system versions can only be discovered when actual services are processed after production. At present, the database technology is developed rapidly, the iteration speed of the system version is high, the updating content is large, and the upgrading risk is particularly highlighted.
The existing system version upgrading scheme has at least the following defects:
firstly, the specific implementation process of system version upgrading depends on manpower to a large extent, and the labor cost investment is large.
Secondly, the process of testing the system version after the system version is upgraded depends on manual input of a test case; because the cases are limited, the real situation in the actual production process cannot be covered; performance problems caused by system version upgrades are difficult to detect during the testing phase. Therefore, after the system version is upgraded, if a problem is found, the actual service processing needs to be interrupted, and the system version is backed off, which affects the continuity of the external service.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides a method and a device for upgrading a system version of a double-cluster database, which can enable a main cluster database and a standby cluster database to alternately complete system version upgrading, and when the system version upgrading fails, service processing interruption caused by system version rollback is avoided.
In order to solve the technical problem, the application provides the following technical scheme:
in a first aspect, the present application provides a system version upgrade method for a dual-cluster database, including:
scheduling the service to be processed to a standby cluster database which finishes system version upgrading for processing;
detecting the processing performance of the corresponding system upgrading version in the processing process;
and if the processing performance of the system upgrading version is detected to reach the standard, the system version of the standby cluster database is returned to the original system version, and then the system version upgrading is carried out on the main cluster database by using the system upgrading version with the processing performance reaching the standard.
Further, before scheduling the service to be processed to the backup cluster database that has completed the system version upgrade for processing, the method further includes:
upgrading the system version of the standby cluster database by using the system upgrading version; and the primary cluster database runs the original system version to process the service during the system version upgrading of the standby cluster database.
Further, after the system version upgrade is performed on the main cluster database by using the system upgrade version with the processing performance reaching the standard, the method further includes:
and if a processing fault occurs when the main cluster database runs the system upgrading version to process the service to be processed, scheduling the service to be processed to the standby cluster database running the original system version for processing.
Further, the method for upgrading the system version of the dual-cluster database further includes:
if the processing performance of the system upgrading version is detected to be not up to the standard, scheduling the service to be processed to a main cluster database running the original system version for processing;
the following iterative operations are performed: and correcting the system upgrading version and detecting the processing performance of the corrected system upgrading version in the standby cluster database until the processing performance of the corrected system upgrading version is up to the standard.
Further, the detecting the processing performance of the corresponding system upgrade version in the processing process includes:
acquiring a first processing parameter when the primary cluster database operates the original system version to process the service to be processed; the first processing parameters at least comprise a first database execution statement, a first statement level input parameter, a first statement level output parameter and a first statement level response time;
acquiring a second processing parameter when the standby cluster database after the system version upgrade processes the same service to be processed; the second processing parameters at least comprise a second database execution statement, a second statement level input parameter, a second statement level output parameter and a second statement level response time;
comparing the first processing parameter to the second processing parameter; and if the preset conditions are met, the treatment performance reaches the standard.
Further, the comparing the first processing parameter to the second processing parameter includes:
determining each database execution statement to be compared according to the first database execution statement and the second database execution statement;
executing sentences aiming at the same database to be compared, and comparing corresponding first sentence-level input parameters with corresponding second sentence-level input parameters;
if the two statement levels are consistent, executing statements aiming at the same database to be compared, and comparing corresponding first statement level output parameters with corresponding second statement level output parameters;
if yes, comparing whether the difference value between the first statement level response time and the second statement level response time is smaller than a preset response time difference value; if yes, the processing performance reaches the standard.
Further, before upgrading the system version of the backup cluster database by using the system upgrade version, the method further includes:
and copying the data processing logic in the main cluster database to the standby cluster database so as to enable the standby cluster database to process the service to be processed according to the data processing logic after the system version upgrading is completed.
Further, the method for upgrading the system version of the dual-cluster database further includes:
if the performance of the main cluster database is stable when the system upgrading version is operated to process the to-be-processed service, the system upgrading version is used for upgrading the system version of the standby cluster database again, and the to-be-processed service is scheduled to the main cluster database and the standby cluster database according to a preset scheduling proportion to be processed.
In a second aspect, the present application provides a system version upgrade apparatus for a dual-cluster database, including:
the standby cluster service scheduling unit is used for scheduling the service to be processed to a standby cluster database which finishes system version upgrading for processing;
the processing performance detection unit is used for detecting the processing performance of the corresponding system upgrading version in the processing process;
and the main cluster version upgrading unit is used for returning the version of the standby cluster database system to the original system version when the processing performance of the system upgrading version is detected to reach the standard, and then upgrading the system version of the main cluster database by using the system upgrading version with the processing performance reaching the standard.
Further, the apparatus for upgrading system version of dual-cluster database further includes:
the backup cluster version upgrading unit is used for upgrading the system version of the backup cluster database by utilizing the system upgrading version; and the primary cluster database runs the original system version to process the service during the system version upgrading of the standby cluster database.
Further, the apparatus for upgrading system version of dual-cluster database further includes:
and the service callback unit is used for scheduling the service to be processed to the standby cluster database running the original system version for processing if a processing fault occurs when the main cluster database runs the system upgrading version to process the service to be processed.
Further, the apparatus for upgrading system version of dual-cluster database further includes:
the performance review callback unit is used for scheduling the service to be processed to a main cluster database running the original system version for processing if the processing performance of the system upgrade version is detected not to reach the standard;
a processing performance review unit configured to perform the following iterative operations: and correcting the system upgrading version and detecting the processing performance of the corrected system upgrading version in the standby cluster database until the processing performance of the corrected system upgrading version is up to the standard.
Further, the processing performance detection unit includes:
the first processing parameter acquisition module is used for acquiring a first processing parameter when the primary cluster database runs the original system version to process the service to be processed; the first processing parameters at least comprise a first database execution statement, a first statement level input parameter, a first statement level output parameter and a first statement level response time;
the second processing parameter acquisition module is used for acquiring a second processing parameter when the standby cluster database after the system version upgrade processes the same service to be processed; the second processing parameters at least comprise a second database execution statement, a second statement level input parameter, a second statement level output parameter and a second statement level response time;
a processing parameter comparison module for comparing the first processing parameter with the second processing parameter; and if the treatment performance meets the preset condition, the treatment performance reaches the standard.
Further, the processing parameter comparison module includes:
the execution statement determining module is used for determining execution statements of the databases to be compared according to the execution statements of the first database and the execution statements of the second database;
the reference comparison module is used for executing sentences aiming at the same database to be compared and comparing corresponding first sentence-level input parameters with second sentence-level input parameters;
the parameter output comparison module is used for executing sentences aiming at the same database to be compared if the parameters are consistent, and comparing the corresponding first sentence level output parameters with the corresponding second sentence level output parameters;
the response time difference comparison module is used for comparing whether the difference value between the first statement level response time and the second statement level response time is smaller than a preset response time difference value or not if the first statement level response time and the second statement level response time are consistent; if yes, the processing performance reaches the standard.
Further, the apparatus for upgrading system version of dual-cluster database further includes:
and the processing logic copying unit is used for copying the data processing logic in the main cluster database to the standby cluster database so as to enable the standby cluster database to process the service to be processed according to the data processing logic after the system version upgrading is completed.
Further, the apparatus for upgrading system version of dual-cluster database further includes:
and the version re-upgrading unit is used for re-upgrading the system version of the standby cluster database by using the system upgrading version if the performance of the main cluster database is stable when the system upgrading version is operated to process the service to be processed, and scheduling the service to be processed to the main cluster database and the standby cluster database according to a preset scheduling ratio for processing.
In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the system version upgrade method for the dual-cluster database when executing the program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the system version-up method of a dual-cluster database.
In a fifth aspect, the present application provides a computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the system version upgrade method of the dual-cluster database.
Aiming at the problems in the prior art, the method and the device for upgrading the system version of the double-cluster database can reduce the influence of frequent iteration of the database version on banking business through the mutual cooperation of transaction scheduling, transaction operation, transaction recording and playing, main and standby double clusters of the database, database system logs, logic replication and performance comparison. Before the system version is upgraded, data processing logic copying between the double clusters is disconnected, performance testing is carried out by using real service flow through a method of recording service load of the main cluster and playing back the service load in the standby cluster, performance problems of a new version of the database are found in advance by comparing performance reports of the main cluster and the standby cluster, and a manufacturer is submitted to repair or an evasion scheme is used for evasion; in the upgrading process, the uninterrupted service processing is realized by a switching method between the main cluster and the standby cluster; after the system version is upgraded, if a problem is found, the influence on the service to be processed can be reduced by switching the service flow to the main cluster where the old version of the database is located, and the quick recovery of the fault is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a system version upgrade method for a dual-cluster database according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of iteratively performing system upgrade version detection in an embodiment of the present application;
FIG. 3 is a flow chart illustrating the performance of a process for detecting an upgraded version of a system according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a comparison between a first processing parameter and a second processing parameter according to an embodiment of the present application;
FIG. 5 is a diagram illustrating one of the structures of a system version upgrading apparatus for a dual-cluster database according to an embodiment of the present disclosure;
FIG. 6 is a second block diagram of a system version upgrading apparatus for a dual-cluster database according to an embodiment of the present application;
fig. 7 is a block diagram of a processing performance detection unit in the embodiment of the present application;
FIG. 8 is a block diagram of a process parameter comparison module in an embodiment of the present application;
FIG. 9 is a schematic structural diagram of an electronic device in an embodiment of the present application;
FIG. 10 is a schematic structural diagram of a system version upgrade implementation based on database dual clusters in an embodiment of the present application;
fig. 11 is a flowchart of a method for implementing system version upgrade based on database dual clusters in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
It should be noted that the method and the apparatus for upgrading the system version of the dual-cluster database provided by the present application may be used in the financial field, and may also be used in any field other than the financial field.
According to the technical scheme, the data acquisition, storage, use, processing and the like meet the relevant regulations of national laws and regulations.
In an embodiment, referring to fig. 1, in order to enable a primary cluster database and a backup cluster database to alternately complete system version upgrade and avoid service processing interruption caused by system version rollback when a system version upgrade fails, a method for upgrading a system version of a dual cluster database is provided, including:
s101: scheduling the service to be processed to a standby cluster database which finishes system version upgrading for processing; the service to be processed can be an actual service or a simulation service recorded according to the actual service;
s102: detecting the processing performance of the corresponding system upgrading version in the processing process;
s103: and if the processing performance of the system upgrading version is detected to reach the standard, the version of the standby cluster database system is returned to the original system version, and then the system upgrading version of the main cluster database is upgraded by using the system upgrading version with the processing performance reaching the standard.
It can be appreciated that system version upgrades to databases have been a high risk activity. Database performance problems caused by upgrading system versions can only be discovered when actual services are processed after production. At present, the database technology is developed rapidly, the iteration speed of the system version is high, the updating content is large, and the upgrading risk is particularly prominent.
In the existing single-cluster database, a large number of data processing nodes (such as a data master node, a data backup node, a routing coordination node, a global transaction number node, a monitoring node, a high-availability master node, and the like) exist in a cluster, the compatibility of high and low versions of a system among the nodes is complex, and the rollback process of the system version caused by the failure of the upgrade of the system version is very complicated.
In order to solve the above technical problem, in the method for upgrading a system version of a dual-cluster database provided in the present application, two database clusters are deployed, which are a primary cluster database (hereinafter, may be referred to as a primary cluster) and a backup cluster database (hereinafter, may be referred to as a backup cluster), respectively.
Referring to fig. 10, in the embodiment of the present application, a system for implementing system version upgrade based on database double clusters includes: 101 a transaction scheduling component, 102 a transaction execution component, 103 a transaction record and playback component, 104 a database cluster, 105 a database system log, 106 a logical replication component, 107 a performance comparison component, wherein:
101 transaction scheduling component: and the system is responsible for scheduling the traffic flow between the two cluster databases according to the requirement. During the dispatching, transaction interception and caching can be performed in a short time and second level, and the transaction (to-be-processed service) updated at the same time is guaranteed to be operated only on a certain cluster database (or on a main cluster database or a standby cluster database).
102 transaction execution component: it is responsible for providing a transaction execution environment, typically an application container or server.
103 transaction record playback component: the system is responsible for recording SQL sentences and parameters corresponding to production transactions running on the main cluster database at a network end, and calling the same SQL sentences and parameters to realize playback on the standby cluster database after the system version is upgraded by a JAVA program.
104 database cluster: the system comprises a plurality of database nodes, the structure of the system can be distributed or centralized, in order to realize high availability, a main node in a cluster generally comprises a plurality of standby nodes, such as a main node and a standby node, the main node and the standby node realize data synchronization through data replication and majority assignment protocols in the cluster, and when the main node fails, the main node can be switched to the standby node to realize high availability of the local.
105 database system log: a transaction log recorded by the database for the purpose of ensuring persistence and rollback.
106 logically copy the component: analyzing the database system log to obtain mirror images before and after the change of the database record, and copying the mirror images to another cluster device by taking key values as conditions; a typical database manufacturer will provide a standard interface for parsing database system logs, and may also use a third party tool to implement the parsing.
107 transaction record playback function and performance comparison component: comparing the results (output parameters) of the operation on the main cluster and the standby cluster under the condition that the input parameters of the same SQL sentence are the same, eliminating variables (such as different operation results of taking system time each time), if the results are inconsistent, determining that a functional problem possibly exists, and outputting a functional problem report, wherein the functional problem report comprises the SQL sentence, the input parameters and the operation results of the main cluster and the standby cluster; comparing the response time of the same SQL statement running on the main cluster and the standby cluster, if the response time exceeds a threshold value, considering that the single SQL statement has a performance problem under a new version, and outputting a single SQL statement performance problem report which comprises the SQL statement, input parameters and the running time of the main cluster and the standby cluster; collecting the production transaction performance report of the recorded transaction of the main cluster, replaying the performance report of the standby cluster (upgrading a new version of the database) during the transaction operation, correlating the two cluster reports according to the contents of SQL sentences, comparing the success rate, the operation time, the CPU time and the BUFFER hit rate of the same SQL sentences, comparing the overall overhead of the system with the waiting events and the like which are arranged in the top 10 of the system, and generating a database cluster performance comparison report, wherein the SQL sentences of which the response time of the standby cluster is slow or the newly added waiting events need to be analyzed to judge whether the database version is upgraded or not. If the new version of the data is suspected to cause a problem, the problem case is desensitized and then sent to a database manufacturer for analysis.
In an embodiment, before scheduling the service to be processed to the backup cluster database that has completed the system version upgrade for processing (S101), the method further includes: upgrading the system version of the standby cluster database by using the system upgrading version; and the primary cluster database runs the original system version to process the service during the system version upgrading of the standby cluster database.
This embodiment may be understood as upgrading the backup cluster database before upgrading the primary cluster database. In order to test whether the processing performance of the corresponding system upgrade version reaches the standard, the traffic corresponding to the service to be processed needs to be introduced into the standby cluster database in which the system version upgrade is completed, so that the standby cluster database in which the system version upgrade is completed runs the system upgrade version, processes the service to be processed, and detects the processing performance of the system upgrade version through a real service processing process.
In addition, considering that the standby cluster database cannot process the service during the system version upgrade, the service during the system version upgrade of the standby cluster database is processed by the primary cluster database running the original system version.
In an embodiment, after the system version upgrade is performed on the primary cluster database by using the system upgrade version with the processing performance reaching the standard (S103), the method further includes: and if a processing fault occurs when the main cluster database runs the system upgrading version to process the service to be processed, scheduling the service to be processed to the standby cluster database running the original system version for processing.
The embodiment shows an advantage of the method provided by the present application, that is, when the primary cluster database after the system version upgrade fails to process the service due to a fault, the backup cluster database may be processed instead. Thus, the service is uninterrupted to the customers needing to transact business.
In an embodiment, referring to fig. 2, the method for upgrading a system version of a dual-cluster database further includes:
s501: if the processing performance of the system upgrading version is detected to be not up to the standard, scheduling the service to be processed to a main cluster database running the original system version for processing;
s502: the following iterative operations are performed: and correcting the system upgrading version and detecting the processing performance of the corrected system upgrading version in the standby cluster database until the processing performance of the corrected system upgrading version is up to the standard.
It is understood that, in the embodiment of the present application, until it is detected that the processing performance of the system upgrade version reaches the standard, the system upgrade version can be put on the main cluster database to perform the system version upgrade on the main cluster database. Therefore, as explained in the foregoing embodiment, it is necessary to introduce the traffic corresponding to the service to be processed into the backup cluster database that has completed the system version upgrade, so that the backup cluster database that has completed the system version upgrade runs the system upgrade version, and the processing performance of the system upgrade version is detected through the real service processing process.
If the processing performance of the system upgrade version is found not to be up to the standard, the standby cluster database is required to stop running the system upgrade version, and then the service to be processed is scheduled to the main cluster database running the original system version for processing, so that the service handling service is not interrupted.
And then, correcting the system upgrading version, putting the corrected system upgrading version on a standby cluster database again for upgrading the system version after correction, repeating the steps, detecting until the processing performance of the corrected system upgrading version reaches the standard, determining that the system upgrading version with the standard processing performance is put on a main cluster database, and upgrading the main cluster database.
In an embodiment, before upgrading the system version of the backup cluster database by using the system upgrade version, the method further includes:
and copying the data processing logic in the main cluster database to the standby cluster database so that the standby cluster database processes the service to be processed according to the data processing logic after the system version is upgraded.
It can be understood that, this embodiment corresponds to 103 the function of the transaction record and playback component, that is, SQL statements and parameters corresponding to production transactions running on the primary cluster database are recorded on the network side, and the same SQL statements and parameters are called by JAVA programs to implement playback on the backup cluster database after the system version upgrade is completed. The recorded content includes data processing logic, e.g., according to what computational steps certain data is processed. When the data processing logics are consistent, the subsequent performance comparison is meaningful.
In an embodiment, the method for upgrading a system version of a dual-cluster database further includes:
if the performance of the main cluster database is stable when the system upgrading version is operated to process the to-be-processed service, the system upgrading version is used for upgrading the system version of the standby cluster database again, and the to-be-processed service is scheduled to the main cluster database and the standby cluster database according to a preset scheduling proportion to be processed.
From the above description, it can be known that the method for upgrading the system version of the dual-cluster database provided by the present application can reduce the influence of frequent iteration of the database version on banking services through the mutual cooperation of transaction scheduling, transaction operation, transaction recording and playback, database master-slave dual clusters, database system logs, logic replication and performance comparison. Before the system version is upgraded, data processing logic copying between the double clusters is disconnected, performance testing is carried out by using real service flow through a method of recording service load of the main cluster and playing back the service load in the standby cluster, performance problems of a new version of the database are found in advance by comparing performance reports of the main cluster and the standby cluster, and a manufacturer is submitted to repair or an evasion scheme is used for evasion; in the upgrading process, the uninterrupted service processing is realized by a switching method between the main cluster and the standby cluster; after the system version is upgraded, if a problem is found, the influence on the service to be processed can be reduced by switching the service flow to the main cluster where the old version of the database is located, and the quick recovery of the fault is realized.
In an embodiment, referring to fig. 3, the detecting the processing performance of the corresponding system upgrade version in the processing procedure includes:
s301: acquiring a first processing parameter when the primary cluster database operates the original system version to process the service to be processed; the first processing parameters at least comprise a first database execution statement, a first statement level input parameter, a first statement level output parameter and a first statement level response time;
s302: acquiring a second processing parameter when the standby cluster database after the system version upgrading processes the same service to be processed; the second processing parameters at least comprise a second database execution statement, a second statement level input parameter, a second statement level output parameter and a second statement level response time;
s303: comparing the first processing parameter to the second processing parameter; and if the treatment performance meets the preset condition, the treatment performance reaches the standard.
In one embodiment, referring to fig. 4, S303 includes:
s401: determining each database execution statement to be compared according to the first database execution statement and the second database execution statement;
s402: executing sentences aiming at the same database to be compared, and comparing corresponding first sentence-level input parameters with corresponding second sentence-level input parameters;
s403: if the two statement levels are consistent, executing statements aiming at the same database to be compared, and comparing corresponding first statement level output parameters with corresponding second statement level output parameters;
s404: if yes, comparing whether the difference value between the first statement level response time and the second statement level response time is smaller than a preset response time difference value; if yes, the processing performance reaches the standard.
It is understood that the above steps S301 to S303 (including steps S401 to S404) can be realized by 107 transaction record and play function and performance comparison component. Specifically, through 107 transaction record playback function and performance comparison components, the following comparisons are made:
(1) comparing the operation results (output parameters) of the 104 database cluster on the main cluster and the 104 database cluster on the standby cluster under the condition that the input parameters of the same SQL statement are the same, and after eliminating variables (such as operation of taking system time, the operation results of each time are different), if the output parameters are inconsistent, considering that the system upgrading version (new version) possibly has a functional problem, and outputting an SQL statement functional problem report (comprising the SQL statement, the input parameters and the operation results of the main/standby clusters);
(2) comparing the response time of the same SQL statement in the operation of the 104 database cluster on the main cluster and the 104 database cluster on the standby cluster, if the response time exceeds a threshold value, considering that the single SQL statement has a performance problem under the system upgrading version (new version), and outputting a single SQL statement performance problem report (comprising the SQL statement, the input parameters and the operation time of the main/standby clusters);
(3) collecting 104 production transaction performance reports recorded in a transaction period on a main cluster database cluster, playing back performance reports of 104 standby cluster database clusters in a transaction running period (upgraded to a new database version), correlating the two cluster reports according to SQL statement contents, comparing the success rate, running time, CPU time and BUFFER hit rate of the same SQL statement, comparing the overall overhead of the system with the waiting event of the top 10 in the system and the like, and generating a database cluster performance comparison report;
(4) outputting a cluster performance problem report (comprising performance reduction SQL sentences, newly increased waiting time and a SQL sentence success rate reduction list) by using the SQL sentences or newly increased waiting events with slow response time of the standby cluster;
(5) and analyzing whether the database version is upgraded or not for suspicious points in the single SQL statement functional problem report, the single SQL statement performance problem report and the cluster performance problem report. If the positioning is that the new version of the data causes a problem, the problem case is desensitized and then sent to a database manufacturer for analysis.
As can be seen from the foregoing description, the system version upgrading method for a dual-cluster database provided in the present application can detect the processing performance of a corresponding system upgrade version during a processing procedure.
The following is a specific process for implementing the method provided by the present application:
referring to fig. 11, a flowchart of a method for implementing system version upgrade based on database dual cluster includes:
step S201, through the 101 transaction scheduling component, it is ensured that the production transaction (the service to be processed) only runs in the 104 database main cluster, the system version of the 104 database standby cluster is upgraded, and the final consistency of the data of the main and standby clusters is ensured through logical replication.
Step S202, at a certain preset time node, cutting off the data copying from the main cluster of the database 104 to the standby cluster of the database 104, recording the production transaction SQL statements and input parameters, response time and output parameters (results) running on the main cluster of the database 104 at the network end through the transaction recording and playing component 103, and calling the same SQL statements and parameters to realize playback on the standby cluster of the database 104 after the system version is upgraded through a JAVA program.
Step S203, through 107 transaction record and play function and performance comparison component, the following comparison is carried out:
(1) comparing the operation results (output parameters) of the 104 database cluster on the main cluster and the 104 database cluster on the standby cluster under the condition that the input parameters of the same SQL statement are the same, and after eliminating variables (such as operation of taking system time, the operation results of each time are different), if the output parameters are inconsistent, considering that the system upgrading version (new version) possibly has a functional problem, and outputting an SQL statement functional problem report (comprising the SQL statement, the input parameters and the operation results of the main/standby clusters);
(2) comparing the response time of the same SQL statement in the operation of the 104 database cluster on the main cluster and the 104 database cluster on the standby cluster, if the response time exceeds a threshold value, considering that the single SQL statement has a performance problem under the system upgrading version (new version), and outputting a single SQL statement performance problem report (comprising the SQL statement, the input parameters and the operation time of the main/standby clusters);
(3) collecting 104 production transaction performance reports recorded in a transaction period on a main cluster database cluster, playing back performance reports of 104 standby cluster database clusters in a transaction running period (upgraded to a new database version), correlating the two cluster reports according to SQL statement contents, comparing the success rate, running time, CPU time and BUFFER hit rate of the same SQL statement, comparing the overall overhead of the system with the waiting event of the top 10 in the system and the like, and generating a database cluster performance comparison report;
(4) outputting a cluster performance problem report (comprising a performance reduction SQL statement, a newly-increased waiting time and an SQL statement success rate reduction list) by using the SQL statement or the newly-increased waiting event with slow response time of the cluster;
(5) and analyzing whether the database version is upgraded or not for suspicious points in the single SQL statement functional problem report, the single SQL statement performance problem report and the cluster performance problem report. If the positioning is that the new version of the data causes a problem, the problem case is desensitized and then sent to a database manufacturer for analysis.
And step S204, after the problems related to the new version of the database system are repaired, the components are copied through the logic 106, the main and standby cluster data are resynchronized 104, and after the synchronization is completed, the transaction interception and caching are performed through the transaction scheduling component 101. At a certain time node, a 106 logic replication component from a main cluster to a standby cluster is cut off, production transactions are switched to a 104 standby cluster (a new system version of a database), upgrading of the version of a service database is not influenced, the 106 logic replication component from the standby cluster to the main cluster is established, final consistency of service data of the main cluster and the standby cluster is guaranteed, and the 104 main cluster is not upgraded within one month (can be adjusted according to specific strategies).
Step S205, if the transaction running on the new database version (standby cluster) has serious performance or function problems, the transaction is intercepted and cached through the 101 transaction scheduling component, the 106 logic copying component from the standby cluster to the main cluster is disconnected, the production transaction is switched back to the 104 main cluster from the old database system version, the rollback of the business database version is not influenced, and the 106 logic copying component from the main cluster to the standby cluster is started.
And if the version is returned, repeating the step S202 to the step S204 until the version of the standby cluster database system is upgraded, and having no influence on the safety and stability of production. And S206, after the production transaction is safely operated on the 104 backup cluster for one month, disconnecting the backup-to-master logic replication component, and upgrading 104 the 104 master cluster database to a new version.
In summary, the beneficial effects of the present application can also be summarized as follows:
the method provided by the application has universality and universality, and is independent of specific database types; for application scenes comprising multiple database types, the method provided by the application can reduce the workload of development and design and the difficulty of operation and maintenance;
the method provided by the application can realize the complete coverage of all common transaction branches in production by recording the service processing process on the main cluster database running the original system version (old version) and playing back the service processing process on the standby cluster database running the system upgrade version (new version); the method is equivalent to testing by using real production data distribution and transaction load to find potential problems in the system upgrade version (new version), reduces the workload of testing after production, improves the possibility of finding the problems of the new version of the database before production, and greatly reduces the risk of generating the problems related to the new version during operation after the new version of the database is upgraded;
the method provided by the application runs the original system version (old version) through the database of the main cluster, runs the system upgrade version (new version) through the standby cluster, realizes the complete decoupling of the two clusters, realizes the synchronization of data processing logic through the data processing logic copying mode, avoids the compatibility problem caused by the inconsistency of the versions of multiple components in the clusters, and reduces the risk during the upgrade of the new version of the database;
by intercepting and caching second-level service traffic, the method can switch the service traffic from a main cluster running with an original system version (old version) to a standby cluster running with a system upgrade version (new version), and realizes that no external service is influenced during the upgrade of the database system version;
and (V) if the system version of the database fails to be upgraded in the process of processing the actual service, switching the service flow from the standby cluster to the main cluster through a second-level service flow interception and caching technology, so that the database version can be quickly returned without influencing external service, and the influence of the database system version problem on the actual service processing is reduced.
Based on the same inventive concept, the embodiment of the present application further provides a system version upgrading apparatus for a dual-cluster database, which can be used to implement the method described in the foregoing embodiment, as described in the following embodiment. The principle of the system version upgrading device of the double-cluster database for solving the problems is similar to that of the system version upgrading method of the double-cluster database, so the implementation of the system version upgrading device of the double-cluster database can refer to the implementation of a software performance reference determination method, and repeated parts are not described again. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. While the system described in the embodiments below is preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
In an embodiment, referring to fig. 5, in order to enable the primary cluster database and the backup cluster database to alternately complete system version upgrade and avoid service processing interruption caused by system version rollback when the system version upgrade fails, the present application provides a system version upgrade apparatus for a dual cluster database, including: a standby group service scheduling unit 501, a processing performance detection unit 502 and a main group version upgrading unit 503.
A standby cluster service scheduling unit 501, configured to schedule a service to be processed to a standby cluster database that has completed system version upgrade for processing;
a processing performance detection unit 502, configured to detect a processing performance of a corresponding system upgrade version in a processing process;
and a main cluster version upgrading unit 503, configured to, when it is detected that the processing performance of the system upgrade version reaches a standard, roll back the backup cluster database system version to the original system version, and then upgrade the system version of the main cluster database by using the system upgrade version whose processing performance reaches the standard.
In an embodiment, the apparatus for upgrading a system version of a dual-cluster database further includes:
the backup cluster version upgrading unit is used for upgrading the system version of the backup cluster database by utilizing the system upgrading version; and the primary cluster database runs the original system version to process the service during the system version upgrading of the standby cluster database.
In an embodiment, the apparatus for upgrading a system version of a dual-cluster database further includes:
and the service callback unit is used for scheduling the service to be processed to the standby cluster database running the original system version for processing if a processing fault occurs when the primary cluster database runs the system upgrade version to process the service to be processed.
In an embodiment, referring to fig. 6, the apparatus for upgrading a system version of a dual-cluster database further includes:
a performance review callback unit 601, configured to, if it is detected that the processing performance of the system upgrade version does not meet the standard, schedule a service to be processed to a master cluster database running the original system version for processing;
a processing performance review unit 602, configured to perform the following iterative operations: and correcting the system upgrading version and detecting the processing performance of the corrected system upgrading version in the standby cluster database until the processing performance of the corrected system upgrading version is up to the standard.
In an embodiment, referring to fig. 7, the processing performance detecting unit 502 includes: a first processing parameter obtaining module 701, a second processing parameter obtaining module 702, and a processing parameter comparing module 703.
A first processing parameter obtaining module 701, configured to obtain a first processing parameter when the primary cluster database runs the original system version to process a service to be processed; the first processing parameters at least comprise a first database execution statement, a first statement level input parameter, a first statement level output parameter and a first statement level response time;
a second processing parameter obtaining module 702, configured to obtain a second processing parameter when the standby cluster database that completes the system version upgrade processes the same service to be processed; the second processing parameters at least comprise a second database execution statement, a second statement level input parameter, a second statement level output parameter and a second statement level response time;
a processing parameter comparing module 703, configured to compare the first processing parameter with the second processing parameter; and if the preset conditions are met, the treatment performance reaches the standard.
In an embodiment, referring to fig. 8, the processing parameter comparison module 703 includes: a statement determination module 801, a reference-in pair module 802, a reference-out comparison module 803 and a response time difference comparison module 804 are executed.
An execution statement determining module 801, configured to determine, according to the first database execution statement and the second database execution statement, each to-be-compared database execution statement;
a reference comparison module 802, configured to execute a statement against the same database to be compared, and compare the corresponding first statement level input parameter with the second statement level input parameter;
a parameter output comparison module 803, configured to execute a statement for the same database to be compared if the parameter is consistent, and compare the corresponding first statement level output parameter with the corresponding second statement level output parameter;
a response time difference comparison module 804, configured to compare whether a difference between the first statement level response time and the second statement level response time is smaller than a preset response time difference if the first statement level response time and the second statement level response time are consistent; if yes, the processing performance reaches the standard.
In an embodiment, the apparatus for upgrading a system version of a dual-cluster database further includes:
and the processing logic copying unit is used for copying the data processing logic in the main cluster database to the standby cluster database so as to enable the standby cluster database to process the service to be processed according to the data processing logic after the system version upgrading is completed.
In an embodiment, the apparatus for upgrading a system version of a dual-cluster database further includes:
and the version re-upgrading unit is used for re-upgrading the system version of the standby cluster database by using the system upgrading version if the performance of the main cluster database is stable when the system upgrading version is operated to process the service to be processed, and scheduling the service to be processed to the main cluster database and the standby cluster database according to a preset scheduling ratio for processing.
In order to enable the primary cluster database and the backup cluster database to alternately complete system version upgrade and avoid interruption of service processing due to system version rollback when the system version upgrade fails, an embodiment of an electronic device for implementing all or part of contents in the method for upgrading system versions of the dual-cluster database is provided in the present application, where the electronic device specifically includes the following contents:
a Processor (Processor), a Memory (Memory), a communication Interface (Communications Interface) and a bus; the processor, the memory and the communication interface complete mutual communication through the bus; the communication interface is used for realizing information transmission between the system version upgrading device of the double-cluster database and relevant equipment such as a core service system, a user terminal, a relevant database and the like; the logic controller may be a desktop computer, a tablet computer, a mobile terminal, and the like, but the embodiment is not limited thereto. In this embodiment, the logic controller may refer to the embodiment of the system version upgrading method of the dual-cluster database and the embodiment of the system version upgrading apparatus of the dual-cluster database in the embodiments for implementation, and the contents thereof are incorporated herein, and repeated descriptions thereof are omitted.
It is understood that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a Personal Digital Assistant (PDA), a vehicle-mounted device, a smart wearable device, and the like. Wherein, intelligence wearing equipment can include intelligent glasses, intelligent wrist-watch, intelligent bracelet etc..
In practical applications, part of the system version upgrading method of the dual-cluster database may be performed on the electronic device side as described above, or all operations may be performed in the client device. The selection may be specifically performed according to the processing capability of the client device, the limitation of the user usage scenario, and the like. This is not a limitation of the present application. The client device may further include a processor if all operations are performed in the client device.
The client device may have a communication module (i.e., a communication unit), and may be in communication connection with a remote server to implement data transmission with the server. The server may include a server on the side of the task scheduling center, and in other implementation scenarios, the server may also include a server on an intermediate platform, for example, a server on a third-party server platform that is communicatively linked to the task scheduling center server. The server may include a single computer device, or may include a server cluster formed by a plurality of servers, or a server structure of a distributed apparatus.
Fig. 9 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 9, the electronic device 9600 can include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is noted that this fig. 9 is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the system version upgrade method function of the dual cluster database may be integrated into the central processor 9100. The central processor 9100 can be configured to perform the following control:
s101: scheduling the service to be processed to a standby cluster database which finishes system version upgrading for processing;
s102: detecting the processing performance of the corresponding system upgrading version in the processing process;
s103: and if the processing performance of the system upgrading version is detected to reach the standard, the system version of the standby cluster database is returned to the original system version, and then the system version upgrading is carried out on the main cluster database by using the system upgrading version with the processing performance reaching the standard.
From the above description, the method for upgrading the system version of the dual-cluster database provided by the application can reduce the influence of frequent database version iteration on banking business through the mutual cooperation of transaction scheduling, transaction operation, transaction record and replay, database master and slave dual clusters, database system logs, logic replication and performance comparison. Before the system version is upgraded, data processing logic copying between the double clusters is disconnected, performance testing is carried out by using real service flow through a method of recording service load of the main cluster and playing back the service load in the standby cluster, performance problems of a new version of the database are found in advance by comparing performance reports of the main cluster and the standby cluster, and a manufacturer is submitted to repair or an evasion scheme is used for evasion; in the upgrading process, the uninterrupted service processing is realized by a switching method between the main cluster and the standby cluster; after the system version is upgraded, if a problem is found, the influence on the service to be processed can be reduced by switching the service flow to the main cluster where the old version of the database is located, and the quick recovery of the fault is realized.
In another embodiment, the system version-up apparatus of the dual-cluster database may be configured separately from the central processor 9100, for example, the system version-up apparatus of the dual-cluster database of the data compound transmission apparatus may be configured as a chip connected to the central processor 9100, and the function of the system version-up method of the dual-cluster database may be implemented by the control of the central processor.
As shown in fig. 9, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 also does not necessarily include all of the components shown in fig. 9; in addition, the electronic device 9600 may further include components not shown in fig. 9, which may be referred to in the prior art.
As shown in fig. 9, a central processor 9100, sometimes referred to as a controller or operational control, can include a microprocessor or other processor device and/or logic device, which central processor 9100 receives input and controls the operation of the various components of the electronic device 9600.
The memory 9140 can be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 9100 can execute the program stored in the memory 9140 to realize information storage or processing, or the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 9140 can be a solid state memory, e.g., read Only Memory (ROM), random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 9140 could also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage part 9142, the application/function storage part 9142 being used to store application programs and function programs or a flow for executing the operation of the electronic device 9600 by the central processing unit 9100.
The memory 9140 can also include a data store 9143, the data store 9143 being used to store data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, contact book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. The communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless lan module, may be disposed in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby implementing ordinary telecommunication functions. The audio processor 9130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100, thereby enabling recording locally through the microphone 9132 and enabling locally stored sounds to be played through the speaker 9131.
The embodiment of the present application further provides a computer-readable storage medium capable of implementing all the steps of the system version-up method for a dual-cluster database with a server or a client as an execution subject in the above embodiment, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements all the steps of the system version-up method for a dual-cluster database with a server or a client as an execution subject, for example, the processor implements the following steps when executing the computer program:
s101: scheduling the service to be processed to a standby cluster database which finishes system version upgrading for processing;
s102: detecting the processing performance of the corresponding system upgrading version in the processing process;
s103: and if the processing performance of the system upgrading version is detected to reach the standard, the system version of the standby cluster database is returned to the original system version, and then the system version upgrading is carried out on the main cluster database by using the system upgrading version with the processing performance reaching the standard.
From the above description, the method for upgrading the system version of the dual-cluster database provided by the application can reduce the influence of frequent database version iteration on banking business through the mutual cooperation of transaction scheduling, transaction operation, transaction record and replay, database master and slave dual clusters, database system logs, logic replication and performance comparison. Before the system version is upgraded, data processing logic copying between the double clusters is disconnected, performance testing is carried out by using real service flow through a method of recording service load of the main cluster and playing back the service load in the standby cluster, performance problems of a new version of the database are found in advance by comparing performance reports of the main cluster and the standby cluster, and a manufacturer is submitted to repair or an evasion scheme is used for evasion; in the upgrading process, the uninterrupted service processing is realized by a switching method between the main cluster and the standby cluster; after the system version is upgraded, if a problem is found, the influence on the service to be processed can be reduced by switching the service flow to the main cluster where the old version of the database is located, and the quick recovery of the fault is realized.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (12)

1. A system version upgrading method for a dual-cluster database is characterized by comprising the following steps:
scheduling the service to be processed to a standby cluster database which finishes system version upgrading for processing;
detecting the processing performance of the corresponding system upgrade version in the processing process;
and if the processing performance of the system upgrading version is detected to reach the standard, the version of the standby cluster database system is returned to the original system version, and then the system upgrading version of the main cluster database is upgraded by using the system upgrading version with the processing performance reaching the standard.
2. The method for upgrading system versions of dual-cluster database according to claim 1, further comprising, before scheduling the pending service to the standby cluster database that has completed the system version upgrade for processing:
upgrading the system version of the standby cluster database by using the system upgrading version; and the primary cluster database runs the original system version to process the service during the system version upgrading of the standby cluster database.
3. The method for upgrading system versions of dual-cluster database according to claim 1, further comprising, after upgrading system versions of the primary cluster database with the system upgrade version whose processing performance meets the standard:
and if a processing fault occurs when the main cluster database runs the system upgrading version to process the service to be processed, scheduling the service to be processed to the standby cluster database running the original system version for processing.
4. The system version-up method for a dual-cluster database according to claim 1, further comprising:
if the processing performance of the system upgrading version is detected not to reach the standard, scheduling the service to be processed to a main cluster database running the original system version for processing;
the following iterative operations are performed: and correcting the system upgrading version and detecting the processing performance of the corrected system upgrading version in the standby cluster database until the processing performance of the corrected system upgrading version is up to the standard.
5. The method for upgrading system versions of a dual-cluster database according to claim 2, wherein the detecting the processing performance of the corresponding system upgrade version during the processing procedure comprises:
acquiring a first processing parameter when the primary cluster database runs the original system version to process a service to be processed; the first processing parameters at least comprise a first database execution statement, a first statement level input parameter, a first statement level output parameter and a first statement level response time;
acquiring a second processing parameter when the standby cluster database after the system version upgrading processes the same service to be processed; the second processing parameters at least comprise a second database execution statement, a second statement level input parameter, a second statement level output parameter and a second statement level response time;
comparing the first processing parameter to the second processing parameter; and if the preset conditions are met, the treatment performance reaches the standard.
6. The method for system version upgrade of a dual-cluster database according to claim 5, wherein said comparing the first processing parameter with the second processing parameter comprises:
determining each database execution statement to be compared according to the first database execution statement and the second database execution statement;
executing sentences aiming at the same database to be compared, and comparing corresponding first sentence-level input parameters with corresponding second sentence-level input parameters;
if the two statement levels are consistent, executing statements aiming at the same database to be compared, and comparing corresponding first statement level output parameters with corresponding second statement level output parameters;
if so, comparing whether the difference value between the first statement level response time and the second statement level response time is smaller than a preset response time difference value; if yes, the processing performance reaches the standard.
7. The method for upgrading system versions of a dual-cluster database according to claim 2, further comprising, before upgrading the system version of the standby cluster database with the system upgrade version, the steps of:
and copying the data processing logic in the main cluster database to the standby cluster database so that the standby cluster database processes the service to be processed according to the data processing logic after the system version is upgraded.
8. The method for system version upgrade of a dual-cluster database according to claim 1, further comprising:
if the performance of the main cluster database is stable when the system upgrading version is operated to process the to-be-processed service, the system upgrading version is used for upgrading the system version of the standby cluster database again, and the to-be-processed service is scheduled to the main cluster database and the standby cluster database according to a preset scheduling proportion to be processed.
9. A system version upgrade apparatus of a dual-cluster database, comprising:
the standby cluster service scheduling unit is used for scheduling the service to be processed to a standby cluster database which finishes system version upgrading for processing;
the processing performance detection unit is used for detecting the processing performance of the corresponding system upgrading version in the processing process;
and the main cluster version upgrading unit is used for returning the version of the standby cluster database system to the original system version when the processing performance of the system upgrading version is detected to reach the standard, and then carrying out system version upgrading on the main cluster database by using the system upgrading version with the processing performance reaching the standard.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the system version upgrade method of a dual-clustered database as claimed in any one of claims 1 to 8 when executing the program.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for system version upgrade of a dual-clustered database as claimed in any one of claims 1 to 8.
12. A computer program product comprising computer program/instructions, characterized in that the computer program/instructions, when executed by a processor, implement the steps of the system version upgrade method of a dual-cluster database according to any of claims 1 to 8.
CN202210988880.2A 2022-08-17 2022-08-17 System version upgrading method and device for double-cluster database Pending CN115269560A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210988880.2A CN115269560A (en) 2022-08-17 2022-08-17 System version upgrading method and device for double-cluster database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210988880.2A CN115269560A (en) 2022-08-17 2022-08-17 System version upgrading method and device for double-cluster database

Publications (1)

Publication Number Publication Date
CN115269560A true CN115269560A (en) 2022-11-01

Family

ID=83752546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210988880.2A Pending CN115269560A (en) 2022-08-17 2022-08-17 System version upgrading method and device for double-cluster database

Country Status (1)

Country Link
CN (1) CN115269560A (en)

Similar Documents

Publication Publication Date Title
CN110765023B (en) Distributed system testing method and system based on chaos experiment
US9189348B2 (en) High availability database management system and database management method using same
US20110087637A1 (en) Method and System for Database Recovery
CN111090699A (en) Service data synchronization method and device, storage medium and electronic device
CN104778102A (en) Master-slave switching method and system
CN108459951B (en) Test method and device
CN111708841A (en) Database data synchronization method and device
CN106055424A (en) Method and device for exception handling of information database
CN113051110A (en) Cluster switching method, device and equipment
CN115658098A (en) Upgrading method and device for distributed business processing system
CN115599665A (en) Disaster recovery system testing method and device, electronic equipment and storage medium
CN113760611B (en) System site switching method and device, electronic equipment and storage medium
CN111324480A (en) Large host transaction fault positioning system and method
CN114489989A (en) Method and system for parallel scheduling based on proxy client
CN111342986A (en) Distributed node management method and device, distributed system and storage medium
US10812586B2 (en) Method and system for high availability topology for master-slave data systems with low write traffic
CN111338767B (en) PostgreSQL master-slave database automatic switching system and method
CN115269560A (en) System version upgrading method and device for double-cluster database
EP4220406B1 (en) Action undo service based on cloud platform
CN115495436A (en) Database upgrading method and device
CN116150029A (en) Automatic overdue batch testing method and device for loan system
CN115421976A (en) Remote disaster recovery data processing method and device
CN115934742A (en) Fault processing method, device, equipment and storage medium
CN114285657A (en) Firewall security policy change verification method and device
CN113377385A (en) Client automatic deployment method and device

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