CN117806969A - Service testing method, device, equipment and medium - Google Patents

Service testing method, device, equipment and medium Download PDF

Info

Publication number
CN117806969A
CN117806969A CN202410003168.1A CN202410003168A CN117806969A CN 117806969 A CN117806969 A CN 117806969A CN 202410003168 A CN202410003168 A CN 202410003168A CN 117806969 A CN117806969 A CN 117806969A
Authority
CN
China
Prior art keywords
node
data
transaction management
exercise
global transaction
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
CN202410003168.1A
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.)
Jinzhuan Xinke Co Ltd
Original Assignee
Jinzhuan Xinke Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinzhuan Xinke Co Ltd filed Critical Jinzhuan Xinke Co Ltd
Priority to CN202410003168.1A priority Critical patent/CN117806969A/en
Publication of CN117806969A publication Critical patent/CN117806969A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a service testing method, device, equipment and medium, and relates to the technical field of service testing. Comprising the following steps: for each service tenant, according to node parameters of a global transaction management node in a global transaction management node cluster of the service tenant and node parameters of data nodes in each data node cluster of the service tenant, taking out an exercise global transaction management node of an exercise tenant corresponding to the service tenant from the global transaction management node cluster, and taking out an exercise data node of the exercise tenant from each data node cluster; according to node parameters of all computing nodes in the computing node cluster, taking out the drilling computing nodes of the drilling tenant from all computing nodes; and performing exercise on the target database business according to the exercise global transaction management node, the exercise data node and the exercise calculation nodes of each exercise tenant. The invention improves the efficiency of service test.

Description

