Migration method and device of structural unit, storage medium and electronic device

By migrating the structural units of the first parallel coupler to the second parallel coupler before isolation maintenance and processing them differently according to the structural unit type, the problem of structural unit migration affecting system availability in the prior art is solved, achieving efficient migration without downtime and improving system availability and user experience.

CN117194386BActive Publication Date: 2026-03-24CHINA CONSTRUCTION BANK
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-18
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies, centralized migration operations during structural unit migration negatively impact system online transaction performance and reduce system availability, and there is a lack of effective solutions.

Method used

By migrating the structural units of the first parallel coupler to the second parallel coupler before isolation maintenance, and by differentiating the structural unit types, including migration strategies for cache types and list types, and by utilizing backup databases and write mode adjustments, a migration process without downtime can be achieved.

Benefits of technology

It improved system availability, reduced the impact of structural unit migration on online transactions, reduced the impact of cross-parallel coupler migration on system services, and enhanced user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117194386B_ABST
    Figure CN117194386B_ABST
Patent Text Reader

Abstract

The application discloses a migration method and device of a structure unit, a storage medium and an electronic device. The method comprises the following steps: determining a first parallel coupler which has completed isolation maintenance, and determining a second parallel coupler; wherein the first parallel coupler migrates all structure units contained in the first parallel coupler to the second parallel coupler before isolation maintenance; determining a target structure unit of a target structure unit type from structure units contained in the second parallel coupler, wherein the target structure unit type at least comprises one of the following: a cache type and a list type; and migrating the target structure unit to the first parallel coupler, wherein the first parallel coupler and the second parallel coupler after the target structure unit is migrated are used to provide data access services. The technical problem of how to migrate the structure unit without affecting the system availability is solved by using the technical solution.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of structural unit migration, and in particular, to a structural unit migration method and device, a storage medium, and an electronic device. BACKGROUND

[0002] Currently, the traditional maintenance method of a parallel coupler of a host platform is to empty all structural units in the parallel coupler to be maintained and then perform a planned maintenance operation such as hardware upgrade. This usually involves centralized processing of all structural units in the parallel coupler within a change window, that is, first migrating all structural units distributed in the parallel coupler to be maintained to another parallel coupler, and then performing an "incorporation" operation on the structural units that have been migrated to the other parallel coupler, where incorporation refers to back migration of the structural units. However, the incorporation operation is also a centralized back migration, which affects the online transaction performance of the system and even reduces the availability of the system during structural unit migration.

[0003] For the technical problem of how to migrate structural units without affecting the availability of the system in the related art, no effective solution has been proposed so far.

[0004] Therefore, it is necessary to improve the related art to overcome the defects in the related art. SUMMARY

[0005] Embodiments of the present application provide a structural unit migration method and device, a storage medium, and an electronic device to at least solve the technical problem of how to migrate structural units without affecting the availability of the system.

[0006] According to an aspect of embodiments of the present application, a structural unit migration method is provided, including: determining a first parallel coupler that has completed isolation maintenance, and determining a second parallel coupler; wherein the first parallel coupler migrates all structural units contained in the first parallel coupler to the second parallel coupler before performing isolation maintenance; determining a target structural unit of a target structural unit type from the structural units contained in the second parallel coupler, wherein the target structural unit type includes at least one of the following: a cache type and a list type; and migrating the target structural unit to the first parallel coupler, wherein the first parallel coupler and the second parallel coupler after the target structural unit is migrated are used to provide data access services.

[0007] In an example embodiment, the migrating the target structure unit to the first parallel coupler comprises: determining a cache type structure unit from the target structure unit if it is determined that the target structure unit type of the target structure unit contains the cache type; determining a first backup database established for the cache type structure unit in the second parallel coupler if it is determined that the current write mode of the cache type structure unit is the quasi-synchronous double write mode; updating the first backup database to a second master database if it is determined that all cache type structure units in the first master database have been migrated to the first backup database, and determining a second backup database created for the second master database in the first parallel coupler, and migrating all cache type structure units in the second master database to the second backup database.

[0008] In an example embodiment, the determining the first backup database established for the cache type structure unit in the second parallel coupler if it is determined that the current write mode of the cache type structure unit is the quasi-synchronous double write mode comprises: obtaining a first mode identifier of the cache type structure unit, wherein the first mode identifier is used to indicate the single write mode of the cache type structure unit; controlling the second mode identifier to take effect after modifying the first mode identifier to a second mode identifier by invoking a first start instruction, wherein the second mode identifier is used to indicate the quasi-synchronous double write mode of the cache type structure unit, and the first start instruction is used to start the current write mode of the cache type structure unit; and creating a data backup space corresponding to the first master database in the second parallel coupler if the current write mode of the cache type structure unit is the quasi-synchronous double write mode, and determining the data backup space as the first backup database.

[0009] In an example embodiment, the updating the first backup database to a second master database comprises: modifying the current write mode of the cache type structure unit from the quasi-synchronous double write mode to other write modes according to a control instruction if it is determined that the current write mode of the cache type structure unit is the quasi-synchronous double write mode; controlling the first backup database to stop data backup from the first master database; discarding data in the first master database, and determining the first backup database as the second master database to provide data access services using data in the second master database.

[0010] In an example embodiment, determining the second standby database created for the second master database in the first parallel coupler comprises: modifying the current write mode of the cache type structure unit from other write modes to the quasi-synchronous double write mode according to a second start instruction, wherein the second start instruction is used to start the quasi-synchronous double write mode of the cache type structure unit; creating a data backup space corresponding to the second master database in the first parallel coupler when the current write mode of the cache type structure unit is the quasi-synchronous double write mode, and determining the data backup space as the second standby database.

[0011] In an example embodiment, migrating the target structure unit to the first parallel coupler comprises: determining a cache type structure unit from the target structure unit when it is determined that the target structure unit type of the target structure unit contains the cache type; determining a third master database established for the cache type structure unit in the second parallel coupler when it is determined that the current write mode of the cache type structure unit is the quasi-synchronous double write mode; migrating all cache type structure units in the third master database to a third standby database created for the third master database in the first parallel coupler.

[0012] In an example embodiment, migrating the target structure unit to the first parallel coupler comprises: determining a list type structure unit from the target structure unit when it is determined that the target structure unit type of the target structure unit contains the list type; determining a fourth master database established for the list type structure unit in the second parallel coupler and a fourth standby database established for the list type structure unit in the first parallel coupler; migrating the list type structure unit of the fourth master database to the fourth standby database according to the binding relationship between the fourth master database and the fourth standby database in response to a third start instruction; and wherein the third start instruction is used to start the migration operation of the list type structure unit.

