Arbitration control method, product, electronic equipment and storage medium
By selecting one of the multiple arbitration devices as the target arbitration device in the dual-active storage system and dynamically adjusting it to deal with communication loss problems, the design complexity and operational overhead problems caused by the arbitration device cluster in the dual-active storage system are solved, and the system's security and efficiency are improved.
Patent Information
- Application Number
- CN202510228168.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-02-28
AI Technical Summary
The use of a cluster of arbitration equipment in the dual-active storage system leads to the problem of increasing the design complexity and operational overhead of arbitration equipment instances.
When the arbitration device establishes a connection with the first storage site and the second storage site, one of the multiple arbitration devices connected simultaneously with the two storage sites is selected as the target arbitration device and the device is enabled for high-speed communication link failure arbitration to select the service takeover site. If communication is lost between the target arbitration device and the storage site, the device is disabled and the target arbitration device is reselected.
This avoids the situation where different storage sites enable different arbitration devices, which causes the two storage sites to send arbitration requests to different arbitration devices when links between storage sites fail, resulting in the situation where both sites take over. At the same time, the communication overhead of using the distributed consensus protocol framework between two independent storage sites is reduced, and the security in the activation process of arbitration devices is improved.
Smart Images

Figure CN119728701A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to an arbitration control method, product, electronic device and storage medium. Background Art
[0002] The active-active storage system consists of two storage sites. Data is synchronized between the two storage sites. The arbitration device maintains a connection with both sites. If a link failure occurs between the storage sites, both storage sites send arbitration requests to the arbitration device. The arbitration device will only return the result of successful arbitration to one of the storage sites. The storage site that obtains the successful arbitration result takes over the business, and the other storage site stops the business. In the existing technical solution, multiple arbitration devices are combined into a cluster, and the arbitration device cluster is connected to the two storage sites as a whole. At this time, the storage system only considers that there is one arbitration, and there is no problem of selecting the arbitration device instance. However, it is necessary to maintain a cluster on the arbitration device side, which greatly increases the design complexity and operation overhead of the arbitration device instance. Summary of the invention
[0003] The present application provides an arbitration control method, apparatus, electronic device and storage medium to at least solve the problem in the related art that an active-active storage system uses an arbitration device cluster, which increases the design complexity and operation overhead of arbitration device instances.
[0004] The present application provides an arbitration control method, comprising: Controlling the first storage site and the second storage site to be connected through a high-speed communication link for data synchronization, wherein the first storage site and the second storage site perform high-speed communication link failure arbitration through the same arbitration device to select a service takeover site; In response to the arbitration device establishing a connection with the first storage site and the second storage site, the first storage site and the second storage site exchange arbitration device connection status information, select one as a target arbitration device from a plurality of arbitration devices simultaneously connected to the first storage site and the second storage site, and enable the target arbitration device to perform high-speed communication link failure arbitration to select a service takeover site; In response to a communication loss between the target arbitration device and the first storage site and / or the second storage site, the target arbitration device is disabled and a target arbitration device is reselected.
[0005] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any one of the above arbitration control methods when executing the computer program.
[0006] The present application also provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of any one of the above arbitration control methods are implemented.
[0007] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above arbitration control methods when executed by a processor.
[0008] Through the present application, when the arbitration device establishes a connection with the first storage site and the second storage site, one arbitration device is selected from multiple arbitration devices simultaneously connected to the two storage sites as the target arbitration device, and the problem of increasing the design complexity and operation overhead of the arbitration device instance due to the use of an arbitration device cluster in the active-active storage system can be solved. Therefore, it can be avoided that different storage sites enable different arbitration devices, resulting in the two storage sites each sending arbitration requests to different arbitration devices when a link failure occurs between the storage sites, causing both sites to be taken over. At the same time, there can only be one arbitration device enabled by both storage sites, which avoids the communication overhead of using a distributed consensus protocol framework between two independent storage sites, and also improves the security of the arbitration device enabling process. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0010] Figure 1 A schematic diagram of the structure of connecting the arbitration device cluster to the existing active-active storage system; Figure 2 This is an application environment diagram of the arbitration control method in one embodiment of the present application; Figure 3 This is a flow chart of an arbitration control method in one embodiment of the present application; Figure 4 A timing diagram of a local arbitration device connection confirmation in one embodiment of the present application; Figure 5 A timing diagram of mutual notification of arbitration connection status in one embodiment of the present application; Figure 6 A timing diagram for enabling an arbitration device in one embodiment of the present application; Figure 7 A timing diagram of disabling an arbitration device in one embodiment of the present application; Figure 8 This is a structural block diagram of an arbitration control device in one embodiment of the present application; Fig. 9 This is a diagram of the internal structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0011] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0012] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0013] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0014] The active-active storage system consists of two storage clusters, which are also called storage sites or sites. The data of the two sites are synchronized, and can provide completely consistent data services to the front-end host. The master node of the site with the smaller serial number in the active-active storage cluster serves as the global master node. The master node is the node that undertakes the event function in the storage cluster. If all other nodes want to initiate a state change, they need to send the change event to the master node, which will be broadcast to all other nodes in the cluster to achieve state synchronization. The storage system is based on dedicated hardware of the storage server and provides storage services to the outside through a dedicated software stack. The storage cluster is composed of multiple storage system nodes. The control status of all nodes in the cluster remains consistent, so complete backup and takeover in the event of local node failure can be achieved. The state change of the storage cluster is triggered by events.
[0015] High availability is the core requirement of storage systems, and active-active storage systems are a storage system deployment method with extremely high availability. Active-active storage systems organize two storage sites distributed in two data centers into a whole, which jointly provide data read and write services to the front-end host. The host only needs to send a data write request to any one of the sites, and the active-active storage system will complete the data synchronization internally to ensure that the host accesses consistent data at any time. If any site fails or the communication link between the two sites is disconnected, data synchronization between the sites will no longer be possible. In order not to cause too much impact on data access, one site must smoothly take over all services.
[0016] A key requirement of an active-active storage system is to ensure that at most one site can be taken over when a site failure occurs. There is only one way of interaction between the two sites, which is communication. When the communication between the local site and the remote site is interrupted, the local site cannot distinguish whether it is a link failure between the sites or a remote site failure. Therefore, a third-party arbitration device must be used to assist in the selection of the arbitration device. The arbitration device maintains a connection with both sites. If a link failure between the sites occurs, both sites send arbitration requests to the arbitration device. The arbitration device will only return the result of successful arbitration to one of the sites. The site that receives the successful arbitration result takes over the business, and the other site stops the business.
[0017] The storage system should avoid single point failures as much as possible. To prevent the arbitration device from becoming a single point, multiple arbitration device instances need to be deployed so that there are sufficient backups when the arbitration device instance currently in use fails. To avoid different sites enabling different arbitration device instances, resulting in the two sites each sending arbitration requests to different arbitration devices when an inter-site link failure occurs, and both sites take over, only one arbitration device instance can be enabled by both sites at the same time.
[0018] like Figure 1 As shown, in the prior art solution, multiple arbitration devices are grouped into a cluster, and the arbitration device cluster establishes a connection with two storage sites as a whole. At this time, the storage system only considers that there is one arbitration, and there is no problem of selecting an arbitration device instance, but there is a greater operating overhead. The obvious disadvantage of the above solution is that it is necessary to maintain a cluster on the arbitration device side, which will greatly increase the design complexity and operating overhead of the arbitration device instance. In actual deployment, the arbitration device should be as simple and reliable as possible, and the deployment cost should be close to zero. If the arbitration cluster is to be maintained, channels and bandwidth resources must be reserved for communication between arbitration device instances. The actual deployment may not have such conditions, which limits the scope of use of the solution.
[0019] Making two sites recognize a certain arbitration device instance is essentially a cross-cluster consensus problem. The present invention provides a cross-cluster consensus reaching method, which can reach a weaker consensus between clusters under certain restrictions. As an application, the cross-site activation problem of arbitration devices is solved. The method can ensure the following two points when there are multiple arbitration device instances: only one arbitration device instance is activated by two sites at the same time; when the currently recognized arbitration device instance fails, it automatically switches to the next arbitration device instance.
[0020] The arbitration control method provided in this application can be applied to Figure 2 In the application environment shown. Among them, the active-active storage system includes a first storage site and a second storage site. Several arbitration devices at the first storage site and the second storage site constitute an arbitration control system. Each storage set site is composed of several nodes, and a consistency protocol is run internally. Each storage set site is one, and a consistent state can be reached internally. There is a high-speed communication link between the first storage site and the second storage site, which is used for active-active data synchronization and can also be used for state synchronization between sites, but the state consistency guarantee between sites is weaker than that within the site. Each node of the two storage sites has a general communication link with all arbitration devices (Q1, Q2, ..., Qn), which carries daily heartbeat IO and arbitration requests, and there is no interaction between arbitration devices. The arbitration device, the first storage site and the second storage site can be implemented with an independent server or a server cluster consisting of multiple servers.
[0021] In one embodiment, Figure 3 As shown, an arbitration control method is provided, comprising the following steps: Step S1, controlling the first storage site and the second storage site to be connected via a high-speed communication link for data synchronization, and the first storage site and the second storage site to perform high-speed communication link failure arbitration through the same arbitration device to select a service takeover site; Step S2, in response to the arbitration device establishing a connection with the first storage site and the second storage site, the first storage site and the second storage site exchange arbitration device connection status information, select one as a target arbitration device from a plurality of arbitration devices simultaneously connected to the first storage site and the second storage site, and enable the target arbitration device to perform high-speed communication link failure arbitration to select a service takeover site; Step S3: in response to a communication loss between the target arbitration device and the first storage site and / or the second storage site, disabling the target arbitration device and reselecting a target arbitration device.
[0022] Specifically, since when the arbitration device establishes a connection with the first storage site and the second storage site, one arbitration device is selected from multiple arbitration devices simultaneously connected to the two storage sites as the target arbitration device, and the problem of increased design complexity and operation overhead of arbitration device instances caused by the use of an arbitration device cluster in an active-active storage system can be solved, it can avoid that different storage sites enable different arbitration devices, resulting in the two storage sites each sending arbitration requests to different arbitration devices when a link failure occurs between the storage sites, causing both sites to be taken over. At the same time, there can only be one arbitration device enabled by both storage sites, which avoids the communication overhead of using a distributed consensus protocol framework between two independent storage sites, and also improves the security of the arbitration device enabling process.
[0023] like Figure 4 , Figure 5 As shown, in this embodiment, the first storage site and the second storage site exchange arbitration device connection status information, and select one of the multiple arbitration devices connected to the first storage site and the second storage site at the same time as the target arbitration device, including: Acquire a first master node and at least one first slave node of a first storage site, in response to the arbitration device establishing a connection with the first master node, the first master node initiates a connection establishment event, and the first slave node that receives the connection establishment event establishes a connection with the arbitration device; Acquire a second primary node and at least one second secondary node of the second storage site, in response to the arbitration device establishing a connection with the second primary node, the second primary node initiates a connection establishment event, and the second secondary node receiving the connection establishment event establishes a connection with the arbitration device; In response to the second primary node and the second secondary node of the second storage site establishing a connection with the arbitration device, the first storage site and the second storage site notify each other of the connection status, and determine whether the arbitration device connected to the first storage site and the second storage site is the same. If it is the same arbitration device, it is used as the target arbitration device.
[0024] It is understandable that there is no interaction between arbitration devices. Storage systems should avoid single point failures as much as possible. To prevent the arbitration device itself from becoming a single point, multiple arbitration devices need to be deployed so that there are sufficient backups when the arbitration device currently in use fails. In order to avoid different arbitration devices being enabled at different sites, resulting in the two sites each sending arbitration requests to different arbitration devices when an inter-site link failure occurs, and both sites take over, only one arbitration device can be enabled by both sites at the same time. Therefore, it is necessary to select one from the multiple arbitration devices simultaneously connected to the first storage site and the second storage site as the target arbitration device.
[0025] Among them, before the first master node and at least one first slave node of the first storage site and the second master node and at least one second slave node of the second storage site establish a connection with the arbitration device, the arbitration device connection can be implemented one by one in ascending or descending order of the ID of the arbitration device, and the arbitration device connected each time is the same.
[0026] like Figure 4 , Figure 5 As shown, in this embodiment, the first storage site and the second storage site exchange arbitration device connection status information, and selecting one of the multiple arbitration devices simultaneously connected to the first storage site and the second storage site as a target arbitration device also includes: The first main node is set to use an arbitration device connection bit array to count the connection status of the first main node and the first secondary node with the arbitration device. The second main node is set to use an arbitration device connection bit array to count the connection status of the second main node and the second secondary node with the arbitration device. According to the connection status, the arbitration device connection bit array includes a first bit array and a second bit array. The first bit array corresponds to the connection status of the first main node and the arbitration device and the connection status of the second main node and the arbitration device, and the second bit array corresponds to the connection status of the first secondary node and the arbitration device and the connection status of the second secondary node and the arbitration device. According to the connection status, the first value or the second value is filled in the first bit array and the second bit array. The first value represents the connected arbitration device, and the second value represents the unconnected arbitration device.
[0027] That is, the first bit array and the second bit array respectively correspond to the connection status of the first master node and the first slave node with the arbitration device, and the first bit array and the second bit array respectively correspond to the connection status of the second master node and the second slave node with the arbitration device.
[0028] Specifically, the arbitration device connection bit array can be represented by quorum_connected_bv. If the arbitration device is connected to a node in the first storage site or the second storage site, the bit corresponding to the node is set to 1, and the default is 0. That is, preferably, the first value is 1 and the second value is 0. By using the arbitration device connection bit array, the connection status of the first main node and the first secondary node with the arbitration device can be intuitively obtained. The second bit array is the value corresponding to the first secondary node. For example, if there is a first main node and n first secondary nodes in the first storage site, the arbitration device connection bit array includes a first bit array and n second bit arrays, and each second bit array corresponds to a first secondary node.
[0029] like Figure 4 As shown, in this embodiment, obtaining a first master node and at least one first slave node of a first storage site, in response to an arbitration device establishing a connection with the first master node, the first master node initiating a connection establishment event, and the first slave node receiving the connection establishment event establishing a connection with the arbitration device includes: In response to the arbitration device establishing a connection with the first master node, the arbitration device sends a connection establishment event to the first master node, changes the first bit array of the arbitration device connection bit array to a first value, the first master node submits the connection establishment event to the first secondary node, and the first master node modifies the connection state of the arbitration device to the first master node being connected to the arbitration device; In response to the arbitration device establishing a connection with the first secondary node, the first secondary node sends a connection establishment event to the first main node, the first main node changes the second bit array of the arbitration device connection bit array to a first value, the first main node submits the connection establishment event to the first secondary node, and the first main node modifies the connection status of the arbitration device to that the first secondary node is connected to the arbitration device.
[0030] Specifically, the quorum device connection status can be represented by quorum_connected, which is TRUE when all nodes in the first storage site or the second storage site are connected to the quorum device, otherwise it is FALSE. The quorum device connection status can intuitively show whether the first primary node and at least one first secondary node of the first storage site are connected to the quorum device.
[0031] like Figure 4 As shown, in this embodiment, obtaining a second primary node and at least one second secondary node of the second storage site, in response to the arbitration device establishing a connection with the second primary node, the second primary node initiating a connection establishment event, and the second secondary node receiving the connection establishment event establishing a connection with the arbitration device includes: In response to the arbitration device establishing a connection with the second master node, the arbitration device sends a connection establishment event to the second master node, changes the first bit array of the arbitration device connection bit array to the first value, the second master node submits the connection establishment event to the second slave node, and the second master node modifies the arbitration device connection state to the second master node being connected to the arbitration device; In response to the arbitration device establishing a connection with the second secondary node, the second secondary node sends a connection establishment event to the second main node, the second main node changes the second bit array of the arbitration device connection bit array to a first value, the second main node submits the connection establishment event to the second secondary node, and the second main node modifies the connection status of the arbitration device to the second secondary node being connected to the arbitration device.
[0032] The arbitration device connection status can intuitively display whether the second main node and at least one second secondary node of the second storage site are connected to the arbitration device. The second bit array is a value corresponding to the second secondary node. For example, if there is one second main node and n second secondary nodes in the second storage site, the arbitration device connection bit array includes one first bit array and n second bit arrays, and each second bit array corresponds to one second secondary node.
[0033] like Figure 5As shown, in this embodiment, in response to the second primary node and the second secondary node of the second storage site establishing a connection with the arbitration device, the first storage site and the second storage site notifying each other of the connection status includes: The first master node of the first storage site synchronizes the local arbitration connection state to the second master node of the second storage site, the second master node sends a remote site arbitration connection state change event, the second master node submits the remote site arbitration connection state change event to the second secondary node, and when the second secondary node receives the remote site arbitration connection state change event, it determines whether the arbitration device connection state has been modified to the second secondary node has been connected to the arbitration device, if so, it determines whether the arbitration device connection state has been modified to the second master node has been connected to the arbitration device, if so, the second storage site determines that the arbitration device is available; The second master node of the second storage site synchronizes the local arbitration connection status to the first master node of the first storage site, the first master node sends a remote site arbitration connection status change event, the first master node submits the remote site arbitration connection status change event to the first secondary node, and when the first secondary node receives the remote site arbitration connection status change event, it determines whether the arbitration device connection status has been modified to the first secondary node is connected to the arbitration device. If so, it determines whether the arbitration device connection status has been modified to the first master node is connected to the arbitration device. If so, the first storage site determines that the arbitration device is available.
[0034] Among them, by notifying the connection status between the first storage site and the second storage site, it is possible to determine whether the arbitration device is available in the first storage site and the second storage site one by one, and to accurately determine one of the multiple arbitration devices simultaneously connected to the first storage site and the second storage site as the target arbitration device.
[0035] like Figure 6 As shown, in this embodiment, enabling the target arbitration device includes: The first master node determines the activation state of the arbitration device, and ends the process if there is an active arbitration device, otherwise obtains the arbitration activation state change count value of the first master node and the arbitration activation state change count value of the first slave node; Determine whether the arbitration enabling state change count value of the first primary node is equal to the arbitration enabling state change count value of the first secondary node, and if they are equal, determine whether there is an available arbitration device; In response to the existence of an available arbitration device, obtaining the available arbitration device serial number, the first master node sending an arbitration enable event, the first master node setting the enable state of the arbitration device to active, increasing the arbitration enable state change count value of the first master node by one, and setting the active arbitration device address of the first master node to the available arbitration device serial number; The first master node submits an arbitration enable event to the first secondary node, the first secondary node sends the arbitration enable event, the first secondary node sets the enable state of the arbitration device to active, increases the arbitration enable state change count value of the first secondary node by one, and sets the active arbitration device address of the first secondary node to the available arbitration device serial number; The first master node sends an arbitration enable event to the second master node, the second master node sends an arbitration enable event, the second master node sets the enable state of the arbitration device to active, increases the arbitration enable state change count value of the second master node by one, and sets the active arbitration device address of the second master node to the available arbitration device serial number; The second master node submits an arbitration enable event to the second slave node, the second slave node sends an arbitration enable event, the second slave node sets the enable state of the arbitration device to active, increases the arbitration enable state change count value of the second slave node by one, and sets the active arbitration device address of the second slave node to the available arbitration device serial number.
[0036] Among them, the arbitration enablement state change count value of the first master node and the second master node can be represented by quorum_state_lvl, and the arbitration enablement state change count value of the first secondary node and the second secondary node can be represented by quorum_state_lvl_remote. The arbitration enablement state change count value is a monotonically increasing integer starting from 0, and a step increase occurs each time the arbitration enablement state changes (from disabled to enabled or from enabled to disabled). In this way, by comparing the values of quorum_state_lvl and quorum_state_lvl_remote in the first storage site to see if they are the same, it is possible to accurately determine whether the arbitration devices connected to the first master node and the first secondary node are the same, and by comparing the values of quorum_state_lvl and quorum_state_lvl_remote in the second storage site to see if they are the same, it is also possible to accurately determine whether the arbitration devices connected to the second master node and the second secondary node are the same.
[0037] like Figure 6 As shown, in this embodiment, the arbitration control method further includes: In response to the target arbitration device being enabled, the first master node sends its arbitration enabled state change count value to the second master node, and the second master node initiates a second secondary node arbitration enabled state change count value update event, setting the arbitration enabled state change count value of the second master node to be equal to the arbitration enabled state change count value of the second secondary node; The second master node sends its arbitration enabled state change count value to the first master node, and the first master node initiates the first secondary node arbitration enabled state change count value update event, setting the arbitration enabled state change count value of the first master node equal to the arbitration enabled state change count value of the first secondary node.
[0038] It is understandable that the present application uses the method of comparing whether the values of quorum_state_lvl and quorum_state_lvl_remote are the same to determine whether the arbitration devices connected to the first master node and the first slave node are the same, and whether the arbitration devices connected to the second master node and the second slave node are the same. Therefore, after the target arbitration device is enabled, it is necessary to promptly update the arbitration enabling state change count value of the second master node to be equal to the arbitration enabling state change count value of the second slave node, and update the arbitration enabling state change count value of the first master node to be equal to the arbitration enabling state change count value of the first slave node, so as to ensure the accuracy of the judgment.
[0039] like Figure 7 As shown, in this embodiment, if communication loss occurs between the target arbitration device and the first storage site and / or the second storage site, disabling the target arbitration device and reselecting the target arbitration device includes: Real-time detection of whether the first master node and the first slave node lose communication with the target arbitration device; In response to the first master node losing communication with the target arbitration device, the first master node sends an arbitration connection loss event, changes the first bit array of the arbitration device connection bit array to a second value, and the first master node modifies the arbitration device connection state to the first master node not being connected to the arbitration device; In response to the loss of communication between the first secondary node and the target arbitration device, the first secondary node sends an arbitration connection loss event to the first main node, changes the second bit array of the arbitration device connection bit array to a second value, the first main node modifies the arbitration device connection status to the first secondary node is not connected to the arbitration device, and the first main node submits the arbitration connection loss event to the first secondary node.
[0040] Specifically, the quorum device connection status can be represented by quorum_connected, which is TRUE when all nodes in the first storage site or the second storage site are connected to the quorum device, otherwise it is FALSE. The quorum device connection status can intuitively show whether the first primary node and at least one first secondary node of the first storage site are connected to the quorum device.
[0041] like Figure 7 As shown, in this embodiment, in response to a communication loss between the target arbitration device and the first storage site and / or the second storage site, disabling the target arbitration device and reselecting the target arbitration device includes: Real-time detection of whether the second primary node and the second secondary node lose communication with the target arbitration device; In response to the second master node losing communication with the target arbitration device, the second master node sends an arbitration connection loss event, changes the first bit array of the arbitration device connection bit array to a second value, the second master node modifies the arbitration device connection state to the second master node not being connected to the arbitration device, the second master node synchronizes the arbitration connection state with the first master node, and the first master node modifies the arbitration device connection state to the second master node not being connected to the arbitration device; In response to the loss of communication between the second secondary node and the target arbitration device, the second secondary node sends an arbitration connection loss event to the second master node, changes the second bit array of the arbitration device connection bit array to a second value, the second master node modifies the arbitration device connection status to the second secondary node is not connected to the arbitration device, the second master node submits the arbitration connection loss event to the second secondary node, the second master node synchronizes the arbitration connection status to the first master node, and the first master node modifies the arbitration device connection status to the second secondary node is not connected to the arbitration device.
[0042] When the communication of the target arbitration device is lost, the arbitration device connection bit array and the arbitration device connection state are modified in time, so that the state of the arbitration device communication loss can be intuitively displayed, and the target arbitration device can be disabled.
[0043] like Figure 7 As shown, in this embodiment, disabling the target arbitration device and reselecting the target arbitration device includes: Determine the activation status of the target arbitration device connected to the first storage site and the second storage site, and terminate if the target arbitration device is not activated; if the target arbitration device is activated, obtain the target arbitration device serial number; Determine whether the active arbitration device addresses of the first primary node and the first secondary node of the first storage site and the second primary node and the second secondary node of the second storage site are the target arbitration device serial numbers; if so, determine whether the arbitration enablement state change count value of the first primary node and the arbitration enablement state change count value of the first secondary node are the same; if they are the same, determine whether the arbitration enablement state change count value of the second primary node and the arbitration enablement state change count value of the second secondary node are the same; if they are the same, disable the target arbitration device in the first primary node and the first secondary node; in response to disabling the target arbitration device in the first primary node and the first secondary node, disable the target arbitration device in the second primary node and the second secondary node.
[0044] The target arbitration device serial number is active_quorum_id, which is the ID of the currently enabled arbitration. If there is no currently enabled arbitration device, the target arbitration device serial number is an invalid value. The target arbitration device can be accurately found according to the target arbitration device serial number to disable the target arbitration device. When disabling, first determine whether the disabling condition is met according to the arbitration enabled state change count value to ensure that the target arbitration device is disabled.
[0045] like Figure 7 As shown, in this embodiment, disabling the target arbitration device in the first master node and the first slave node includes: The first master node sends an arbitration disable event; The first master node submits an arbitration disable event to the first secondary node, the first secondary node sets the enable state of the arbitration device to inactive, increases the arbitration enable state change count value of the first secondary node by one, and changes the active arbitration device address of the first secondary node to an invalid sequence number; the first master node sets the enable state of the arbitration device to inactive, increases the arbitration enable state change count value of the first master node by one, and changes the active arbitration device address of the first master node to an invalid sequence number; The first master node synchronizes the arbitration disable event to the second master node.
[0046] The node synchronization arbitration disabling event in the first storage site can enable all nodes in the first storage site to completely disable the target arbitration device.
[0047] like Figure 7 As shown, in this embodiment, disabling the target arbitration device in the second primary node and the second secondary node includes: In response to the second master node receiving the arbitration disable event sent by the first master node, the second master node submits the arbitration disable event to the second secondary node, the second secondary node sets the enable state of the arbitration device to inactive, increases the arbitration enable state change count of the second secondary node by one, and changes the active arbitration device address of the second secondary node to an invalid serial number; the second master node sets the enable state of the arbitration device to inactive, increases the arbitration enable state change count of the second master node by one, and changes the active arbitration device address of the second master node to an invalid serial number.
[0048] The node synchronization arbitration disabling event in the second storage site can enable all nodes in the second storage site to completely disable the target arbitration device.
[0049] like Figure 7 As shown, in this embodiment, the arbitration control method further includes: In response to disabling the target arbitration device in the first storage site and the second storage site, the first master node sends its arbitration enable state change count value to the second master node, the second master node initiates a second secondary node arbitration enable state change count value update event, and sets the arbitration enable state change count value of the second master node to be equal to the arbitration enable state change count value of the second secondary node; The second master node sends its arbitration enabled state change count value to the first master node, and the first master node initiates the first secondary node arbitration enabled state change count value update event, setting the arbitration enabled state change count value of the first master node equal to the arbitration enabled state change count value of the first secondary node.
[0050] It is understandable that the present application adopts the method of comparing whether the values of quorum_state_lvl and quorum_state_lvl_remote are the same to determine whether the arbitration devices connected to the first master node and the first secondary node are the same, and whether the arbitration devices connected to the second master node and the second secondary node are the same. Therefore, after disabling the target arbitration device in the first storage site and the second storage site, it is necessary to promptly update the arbitration enablement state change count value of the second master node to be equal to the arbitration enablement state change count value of the second secondary node, and update the arbitration enablement state change count value of the first master node to be equal to the arbitration enablement state change count value of the first secondary node to ensure the accuracy of the judgment.
[0051] In this embodiment, the first storage site and the second storage site select a service takeover site through high-speed communication link failure arbitration using the same arbitration device, including: In response to a communication failure occurring in the high-speed communication link between the first storage site and the second storage site, the first storage site and the second storage site sending an arbitration request to the arbitration device; The arbitration device determines the winning storage site and returns a successful arbitration result to the winning storage site. The storage site that obtains the successful arbitration result takes over the business and continues to provide services, while the other storage site stops providing services.
[0052] By taking over the business based on the storage site that obtains the successful arbitration result and continuing to provide services, while the other storage site stops providing services, it is possible to avoid the situation where different storage sites enable different arbitration devices, resulting in the two storage sites each sending arbitration requests to different arbitration devices when a link failure occurs between the storage sites, causing both sites to be taken over.
[0053] In this embodiment, disabling the target arbitration device and reselecting the target arbitration device includes: In response to the target arbitration device being disabled, the arbitration devices connected to the first storage site and the second storage site are changed, and a new target arbitration device is selected from arbitration devices connected to the first storage site and the second storage site.
[0054] Combination Figure 2 , selecting a new target arbitration device after the target arbitration device is disabled can keep the arbitration device's function of controlling the first storage site and the second storage site intact.
[0055] Specifically, in response to the target arbitration device being disabled, changing the arbitration device connected to the first storage site and the second storage site, and selecting a new target arbitration device from the arbitration devices connected to the first storage site and the second storage site includes: Detecting whether the first storage site and the second storage site are connected to a new arbitration device, if so, the first storage site and the second storage site notify each other of the connection status; A new arbitration device connected to the first storage site and the second storage site is obtained, and it is determined whether the new arbitration device connected to the first storage site and the second storage site is the same. If the new arbitration device is the same, it is used as a new target arbitration device.
[0056] In the above arbitration control method, since one is selected as the target arbitration device from multiple arbitration devices simultaneously connected to the two storage sites when the arbitration device establishes a connection with the first storage site and the second storage site, and the problem of increasing the design complexity and operation overhead of the arbitration device instance due to the arbitration device cluster adopted in the active-active storage system can be solved, it can avoid that different storage sites enable different arbitration devices, resulting in the two storage sites sending arbitration requests to different arbitration devices respectively when a link failure occurs between the storage sites, causing both sites to be taken over. At the same time, there can be only one arbitration device enabled by both storage sites, which avoids the communication overhead of using a distributed consensus protocol framework between two independent storage sites, and also improves the security of the arbitration device enabling process.
[0057] It should be understood that although Figure 3-Figure 7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 3-Figure 7 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0058] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0059] like Figure 8 As shown, an embodiment of the present application further provides an arbitration control device, comprising: a service processing module 1, an arbitration device selection module 2, and an arbitration device disabling module 3.
[0060] The business processing module 1 is used to control the first storage site and the second storage site to synchronize data through a high-speed communication link connection. The first storage site and the second storage site perform high-speed communication link failure arbitration through the same arbitration device to select a business takeover site.
[0061] The arbitration device selection module 2 is used for selecting one as a target arbitration device from a plurality of arbitration devices simultaneously connected to the first storage site and the second storage site in response to the arbitration device establishing a connection with the first storage site and the second storage site, the first storage site and the second storage site exchanging arbitration device connection status information, and enabling the target arbitration device to perform high-speed communication link failure arbitration to select a service takeover site.
[0062] The arbitration device disabling module 3 is used for disabling the target arbitration device and reselecting the target arbitration device in response to a communication loss between the target arbitration device and the first storage site and / or the second storage site.
[0063] In this embodiment, the first storage site and the second storage site exchange arbitration device connection status information, and selecting one of the multiple arbitration devices simultaneously connected to the first storage site and the second storage site as a target arbitration device includes: Acquire a first master node and at least one first slave node of a first storage site, in response to the arbitration device establishing a connection with the first master node, the first master node initiates a connection establishment event, and the first slave node that receives the connection establishment event establishes a connection with the arbitration device; Acquire a second primary node and at least one second secondary node of the second storage site, in response to the arbitration device establishing a connection with the second primary node, the second primary node initiates a connection establishment event, and the second secondary node receiving the connection establishment event establishes a connection with the arbitration device; In response to the second primary node and the second secondary node of the second storage site establishing a connection with the arbitration device, the first storage site and the second storage site notify each other of the connection status, and determine whether the arbitration device connected to the first storage site and the second storage site is the same. If it is the same arbitration device, it is used as the target arbitration device.
[0064] In this embodiment, the first storage site and the second storage site exchange arbitration device connection state information, and selecting one of the multiple arbitration devices simultaneously connected to the first storage site and the second storage site as a target arbitration device further includes: Setting the first master node to use an arbitration device connection bit array to count the connection status of the first master node and the first secondary node with the arbitration device, the arbitration device connection bit array includes a first bit array and a second bit array according to the connection status, the first bit array and the second bit array respectively correspond to the connection status of the first master node and the first secondary node with the arbitration device, and the first value or the second value is filled in the first bit array and the second bit array according to the connection status, the first value represents the connected arbitration device, and the second value represents the unconnected arbitration device; The second main node is set to use an arbitration device connection bit array to count the connection status of the second main node and the second secondary node with the arbitration device. According to the connection status, the arbitration device connection bit array includes a first bit array and a second bit array. The first bit array and the second bit array correspond to the connection status of the second main node and the second secondary node with the arbitration device respectively. According to the connection status, the first value or the second value is filled in the first bit array and the second bit array. The first value represents a connected arbitration device, and the second value represents an unconnected arbitration device.
[0065] In this embodiment, obtaining a first master node and at least one first slave node of a first storage site, in response to an arbitration device establishing a connection with the first master node, the first master node initiating a connection establishment event, and the first slave node receiving the connection establishment event establishing a connection with the arbitration device includes: In response to the arbitration device establishing a connection with the first master node, the arbitration device sends a connection establishment event to the first master node, changes the first bit array of the arbitration device connection bit array to a first value, the first master node submits the connection establishment event to the first secondary node, and the first master node modifies the connection state of the arbitration device to the first master node being connected to the arbitration device; In response to the arbitration device establishing a connection with the first secondary node, the first secondary node sends a connection establishment event to the first main node, the first main node changes the second bit array of the arbitration device connection bit array to a first value, the first main node submits the connection establishment event to the first secondary node, and the first main node modifies the connection status of the arbitration device to that the first secondary node is connected to the arbitration device.
[0066] In this embodiment, obtaining a second primary node and at least one second secondary node of the second storage site, in response to the arbitration device establishing a connection with the second primary node, the second primary node initiating a connection establishment event, and the second secondary node receiving the connection establishment event establishing a connection with the arbitration device includes: In response to the arbitration device establishing a connection with the second master node, the arbitration device sends a connection establishment event to the second master node, changes the first bit array of the arbitration device connection bit array to the first value, the second master node submits the connection establishment event to the second slave node, and the second master node modifies the arbitration device connection state to the second master node being connected to the arbitration device; In response to the arbitration device establishing a connection with the second secondary node, the second secondary node sends a connection establishment event to the second main node, the second main node changes the second bit array of the arbitration device connection bit array to a first value, the second main node submits the connection establishment event to the second secondary node, and the second main node modifies the connection status of the arbitration device to the second secondary node being connected to the arbitration device.
[0067] In this embodiment, in response to the second primary node and the second secondary node of the second storage site establishing a connection with the arbitration device, the first storage site and the second storage site notifying each other of a connection status includes: The first master node of the first storage site synchronizes the local arbitration connection state to the second master node of the second storage site, the second master node sends a remote site arbitration connection state change event, the second master node submits the remote site arbitration connection state change event to the second secondary node, and when the second secondary node receives the remote site arbitration connection state change event, it determines whether the arbitration device connection state has been modified to the second secondary node has been connected to the arbitration device, if so, it determines whether the arbitration device connection state has been modified to the second master node has been connected to the arbitration device, if so, the second storage site determines that the arbitration device is available; The second master node of the second storage site synchronizes the local arbitration connection status to the first master node of the first storage site, the first master node sends a remote site arbitration connection status change event, the first master node submits the remote site arbitration connection status change event to the first secondary node, and when the first secondary node receives the remote site arbitration connection status change event, it determines whether the arbitration device connection status has been modified to the first secondary node is connected to the arbitration device. If so, it determines whether the arbitration device connection status has been modified to the first master node is connected to the arbitration device. If so, the first storage site determines that the arbitration device is available.
[0068] In this embodiment, enabling the target arbitration device includes: The first master node determines the activation state of the arbitration device, and ends the process if there is an active arbitration device, otherwise obtains the arbitration activation state change count value of the first master node and the arbitration activation state change count value of the first slave node; Determine whether the arbitration enabling state change count value of the first primary node is equal to the arbitration enabling state change count value of the first secondary node, and if they are equal, determine whether there is an available arbitration device; In response to the existence of an available arbitration device, obtaining the available arbitration device serial number, the first master node sending an arbitration enable event, the first master node setting the enable state of the arbitration device to active, increasing the arbitration enable state change count value of the first master node by one, and setting the active arbitration device address of the first master node to the available arbitration device serial number; The first master node submits an arbitration enable event to the first secondary node, the first secondary node sends the arbitration enable event, the first secondary node sets the enable state of the arbitration device to active, increases the arbitration enable state change count value of the first secondary node by one, and sets the active arbitration device address of the first secondary node to the available arbitration device serial number; The first master node sends an arbitration enable event to the second master node, the second master node sends an arbitration enable event, the second master node sets the enable state of the arbitration device to active, increases the arbitration enable state change count value of the second master node by one, and sets the active arbitration device address of the second master node to the available arbitration device serial number; The second master node submits an arbitration enable event to the second slave node, the second slave node sends an arbitration enable event, the second slave node sets the enable state of the arbitration device to active, increases the arbitration enable state change count value of the second slave node by one, and sets the active arbitration device address of the second slave node to the available arbitration device serial number.
[0069] In this embodiment, if Figure 8 As shown, the arbitration control device further includes an arbitration connection loss management module 4. The arbitration connection loss management module 4 is used for: In response to the target arbitration device being enabled, the first master node sends its arbitration enabled state change count value to the second master node, and the second master node initiates a second secondary node arbitration enabled state change count value update event, setting the arbitration enabled state change count value of the second master node to be equal to the arbitration enabled state change count value of the second secondary node; The second master node sends its arbitration enabled state change count value to the first master node, and the first master node initiates the first secondary node arbitration enabled state change count value update event, setting the arbitration enabled state change count value of the first master node equal to the arbitration enabled state change count value of the first secondary node.
[0070] In this embodiment, if communication loss occurs between the target arbitration device and the first storage site and / or the second storage site, disabling the target arbitration device and reselecting the target arbitration device includes: Real-time detection of whether the first master node and the first slave node lose communication with the target arbitration device; In response to the first master node losing communication with the target arbitration device, the first master node sends an arbitration connection loss event, changes the first bit array of the arbitration device connection bit array to a second value, and the first master node modifies the arbitration device connection state to the first master node not being connected to the arbitration device; In response to the loss of communication between the first secondary node and the target arbitration device, the first secondary node sends an arbitration connection loss event to the first main node, changes the second bit array of the arbitration device connection bit array to a second value, the first main node modifies the arbitration device connection status to the first secondary node is not connected to the arbitration device, and the first main node submits the arbitration connection loss event to the first secondary node.
[0071] In this embodiment, in response to a communication loss between the target arbitration device and the first storage site and / or the second storage site, disabling the target arbitration device and reselecting the target arbitration device includes: Real-time detection of whether the second primary node and the second secondary node lose communication with the target arbitration device; In response to the second master node losing communication with the target arbitration device, the second master node sends an arbitration connection loss event, changes the first bit array of the arbitration device connection bit array to a second value, the second master node modifies the arbitration device connection state to the second master node not being connected to the arbitration device, the second master node synchronizes the arbitration connection state with the first master node, and the first master node modifies the arbitration device connection state to the second master node not being connected to the arbitration device; In response to the loss of communication between the second secondary node and the target arbitration device, the second secondary node sends an arbitration connection loss event to the second master node, changes the second bit array of the arbitration device connection bit array to a second value, the second master node modifies the arbitration device connection status to the second secondary node is not connected to the arbitration device, the second master node submits the arbitration connection loss event to the second secondary node, the second master node synchronizes the arbitration connection status to the first master node, and the first master node modifies the arbitration device connection status to the second secondary node is not connected to the arbitration device.
[0072] In this embodiment, disabling the target arbitration device and reselecting the target arbitration device includes: Determine the activation status of the target arbitration device connected to the first storage site and the second storage site, and terminate if the target arbitration device is not activated; if the target arbitration device is activated, obtain the target arbitration device serial number; Determine whether the active arbitration device addresses of the first primary node and the first secondary node of the first storage site and the second primary node and the second secondary node of the second storage site are the target arbitration device serial numbers; if so, determine whether the arbitration enablement state change count value of the first primary node and the arbitration enablement state change count value of the first secondary node are the same; if they are the same, determine whether the arbitration enablement state change count value of the second primary node and the arbitration enablement state change count value of the second secondary node are the same; if they are the same, disable the target arbitration device in the first primary node and the first secondary node; in response to disabling the target arbitration device in the first primary node and the first secondary node, disable the target arbitration device in the second primary node and the second secondary node.
[0073] In this embodiment, disabling the target arbitration device in the first primary node and the first secondary node includes: The first master node sends an arbitration disable event; The first master node submits an arbitration disable event to the first secondary node, the first secondary node sets the enable state of the arbitration device to inactive, increases the arbitration enable state change count value of the first secondary node by one, and changes the active arbitration device address of the first secondary node to an invalid sequence number; the first master node sets the enable state of the arbitration device to inactive, increases the arbitration enable state change count value of the first master node by one, and changes the active arbitration device address of the first master node to an invalid sequence number; The first master node synchronizes the arbitration disable event to the second master node.
[0074] In this embodiment, disabling the target arbitration device in the second primary node and the second secondary node includes: In response to the second master node receiving the arbitration disable event sent by the first master node, the second master node submits the arbitration disable event to the second secondary node, the second secondary node sets the enable state of the arbitration device to inactive, increases the arbitration enable state change count of the second secondary node by one, and changes the active arbitration device address of the second secondary node to an invalid serial number; the second master node sets the enable state of the arbitration device to inactive, increases the arbitration enable state change count of the second master node by one, and changes the active arbitration device address of the second master node to an invalid serial number.
[0075] In this embodiment, if Figure 8 As shown, the arbitration control device further includes an arbitration status updating module 5. The arbitration status updating module 5 is used for: In response to disabling the target arbitration device in the first storage site and the second storage site, the first master node sends its arbitration enable state change count value to the second master node, the second master node initiates a second secondary node arbitration enable state change count value update event, and sets the arbitration enable state change count value of the second master node to be equal to the arbitration enable state change count value of the second secondary node; The second master node sends its arbitration enabled state change count value to the first master node, and the first master node initiates the first secondary node arbitration enabled state change count value update event, setting the arbitration enabled state change count value of the first master node equal to the arbitration enabled state change count value of the first secondary node.
[0076] In this embodiment, the first storage site and the second storage site select a service takeover site through high-speed communication link failure arbitration using the same arbitration device, including: In response to a communication failure occurring in the high-speed communication link between the first storage site and the second storage site, the first storage site and the second storage site sending an arbitration request to the arbitration device; The arbitration device determines the winning storage site and returns a successful arbitration result to the winning storage site. The storage site that obtains the successful arbitration result takes over the business and continues to provide services, while the other storage site stops providing services.
[0077] In this embodiment, if Figure 8 As shown, the arbitration control device further includes an arbitration device changing module 6. The arbitration device changing module 6 is used for: In response to the target arbitration device being disabled, the arbitration devices connected to the first storage site and the second storage site are changed, and a new target arbitration device is selected from arbitration devices connected to the first storage site and the second storage site.
[0078] In this embodiment, in response to the target arbitration device being disabled, changing the arbitration device connected to the first storage site and the second storage site, and selecting a new target arbitration device from the arbitration devices connected to the first storage site and the second storage site includes: Detecting whether the first storage site and the second storage site are connected to a new arbitration device, if so, the first storage site and the second storage site notify each other of the connection status; A new arbitration device connected to the first storage site and the second storage site is obtained, and it is determined whether the new arbitration device connected to the first storage site and the second storage site is the same. If the new arbitration device is the same, it is used as a new target arbitration device.
[0079] For the description of the features in the embodiment corresponding to the arbitration control device, reference can be made to the relevant description of the embodiment corresponding to the arbitration control method, which will not be described in detail here.
[0080] In the above arbitration control device, since one arbitration device is selected from multiple arbitration devices simultaneously connected to the two storage sites as a target arbitration device when the arbitration device establishes a connection with the first storage site and the second storage site, and the problem of increasing the design complexity and operation overhead of the arbitration device instance due to the use of an arbitration device cluster in the active-active storage system can be solved, it can avoid that different storage sites enable different arbitration devices, resulting in the two storage sites each sending arbitration requests to different arbitration devices when a link failure occurs between the storage sites, causing both sites to be taken over. At the same time, there can be only one arbitration device enabled by both storage sites, which avoids the communication overhead of using a distributed consensus protocol framework between two independent storage sites and improves the security of the arbitration device enabling process.
[0081] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above arbitration control method embodiments.
[0082] For the specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the arbitration control method above, which will not be repeated here.
[0083] In one embodiment, an electronic device is provided. The electronic device may be a server, and its internal structure diagram may be as follows: Fig. 9 As shown. The electronic device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store arbitration control data. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an arbitration control method is implemented.
[0084] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0085] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above arbitration control method embodiments when running.
[0086] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0087] For the specific limitations on the steps implemented when the processor executes the computer program, please refer to the limitations on the arbitration control method above, which will not be repeated here.
[0088] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above arbitration control method embodiments are implemented.
[0089] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned arbitration control method embodiments are implemented.
[0090] For the specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the arbitration control method above, which will not be repeated here.
[0091] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0092] The above is a detailed introduction to an arbitration control method, product, electronic device and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. An arbitration control method, characterized in that: include: Controlling the first storage site to be connected with the second storage site through a high-speed communication link to perform data synchronization; In response to the arbitration device establishing a connection with the first storage site and the second storage site, the first storage site and the second storage site exchange arbitration device connection status information, select one as a target arbitration device from a plurality of arbitration devices simultaneously connected to the first storage site and the second storage site, and enable the target arbitration device to perform high-speed communication link failure arbitration to select a service takeover site; In response to a communication loss between the target arbitration device and the first storage site and / or the second storage site, the target arbitration device is disabled and a target arbitration device is reselected.
2. The arbitration control method according to claim 1, characterized in that: The first storage site and the second storage site exchange arbitration device connection status information, and selecting one of a plurality of arbitration devices simultaneously connected to the first storage site and the second storage site as a target arbitration device comprises: Acquire a first master node and at least one first slave node of the first storage site, in response to an arbitration device establishing a connection with the first master node, the first master node initiates a connection establishment event, and the first slave node that receives the connection establishment event establishes a connection with the arbitration device; Acquire a second primary node and at least one second secondary node of the second storage site, in response to the arbitration device establishing a connection with the second primary node, the second primary node initiates a connection establishment event, and the second secondary node that receives the connection establishment event establishes a connection with the arbitration device; In response to the second primary node and the second secondary node of the second storage site establishing a connection with the arbitration device, the first storage site and the second storage site notify each other of the connection status, and determine whether the arbitration device connected to the first storage site and the second storage site is the same. If it is the same arbitration device, it is used as the target arbitration device.
3. The arbitration control method according to claim 2, characterized in that: The first storage site and the second storage site exchange arbitration device connection status information, and selecting one of a plurality of arbitration devices simultaneously connected to the first storage site and the second storage site as a target arbitration device further comprises: The first master node is set to use an arbitration device connection bit array to count the connection status of the first master node and the first secondary node with the arbitration device, and the second master node is set to use an arbitration device connection bit array to count the connection status of the second master node and the second secondary node with the arbitration device. According to the connection status, the arbitration device connection bit array includes a first bit array and a second bit array, the first bit array corresponds to the connection status of the first master node and the arbitration device and the connection status of the second master node and the arbitration device, and the second bit array corresponds to the connection status of the first secondary node and the arbitration device and the connection status of the second secondary node and the arbitration device. According to the connection status, a first value or a second value is filled in the first bit array and the second bit array, the first value represents that the arbitration device is connected, and the second value represents that the arbitration device is not connected.
4. The arbitration control method according to claim 3, characterized in that: The acquiring of the first primary node and at least one first secondary node of the first storage site, in response to the arbitration device establishing a connection with the first primary node, the first primary node initiating a connection establishment event, and the first secondary node receiving the connection establishment event establishing a connection with the arbitration device, comprises: In response to the arbitration device establishing a connection with the first master node, the arbitration device sends a connection establishment event to the first master node, changes the first bit array of the arbitration device connection bit array to a first value, the first master node submits the connection establishment event to the first slave node, and the first master node modifies the arbitration device connection state to the first master node being connected to the arbitration device; In response to the arbitration device establishing a connection with the first secondary node, the first secondary node sends a connection establishment event to the first master node, the first master node changes the second bit array of the arbitration device connection bit array to a first value, the first master node submits the connection establishment event to the first secondary node, and the first master node modifies the connection status of the arbitration device to that the first secondary node is connected to the arbitration device.
5. The arbitration control method according to claim 3, characterized in that: The acquiring of the second primary node and at least one second secondary node of the second storage site, in response to the arbitration device establishing a connection with the second primary node, the second primary node initiating a connection establishment event, and the second secondary node receiving the connection establishment event establishing a connection with the arbitration device, comprises: In response to the arbitration device establishing a connection with the second master node, the arbitration device sends a connection establishment event to the second master node, changes the first bit array of the arbitration device connection bit array to a first value, the second master node submits the connection establishment event to the second slave node, and the second master node modifies the arbitration device connection state to the second master node being connected to the arbitration device; In response to the arbitration device establishing a connection with the second secondary node, the second secondary node sends a connection establishment event to the second primary node, the second primary node changes the second bit array of the arbitration device connection bit array to a first value, the second primary node submits a connection establishment event to the second secondary node, and the second primary node modifies the connection status of the arbitration device to indicate that the second secondary node is connected to the arbitration device.
6. The arbitration control method according to claim 2, characterized in that: In response to the second primary node and the second secondary node of the second storage site establishing a connection with the arbitration device, the first storage site and the second storage site notifying each other of a connection status comprises: The first master node of the first storage site synchronizes the local arbitration connection state to the second master node of the second storage site, the second master node sends a remote site arbitration connection state change event, the second master node submits the remote site arbitration connection state change event to the second slave node, and when the second slave node receives the remote site arbitration connection state change event, it determines whether the arbitration device connection state has been modified to the second slave node has been connected to the arbitration device, and if so, it determines whether the arbitration device connection state has been modified to the second master node has been connected to the arbitration device, and if so, the second storage site determines that the arbitration device is available; The second master node of the second storage site synchronizes the local arbitration connection status to the first master node of the first storage site, the first master node sends a remote site arbitration connection status change event, the first master node submits the remote site arbitration connection status change event to the first slave node, and when the first slave node receives the remote site arbitration connection status change event, it determines whether the connection status of the arbitration device has been modified to that the first slave node is connected to the arbitration device. If so, it determines whether the connection status of the arbitration device has been modified to that the first master node is connected to the arbitration device. If so, the first storage site determines that the arbitration device is available.
7. The arbitration control method according to claim 6, characterized in that: The enabling of the target arbitration device comprises: The first master node determines the activation state of the arbitration device, and ends the process if there is an active arbitration device, otherwise obtains the arbitration activation state change count value of the first master node and the arbitration activation state change count value of the first slave node; Determine whether the arbitration enabling state change count value of the first master node is equal to the arbitration enabling state change count value of the first slave node, and if they are equal, determine whether there is an available arbitration device; In response to the existence of an available arbitration device, obtaining the available arbitration device serial number, the first master node sending an arbitration enable event, the first master node setting the enable state of the arbitration device to active, increasing the arbitration enable state change count value of the first master node by one, and setting the active arbitration device address of the first master node to the available arbitration device serial number; The first master node submits an arbitration enable event to the first slave node, the first slave node sends the arbitration enable event, the first slave node sets the enable state of the arbitration device to be active, increases the arbitration enable state change count value of the first slave node by one, and sets the active arbitration device address of the first slave node to the available arbitration device serial number; The first master node sends an arbitration enable event to the second master node, the second master node sends an arbitration enable event, the second master node sets the enable state of the arbitration device to active, increases the arbitration enable state change count value of the second master node by one, and sets the active arbitration device address of the second master node to the available arbitration device serial number; The second master node submits an arbitration enable event to the second slave node, the second slave node sends an arbitration enable event, the second slave node sets the enable state of the arbitration device to active, increases the arbitration enable state change count value of the second slave node by one, and sets the active arbitration device address of the second slave node to the available arbitration device serial number.
8. The arbitration control method according to claim 7, characterized in that: Also includes: In response to the target arbitration device being enabled, the first master node sends its arbitration enabled state change count value to the second master node, and the second master node initiates a second secondary node arbitration enabled state change count value update event, and sets the arbitration enabled state change count value of the second master node to be equal to the arbitration enabled state change count value of the second secondary node; The second master node sends its arbitration enabled state change count value to the first master node, and the first master node initiates a first secondary node arbitration enabled state change count value update event to set the arbitration enabled state change count value of the first master node equal to the arbitration enabled state change count value of the first secondary node.
9. The arbitration control method according to claim 4, characterized in that: If communication loss occurs between the target arbitration device and the first storage site and / or the second storage site, disabling the target arbitration device and reselecting a target arbitration device comprises: detecting in real time whether the first master node and the first slave node lose communication with the target arbitration device; In response to the first master node losing communication with the target arbitration device, the first master node sends an arbitration connection loss event, changes the first bit array of the arbitration device connection bit array to a second value, and the first master node modifies the arbitration device connection state to the first master node not being connected to the arbitration device; In response to the loss of communication between the first secondary node and the target arbitration device, the first secondary node sends an arbitration connection loss event to the first master node, changes the second bit array of the arbitration device connection bit array to a second value, the first master node modifies the arbitration device connection state to the first secondary node is not connected to the arbitration device, and the first master node submits the arbitration connection loss event to the first secondary node.
10. The arbitration control method according to claim 5, characterized in that: In response to a communication loss between the target arbitration device and the first storage site and / or the second storage site, disabling the target arbitration device and reselecting a target arbitration device comprises: detecting in real time whether the second primary node and the second secondary node lose communication with the target arbitration device; In response to the second master node losing communication with the target arbitration device, the second master node sends an arbitration connection loss event, changes the first bit array of the arbitration device connection bit array to a second value, the second master node modifies the arbitration device connection state to the second master node not being connected to the arbitration device, the second master node synchronizes the arbitration connection state with the first master node, and the first master node modifies the arbitration device connection state to the second master node not being connected to the arbitration device; In response to the second secondary node losing communication with the target arbitration device, the second secondary node sends an arbitration connection loss event to the second master node, changes the second bit array of the arbitration device connection bit array to a second value, the second master node modifies the arbitration device connection state to the second secondary node not being connected to the arbitration device, the second master node submits the arbitration connection loss event to the second secondary node, the second master node synchronizes the arbitration connection state to the first master node, and the first master node modifies the arbitration device connection state to the second secondary node not being connected to the arbitration device.
11. The arbitration control method according to claim 7, characterized in that: The disabling the target arbitration device and reselecting the target arbitration device comprises: Determine the activation status of the target arbitration device connected to the first storage site and the second storage site, and terminate if the target arbitration device is not activated; if the target arbitration device is activated, obtain the target arbitration device serial number; Determine whether the active arbitration device addresses of the first primary node and the first secondary node of the first storage site and the second primary node and the second secondary node of the second storage site are the target arbitration device serial numbers; if so, determine whether the arbitration enablement state change count value of the first primary node and the arbitration enablement state change count value of the first secondary node are the same; if they are the same, determine whether the arbitration enablement state change count value of the second primary node and the arbitration enablement state change count value of the second secondary node are the same; if they are the same, disable the target arbitration device in the first primary node and the first secondary node; in response to disabling the target arbitration device in the first primary node and the first secondary node, disable the target arbitration device in the second primary node and the second secondary node.
12. The arbitration control method according to claim 11, characterized in that: The disabling of the target arbitration device in the first primary node and the first secondary node comprises: The first master node sends an arbitration disable event; The first master node submits the arbitration disable event to the first slave node, the first slave node sets the enable state of the arbitration device to be inactive, increases the arbitration enable state change count value of the first slave node by one, and changes the active arbitration device address of the first slave node to an invalid sequence number; the first master node sets the enable state of the arbitration device to be inactive, increases the arbitration enable state change count value of the first master node by one, and changes the active arbitration device address of the first master node to an invalid sequence number; The first master node synchronizes the arbitration disable event to the second master node.
13. The arbitration control method according to claim 12, characterized in that: The disabling of the target arbitration device in the second primary node and the second secondary node comprises: In response to the second master node receiving the arbitration disable event sent by the first master node, the second master node submits the arbitration disable event to the second slave node, the second slave node sets the enable state of the arbitration device to inactive, increases the arbitration enable state change count of the second slave node by one, and changes the active arbitration device address of the second slave node to an invalid serial number; the second master node sets the enable state of the arbitration device to inactive, increases the arbitration enable state change count of the second master node by one, and changes the active arbitration device address of the second master node to an invalid serial number.
14. The arbitration control method according to claim 13, characterized in that: Also includes: In response to disabling the target arbitration device in the first storage site and the second storage site, the first master node sends its arbitration enable state change count value to the second master node, and the second master node initiates a second slave node arbitration enable state change count value update event to set the arbitration enable state change count value of the second master node to be equal to the arbitration enable state change count value of the second slave node; The second master node sends its arbitration enabled state change count value to the first master node, and the first master node initiates a first secondary node arbitration enabled state change count value update event to set the arbitration enabled state change count value of the first master node equal to the arbitration enabled state change count value of the first secondary node.
15. The arbitration control method according to claim 1, characterized in that: The first storage site and the second storage site select a service takeover site through high-speed communication link failure arbitration using the same arbitration device, including: In response to a communication failure occurring in the high-speed communication link between the first storage site and the second storage site, the first storage site and the second storage site sending an arbitration request to the arbitration device; The arbitration device determines the winning storage site, and returns an arbitration success result to the winning storage site. The storage site that obtains the arbitration success result takes over the business and continues to provide services, while the other storage site stops providing services.
16. The arbitration control method according to claim 1, characterized in that: The disabling the target arbitration device and reselecting the target arbitration device comprises: In response to the target arbitration device being disabled, the arbitration devices connected to the first storage site and the second storage site are changed, and a new target arbitration device is selected from arbitration devices connected to the first storage site and the second storage site.
17. The arbitration control method according to claim 16, characterized in that: In response to the target arbitration device being disabled, changing the arbitration device connected to the first storage site and the second storage site, and selecting a new target arbitration device from the arbitration devices connected to the first storage site and the second storage site comprises: detecting whether the first storage site and the second storage site are connected to a new arbitration device, and if so, the first storage site and the second storage site notify each other of the connection status; A new arbitration device connected to the first storage site and the second storage site is obtained, and it is determined whether the new arbitration device connected to the first storage site and the second storage site is the same. If the new arbitration device is the same, it is used as a new target arbitration device.
18. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the arbitration control method according to any one of claims 1 to 17 when executing the computer program.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the arbitration control method according to any one of claims 1 to 17.
20. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the arbitration control method according to any one of claims 1 to 17 are implemented.
Citation Information
Patent Citations
Multi-master arbitration method in dynamic reconfigurable high-rate serial bus
CN104866455A
Disaster recovery method and apparatus in dual-activation cluster system
CN105426275A
Management method and device of network storage system
CN105893176A
Service recovery method and device, arbitration server and storage system
CN109445984A
Synchronization method, device and equipment of V2X system
CN113141596A
Cited By
Arbitration control method, and product, electronic device and storage medium
WO2026179303A1