Service testing method, device, equipment and medium
Technical Field
The present invention relates to the field of service testing technologies, and in particular, to a service testing method, device, equipment, and medium.
Background
Business systems often require business exercise, i.e., testing of business in a simulated production environment to verify availability of the business.
At present, a set of complete standby service system is built for service test by conventional technical means, and the defect of low service exercise efficiency exists.
Disclosure of Invention
The invention provides a service testing method, device, equipment and medium, which are used for improving the efficiency of service exercise.
In a first aspect, the present invention provides a method for testing a service, including:
acquiring a global transaction management node cluster of at least one service tenant of a target database service and at least one data node cluster of the service tenant;
for each service tenant, according to node parameters of a global transaction management node in a global transaction management node cluster of the service tenant and node parameters of data nodes in each data node cluster of the service tenant, taking out an exercise global transaction management node of an exercise tenant corresponding to the service tenant from the global transaction management node cluster, and taking out an exercise data node of the exercise tenant from each data node cluster;
according to node parameters of all computing nodes in the computing node cluster, taking out the drilling computing nodes of the drilling tenant from all computing nodes;
And according to the drilling global transaction management node, the drilling data node and the drilling calculation node of each drilling tenant, drilling the target database business.
In a second aspect, the present invention further provides a service testing device, including:
the node cluster determining module is used for acquiring a global transaction management node cluster of at least one service tenant of the target database service and at least one data node cluster of the service tenant;
the first node determining module is used for taking out the drilling global transaction management node of the drilling tenant corresponding to the service tenant from the global transaction management node cluster according to the node parameters of the global transaction management node in the global transaction management node cluster of the service tenant and the node parameters of the data nodes in each data node cluster of the service tenant and taking out the drilling data node of the drilling tenant from each data node cluster;
the second node determining module is used for taking out the exercise computing nodes of the exercise tenant from the computing nodes according to the node parameters of the computing nodes in the computing node cluster;
and the business exercise module is used for carrying out exercise on the target database business according to the exercise global transaction management node, the exercise data node and the exercise calculation nodes of each exercise tenant.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the method comprises the steps of
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of testing services provided by any of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer readable storage medium, where computer instructions are stored, where the computer instructions are configured to cause a processor to execute a method for implementing a service according to any of the embodiments of the present invention.
The embodiment of the invention obtains the global transaction management node cluster of at least one service tenant of the target database service and the at least one data node cluster of the service tenant; for each service tenant, according to node parameters of a global transaction management node in a global transaction management node cluster of the service tenant and node parameters of data nodes in each data node cluster of the service tenant, taking out an exercise global transaction management node of an exercise tenant corresponding to the service tenant from the global transaction management node cluster, and taking out an exercise data node of the exercise tenant from each data node cluster; according to node parameters of all computing nodes in the computing node cluster, taking out the drilling computing nodes of the drilling tenant from all computing nodes; and according to the drilling global transaction management node, the drilling data node and the drilling calculation node of each drilling tenant, drilling the target database business. According to the technical scheme, the global transaction management node cluster and the data node cluster of each service tenant of the target database service can be taken out, the global transaction management node and the drilling data node of the service tenant corresponding to the drilling tenant are taken out, the drilling computing node of the drilling tenant is taken out from the computing node cluster, and further the drilling test is carried out on the target database service through the drilling tenant.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for testing a service according to a first embodiment of the present invention;
fig. 2 is a flowchart of a method for testing a service according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for testing a service according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a service testing device according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing a method for testing services according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and "third," etc. in the description and claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the technical scheme of the embodiment of the invention, the acquisition, storage, application and the like of the related global transaction management node cluster and the like all meet the requirements of related laws and regulations, and the public sequence is not violated.
Example 1
Fig. 1 is a flowchart of a service testing method according to a first embodiment of the present invention, where the method may be applied to a database service exercise test, and the method may be performed by a service testing device, where the service testing device may be implemented in hardware and/or software, and specifically configured in an electronic device, for example, a server.
Referring to the service testing method shown in fig. 1, the method includes:
s101, acquiring a global transaction management node cluster of at least one service tenant of a target database service and at least one data node cluster of the service tenant.
In this embodiment, the target database service may be a database service to be subjected to an exercise test; database services may refer to services in a database-based services system; the services may include, but are not limited to, a resource amount inquiry service, a resource transfer service, etc., and for example, the services may include a balance inquiry service and a transfer service. The tenant may be an entity in the database; the tenant occupies a certain number of nodes in the database and is used for executing the set business logic; the service tenant may be a tenant of the target database service corresponding in the database. Wherein nodes in the database occupied by each service tenant are different. The service logic corresponding to the service tenant may be a part of all service logic of the target database service; the execution of the target database service can be realized through the service logic of the execution setting of each service tenant. In an alternative embodiment, the database may be a distributed database.
In this embodiment, a global transaction management node (Global Transaction Manager, GTM) cluster may include a master global transaction management node and at least one slave global transaction management node; the slave global transaction management node can be a backup of the master global transaction management node and is only used for synchronizing data in the slave global transaction management node so as to maintain consistency between the slave global transaction management node and the master global transaction management node. For each data node cluster, the data node cluster comprises a master data node and at least one slave data node; the service data of the service tenant may be stored in a distributed manner in the master data node of each data node cluster. The main data node can participate in the execution process of the business logic, and is particularly used for executing processing operations such as writing data, deleting data or modifying data; the slave data node can be used as a backup of the master data node and is only used for synchronizing data in the slave data node so as to maintain consistency between the slave data node and the master data node.
S102, for each service tenant, according to node parameters of a global transaction management node in a global transaction management node cluster of the service tenant and node parameters of data nodes in each data node cluster of the service tenant, taking out an exercise global transaction management node of an exercise tenant corresponding to the service tenant from the global transaction management node cluster, and taking out an exercise data node of the exercise tenant from each data node cluster.
In this embodiment, the exercise tenant may be an entity in the database for performing an exercise test on the target database service; wherein, the drilling tenant corresponds to the business tenant one by one. The exercise global transaction management node may refer to a global transaction management node occupied by an exercise tenant; the exercise data node may refer to a global transaction management node occupied by an exercise tenant; the exercise data node may refer to a data node occupied by an exercise tenant. The node parameters may be used to characterize the performance or attributes of the node; the node parameters may include, but are not limited to, at least one of buffer size, thread pool size, synchronization frequency, and data synchronization delay, etc.
Specifically, a set algorithm is adopted, according to node parameters of all global transaction management nodes in a global transaction management node cluster of a service tenant and node parameters of all data nodes in a data node cluster of the service tenant, an exercise global transaction management node of an exercise tenant corresponding to the service tenant is taken out from all global transaction management node clusters, and an exercise data node of the exercise tenant is taken out from all data nodes.
S103, taking out the exercise computing nodes of the exercise tenant from the computing nodes according to the node parameters of the computing nodes in the computing node cluster.
In this embodiment, the exercise computing node may be a computing node occupied by an exercise tenant. The compute base point may be used to provide access portals for SQL (Structured Query Language ) commands for the target database service, as well as to parse and execute SQL commands. Specifically, a set algorithm is adopted, and according to node parameters of all the computing nodes in the computing node cluster, the drilling computing nodes of the drilling tenant are taken out from all the computing nodes.
And S104, performing exercise on the target database service according to the exercise global transaction management node, the exercise data node and the exercise calculation node of each exercise tenant.
In this embodiment, an exercise global transaction management node of an exercise tenant corresponding to a service tenant is taken out from each global transaction management node cluster of the service tenant of the target database service, and an exercise data node of the exercise tenant is taken out from each data node of the service tenant of the target database tenant; for each drilling tenant, the drilling tenant can execute the business logic of the corresponding business tenant, and the same business data as the business tenant is stored. The target database business can be exercised according to the exercise global transaction management node, the exercise data node and the exercise calculation node of each exercise tenant. Any algorithm in the prior art can be adopted to exercise the target database business according to the exercise global transaction management node, the exercise data node and the exercise calculation node of each exercise tenant, and the invention is not limited to this.
The embodiment of the invention obtains the global transaction management node cluster and the data node cluster of at least one service tenant of the target database service; for each service tenant, according to node parameters of each global transaction management node in a global transaction management node cluster of the service tenant and node parameters of each data node in a data node cluster of the service tenant, taking out an exercise global transaction management node of an exercise tenant corresponding to the service tenant from each global transaction management node cluster, and taking out an exercise data node of the exercise tenant from each data node; according to node parameters of all computing nodes in the computing node cluster, taking out the drilling computing nodes of the drilling tenant from all computing nodes; and according to the drilling global transaction management node, the drilling data node and the drilling calculation node of each drilling tenant, drilling the target database business. According to the technical scheme, the global transaction management node cluster and the data node cluster of each service tenant of the target database service can be taken out, the global transaction management node and the drilling data node of the service tenant corresponding to the drilling tenant are taken out, the drilling computing node of the drilling tenant is taken out from the computing node cluster, and further the drilling test is carried out on the target database service through the drilling tenant.
Example two
Fig. 2 is a flowchart of a service testing method provided by a second embodiment of the present invention, where the embodiment of the present invention optimizes and improves the operation of fetching a drilling global transaction management node and the operation of fetching a drilling data node based on the technical solution of the foregoing embodiment.
Further, the method includes the steps of ' according to node parameters of global transaction management nodes in a global transaction management node cluster of a service tenant and node parameters of data nodes in each data node cluster of the service tenant ', taking out an exercise global transaction management node of an exercise tenant corresponding to the service tenant from the global transaction management node cluster, and taking out exercise data nodes of the exercise tenant from each data node cluster ', refining the exercise data nodes into ' according to each global transaction management node in the global transaction management node cluster and the data nodes in each data node cluster ', and constructing at least one candidate node combination; wherein the candidate node combination comprises a global transaction management node and at least one data node; the data node clusters to which each data node in the candidate node combination belongs are different; constructing at least one candidate node combination category according to the node position of the global transaction management node and the node position of each data node in each candidate node combination; counting the number of candidate node combinations in each candidate node combination category, and determining the candidate node combination category with the largest number of candidate node combinations as an auxiliary node combination category; determining a target node combination from the auxiliary node combinations according to the availability indexes of the global transaction management nodes and the availability indexes of the data nodes in the auxiliary node combinations, determining the global transaction management nodes in the target node combination as exercise global transaction management nodes, and determining the data nodes in the target node combination as exercise data nodes; wherein the auxiliary node combination is a candidate node combination in the auxiliary node combination class; and taking out the drilling global transaction management node from each global transaction management node and taking out drilling data nodes from each data node cluster so as to perfect the taking-out operation of the drilling global transaction management node and the taking-out operation of the drilling data nodes.
In the embodiments of the present invention, the details are not described, and reference may be made to the description of the foregoing embodiments.
Referring to the service testing method shown in fig. 2, the method includes:
s201, acquiring a global transaction management node cluster and a data node cluster of at least one service tenant of a target database service.
S202, constructing at least one candidate node combination according to each global transaction management node in a global transaction management node cluster and data nodes in each data node cluster; wherein the candidate node combination comprises a global transaction management node and at least one data node; the clusters of data nodes to which each data node in the candidate node combination belongs are different.
Specifically, for each service tenant, selecting a global transaction management node from all global transaction management nodes in a global transaction management node cluster of the service tenant; selecting a data node from each data node cluster of the service tenant; determining a selected global transaction management node and data nodes in each selected data node cluster as a candidate node combination; by adopting the method, at least one candidate node combination is constructed. Illustratively, the data node cluster includes a data node cluster a and a data node cluster b; a master data node a1 and a slave data node a2 in the data node cluster a; a master data node b1, a slave data node b2 and a slave data node b3 in the data node cluster b; the global transaction management node cluster comprises a master global transaction management node A and a slave global transaction management node B, and then candidate node combinations can be constructed and obtained and comprise (A, a1, B1), (A, a1, B2), (A, a1, B3), (A, a2, B1), (A, a2, B3), (B, a1, B1), (B, a1, B3), (B, a2, B1), (B, a2, B2) and (B, a2, B3).
In an optional embodiment, for each service tenant, a global transaction management node may be selected from global transaction management nodes in the global transaction management node cluster of the service tenant; selecting one data node from the slave data nodes of each data node cluster of the service tenant; determining a selected global transaction management node and a selected slave data node in each data node cluster as a candidate node combination; by adopting the method, at least one candidate node combination is constructed, so that the need of selecting the main node as the exercise node can be avoided. Illustratively, the data node cluster includes a data node cluster a and a data node cluster b; a master data node a1 and a slave data node a2 in the data node cluster a; a master data node b1, a slave data node b2 and a slave data node b3 in the data node cluster b; the global transaction management node cluster comprises a master global transaction management node A and a slave global transaction management node B, and candidate node combinations comprising (B, a2, B2) and (B, a2, B3) can be constructed.
S203, constructing at least one candidate node combination category according to the node position of the global transaction management node and the node position of each data node in each candidate node combination.
In this embodiment, the node position may be used to represent the machine room position to which the server where the node belongs, where the node position may be represented by coordinates or by longitude and latitude. The candidate node combination class may be a class of node locations of the global transaction management node and the data nodes in the candidate node combination.
Illustratively, if the data node cluster includes a data node cluster a and a data node cluster b; the node position of the master data node a1 in the data node cluster a is 001, the node position of the slave data node a2 is 002, and the node position of the slave data node a3 is 002; the node position of the main data node b1 in the data node cluster b is 003, the node position of the auxiliary data node is 003, and the node position of the auxiliary data node b3 is 003; the node position of the master global transaction management node a in the global transaction management node cluster is 001, the node position of the slave global transaction management node B is 003, and the node position of the slave global transaction management node B is 003, then candidate node combination categories including (001, 001, 003), (001, 002, 003), (003, 001, 003) and (003, 002, 003) can be constructed.
S204, counting the number of candidate node combinations in each candidate node combination category, and determining the candidate node combination category with the largest number of candidate node combinations as an auxiliary node combination category.
Illustratively, if the data node cluster includes a data node cluster a and a data node cluster b; the node position of a main data node a1 in the data node cluster a is W1, the node position of a slave data node a2 is W2, and the node position of a slave data node a3 is W2; the node position of a main data node b1 in the data node cluster b is W3, the node position of a slave data node is W3, and the node position of the slave data node b3 is W3; the node position of a master global transaction management node A in the global transaction management node cluster is W1, the node position of a slave global transaction management node B is W3, and the node position of the slave global transaction management node B is W3, and the candidate node combination class (W1, W1 and W3) comprises 3 candidate node combinations; the candidate node combination class (W1, W2, W3) comprises 6 candidate node combinations; the candidate node combination class (W3, W1, W3) comprises 6 candidate node combinations; the candidate node combination class (W3, W2, W3) comprises 12 candidate node combinations; the candidate node combination class (W3, W2, W3) is taken as the auxiliary node combination class.
S205, determining a target node combination from the auxiliary node combinations according to the availability indexes of the global transaction management nodes and the availability indexes of the data nodes in the auxiliary node combinations, determining the global transaction management nodes in the target node combination as exercise global transaction management nodes, and determining the data nodes in the target node combination as exercise data nodes; wherein the auxiliary node combination is a candidate node combination in the auxiliary node combination class.
In this embodiment, the availability index may be an index for characterizing the availability probability of the node; the availability indicator may include, but is not limited to, at least one of a failover duration, a data synchronization delay, a failure rate and a failure recovery duration, etc. The target node combination may be a candidate node combination with a higher probability of availability of the global transaction management node and a higher probability of availability of each data node.
Specifically, a certain algorithm is adopted, and a target node combination is determined from all auxiliary node combinations according to the availability index of the global transaction management node and the availability index of all data nodes in all auxiliary node combinations; the global transaction management node in the target node combination is determined to be the exercise global transaction management node, and each data node in the target node combination is determined to be the exercise data node.
Optionally, determining the target node combination from the auxiliary node combinations according to the availability index of the global transaction management node and the availability index of the data node in the auxiliary node combinations includes: for each auxiliary node combination, determining the availability probability of the global transaction management node in the auxiliary node combination according to the availability index of the global transaction management node in the auxiliary node combination; determining the availability probability of the data nodes in the auxiliary node combination according to the availability index of the data nodes in the auxiliary node combination; determining the available probability of the auxiliary node combination according to the available probability of the global transaction management node in the auxiliary node combination and the available probability of the data node in the auxiliary node combination; and determining the auxiliary node combination with the highest availability as a target node combination.
Specifically, for each auxiliary node combination, weighting and summing all availability indexes of the global transaction management node in the auxiliary node combination according to the weight corresponding to each set availability index, and determining the weighting and summing result as the availability probability of the global transaction management node in the auxiliary node combination; for each data node in the auxiliary node combination, carrying out weighted summation on the availability indexes of the data nodes according to the weights corresponding to the set availability indexes, and determining the weighted summation result as the availability probability of the data node; determining an available probability average value between the available probability of the global transaction management node in the auxiliary node combination and the available probability of each data node in the auxiliary node combination, and determining the available probability average value as the available probability of the auxiliary node combination; and determining the auxiliary node combination with the highest availability as a target node combination.
It can be understood that by adopting the technical scheme, the availability probability of the global transaction management node and the availability probability of each data node in the auxiliary node combination are determined, so that the availability probability of the auxiliary node combination is determined, the target node combination can be determined according to the availability probability of each node in the auxiliary node combination, and the accuracy of the target availability combination and the availability of the target availability combination can be improved.
S206, taking out the drilling global transaction management node from each global transaction management node, and taking out the drilling data node from each data node cluster.
Optionally, the node parameters of the computing node include a node position and a node service type; determining an exercise computing node of the exercise tenant according to node parameters of each computing node in the computing node cluster, including: determining at least one auxiliary computing node according to the service type of the target database service and the node service type of each computing node; and determining exercise calculation nodes from the auxiliary calculation nodes according to the node positions of the auxiliary calculation nodes, the node positions of the exercise global transaction management nodes and the node positions of the exercise data nodes.
In this embodiment, the node service type may be a type of service that the set computing node needs to process. Specifically, determining a computing node with a node service type matched with the service type of the target database service as an auxiliary computing node; for each auxiliary computing node, determining a first distance between the node position of the auxiliary node and the node position of the exercise global transaction management node, and determining a second distance between the position of the auxiliary node and the node position of each exercise data node; summing the first distance and each second distance to obtain the total distance of the auxiliary computing node; and taking the auxiliary computing node with the smallest total distance as an exercise computing node.
It can be understood that by adopting the technical scheme, the auxiliary computing node which has the same type as the target library service and is closest to the drilling global transaction management node and the drilling data node can be used as the drilling computing node, so that the drilling computing node can ensure higher service processing capacity to the target database service, ensure the data transmission efficiency among the drilling computing node, the drilling global transaction management node and the drilling data node, and further improve the drilling test efficiency of the target database service.
S207, taking out the exercise computing nodes of the exercise tenant from the computing nodes according to the node parameters of the computing nodes in the computing node cluster.
And S208, performing exercise on the target database service according to the exercise global transaction management node, the exercise data node and the exercise calculation node of each exercise tenant.
According to the technical scheme of the embodiment of the invention, the candidate node combinations are constructed, and the auxiliary node combinations are determined according to the node positions of the global transaction management nodes and the node positions of the data nodes in each candidate node combination; determining a target node combination from all auxiliary node combinations according to the availability index of the global transaction management node in all auxiliary node combinations and the availability index of all data nodes; the global transaction management node in the target node combination is determined to be the drilling global transaction management node, and each data node in the target node combination is determined to be the drilling data node, so that the drilling global transaction management node can be determined from the node position with the largest number of the global transaction management nodes, and the drilling data node can be determined from the node position with the largest number of the data nodes in each data node cluster, the data transmission efficiency between the drilling global transaction management node and the drilling data node is improved, and further the drilling test efficiency of the target database service is improved.
Example III
Fig. 3 is a flowchart of a service testing method provided in a third embodiment of the present invention, where the embodiment of the present invention performs additional optimization based on the technical solution of the foregoing embodiment.
Further, "adding the exercise global transaction management node to the global transaction management node cluster of the service tenant and adding each exercise data node to the data node cluster of the corresponding service tenant" after "exercise the target database service according to the exercise global transaction management node, the exercise data node and the exercise calculation node of each exercise tenant". "to perfect the testing method of the service.
In the embodiments of the present invention, the details are not described, and reference may be made to the description of the foregoing embodiments.
Referring to the test method of the service shown in fig. 3, the method includes:
s301, acquiring a global transaction management node cluster and a data node cluster of at least one service tenant of a target database service.
S302, for each service tenant, according to node parameters of each global transaction management node in a global transaction management node cluster of the service tenant and node parameters of each data node in a data node cluster of the service tenant, taking out an exercise global transaction management node of an exercise tenant corresponding to the service tenant from each global transaction management node cluster, and taking out an exercise data node of the exercise tenant from each data node.
S303, taking out the exercise computing nodes of the exercise tenant from the computing nodes according to the node parameters of the computing nodes in the computing node cluster.
S304, performing exercise on the target database service according to the exercise global transaction management node, the exercise data node and the exercise calculation node of each exercise tenant.
S305, adding the drilling global transaction management node into a global transaction management node cluster of the service tenant, and adding each drilling data node into a data node cluster of the corresponding service tenant.
In this embodiment, the node parameters of the data node further include a cluster identifier to which the node belongs; the cluster identifier to which the node belongs can be used to uniquely identify the data node cluster to which the data node belongs. Specifically, adding the drilling global transaction management node into a global transaction management node cluster of a service tenant; and adding each drilling data node into the corresponding data node cluster according to the cluster identifier of the drilling data node.
Optionally, before the exercise global transaction management node, the exercise data node and the exercise calculation node according to each exercise tenant perform exercise on the target database service, the method further includes: adding a first rollback identification at the end position of an operation record log of the drilling global transaction management node; at the end position of the running log of the drilling data node, a second rollback identification is added.
In this embodiment, the operation log may be used to store operation log data; the operation record data may include, but is not limited to, operation states of the nodes at each unit time, and operations performed by the nodes. The first rollback identifier may be used to characterize a data location to which the running log of the global transaction management node needs to be rolled back; the second rollback identification may be used to characterize the data location to which the running log uniquely identifying the data node needs to be rolled back.
Correspondingly, adding the drilling global transaction management node to the global transaction management node cluster of the service tenant, and adding each drilling data node to the data node cluster of the corresponding service tenant, comprises: taking the operation record data after the first rollback mark in the operation record log of the operation global transaction management node as first operation data, and taking the operation record data after the second rollback mark in the operation record log of the operation data node as second operation data; according to the first exercise data, carrying out rollback processing on the exercise global transaction management node, and according to the second exercise data, carrying out rollback processing on each exercise data node; adding the back-off processed drilling global transaction management node into a global transaction management node cluster of a service tenant, and adding each back-off processed drilling data node into a data node cluster of the service tenant.
Specifically, according to the time sequence of the operation time of the completion of the node execution in the first exercise data and the operation time of the completion of each execution, the exercise global transaction management node is subjected to the back-off processing to carry out the back-off processing on the exercise global transaction management node, and according to the time sequence of the operation time of the completion of the node execution in the second exercise data and the operation time of the completion of each execution, the exercise data node is subjected to the back-off processing to carry out the back-off processing on each exercise data node; adding the back-off processed drilling global transaction management node into a global transaction management node cluster of a service tenant, and adding each back-off processed drilling data node into a data node cluster of the service tenant; wherein, an inverse operation may refer to an operation that is inverse to the execution logic of the operation; illustratively, if the operation is to modify the a-service data stored in the exercise data node to B-service data, the inverse operation is to modify the B-service data to a-service data.
It can be understood that by adopting the above technical scheme, data generated by the exercise global transaction processing node and the exercise data node in the process of performing exercise on the target database service are cleared, so that the exercise global transaction processing node and the exercise data node are retracted to a state before being taken out from a service tenant, then the retracted exercise global transaction management node is added into a global transaction management node cluster of the service tenant, and each exercise data node after the retraction is added into a data node cluster of the service tenant, thereby avoiding the influence of the exercise data generated in the exercise process on the normal execution of the target database service, and improving the execution stability of the target database service.
In a specific embodiment, the first exercise data and the second exercise data may be stored in a preset database, so as to save data generated in the exercise process of the target database service, so that a subsequent technician can analyze and process the performance and stability of the target database service.
Optionally, before adding the rolled-back drilling global transaction management node to the global transaction management node cluster of the service tenant, and adding each rolled-back drilling data node to the data node cluster of the service tenant, the method further includes: taking the operation record data before the first rollback mark in the operation record log of the exercise global transaction management node as first historical data, and taking the operation record data before the second rollback mark in the operation record log of the exercise data node as second historical data; determining operation record data after first historical data in operation record logs of any global transaction management node of a service tenant as determination first record data; for each drilling data node, determining the operation record data after the second history data in the operation record log of any data node in the data node cluster corresponding to the drilling data node as determined second record data; the first record data is synchronized into the running record log of the drilling global transaction management node, and each second record data is synchronized into the running record log of the corresponding drilling data node.
In this embodiment, the operation record data before the first rollback identifier in the operation record log of the exercise global transaction management node is used as the first history data, and the operation record data before the second rollback identifier in the operation record log of the exercise data node is used as the second history data; acquiring an operation record log of any global transaction management node of a service tenant, and determining operation record data after first historical data in the acquired operation record log as determined first record data; the first record data is synchronized into a running record log of the drilling global transaction management node.
Aiming at each drilling data node, according to the cluster identifier of the drilling data node, acquiring an operation record log of any data node in a data node cluster corresponding to the drilling data node, and determining operation record data after second history data in the acquired operation record log as determined second record data; and synchronizing the second record data into an operation record log of the drilling data node.
In an optional embodiment, the first record data is synchronized to the operation record log of the drilling global transaction management node, and each second record data is synchronized to the operation record log of the corresponding drilling data node, so that the drilling global transaction management node can execute the operation in the first record data, and the drilling global transaction management node is kept consistent with the global transaction management node in the service tenant; and enabling each drilling data node to execute the operation in the second record data so as to enable each drilling data node to keep data consistency with any data node in a corresponding data node cluster in the service tenant.
It can be understood that, in the present embodiment, when the exercise tenant performs the exercise process of the target database service, the target database service may still be executed by the service tenant, so as to provide the executable target database service to the outside; by adopting the technical scheme, the data generated by the global transaction management node in the service tenant of the target database service can be synchronized to the drilling global transaction management node in the drilling process of the target database service, and the data generated by the data node in the service tenant can be synchronized to the drilling data node, so that the drilling global transaction management node keeps data consistency with the global transaction management node in the service tenant, and each drilling data node keeps data consistency with any data node in a corresponding data node cluster in the service tenant, and after the drilling global transaction management node and the drilling data node return the service tenant, the normal execution of the target database service is not influenced, and the execution stability of the target database service is improved.
According to the technical scheme, after the drilling is finished, the drilling global transaction management node is added to the global transaction management node cluster of the service tenant, each drilling data node is added to the data node cluster of the corresponding service tenant, the number of nodes occupied by the service tenant is recovered, and therefore stability of target database service execution and efficiency of target database service execution are improved.
Example IV
Fig. 4 is a schematic structural diagram of a service testing device according to a fourth embodiment of the present invention. The embodiment of the invention can be suitable for the condition of performing exercise test on database business, the device can execute a business test method, the business test device can be realized in a hardware and/or software form, and the device can be configured in electronic equipment, such as a server.
Referring to the test apparatus of the service shown in fig. 4, it includes a node cluster determining module 401, a first node determining module 402, a second node determining module 403, and a service exercise module 404, wherein,
the node cluster determining module 401 is configured to obtain a global transaction management node cluster of at least one service tenant of the target database service and at least one data node cluster of the service tenant;
A first node determining module 402, configured to, for each service tenant, take out, from the global transaction management node cluster, an exercise global transaction management node of the service tenant corresponding to the exercise tenant, and take out, from each data node cluster, an exercise data node of the exercise tenant according to a node parameter of the global transaction management node in the global transaction management node cluster of the service tenant and a node parameter of a data node in each data node cluster of the service tenant;
a second node determining module 403, configured to take out an exercise computing node of the exercise tenant from each computing node according to a node parameter of each computing node in the computing node cluster;
and the business exercise module 404 is configured to exercise the target database business according to the exercise global transaction management node, the exercise data node and the exercise calculation nodes of each exercise tenant.
The embodiment of the invention obtains a global transaction management node cluster of at least one service tenant of a target database service and at least one data node cluster of the service tenant through a node cluster determining module; taking out the drilling global transaction management node of the drilling tenant corresponding to the service tenant from the global transaction management node cluster according to the node parameters of the global transaction management node in the global transaction management node cluster of the service tenant and the node parameters of the data nodes in the data node clusters of the service tenant and taking out the drilling data node of the drilling tenant from the data node clusters by the first node determining module; taking out the exercise computing nodes of the exercise tenant from the computing nodes according to the node parameters of the computing nodes in the computing node cluster through a second node determining module; and through the business exercise module, the target database business is exercised according to the exercise global transaction management node, the exercise data node and the exercise calculation nodes of each exercise tenant. According to the technical scheme, the global transaction management node cluster and the data node cluster of each service tenant of the target database service can be taken out, the global transaction management node and the drilling data node of the service tenant corresponding to the drilling tenant are taken out, the drilling computing node of the drilling tenant is taken out from the computing node cluster, and further the drilling test is carried out on the target database service through the drilling tenant.
Optionally, the node parameters of the global transaction management node and the node parameters of the data node include a node position and at least one availability index;
a first node determination module 402 comprising:
the node combination construction unit is used for constructing at least one candidate node combination according to each global transaction management node in the global transaction management node cluster and the data nodes in each data node cluster; wherein the candidate node combination comprises a global transaction management node and at least one data node; the data node clusters to which each data node in the candidate node combination belongs are different;
the candidate category determining unit is used for constructing at least one candidate node combination category according to the node position of the global transaction management node and the node position of each data node in each candidate node combination;
an auxiliary category determining unit, configured to count the number of candidate node combinations in each candidate node combination category, and determine, as an auxiliary node combination category, a candidate node combination category with the largest number of candidate node combinations;
a target node combination determining unit, configured to determine a target node combination from the auxiliary node combinations according to the availability index of the global transaction management node and the availability index of the data node in each auxiliary node combination, determine the global transaction management node in the target node combination as an exercise global transaction management node, and determine each data node in the target node combination as an exercise data node; wherein the auxiliary node combination is a candidate node combination in the auxiliary node combination class;
And the exercise node extraction unit is used for extracting the exercise global transaction management nodes from the global transaction management nodes and extracting the exercise data nodes from the data node clusters.
Optionally, the target node combination determining unit includes:
the first probability determination subunit is used for determining the availability probability of the global transaction management node in the auxiliary node combination according to the availability index of the global transaction management node in the auxiliary node combination for each auxiliary node combination;
the second probability determination subunit is used for determining the available probability of the data nodes in the auxiliary node combination according to the availability index of the data nodes in the auxiliary node combination;
the third probability determining subunit is used for determining the available probability of the auxiliary node combination according to the available probability of the global transaction management node in the auxiliary node combination and the available probability of the data node in the auxiliary node combination;
and the target node combination determining subunit is used for determining the auxiliary node combination with the highest availability as the target node combination.
Optionally, the node parameters of the computing node include a node position and a node service type;
the second node determining module 403 includes:
The auxiliary node determining unit is used for determining at least one auxiliary computing node according to the service type of the target database service and the node service type of each computing node;
and the target node determining unit is used for determining the exercise calculation node from the auxiliary calculation nodes according to the node positions of the auxiliary calculation nodes, the node positions of the exercise global transaction management nodes and the node positions of the exercise data nodes.
Optionally, the service testing device further includes:
the node adding module is used for adding the drilling global transaction management node into the global transaction management node cluster of the service tenant, and adding each drilling data node into the data node cluster of the corresponding service tenant.
Optionally, the service testing device further includes:
the first identification adding module is used for adding a first rollback identification at the end position of the running record log of the drilling global transaction management node;
the second identification adding module is used for adding a second rollback identification at the end position of the operation record log of the drilling data node;
correspondingly, the node adding module comprises:
the exercise data determining unit is used for taking the operation record data after the first rollback mark in the operation record log of the exercise global transaction management node as first exercise data and taking the operation record data after the second rollback mark in the operation record log of the exercise data node as second exercise data;
The back-off processing unit is used for carrying out back-off processing on the drilling global transaction management node according to the first drilling data and carrying out back-off processing on each drilling data node according to the second drilling data;
the node adding unit is used for adding the back-off processed drilling global transaction management node into the global transaction management node cluster of the service tenant, and adding each back-off processed drilling data node into the data node cluster of the service tenant.
Optionally, the service testing device further includes:
the history data determining unit is used for taking the operation record data before the first rollback mark in the operation record log of the exercise global transaction management node as first history data and taking the operation record data before the second rollback mark in the operation record log of the exercise data node as second history data;
a first data determining unit, configured to determine, as determining first record data, operation record data after first history data in operation record logs of any global transaction management node of a service tenant;
the second data determining unit is used for determining, for each drilling data node, the operation record data after the second history data in the operation record log of any data node in the data node cluster corresponding to the drilling data node as determined second record data;
And the data synchronization unit is used for synchronizing the first recorded data to the operation record log of the exercise global transaction management node and synchronizing the second recorded data to the operation record log of the corresponding exercise data node.
The service testing device provided by the embodiment of the invention can execute the service testing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the service testing method.
Example five
Fig. 5 shows a schematic diagram of an electronic device 500 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 500 includes at least one processor 501, and a memory communicatively connected to the at least one processor 501, such as a Read Only Memory (ROM) 502, a Random Access Memory (RAM) 503, etc., where the memory stores computer programs executable by the at least one processor, and the processor 501 may perform various suitable actions and processes according to the computer programs stored in the Read Only Memory (ROM) 502 or the computer programs loaded from the storage unit 508 into the Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 may also be stored. The processor 501, ROM 502, and RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in electronic device 500 are connected to I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, etc.; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508 such as a magnetic disk, an optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 501 performs the various methods and processes described above, such as the testing method of traffic.
In some embodiments, the method of testing a business may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into RAM 503 and executed by processor 501, one or more steps of the testing method of the business described above may be performed. Alternatively, in other embodiments, processor 501 may be configured to perform the testing method of the traffic in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a testing device for a general purpose computer, special purpose computer, or other programmable services, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS (Virtual Private Server ) service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for testing a service, the method comprising:
acquiring a global transaction management node cluster of at least one service tenant of a target database service and at least one data node cluster of the service tenant;
for each service tenant, according to node parameters of a global transaction management node in a global transaction management node cluster of the service tenant and node parameters of data nodes in each data node cluster of the service tenant, taking out an exercise global transaction management node of an exercise tenant corresponding to the service tenant from the global transaction management node cluster, and taking out an exercise data node of the exercise tenant from each data node cluster;
According to node parameters of all computing nodes in the computing node cluster, taking out the drilling computing nodes of the drilling tenant from all the computing nodes;
and according to the drilling global transaction management node, the drilling data node and the drilling calculation node of each drilling tenant, drilling the target database service.
2. The method of claim 1, wherein the node parameters of the global transaction management node and the node parameters of the data node include a node location and at least one availability indicator;
according to the node parameters of the global transaction management node in the global transaction management node cluster of the service tenant and the node parameters of the data nodes in each data node cluster of the service tenant, the exercise global transaction management node of the exercise tenant corresponding to the service tenant is taken out from the global transaction management node cluster, and the exercise data node of the exercise tenant is taken out from each data node cluster, comprising:
constructing at least one candidate node combination according to each global transaction management node in the global transaction management node cluster and the data nodes in each data node cluster; wherein the candidate node combination comprises a global transaction management node and at least one data node; the data node clusters to which each data node in the candidate node combination belongs are different;
Classifying each candidate node combination according to the node position of the global transaction management node and the node position of each data node in each candidate node combination to obtain at least one candidate node combination category;
counting the number of candidate node combinations in each candidate node combination category, and determining the candidate node combination category with the largest number of candidate node combinations as an auxiliary node combination category;
determining a target node combination from all the auxiliary node combinations according to the availability indexes of the global transaction management nodes and the availability indexes of the data nodes in the auxiliary node combinations, determining the global transaction management nodes in the target node combination as exercise global transaction management nodes, and determining the data nodes in the target node combination as exercise data nodes; wherein the auxiliary node combination is a candidate node combination in the auxiliary node combination class;
and extracting the drilling global transaction management node from each global transaction management node, and extracting the drilling data node from each data node cluster.
3. The method of claim 2, wherein determining the target node combination from each of the auxiliary node combinations based on the availability index of the global transaction management node and the availability index of the data node in each of the auxiliary node combinations comprises:
For each auxiliary node combination, determining the availability probability of the global transaction management node in the auxiliary node combination according to the availability index of the global transaction management node in the auxiliary node combination;
determining the availability probability of the data nodes in the auxiliary node combination according to the availability index of the data nodes in the auxiliary node combination;
determining the available probability of the auxiliary node combination according to the available probability of the global transaction management node in the auxiliary node combination and the available probability of the data node in the auxiliary node combination;
and determining the auxiliary node combination with the highest availability as a target node combination.
4. The method of claim 2, wherein the node parameters of the computing node include node location and node traffic type; determining the drilling computing node of the drilling tenant according to the node parameters of each computing node in the computing node cluster, including:
determining at least one auxiliary computing node according to the service type of the target database service and the node service type of each computing node;
and determining exercise calculation nodes from the auxiliary calculation nodes according to the node positions of the auxiliary calculation nodes, the node positions of the exercise global transaction management nodes and the node positions of the exercise data nodes.
5. The method of claim 1, further comprising, after the exercise of the target database business according to the exercise global transaction management node, the exercise data node, and the exercise calculation node of each of the exercise tenants:
adding the drilling global transaction management node into a global transaction management node cluster of the service tenant, and adding each drilling data node into a corresponding data node cluster of the service tenant.
6. The method of claim 5, further comprising, prior to drilling the target database business according to the drilling global transaction management node, drilling data node, and drilling computing node of each drilling tenant:
adding a first rollback identification at the end position of an operation record log of the drilling global transaction management node;
adding a second rollback identification at the end position of the operation record log of the drilling data node;
correspondingly, the adding the drilling global transaction management node to the global transaction management node cluster of the service tenant, and adding each drilling data node to the corresponding data node cluster of the service tenant includes:
Taking the operation record data after the first rollback mark in the operation record log of the exercise global transaction management node as first exercise data, and taking the operation record data after the second rollback mark in the operation record log of the exercise data node as second exercise data;
performing rollback processing on the exercise global transaction management node according to the first exercise data, and performing rollback processing on each exercise data node according to the second exercise data;
and adding the back-off processed drilling global transaction management node into the global transaction management node cluster of the service tenant, and adding each back-off processed drilling data node into the data node cluster of the corresponding service tenant.
7. The method of claim 6, further comprising, prior to adding the rollback processed drilling global transaction management node to the service tenant global transaction management node cluster and adding each rollback processed drilling data node to the corresponding service tenant data node cluster:
taking the operation record data before a first rollback mark in the operation record log of the exercise global transaction management node as first historical data, and taking the operation record data before a second rollback mark in the operation record log of the exercise data node as second historical data;
Determining operation record data after first historical data in operation record logs of any global transaction management node of the service tenant as determination first record data;
for each drilling data node, determining the operation record data after the second history data in the operation record log of any data node in the data node cluster corresponding to the drilling data node as determined second record data;
and synchronizing the first recorded data to the running record log of the drilling global transaction management node, and synchronizing each second recorded data to the running record log of the corresponding drilling data node.
8. A device for testing a service, the device comprising:
the node cluster determining module is used for acquiring a global transaction management node cluster of at least one service tenant of the target database service and at least one data node cluster of the service tenant;
a first node determining module, configured to, for each service tenant, take out, from a global transaction management node cluster of the service tenant, an exercise global transaction management node of the corresponding exercise tenant of the service tenant according to a node parameter of a global transaction management node in the global transaction management node cluster of the service tenant and a node parameter of a data node in each data node cluster of the service tenant, and take out an exercise data node of the exercise tenant from each data node cluster;
The second node determining module is used for taking out the exercise computing nodes of the exercise tenant from the computing nodes according to the node parameters of the computing nodes in the computing node cluster;
and the business exercise module is used for carrying out exercise on the target database business according to the exercise global transaction management node, the exercise data node and the exercise calculation nodes of each exercise tenant.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of testing of a service according to any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to execute the method of testing the service of any one of claims 1-7.
CN202410003168.1A 2024-01-02 2024-01-02 Service testing method, device, equipment and medium Pending CN117806969A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410003168.1A CN117806969A (en) 2024-01-02 2024-01-02 Service testing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410003168.1A CN117806969A (en) 2024-01-02 2024-01-02 Service testing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117806969A true CN117806969A (en) 2024-04-02