[0013] In an example embodiment, determining the fourth standby database established for the list type structure unit in the first parallel coupler comprises: determining a preset migration order of the list type structure unit in the fourth master database; determining a migration serial number of each of the first parallel couplers in the preset migration order for a plurality of first parallel couplers; and determining the standby database in the first parallel coupler with the largest migration serial number as the fourth standby database.

[0014] In an example embodiment, the migrating the target structure unit to the first parallel coupler comprises: monitoring a service throughput of the second parallel coupler when providing the data access service; in a case that the service throughput is determined to be less than a service throughput threshold, if it is determined that a service time when the second parallel coupler provides the data access service belongs to a preset time period, migrating, according to a structure unit type, a target structure unit contained in the second parallel coupler to the first parallel coupler.

[0015] According to another aspect of the embodiments of the present application, a structure unit migration apparatus is further provided, comprising: a first determination module configured to determine a first parallel coupler that has completed isolation maintenance, and a second parallel coupler that has backed up structure units contained in the first parallel coupler; wherein the first parallel coupler migrates the structure units contained in the first parallel coupler to the second parallel coupler before the isolation maintenance; a second determination module configured to determine a target structure unit having a target structure unit type from the structure units contained in the second parallel coupler, wherein the target structure unit type comprises at least one of: a cache type and a list type; and a migration module configured to migrate the target structure unit to the first parallel coupler, so as to use the first parallel coupler and the second parallel coupler to provide a data access service.

[0016] According to still another aspect of the embodiments of the present application, a computer readable storage medium is further provided, and the computer readable storage medium stores a computer program, wherein the computer program is configured to execute the structure unit migration method when running.

[0017] According to still another aspect of the embodiments of the present application, an electronic device is further provided, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the structure unit migration method through the computer program.

[0018] This application identifies a first parallel coupler that has completed isolation maintenance and a second parallel coupler. Before isolation maintenance, all structural units contained in the first parallel coupler are migrated to the second parallel coupler. Target structural units of a specific type are determined from the structural units contained in the second parallel coupler, and the target structural unit type includes at least one of the following: cache type, list type. These target structural units are then migrated to the first parallel coupler. After the migration of the target structural units, both the first and second parallel couplers provide data access services. Using this technical solution, structural units distributed in a single parallel coupler can be migrated to a parallel coupler that has completed isolation maintenance according to their structural unit type. This allows for the integration of parallel couplers that have completed isolation maintenance without system downtime. From the perspective of structural unit type, this solves the technical problem in related technologies of how to migrate structural units without affecting system availability, improves system availability, reduces the impact of centralized migration of structural units across parallel couplers on online transactions, reduces the impact of structural unit migration on system services, and improves user experience. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and, together with the description thereof, serve to explain this application and do not constitute an undue limitation thereof. In the drawings:

[0020] Figure 1 This is a schematic diagram illustrating the principle of the migration process of structural units according to an embodiment of this application;

[0021] Figure 2 This is a flowchart of a method for migrating structural units according to an embodiment of this application;

[0022] Figure 3 This is a schematic flowchart of a structural unit migration method according to an embodiment of this application;

[0023] Figure 4 This is a schematic diagram illustrating the data access service provided by a lock type structure unit according to an embodiment of this application;

[0024] Figure 5 This is a schematic diagram illustrating the migration principle of the cache type structure unit according to an embodiment of this application;

[0025] Figure 6 This is a schematic flowchart (I) illustrating the migration of cache type structure units according to an embodiment of this application;

[0026] Figure 7This is a schematic flowchart (II) illustrating the migration of cache type structure units according to an embodiment of this application;

[0027] Figure 8 This is a structural block diagram of a migration device for structural units according to an embodiment of this application. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0029] It should be noted that the terms and terms such as "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] The methods and embodiments provided in this application can be executed in a host cluster. Taking running on a host cluster as an example, Figure 1 This is a schematic diagram illustrating the migration process of structural units according to an embodiment of this application. Two parallel couplers, CF1 and CF2, are configured on the host cluster. Figure 1 The first parallel coupler and the second parallel coupler are shown. Before isolation maintenance, the first parallel coupler migrates all the structural units contained in the first parallel coupler to the second parallel coupler. After the isolation maintenance of the first parallel coupler is completed, the second parallel coupler and the first parallel coupler can be merged. Specifically, according to the structural unit type, some structural units of the second parallel coupler (such as cache type structural units and list type structural units) are migrated back to the first parallel coupler. In this way, the impact on online transactions during structural unit migration can be reduced.

[0031] Optionally, the isolation maintenance process of the first parallel coupler can be performed manually, and this application does not impose any restrictions on this.

[0032] Optionally, the process of migrating all structural units contained in the first parallel coupler to the second parallel coupler before performing isolation maintenance may include, for example, migrating preset structural units contained in the first parallel coupler to the second parallel coupler according to structural unit type, wherein the structural unit type includes at least one of the following: lock type, cache type, list type. If it is determined that all the preset structural units have been migrated to the second parallel coupler, the second parallel coupler is used to replace the first parallel coupler to provide data access services.

[0033] This embodiment provides a method for migrating structural units. Figure 2 This is a flowchart of a structural unit migration method according to an embodiment of this application, which includes the following steps:

[0034] Step S202: Identify the first parallel coupler that has completed isolation maintenance, and identify the second parallel coupler; wherein, before performing isolation maintenance, all structural units contained in the first parallel coupler are migrated to the second parallel coupler.

[0035] Step S204: Determine the target structural unit type from the structural units contained in the second parallel coupler, wherein the target structural unit type includes at least one of the following: cache type, list type;

[0036] Step S206: The target structural unit is migrated to the first parallel coupler, wherein the first parallel coupler and the second parallel coupler after the target structural unit is migrated are used to provide data access services.

[0037] Through the above steps, a first parallel coupler that has completed isolation maintenance and a second parallel coupler can be identified. Before isolation maintenance, all structural units contained in the first parallel coupler are migrated to the second parallel coupler. From the structural units contained in the second parallel coupler, target structural units of a specific type are determined, wherein the target structural unit type includes at least one of the following: cache type, list type. The target structural units are then migrated to the first parallel coupler. After the migration of the target structural units, the first and second parallel couplers are used to provide data access services. Using this technical solution, structural units distributed in a single parallel coupler can be migrated to a parallel coupler that has completed isolation maintenance according to their structural unit type. This allows for the integration process of a parallel coupler that has completed isolation maintenance without system downtime. From the perspective of structural unit type, this solves the technical problem of migrating structural units without affecting system availability, improves system availability, reduces the impact of centralized migration of structural units across parallel couplers on online transactions, reduces the impact of structural unit migration on system services, and improves user experience.

[0038] Optionally, in an exemplary embodiment, the method further includes: determining other structural units (e.g., lock-type structural units) besides the target structural unit from the structural units included in the second parallel coupler; if it is determined that the ratio of system computing resources occupied during the migration of other structural units is greater than a preset threshold, it is confirmed that the lock-type structural units have a significant impact on online transactions during migration, and in this case, other structural units are not migrated back; if it is determined that the ratio of system computing resources occupied during the migration of other structural units is less than a preset threshold, then the other structural units are migrated back. The migration method can refer to the list-type structural units, which will not be elaborated here.

[0039] In an exemplary embodiment, to better understand the implementation process of migrating the target structural unit to the first parallel coupler in step S206 above, the following steps are specifically proposed: Step S11, if it is determined that the target structural unit type of the target structural unit includes the cache type, a cache type structural unit is determined from the target structural unit; Step S12, if it is determined that the current write mode of the cache type structural unit is a quasi-synchronous dual-write mode, a first backup database established for the cache type structural unit in the second parallel coupler and a first primary database established for the cache type structural unit in the first parallel coupler are determined; Step S13, if it is determined that all cache type structural units in the first primary database have been migrated to the first backup database, the first backup database is updated to the second primary database, and a second backup database created for the second primary database in the first parallel coupler is determined, and all cache type structural units in the second primary database are migrated to the second backup database.

[0040] In an exemplary embodiment, the technical solution for determining the first backup database to be established for the cache type structure unit within the second parallel coupler when the current write mode of the cache type structure unit is determined to be a quasi-synchronous dual-write mode in step S12 above specifically includes the following steps: Step S21, obtaining the first mode identifier of the cache type structure unit, wherein the first mode identifier is used to represent the single-write mode of the cache type structure unit; Step S22, after modifying the first mode identifier to a second mode identifier, controlling the second mode identifier to take effect by calling a first enable instruction, wherein the second mode identifier is used to represent the quasi-synchronous dual-write mode of the cache type structure unit, and the first enable instruction is used to enable the current write mode of the cache type structure unit; Step S23, when the current write mode of the cache type structure unit is a quasi-synchronous dual-write mode, creating a data backup space corresponding to the first primary database within the second parallel coupler, and determining the data backup space as the first backup database.

[0041] The current write mode of the cache type structure unit activated by the first enable instruction can be understood as a quasi-synchronous dual-write mode.

[0042] Optionally, after the data backup space is designated as the first backup database, the first primary database provides services to the outside world.

[0043] In an exemplary embodiment, the implementation process of updating the first backup database to the second primary database in step S13 above includes the following steps: Step S31, when it is determined that the current write mode of the cache type structure unit is a quasi-synchronous dual-write mode, the current write mode of the cache type structure unit is changed from the quasi-synchronous dual-write mode to another write mode according to the control instruction; Step S32, the first backup database is controlled to stop backing up data from the first primary database; Step S33, the data in the first primary database is discarded, and the first backup database is determined as the second primary database so as to provide data access services using the data in the second primary database.

[0044] Optionally, the other write modes mentioned above refer to write modes other than the quasi-synchronous dual write mode, such as single write mode or dual write mode.

[0045] In an exemplary embodiment, the technical solution for determining the second backup database created for the second primary database within the first parallel coupler in step S13 above further includes the following implementation steps: Step S41, modifying the current write mode of the cache type structure unit from other write modes to quasi-synchronous dual-write mode according to the second enable instruction, wherein the second enable instruction is used to enable the quasi-synchronous dual-write mode of the cache type structure unit; Step S42, when the current write mode of the cache type structure unit is quasi-synchronous dual-write mode, creating a data backup space corresponding to the second primary database within the first parallel coupler, and determining the data backup space as the second backup database.

[0046] In one exemplary embodiment, another process for migrating the target structural unit to the first parallel coupler in step S206 is further proposed, specifically including: step S51, if it is determined that the target structural unit type of the target structural unit includes the cache type, a cache type structural unit is determined from the target structural unit; step S52, if it is determined that the current write mode of the cache type structural unit is a quasi-synchronous dual-write mode, a third primary database established for the cache type structural unit in the second parallel coupler is determined; step S53, a third backup database created for the third primary database in the first parallel coupler is determined, and all cache type structural units in the third primary database are migrated to the third backup database.

[0047] In an exemplary embodiment, the migration of the target structural unit to the first parallel coupler can also be achieved through other technical solutions, specifically as follows: If it is determined that the target structural unit type of the target structural unit includes the list type, a list type structural unit is determined from the target structural unit; a fourth primary database established for the list type structural unit in the second parallel coupler and a fourth backup database established for the list type structural unit in the first parallel coupler are determined; in response to a third enable instruction, the list type structural units of the fourth primary database are migrated to the fourth backup database according to the binding relationship between the fourth primary database and the fourth backup database; wherein, the third enable instruction is used to enable the migration operation of the list type structural unit.

[0048] In an exemplary embodiment, the implementation process of determining the fourth backup database established for the list-type structure unit within the first parallel coupler is further described. The implementation steps include: step S61, determining the preset migration order corresponding to the list-type structure unit within the fourth master database; step S62, for multiple first parallel couplers, determining the migration sequence number of each of the multiple first parallel couplers in the preset migration order; step S63, determining the backup database in the first parallel coupler with the largest migration sequence number as the fourth backup database.

[0049] In an exemplary embodiment, for the technical solution of migrating the target structural unit to the first parallel coupler in step S206 above, the following implementation steps are further proposed: Step S71, monitor the service throughput of the second parallel coupler when providing data access services; Step S72, if it is determined that the service throughput is less than the service throughput threshold, and if it is determined that the service time when the second parallel coupler provides data access services belongs to a preset time period, then the target structural unit contained in the second parallel coupler is migrated to the first parallel coupler according to the structural unit type.