Family

ID=90433568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410003168.1A Pending CN117806969A (en) 2024-01-02 2024-01-02 Service testing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117806969A (en)

Similar Documents

Publication Publication Date Title
CN116049146B (en) Database fault processing method, device, equipment and storage medium
CN116225769B (en) Method, device, equipment and medium for determining root cause of system fault
CN115099175A (en) Method and device for acquiring time sequence netlist, electronic equipment and storage medium
CN114547069A (en) Data query method and device, electronic equipment and storage medium
CN115794473A (en) Root cause alarm positioning method, device, equipment and medium
CN116204522A (en) Data auditing method and device, electronic equipment and storage medium
CN114896418A (en) Knowledge graph construction method and device, electronic equipment and storage medium
CN117806969A (en) Service testing method, device, equipment and medium
CN115687406A (en) Sampling method, device and equipment of call chain data and storage medium
CN114443493A (en) Test case generation method and device, electronic equipment and storage medium
CN116127882B (en) Hierarchical logic synthesis method, device, equipment and storage medium
CN116662788B (en) Vehicle track processing method, device, equipment and storage medium
CN116186549B (en) Model training method, device, equipment and medium
CN118012936A (en) Data extraction method, device, equipment and storage medium
CN116150031A (en) Program performance test early warning method, device, equipment and storage medium
CN117041182A (en) Main server node selection method, device, equipment and medium of distributed component
CN117194435A (en) Index data updating method, device, equipment and storage medium
CN117493062A (en) System stability evaluation method, device, equipment and storage medium
CN118520092A (en) Complaint event processing method and device, electronic equipment and storage medium
CN118568087A (en) Operation sequencing result generation method, device, equipment and storage medium
CN117687816A (en) Service reliability evaluation method, device, equipment and storage medium
CN117331924A (en) Data model matching degree checking method, device, equipment and storage medium
CN117453746A (en) Method, device, equipment and medium for data cycle screening
CN117609311A (en) Service degradation method, device, equipment and storage medium
CN117668113A (en) Data synchronization method, device, equipment and medium

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