[0050] Optionally, in an exemplary embodiment, the process of migrating the target structural unit to the first parallel coupler in step S206 above specifically includes: classifying the target structural unit into multiple groups of structural units according to the target structural unit type, wherein each group of structural units corresponds to a structural unit type; determining the unit order among the multiple structural units contained in each group of structural units for each group of structural units; migrating each group of structural units according to the unit order, wherein the time interval between the multiple structural units contained in each group of structural units during migration is greater than a preset value.

[0051] In this embodiment, taking the cache type structure unit as an example, all cache type structure units can be executed in a serial order, and the interval of the migration command for each cache type structure unit can be set to at least 1 second.

[0052] Optionally, in an exemplary embodiment, the process of migrating the target structural unit to the first parallel coupler may further include: monitoring the service throughput of the second parallel coupler when providing data access services; if it is determined that the service throughput is less than a service throughput threshold, and if it is determined that the service time when the second parallel coupler provides data access services belongs to a preset time period, then the preset structural units contained in the second parallel coupler are migrated to the first parallel coupler according to the structural unit type. If neither the service throughput is less than the service throughput threshold nor the service time when the second parallel coupler provides data access services belongs to a preset time period is met, then the preset structural units contained in the second parallel coupler are not migrated.

[0053] The aforementioned preset time period is, for example, the low business hours between 11 p.m. and 4 a.m., but is not limited to this.

[0054] Obviously, the embodiments described above are only some embodiments of this application, and not all embodiments. To better understand the migration method of the above structural units, the following description, in conjunction with embodiments, illustrates the process, but is not intended to limit the technical solutions of the embodiments of this application. Specifically:

[0055] In an optional embodiment, Figure 3 This is a schematic flowchart of the structural unit migration method according to an embodiment of this application. The following is in conjunction with... Figure 3 The method for migrating structural units in this embodiment is explained as follows: Figure 3 As shown, the specific steps are as follows:

[0056] Step S301: Maintain the lock type structure unit without adjustment. For example, do not perform a migration operation on the global lock GRS ISGLOCK structure unit of the host cluster system that has been migrated due to the need for parallel coupler isolation, and do not perform a migration operation on the lock type structure unit DB2 LOCK1 used by the database, so as to avoid the possible impact on online transactions caused by the lock type structure unit during the migration process.

[0057] Step S302: Swap the distribution positions of the cache type structure units in the parallel coupler.

[0058] Because the distribution of the global lock GRS ISGLOCK structure unit and the lock type structure unit DB2 LOCK1 used by the database in the host cluster system has changed, the distribution of the primary and backup copies of the cache type structure unit needs to be swapped during the migration of the cache type structure unit, so as to ensure the load balance of access by the two parallel couplers in the host cluster.

[0059] Step S303: Perform a migration back for list-type structural units. The list-type structural units that migrated during parallel coupler maintenance are migrated back according to their distribution order within the parallel coupler (i.e., the preset migration order mentioned above).

[0060] By following the steps above, the migration method of centrally migrating back all types of structural units of the parallel coupler that has completed maintenance can be changed to a migration method based on structural unit type. This can reduce the impact of centrally migrating all structural units in the entire parallel coupler on online transactions.

[0061] Optionally, in one embodiment, to reduce the impact of the lock type structure unit DB2 LOCK1 used for database migration during parallel coupler merging on online transactions, a migration operation is not performed on the lock type structure unit DB2 LOCK1 during parallel coupler merging. In this embodiment, the state of DB2 LOCK1 after parallel coupler merging is as follows: Figure 4 As shown. During the parallel coupler isolation phase, the original primary replica is discarded, and the original backup replica becomes the new primary replica to provide services. At this time, multiple service virtual machines in the host cluster access the new primary replica to provide service support. Furthermore, the write mode of the lock structure unit after the isolation operation has been restored to the normal single-write (SIMPLEX) mode. During the parallel coupler merging phase, there are no operations on the DB2 LOCK1 lock type structure unit used by the database.

[0062] Similarly, the global lock type structure unit GRS ISGLOCK in the host cluster system will no longer be migrated back, which can further reduce the impact on mutual exclusion access requirements such as file access that may be caused by migrating back GRS ISGLOCK.

[0063] Optionally, in one embodiment, the distribution of structural units can be adjusted based on the objectives of minimizing the impact of structural unit migration operations on online transactions of the system and maintaining load balancing of the parallel coupler during structural unit migration operations, such as... Figure 5As shown, this specifically includes: no longer migrating back the lock-type structure unit of the second parallel coupler to reduce the impact on online transactions during the migration process; for the cache-type structure unit of the second parallel coupler, after establishing a backup copy and completing data synchronization, swapping the distribution positions of the primary copy and the backup copy in the parallel coupler, so that the usage load of the two parallel couplers reaches a stable level.

[0064] In one embodiment, the migration process of the cache type structure unit is as follows: Figure 6 As shown, the specific steps are as follows:

[0065] Step 1: Allocate a copy of the cache type structure unit within the newly incorporated parallel coupler: First, restore the double-write mode of the cache type structure unit: "SETXCF START, REBUILD, DUPLEX, STRNM = GBPx";

[0066] Specifically, the recovery operation of the GBPx double-write mode of the cache type structure unit is realized by calling the START option of the SETXCF command.

[0067] Step 2: Establish quasi-synchronous dual-write between the primary and backup copies of the cache structure unit. This step is automatically implemented by the system upon receiving the command from the previous step, without manual intervention.

[0068] Among them, the step of the business virtual machine using the original primary replica before being incorporated into the parallel coupler to provide services to the outside world is automatically implemented by the system receiving the command in the previous step, without manual intervention.

[0069] Step 3: Next, stop the dual-write mode of this cache type structure unit, and turn the current backup copy into the primary copy. The system accesses the new primary copy (i.e., the second primary database) to provide services to the outside world: "SETXCF STOP, REBUILD, DUPLEX, STRNM=GBPx, KEEP=NEW".

[0070] The STOP option of the SETXCF command is used to stop the DUPLEX function. STRNM=GPBx represents the name of the GBP structure unit that implements the stop of the DUPLEX function, and KEEP=NEW means to retain the backup copy in the current dual-write mode and discard the primary copy in the original dual-write mode.

[0071] The operation of discarding the primary copy of the cache type structure unit is automatically implemented by the system without manual intervention.

[0072] The operation of providing services to the outside world by using the new primary replica of the cache structure unit for business virtual machines is automatically implemented by the system without manual intervention.

[0073] It should be noted that discarding a cached type structure unit master copy operation is transparent to the operation of online transactions and has little impact.

[0074] Subsequently, the USER-MANAGED Duplexing mode of the cache type structure unit is restored, and the backup copy of the cache type structure unit is allocated in the parallel coupler where the original primary copy of the cache type structure unit is located: First, the USER-MANAGED Duplexing mode of the cache type structure unit is restored: "SETXCF START, REBUILD, DUPLEX, STRNM = GBPx".

[0075] Specifically, the recovery operation of the GBPx double-write mode of the cache type structure unit is realized by calling the START option of the SETXCF command.

[0076] The step of establishing quasi-synchronous dual-write between the primary and backup copies of the cache structure unit is automatically implemented by the system upon receiving the command from the previous step, without manual intervention.

[0077] Among them, the step of the business virtual machine using the original primary replica before being incorporated into the parallel coupler to provide services to the outside world is automatically implemented by the system receiving the command in the previous step, without manual intervention.

[0078] Thus, through the above steps, the migration process of a cache type structural unit is achieved by swapping the distribution positions of the primary and backup copies of a cache type structural unit in two parallel couplers.

[0079] Optionally, in one embodiment, the migration process of the cache type structural unit is as follows: Figure 7 As shown, the specific steps are as follows:

[0080] Step 1: Restore the dual-write mode of the cache type structure unit and allocate a copy of the cache type structure unit within the newly incorporated parallel coupler:

[0081] "SETXCF START, REBUILD, DUPLEX, STRNM=GBPx";

[0082] Specifically, the recovery operation of the GBPx double-write mode of the cache type structure unit is realized by calling the START option of the SETXCF command.

[0083] Step 2: Establish quasi-synchronous dual-write between the primary and backup copies of the cache structure unit.

[0084] Step 3 is the process of using the original primary replica of the virtual machine before it is merged into the parallel coupler to provide services to the outside world.

[0085] Steps 2-3 can be automatically implemented by the system receiving the command from the previous step, without human intervention.

[0086] Thus, through the above steps, by swapping the distribution positions of the primary and backup copies of a cache-type structural unit in two parallel couplers, the migration process of the cache-type structural unit is realized. This solves the problem of uneven access load on the two parallel couplers caused by the change in the distribution positions of lock-type structural units ISGLOCK and DB2 LOCK1, thereby achieving load balancing of the parallel couplers before and after isolation and merging operations, and improving the system's availability during structural unit migration.

[0087] Optionally, in one embodiment, the migration process of a list-type structural unit will not affect the operation of online transactions, and the distribution position of the list-type structural units will not be adjusted. In this embodiment, the migration of a list-type structural unit is achieved by the following command:

[0088] "SETXCF START,REBUILD,STRNM=IXCSTRx,LOCATOIN=NORMAL";

[0089] Specifically, the START option of the SETXCF command is used to perform a migration operation on the list-type structure unit IXCSTRx. LOCATION=NORMAL means that the list-type structure unit is moved from the current parallel coupler to the original distributed parallel coupler.

[0090] Optionally, during the backhaul of list-type structural units, they can be backhauled to a preferred parallel coupler in the order of the list-type structural units PREFLIST(CF1, CF2) for distribution.

[0091] Optionally, in one embodiment, migration operations can be performed sequentially on all list-type structural units in the same host cluster, controlling the interval between migration commands for each list-type structural unit to be at least 1 second, ensuring that multiple list-type structural units do not migrate simultaneously, reducing the impact of the migration process on services. This embodiment comprehensively considers the type characteristics of different structural units, the impact of migration operations on online transactions, and the load differences between the two parallel couplers whose distribution changes due to isolation operations, taking into account the load balancing requirements of the parallel couplers and improving the high availability of the host cluster.

[0092] In one embodiment, the original maintenance strategy based on the perspective of the parallel coupler can be adjusted to a more refined maintenance strategy based on the structural units used by the distributed host cluster within the parallel coupler, thereby solving the problem of transaction performance degradation caused by centralized processing of all types of structural units within the parallel coupler.

[0093] In the process of isolating parallel couplers, differentiated migration measures are taken for structural units in parallel couplers according to lock type, cache type, and list type. This solves the impact on online transaction performance caused by the migration operation required for different types of structural units due to parallel coupler isolation, and minimizes the impact of migration operations of different types of structural units on online services.

[0094] In the process of merging parallel couplers, differentiated migration measures are adopted for structural units in the parallel coupler according to lock type, cache type, and list type. This solves the impact on online transaction performance caused by the migration operation required for different types of structural units due to the merging of parallel couplers. At the same time, it takes into account the load balancing requirements of all types of structural units in the parallel coupler during normal operation after migration, thereby improving the high availability of the system.

[0095] Optionally, in one embodiment, the centralized processing method is changed to a processing method based on the structural unit type during the isolation phase and the merging phase of the parallel coupler. This can solve the problem of online transaction response time jitter caused during centralized migration, and the isolation and merging operations in the maintenance work of the parallel coupler can be realized without downtime.

[0096] In this embodiment, during the isolation process of the parallel coupler, the differentiated migration measures for the structural units in the parallel coupler according to lock type, cache type, and list type may specifically include:

[0097] 1. By adjusting the lock type structure unit from the normally deployed single-write mode to the quasi-synchronous dual-write mode, the problem of decreased online transaction performance caused by excessive CPU utilization due to maintaining the quasi-synchronous dual-write mode during operation is avoided.

[0098] 2. During the off-peak business period before the maintenance of the first parallel coupler where the lock type structure unit is located, the lock type structure unit is actively adjusted to quasi-synchronous dual-write mode to realize the creation of the backup copy of structure unit DB2 LOCK1 and the data synchronization between the primary copy and the backup copy in advance.

[0099] 3. Then, the lock type structure unit of the first parallel coupler is migrated to the second parallel coupler. During the migration, the primary copy or backup copy is retained to continue providing services to the outside world, thereby reducing the impact of the migration operation of the lock type structure unit and optimizing the online service performance of the system during maintenance.

[0100] Optionally, in this embodiment, the differentiated migration measures for structural units in the parallel coupler based on lock type, cache type, and list type may further include:

[0101] 1. Deploy the cache type structure unit in synchronous dual-write mode;

[0102] 2. Migrate the cache type structure unit of the first parallel coupler to the second parallel coupler. During the migration, retain the primary or backup copy to continue providing services, reduce the impact of the migration operation of the lock type structure unit, and optimize the online service performance of the system during maintenance.

[0103] 3. During off-peak business hours, perform migration operations on cache type structural units;

[0104] 4. For migration operations of all cache type structural units in the same host cluster, a serial execution method is adopted, and the interval between migration commands of each cache type structural unit is controlled to be at least 1 second to ensure that multiple cache type structural units will not migrate at the same time.

[0105] Optionally, in this embodiment, the differentiated migration measures for structural units in the parallel coupler based on lock type, cache type, and list type may further include:

[0106] 1. Migrate the list-type structure unit of the first parallel coupler to the second parallel coupler;

[0107] 2. During off-peak business hours, perform migration operations on list-type structural units;

[0108] 3. Perform migration operations on all list-type structural units in the same host cluster in sequence, and control the interval between migration commands for each list-type structural unit to be at least 1 second to ensure that multiple list-type structural units do not migrate at the same time.

[0109] Specifically, during the integration process of the parallel coupler, differentiated migration measures are implemented for the structural units in the parallel coupler based on lock type, cache type, and list type. This is to ensure load balancing requirements for all types of structural units in the parallel coupler during normal operation after migration. In this embodiment, the differentiated migration measures for the structural units in the parallel coupler based on lock type, cache type, and list type may specifically include:

[0110] 1. Lock-type structural units that need to be migrated due to the isolation requirements of parallel couplers will no longer be migrated back, in order to avoid the possible impact on online transactions during the migration process.

[0111] 2. For the cache type structure unit GBP global buffer pool structure unit used by DB2 database, after establishing the backup copy and completing data synchronization, the distribution positions of the primary copy and the backup copy in the parallel coupler are swapped, so that the usage load of the two parallel couplers reaches a stable level.

[0112] Among them, during off-peak business hours, the cache type structure unit is migrated;

[0113] In this process, the migration operations of all cache type structural units in the host cluster are executed sequentially, and the interval between the migration commands of each cache type structural unit is controlled to be at least 1 second, so as to ensure that multiple cache type structural units will not migrate at the same time.

[0114] 3. The distribution of list-type structural units will not be adjusted;

[0115] Among them, during off-peak business hours, migration operations are performed on list-type structural units;

[0116] Specifically, migration operations are performed sequentially on all list-type structural units in the same host cluster, and the interval between migration commands for each list-type structural unit is controlled to be at least 1 second to ensure that multiple list-type structural units do not migrate simultaneously.

[0117] Through the above steps, since the migration and relocation operations of lock-type structural units have a significant impact on online transactions, the relocation operation of lock-type structural units is no longer performed during the parallel coupler merging process, reducing operational risks. During the relocation process of cache-type structural units, the distribution positions of the primary and backup replicas of the cache-type structural units are proactively swapped, taking into account the changes in the distribution positions of the lock-type structural units in the host cluster. This achieves the goal of load balancing of the parallel coupler after merging, improving the high availability of the system.

[0118] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0119] This embodiment also provides a structural unit migration device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.

[0120] Figure 8This is a structural block diagram of a migration device for structural units according to an embodiment of this application. The device includes:

[0121] The first determining module 802 is used to determine a first parallel coupler that has completed isolation maintenance, and a second parallel coupler for backing up the structural units contained in the first parallel coupler; wherein, before performing isolation maintenance, the first parallel coupler migrates all the structural units contained in the first parallel coupler to the second parallel coupler.

[0122] The second determining module 804 is configured to determine a target structural unit having a target structural unit type from the structural units contained in the second parallel coupler, wherein the target structural unit type includes at least one of the following: cache type, list type;

[0123] Migration module 806 is used to migrate the target structural unit to the first parallel coupler so as to provide data access services using the first parallel coupler and the second parallel coupler.

[0124] This application identifies a first parallel coupler that has completed isolation maintenance and a second parallel coupler. Before isolation maintenance, all structural units contained in the first parallel coupler are migrated to the second parallel coupler. Target structural units of a specific type are determined from the structural units contained in the second parallel coupler, and the target structural unit type includes at least one of the following: cache type, list type. These target structural units are then migrated to the first parallel coupler. After the migration of the target structural units, both the first and second parallel couplers provide data access services. Using this technical solution, structural units distributed in a single parallel coupler can be migrated to a parallel coupler that has completed isolation maintenance according to their structural unit type. This allows for the integration of parallel couplers that have completed isolation maintenance without system downtime. From the perspective of structural unit type, this solves the technical problem in related technologies of how to migrate structural units without affecting system availability, improves system availability, reduces the impact of centralized migration of structural units across parallel couplers on online transactions, reduces the impact of structural unit migration on system services, and improves user experience.

[0125] Optionally, in an exemplary embodiment, the migration module 806 is further configured to: determine other structural units (e.g., lock-type structural units) besides the target structural unit from the structural units included in the second parallel coupler; if it is determined that the ratio of system computing resources occupied during the migration of other structural units is greater than a preset threshold, it is confirmed that the lock-type structural units have a significant impact on online transactions during migration, and in this case, other structural units are not migrated back; if it is determined that the ratio of system computing resources occupied during the migration of other structural units is less than a preset threshold, then the other structural units are migrated back. The migration method can refer to the list-type structural units, which will not be described in detail here.

[0126] In an exemplary embodiment, the migration module 806 further includes: a first determining unit, configured to determine a cache type structural unit from the target structural unit when it is determined that the target structural unit type of the target structural unit includes the cache type; a second determining unit, configured to determine a first backup database established for the cache type structural unit in the second parallel coupler and a first primary database established for the cache type structural unit in the first parallel coupler when it is determined that the current write mode of the cache type structural unit is a quasi-synchronous dual write mode; and a first migration unit, configured to update the first backup database to a second primary database if it is determined that all cache type structural units in the first primary database have been migrated to the first backup database, and to determine a second backup database created for the second primary database in the first parallel coupler, and migrate all cache type structural units in the second primary database to the second backup database.

[0127] In an exemplary embodiment, the second determining unit is further configured to implement, through the following steps, a technical solution for determining a first backup database to be established for the cache type structure unit within the second parallel coupler when the current write mode of the cache type structure unit is determined to be a quasi-synchronous dual-write mode: Step S21, obtaining a first mode identifier of the cache type structure unit, wherein the first mode identifier is used to represent the single-write mode of the cache type structure unit; Step S22, after modifying the first mode identifier to a second mode identifier, controlling the second mode identifier to take effect by calling a first enable instruction, wherein the second mode identifier is used to represent the quasi-synchronous dual-write mode of the cache type structure unit, and the first enable instruction is used to enable the current write mode of the cache type structure unit; Step S23, when the current write mode of the cache type structure unit is a quasi-synchronous dual-write mode, creating a data backup space corresponding to the first primary database within the second parallel coupler, and determining the data backup space as the first backup database.

[0128] The current write mode of the cache type structure unit activated by the first enable instruction can be understood as a quasi-synchronous dual-write mode.

[0129] Optionally, after the data backup space is designated as the first backup database, the first primary database provides services to the outside world.

[0130] In an exemplary embodiment, the first migration unit described above is further configured to implement the process of updating the first backup database to the second primary database through the following steps: Step S31, when it is determined that the current write mode of the cache type structure unit is a quasi-synchronous dual-write mode, the current write mode of the cache type structure unit is modified from the quasi-synchronous dual-write mode to another write mode according to the control instruction; Step S32, the first backup database is controlled to stop backing up data from the first primary database; Step S33, the data in the first primary database is discarded, and the first backup database is determined as the second primary database so as to provide data access services using the data in the second primary database.

[0131] In an exemplary embodiment, the first migration unit described above is further configured to complete the technical solution of creating a second backup database for the second primary database within the first parallel coupler through the following steps: Step S41, modifying the current write mode of the cache type structure unit from other write modes to quasi-synchronous dual write mode according to a second enable instruction, wherein the second enable instruction is used to enable the quasi-synchronous dual write mode of the cache type structure unit; Step S42, when the current write mode of the cache type structure unit is quasi-synchronous dual write mode, creating a data backup space corresponding to the second primary database within the first parallel coupler, and determining the data backup space as the second backup database.

[0132] In an exemplary embodiment, the migration module 806 further includes: a third determining unit, configured to determine a cache type structure unit from the target structure unit when the target structure unit type of the target structure unit is determined to include the cache type; a fourth determining unit, configured to determine a third primary database established for the cache type structure unit in the second parallel coupler when the current write mode of the cache type structure unit is determined to be a quasi-synchronous dual-write mode; and a second migration unit, configured to determine a third backup database created for the third primary database in the first parallel coupler, and migrate all cache type structure units in the third primary database to the third backup database.

[0133] In an exemplary embodiment, the migration module 806 may further include: a fifth determining unit, configured to determine a list type structure unit from the target structure unit when it is determined that the target structure unit type of the target structure unit includes the list type; a sixth determining unit, configured to determine a fourth primary database established for the list type structure unit in the second parallel coupler, and a fourth backup database established for the list type structure unit in the first parallel coupler; and a third migration unit, configured to migrate the list type structure unit of the fourth primary database to the fourth backup database according to the binding relationship between the fourth primary database and the fourth backup database in response to a third enabling instruction; wherein the third enabling instruction is used to enable the migration operation of the list type structure unit.

[0134] In an exemplary embodiment, the sixth determining unit is further configured to describe the implementation process of determining the fourth backup database established for the list-type structure unit within the first parallel coupler through the following steps: Step S61, determining the preset migration order corresponding to the list-type structure unit within the fourth master database; Step S62, for the plurality of first parallel couplers, determining the migration sequence number of each of the plurality of first parallel couplers in the preset migration order; Step S63, determining the backup database in the first parallel coupler with the largest migration sequence number as the fourth backup database.

[0135] In an exemplary embodiment, the migration module 806 may further include: a monitoring unit for monitoring the service throughput of the second parallel coupler when providing data access services; and a fourth migration unit for migrating the target structural unit contained in the second parallel coupler to the first parallel coupler according to the structural unit type if it is determined that the service throughput is less than the service throughput threshold and the service time when the second parallel coupler provides data access services belongs to a preset time period.

[0136] Optionally, in an exemplary embodiment, the migration module 806 is further configured to: classify the target structural unit into multiple groups of structural units according to the target structural unit type, wherein each group of structural units corresponds to a structural unit type; determine the unit order among the multiple structural units contained in each group of structural units for each group of structural units; and migrate each group of structural units according to the unit order, wherein the time interval between the multiple structural units contained in each group of structural units during migration is greater than a preset value.

[0137] In this embodiment, taking the cache type structure unit as an example, all cache type structure units can be executed in a serial order, and the interval of the migration command for each cache type structure unit can be set to at least 1 second.

[0138] Optionally, in an exemplary embodiment, the migration module 806 is further configured to: monitor the service throughput of the second parallel coupler when providing data access services; and, if it is determined that the service throughput is less than a service throughput threshold, if it is determined that the service time during which the second parallel coupler provides data access services belongs to a preset time period, then migrate the preset structural units contained in the second parallel coupler to the first parallel coupler according to the structural unit type. If neither the service throughput is less than the service throughput threshold nor the service time during which the second parallel coupler provides data access services belongs to a preset time period is true, then the preset structural units contained in the second parallel coupler are not migrated.

[0139] The aforementioned preset time period is, for example, the low business hours between 11 p.m. and 4 a.m., but is not limited to this.

[0140] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the above embodiments when it is run.

[0141] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0142] S1, identify the first parallel coupler that has completed isolation maintenance, and identify the second parallel coupler; wherein, before performing isolation maintenance, all structural units contained in the first parallel coupler are migrated to the second parallel coupler.

[0143] S2, determine the target structural unit of the target structural unit type from the structural units contained in the second parallel coupler, wherein the target structural unit type includes at least one of the following: cache type, list type;

[0144] S3, migrate the target structural unit to the first parallel coupler, wherein the first parallel coupler and the second parallel coupler after the target structural unit is migrated are used to provide data access services.

[0145] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0146] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0147] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0148] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0149] S1, identify the first parallel coupler that has completed isolation maintenance, and identify the second parallel coupler; wherein, before performing isolation maintenance, all structural units contained in the first parallel coupler are migrated to the second parallel coupler.

[0150] S2, determine the target structural unit of the target structural unit type from the structural units contained in the second parallel coupler, wherein the target structural unit type includes at least one of the following: cache type, list type;

[0151] S3, migrate the target structural unit to the first parallel coupler, wherein the first parallel coupler and the second parallel coupler after the target structural unit is migrated are used to provide data access services.

[0152] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0153] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0154] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0155] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A method for migrating structural units, characterized in that, include: A first parallel coupler that has completed isolation maintenance is identified, and a second parallel coupler is identified; wherein, before performing isolation maintenance, all structural units contained in the first parallel coupler are migrated to the second parallel coupler. The target structural unit type is determined from the structural units contained in the second parallel coupler, wherein the target structural unit type includes at least one of the following: cache type, list type; The target structural unit is migrated to the first parallel coupler, wherein the first parallel coupler and the second parallel coupler after the target structural unit is migrated are used to provide data access services; Migrating the target structural unit to the first parallel coupler includes: If it is determined that the target structural unit type of the target structural unit contains the cache type, then the cache type structural unit is determined from the target structural unit; If the current write mode of the cache type structure unit is determined to be quasi-synchronous dual write mode, a first backup database is determined for the cache type structure unit in the second parallel coupler, and a first primary database is determined for the cache type structure unit in the first parallel coupler. If it is determined that all cache type structure units in the first primary database have been migrated to the first backup database, then the first backup database is updated to the second primary database, and the second backup database created for the second primary database in the first parallel coupler is determined, and all cache type structure units in the second primary database are migrated to the second backup database.

2. The method for migrating structural units according to claim 1, characterized in that, If the current write mode of the cache type structure unit is determined to be quasi-synchronous dual-write mode, then the first backup database established for the cache type structure unit within the second parallel coupler is determined, including: Obtain the first mode identifier of the cache type structure unit, wherein the first mode identifier is used to represent the single write mode of the cache type structure unit; After the first mode identifier is modified to the second mode identifier, the second mode identifier is controlled to take effect by calling the first enable instruction. The second mode identifier is used to represent the quasi-synchronous dual-write mode of the cache type structure unit, and the first enable instruction is used to enable the current write mode of the cache type structure unit. When the current write mode of the cache type structure unit is quasi-synchronous dual-write mode, a data backup space corresponding to the first primary database is created in the second parallel coupler, and the data backup space is determined as the first backup database.

3. The method for migrating structural units according to claim 1, characterized in that, Updating the first backup database to the second primary database includes: If the current write mode of the cache type structure unit is determined to be quasi-synchronous dual write mode, the current write mode of the cache type structure unit is changed from quasi-synchronous dual write mode to other write modes according to the control instruction. Control the first backup database to stop backing up data from the first primary database; The data in the first primary database is discarded, and the first backup database is designated as the second primary database so that data access services can be provided using the data in the second primary database.

4. The method for migrating structural units according to claim 1, characterized in that, The second backup database created within the first parallel coupler for the second primary database is identified, including: According to the second enable instruction, the current write mode of the cache type structure unit is changed from other write modes to quasi-synchronous dual write mode, wherein the second enable instruction is used to enable the quasi-synchronous dual write mode of the cache type structure unit. When the current write mode of the cache type structure unit is quasi-synchronous dual-write mode, a data backup space corresponding to the second primary database is created within the first parallel coupler, and the data backup space is determined as the second backup database.

5. The method for migrating structural units according to claim 1, characterized in that, Migrating the target structural unit to the first parallel coupler includes: If it is determined that the target structural unit type of the target structural unit contains the cache type, then the cache type structural unit is determined from the target structural unit; If the current write mode of the cache type structure unit is determined to be quasi-synchronous dual write mode, a third master database is determined to be established for the cache type structure unit within the second parallel coupler; The third backup database created for the third primary database within the first parallel coupler is identified, and all cache type structure units within the third primary database are migrated to the third backup database.

6. The method for migrating structural units according to claim 1, characterized in that, Migrating the target structural unit to the first parallel coupler includes: If it is determined that the target structural unit type of the target structural unit contains the list type, then the list type structural unit is determined from the target structural unit; A fourth primary database is established within the second parallel coupler for the list-type structure unit, and a fourth backup database is established within the first parallel coupler for the list-type structure unit. In response to the third enable command, the list-type structure unit of the fourth primary database is migrated to the fourth backup database according to the binding relationship between the fourth primary database and the fourth backup database; wherein, the third enable command is used to enable the migration operation of the list-type structure unit.

7. The method for migrating structural units according to claim 6, characterized in that, The fourth backup database established within the first parallel coupler for the list-type structure unit is determined, including: Determine the preset migration order corresponding to the list-type structural units within the fourth main database; For a plurality of first parallel couplers, determine the migration sequence number of each of the plurality of first parallel couplers in the preset migration order; The fourth backup database is determined from the backup database in the first parallel coupler with the largest migration sequence number.

8. The method for migrating structural units according to claim 1, characterized in that, Migrating the target structural unit to the first parallel coupler includes: Monitor the throughput of the second parallel coupler when providing data access services; If the service throughput is determined to be less than the service throughput threshold, and if the service time for which the data access service is provided by the second parallel coupler is determined to be within a preset time period, then the target structural unit contained in the second parallel coupler is migrated to the first parallel coupler according to the structural unit type.

9. A migration device for a structural unit, characterized in that, include: The first determining module is used to determine a first parallel coupler that has completed isolation maintenance, and a second parallel coupler for backing up the structural units contained in the first parallel coupler; wherein, before performing isolation maintenance, the first parallel coupler migrates all the structural units contained in the first parallel coupler to the second parallel coupler. The second determining module is configured to determine a target structural unit having a target structural unit type from the structural units contained in the second parallel coupler, wherein the target structural unit type includes at least one of the following: cache type, list type; A migration module is used to migrate the target structural unit to the first parallel coupler, so as to provide data access services using the first parallel coupler and the second parallel coupler; The migration module is further configured to: determine a cache type structure unit from the target structure unit if the target structure unit type includes the cache type; determine a first backup database established for the cache type structure unit in the second parallel coupler and a first primary database established for the cache type structure unit in the first parallel coupler if the current write mode of the cache type structure unit is determined to be a quasi-synchronous dual-write mode; if it is determined that all cache type structure units in the first primary database have been migrated to the first backup database, update the first backup database to the second primary database, determine a second backup database created for the second primary database in the first parallel coupler, and migrate all cache type structure units in the second primary database to the second backup database.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 8.

11. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 8 through the computer program.

Citation Information

Patent Citations

  • System high-availability drilling method and device, electronic equipment and storage medium

    CN115495269A