CN113835621B - IP arbitration process quantity management and control method, system, terminal and storage medium - Google Patents
IP arbitration process quantity management and control method, system, terminal and storage medium Download PDFInfo
- Publication number
- CN113835621B CN113835621B CN202110942057.3A CN202110942057A CN113835621B CN 113835621 B CN113835621 B CN 113835621B CN 202110942057 A CN202110942057 A CN 202110942057A CN 113835621 B CN113835621 B CN 113835621B
- Authority
- CN
- China
- Prior art keywords
- target
- arbitration process
- arbitration
- linked list
- connection
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 312
- 230000008569 process Effects 0.000 title claims abstract description 272
- 238000012544 monitoring process Methods 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 3
- 230000002159 abnormal effect Effects 0.000 abstract description 8
- 230000002708 enhancing effect Effects 0.000 abstract 1
- 238000004891 communication Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000000977 initiatory effect Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000015556 catabolic process Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0631—Configuration or reconfiguration of storage systems by allocating resources to storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F9/526—Mutual exclusion algorithms
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a method, a system, a terminal and a storage medium for controlling the number of IP arbitration processes, which comprise the following steps: creating a process linked list and storing an existing IP arbitration process key value pair in the process linked list, wherein the key value pair comprises an existing IP arbitration process ID and corresponding referenced number, and the referenced number is the number of nodes connected by the IP arbitration process; analyzing a target IP arbitration process ID and a target node in the IP arbitration process connection request; if the matching key value pair of the target IP arbitration process ID does not exist in the process linked list or the number of the matched key value pair which is referenced is 0, applying for a resource lock for the target IP arbitration process ID; and if the number of the currently used resource locks is lower than a set number threshold, the target IP arbitration process ID successfully applies for the resource locks and requests the resource locks through the connection. The invention limits the number of IP arbitration processes based on the resource lock, thereby enhancing the system robustness under abnormal conditions.
Description
Technical Field
The invention relates to the technical field of storage systems, in particular to a method, a system, a terminal and a storage medium for controlling the number of IP arbitration processes.
Background
In a storage system of multiple controllers, IP arbitration is generally required to judge the connection condition of nodes, and when a certain node fails, the node takes over the condition; one of the deployment modes of the IP arbitration is to deploy on a third party server; the number of connected IP arbitration processes is limited by the current storage cluster, some systems are limited to 5, and records of the connected processes are stored by an array with the length of 5 (meanwhile, the IP arbitration process of most connection of each node is 5); that is, one third party server may start up no more than 5 IP arbitration processes, or multiple third party servers may start up no more than 5 IP arbitration processes altogether; when the total connection process number of the iPrquorum is not higher than 5; the multi-control system can normally operate and has a certain capability of handling abnormal situations.
But in the case that a third party server does not operate manually (e.g., mouse problem produces multiple clicks, or process starts too slowly for this process to exist), multiple (exceeding system limit requirements) IP arbitration processes are started; when a node fails and then recovers, the system will have a problem with a high probability, taking 4-control clusters as an example: assume that the current connection situation is: node1, node2, node3, node4 are connected with the 5 processes of ipquorum1-ipquorum5 respectively, so that the 5 IDs of ipquorum1-ipquorum5 are stored in the IP arbitration connection array of the cluster, and the array is full; yet another ipqurum6 process is always requesting a connection with node1, and since the number of connections of node1 has reached 5, the connection of ipqurum6 is rejected, but the ipqurum6 process is still trying all the time; when the node1 has network fault, the connection between the node1 and the ipquorum1-ipquorum5 is disconnected, and as the other 3 nodes in the cluster also keep the connection with the ipquorum1-ipquorum5, the cluster perceives that the ipquorum is still 5; when the node1 network is restored, the ipquorum6 is connected with the node1 before other processes and reported to the cluster, and as the connection array of the cluster is full, when the new ipquorum6 is received and stored, the fault occurs, so that the cluster is abnormally crashed.
In order to solve the problem of cluster system breakdown caused by connection of the IP arbitration processes after network failure of one or more nodes in the multi-control system is recovered, the invention provides a method for managing and controlling the number of the IP arbitration processes.
Disclosure of Invention
Aiming at the technical problem of storage system crash caused by the fact that the number of the established IP arbitration exceeds the limit number in the prior art, the invention provides a method, a system, a terminal and a storage medium for managing the number of the IP arbitration processes, so as to solve the technical problem.
In a first aspect, the present invention provides a method for controlling the number of IP arbitration processes, including:
creating a process linked list and storing an existing IP arbitration process key value pair in the process linked list, wherein the key value pair comprises an existing IP arbitration process ID and a corresponding referenced number, and the referenced number is the number of nodes connected by the IP arbitration process;
analyzing a target IP arbitration process ID and a target node in the IP arbitration process connection request;
if the matching key value pair of the target IP arbitration process ID does not exist in the process linked list or the number of the matched key value pair which is referenced is 0, applying for a resource lock for the target IP arbitration process ID;
and if the number of the currently used resource locks is lower than a set number threshold, the target IP arbitration process ID successfully applies for the resource locks and requests the resource locks through the connection.
Further, the method further comprises:
if a matched key value pair of the target IP arbitration process ID exists in the process linked list and the number of the matched key value pair to be referred is not 0, establishing connection between the target IP arbitration process and a target node through the connection request;
storing a target IP arbitration process ID in a reference chain table in the target node, wherein the reference chain table is used for storing the IP arbitration process ID which establishes connection with the node;
and updating the number of the quoted pairs in the process linked list, which is matched with the target IP arbitration process ID, to be the historical number of the quoted pairs plus 1.
Further, before passing the connection request, the method further includes:
invoking a reference linked list of a target node, and judging whether the reference linked list stores an IP arbitration process ID which is the same as the target IP arbitration process ID:
if yes, rejecting the connection request and returning a connection failure prompt;
if not, passing the connection request.
Further, the method further comprises:
and if the number of the currently used resource locks is not lower than the set number threshold, rejecting the connection request and outputting a connection failure prompt.
Further, the method further comprises:
monitoring the connection condition of the existing IP arbitration process and the node, if the connection disconnection of the IP arbitration process and the node is monitored, updating the referenced number of the matched key value pairs of the IP arbitration process in the process linked list;
and if the referenced number of the matched key value pairs of the IP arbitration process in the process linked list is cleared, releasing the resource lock of the IP arbitration process.
In a second aspect, the present invention provides an IP arbitration process number management and control system, including:
the process recording unit is used for creating a process linked list and storing the key value pairs of the existing IP arbitration process in the process linked list, wherein the key value pairs comprise the IDs of the existing IP arbitration processes and the corresponding referenced quantity, and the referenced quantity is the quantity of nodes connected with the IP arbitration processes;
the request analysis unit is used for analyzing the target IP arbitration process ID and the target node in the IP arbitration process connection request;
the locking application unit is used for applying for the resource lock for the target IP arbitration process ID if no matching key value pair of the target IP arbitration process ID exists in the process linked list or the number of the matched key value pairs which are referenced is 0;
and the resource locking unit is used for successfully applying the resource lock by the target IP arbitration process ID and requesting through the connection if the number of the currently used resource locks is lower than a set number threshold.
Further, the system further comprises:
a process direct connection unit, configured to establish connection between the target IP arbitration process and the target node through the connection request if there is a matching key value pair of the target IP arbitration process ID in the process linked list and the number of referenced matching key value pairs is not 0;
the node recording unit is used for storing the target IP arbitration process ID in a reference linked list in the target node, wherein the reference linked list is used for storing the IP arbitration process ID which establishes connection with the node;
and the linked list adding unit is used for updating the number of the quoted in the target key value pair matched with the target IP arbitration process ID in the process linked list to be the historical quoted number plus 1.
Further, the system further comprises:
the node judging unit is used for calling a reference linked list of the target node and judging whether the reference linked list stores the IP arbitration process ID which is the same as the target IP arbitration process ID:
a request rejecting unit, configured to reject the connection request and return a connection failure prompt if the reference linked list stores an IP arbitration process ID that is the same as the target IP arbitration process ID;
and the request accepting unit is used for requesting through the connection if the IP arbitration process ID which is the same as the target IP arbitration process ID is not stored in the reference chain table.
Further, the system further comprises:
and the application failure unit is used for rejecting the connection request and outputting a connection failure prompt if the number of the currently used resource locks is not lower than the set number threshold.
Further, the system further comprises:
the connection monitoring unit is used for monitoring the connection condition of the existing IP arbitration process and the node, and if the connection disconnection of the IP arbitration process and the node is monitored, updating the referenced number of the matched key value pairs of the IP arbitration process in the process linked list;
and the lock release unit is used for releasing the resource lock of the IP arbitration process if the referenced number of the matched key value pairs of the IP arbitration process in the process linked list is cleared.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program,
the processor is configured to call and run the computer program from the memory, so that the terminal performs the method of the terminal as described above.
In a fourth aspect, there is provided a computer storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of the above aspects.
The invention has the advantages that,
the method, the system, the terminal and the storage medium for controlling the number of the IP arbitration processes provided by the invention realize the number control of the newly-added IP arbitration processes by adding the specific number of the resource locks and recording the existing IP arbitration processes and the corresponding referenced conditions through the process linked list, namely, once the IP arbitration process of the connection request is judged to be the newly-added IP arbitration process based on the process linked list, the resource locks are required to be applied for the newly-added IP arbitration process, the number of the resource locks is limited, and when the IP arbitration process which has applied for the resource locks reaches a limit value, the subsequent newly-added IP arbitration process cannot apply for the resource locks any more, and connection with the node cannot be established. The invention limits the number of the IP arbitration processes based on the resource lock, enhances the system robustness under the abnormal condition, can not rely on manual checking to limit the number of the IP arbitration processes for initiating connection, and completely gives the abnormal judgment to the system for processing, so that the system is more robust and humanized.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention.
Fig. 2 is another schematic flow chart of a method of one embodiment of the invention.
FIG. 3 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
In order to solve the problem of cluster system breakdown caused by the connection of an ipquorum process after the network failure of one or more nodes in the multi-control system is recovered, the invention provides a multi-control cluster ipquorum connection method based on a resource lock; because a new iquorum process needs to apply for a resource lock every time a new iquorum process is connected, the problem that the connection process overflows beyond the limit can be solved, and cluster abnormality can not be caused.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention. The execution body of fig. 1 may be an IP arbitration process number management and control system.
As shown in fig. 1, the method includes:
step 110, creating a process linked list and storing an existing IP arbitration process key value pair in the process linked list, wherein the key value pair comprises an existing IP arbitration process ID and a corresponding number of referenced nodes connected by the IP arbitration process.
The cluster maintains a connection linked list, the element is a key value pair (ipquorum ID), the ipquorum ID is the ID of the ipquorum of the established connection, and the value is the connection times.
Step 120, parsing the target IP arbitration process ID and the target node in the IP arbitration process connection request.
When the system receives the IP arbitration process connection request, the request is intercepted, and the target IP arbitration process ID and the target node are resolved from the connection request.
Step 130, if there is no matching key value pair of the target IP arbitration process ID in the process linked list, or the number of the matched key value pairs referenced is 0, applying for a resource lock for the target IP arbitration process ID.
Step 140, if the number of the currently used resource locks is lower than the set number threshold, the target IP arbitration process ID successfully applies for the resource locks, and requests the resource locks through the connection.
In order to facilitate understanding of the present invention, the method for controlling the number of IP arbitration processes provided by the present invention is further described below by using the principle of the method for controlling the number of IP arbitration processes according to the present invention, in combination with the process of controlling the number of IP arbitration processes in the embodiment.
Specifically, the method for controlling the number of the IP arbitration processes comprises the following steps:
s1, creating a process linked list and storing an existing IP arbitration process key value pair in the process linked list, wherein the key value pair comprises an existing IP arbitration process ID and a corresponding referenced number, and the referenced number is the number of nodes connected by the IP arbitration process.
S2, analyzing the target IP arbitration process ID and the target node in the IP arbitration process connection request.
S3, if no matched key value pair of the target IP arbitration process ID exists in the process linked list or the number of the matched key value pairs referenced is 0, applying for a resource lock for the target IP arbitration process ID; and if the number of the currently used resource locks is lower than a set number threshold, the target IP arbitration process ID successfully applies for the resource locks and requests the resource locks through the connection. The method further comprises, prior to passing the connection request: invoking a reference linked list of a target node, and judging whether the reference linked list stores an IP arbitration process ID which is the same as the target IP arbitration process ID: if yes, rejecting the connection request and returning a connection failure prompt; if not, passing the connection request. And if the number of the currently used resource locks is not lower than the set number threshold, rejecting the connection request and outputting a connection failure prompt.
The step introduces a reference chain table of the node, and avoids the waste of calculation resources caused by repeated connection of the IP arbitration process and the node.
S4, if a matched key value pair of the target IP arbitration process ID exists in a process linked list and the number of the matched key value pair to be referred is not 0, establishing connection between the target IP arbitration process and a target node through the connection request; storing a target IP arbitration process ID in a reference chain table in the target node, wherein the reference chain table is used for storing the IP arbitration process ID which establishes connection with the node; and updating the number of the quoted pairs in the process linked list, which is matched with the target IP arbitration process ID, to be the historical number of the quoted pairs plus 1.
If there is a matching key value pair of the target IP arbitration process ID in the process linked list and the number of the matched key value pairs is not 0, the target IP arbitration process ID is an existing IP arbitration process of the system, and the existing IP arbitration process has already applied for the resource lock, so that the resource lock does not need to be applied for any more.
S5, monitoring the connection condition of the existing IP arbitration process and the node, and if the connection disconnection of the IP arbitration process and the node is monitored, updating the referenced number of the matched key value pairs of the IP arbitration process in the process linked list; and if the referenced number of the matched key value pairs of the IP arbitration process in the process linked list is cleared, releasing the resource lock of the IP arbitration process.
The following describes an example in which the system can create 5 IP arbitration processes, please refer to fig. 2, which includes the following procedures:
1. an initialization stage:
initializing cluster resource locks to 5; when a new IP arbitration process initiates a connection request, firstly applying for a resource lock;
the cluster maintains a connection linked list, wherein elements are key value pairs (ipquorum ID, value), the ipquorum ID is the ID of the ipquorum of the established connection, and the value is the connection times;
each node in the cluster maintains a connection linked list, and the element is ipquorum ID which indicates the ipquorum connected with the node;
2. connection phase (for example, ipquorum1 requests connection node 1):
when an ipquorum1 requests to connect with a node1, firstly judging whether a key=ipquorum 1 key value pair exists in a cluster connection linked list; if the connection between the iquorum 1 and the node1 does not exist, the fact that any node in the cluster does not establish the connection with the iquorum 1 is indicated, and if the connection between the iquorum 1 and the node1 is to be established, a resource lock needs to be applied first; if so, it is also determined whether the connection is actually present (value > 0) or whether the previous connection has passed the invalid connection which has been disconnected now (value=0); if value >0, the node1 can autonomously judge whether to establish connection with the ipquorum1 without applying for a resource lock; if value=0, then the resource lock needs to be applied first;
aiming at the situation that the connection request needs to apply for the resource lock first, if the ipquorum1 requests to connect node1, the resource lock needs to be applied first; firstly, judging the number of available resource locks of a cluster which are not applied, and if the number of available resource locks is larger than 0, executing a connection establishment process: [ Cluster resource Lock number reduced by 1, node1 establishes a connection with ipquorum1; adding an element ipquorum1 to the node1 connection linked list, adding an element (ipquorum 1, 1) if the key=ipquorum 1 is not present in the cluster connection linked list, and adding a value +1 if the key=ipquorum 1 is present; -a; if available resource lock=0, then directly deciding the connection;
when the resource lock is not required to be applied, the fact that the connection between the nodes in the cluster and the ipquorum1 is established is explained; at this time, node1 needs to determine whether ipquorum1 exists in its own connection list, and if so, the connection of ipquorum1 is refused at this time; if not, executing a process of establishing connection with the iPrquorum 1: node1 establishes a connection with ipquorum1; adding an element ipquorum1 to the connection chain table of node 1; adding 1 to a value corresponding to ipquorum1 in the cluster chain table; ' s of
3. Ipquorum connection scenario when a node fails and recovers:
taking a failure of the node1 network as an example, if ipquorum1, ipquorum2, ipquorum3, ipquorum4 and ipquorum5 exist in a linked list before the failure of the node1 network; there is also an ipquorum6 process that is refused to connect but is still being attempted. When node1 fails, loses communication with other nodes of the cluster, or exits from the cluster, the cluster may update its own connection link table according to the connection link table of node 1: in the cluster, in the own connection chain table, subtracting 1 from the corresponding value of the element of which the key value is ipquorum1, ipquorum2, ipquorum3, ipquorum4, ipquorum5; if the value is reduced to 0, releasing one resource lock, and increasing the number of cluster resource locks by 1; -a; when the node1 network fault is recovered, the ipquorum6 preemptively requests to establish connection with the node 1; then the process is repeated [ step 2: and judging whether the connection is carried out or not according to the process of the connection stage.
The embodiment limits the number of the IP arbitration processes based on the resource lock, enhances the system robustness under the abnormal condition, can not rely on manual checking to limit the number of the IP arbitration processes for initiating connection, and completely gives the abnormal judgment to the system for processing, so that the system is more robust and humanized.
As shown in fig. 3, the system 300 includes:
the process recording unit is used for creating a process linked list and storing the key value pairs of the existing IP arbitration process in the process linked list, wherein the key value pairs comprise the IDs of the existing IP arbitration processes and the corresponding referenced quantity, and the referenced quantity is the quantity of nodes connected with the IP arbitration processes;
the request analysis unit is used for analyzing the target IP arbitration process ID and the target node in the IP arbitration process connection request;
the locking application unit is used for applying for the resource lock for the target IP arbitration process ID if no matching key value pair of the target IP arbitration process ID exists in the process linked list or the number of the matched key value pairs which are referenced is 0;
and the resource locking unit is used for successfully applying the resource lock by the target IP arbitration process ID and requesting through the connection if the number of the currently used resource locks is lower than a set number threshold.
Optionally, as an embodiment of the present invention, the system further includes:
a process direct connection unit, configured to establish connection between the target IP arbitration process and the target node through the connection request if there is a matching key value pair of the target IP arbitration process ID in the process linked list and the number of referenced matching key value pairs is not 0;
the node recording unit is used for storing the target IP arbitration process ID in a reference linked list in the target node, wherein the reference linked list is used for storing the IP arbitration process ID which establishes connection with the node;
and the linked list adding unit is used for updating the number of the quoted in the target key value pair matched with the target IP arbitration process ID in the process linked list to be the historical quoted number plus 1.
Optionally, as an embodiment of the present invention, the system further includes:
the node judging unit is used for calling a reference linked list of the target node and judging whether the reference linked list stores the IP arbitration process ID which is the same as the target IP arbitration process ID:
a request rejecting unit, configured to reject the connection request and return a connection failure prompt if the reference linked list stores an IP arbitration process ID that is the same as the target IP arbitration process ID;
and the request accepting unit is used for requesting through the connection if the IP arbitration process ID which is the same as the target IP arbitration process ID is not stored in the reference chain table.
Optionally, as an embodiment of the present invention, the system further includes:
and the application failure unit is used for rejecting the connection request and outputting a connection failure prompt if the number of the currently used resource locks is not lower than the set number threshold.
Optionally, as an embodiment of the present invention, the system further includes:
the connection monitoring unit is used for monitoring the connection condition of the existing IP arbitration process and the node, and if the connection disconnection of the IP arbitration process and the node is monitored, updating the referenced number of the matched key value pairs of the IP arbitration process in the process linked list;
and the lock release unit is used for releasing the resource lock of the IP arbitration process if the referenced number of the matched key value pairs of the IP arbitration process in the process linked list is cleared.
Fig. 4 is a schematic structural diagram of a terminal 400 according to an embodiment of the present invention, where the terminal 400 may be used to execute the method for controlling the number of IP arbitration processes according to the embodiment of the present invention.
The terminal 400 may include: processor 410, memory 420, and communication unit 430. The components may communicate via one or more buses, and it will be appreciated by those skilled in the art that the configuration of the server as shown in the drawings is not limiting of the invention, as it may be a bus-like structure, a star-like structure, or include more or fewer components than shown, or may be a combination of certain components or a different arrangement of components.
The memory 420 may be used to store instructions for execution by the processor 410, and the memory 420 may be implemented by any type of volatile or nonvolatile memory terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. The execution of the instructions in memory 420, when executed by processor 410, enables terminal 400 to perform some or all of the steps in the method embodiments described below.
The processor 410 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by running or executing software programs and/or modules stored in the memory 420, and invoking data stored in the memory. The processor may be comprised of an integrated circuit (Integrated Circuit, simply referred to as an IC), for example, a single packaged IC, or may be comprised of a plurality of packaged ICs connected to the same function or different functions. For example, the processor 410 may include only a central processing unit (Central Processing Unit, simply CPU). In the embodiment of the invention, the CPU can be a single operation core or can comprise multiple operation cores.
And a communication unit 430 for establishing a communication channel so that the storage terminal can communicate with other terminals. Receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium in which a program may be stored, which program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (random access memory, RAM), or the like.
Therefore, the invention realizes the quantity control of the newly added IP arbitration process by adding a specific quantity of resource locks and recording the existing IP arbitration process and the corresponding cited condition through the process linked list, namely, once the IP arbitration process of the connection request is judged to be the newly added IP arbitration process based on the process linked list, the resource locks are required to be applied for the newly added IP arbitration process, the quantity of the resource locks is limited, and when the IP arbitration process for which the resource locks are applied reaches a limit value, the subsequent newly added IP arbitration process can not apply the resource locks any more, and connection can not be established with the node. The invention limits the number of the IP arbitration processes based on the resource lock, enhances the system robustness under the abnormal condition, can not rely on manual checking to limit the number of the IP arbitration processes for initiating connection, and completely gives the abnormal judgment to the system for processing, so that the system is more robust and humanized, and the technical effects achieved by the embodiment can be seen from the description above and are not repeated here.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium such as a U-disc, a mobile hard disc, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, etc. various media capable of storing program codes, including several instructions for causing a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the method described in the embodiments of the present invention.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the terminal embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference should be made to the description in the method embodiment for relevant points.
In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods may be implemented in other ways. For example, the system embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, system or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
Although the present invention has been described in detail by way of preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications and substitutions may be made in the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and it is intended that all such modifications and substitutions be within the scope of the present invention/be within the scope of the present invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (7)
1. The method for controlling the number of the IP arbitration processes is characterized by comprising the following steps:
creating a process linked list and storing an existing IP arbitration process key value pair in the process linked list, wherein the key value pair comprises an existing IP arbitration process ID and a corresponding referenced number, and the referenced number is the number of nodes connected by the IP arbitration process;
analyzing a target IP arbitration process ID and a target node in the IP arbitration process connection request;
if the matching key value pair of the target IP arbitration process ID does not exist in the process linked list or the number of the matched key value pair which is referenced is 0, applying for a resource lock for the target IP arbitration process ID;
if the number of the currently used resource locks is lower than a set number threshold, the target IP arbitration process ID successfully applies for the resource locks and requests the resource locks through the connection;
the method further comprises the steps of:
if a matched key value pair of the target IP arbitration process ID exists in the process linked list and the number of the matched key value pair to be referred is not 0, establishing connection between the target IP arbitration process and a target node through the connection request;
storing a target IP arbitration process ID in a reference chain table in the target node, wherein the reference chain table is used for storing the IP arbitration process ID which establishes connection with the node;
updating the number of referenced in a target key value pair matched with the target IP arbitration process ID in the process linked list to be the historical number of referenced plus 1;
the method further comprises the steps of:
and if the number of the currently used resource locks is not lower than the set number threshold, rejecting the connection request and outputting a connection failure prompt.
2. The method of claim 1, wherein prior to passing the connection request, the method further comprises:
invoking a reference linked list of a target node, and judging whether the reference linked list stores an IP arbitration process ID which is the same as the target IP arbitration process ID:
if yes, rejecting the connection request and returning a connection failure prompt;
if not, passing the connection request.
3. The method according to claim 1, wherein the method further comprises:
monitoring the connection condition of the existing IP arbitration process and the node, if the connection disconnection of the IP arbitration process and the node is monitored, updating the referenced number of the matched key value pairs of the IP arbitration process in the process linked list;
and if the referenced number of the matched key value pairs of the IP arbitration process in the process linked list is cleared, releasing the resource lock of the IP arbitration process.
4. An IP arbitration process number management and control system, comprising:
the process recording unit is used for creating a process linked list and storing the key value pairs of the existing IP arbitration process in the process linked list, wherein the key value pairs comprise the IDs of the existing IP arbitration processes and the corresponding referenced quantity, and the referenced quantity is the quantity of nodes connected with the IP arbitration processes;
the request analysis unit is used for analyzing the target IP arbitration process ID and the target node in the IP arbitration process connection request;
the locking application unit is used for applying for the resource lock for the target IP arbitration process ID if no matching key value pair of the target IP arbitration process ID exists in the process linked list or the number of the matched key value pairs which are referenced is 0;
the resource locking unit is used for successfully applying for the resource lock by the target IP arbitration process ID and requesting through the connection if the number of the currently used resource locks is lower than a set number threshold;
the system further comprises:
a process direct connection unit, configured to establish connection between the target IP arbitration process and the target node through the connection request if there is a matching key value pair of the target IP arbitration process ID in the process linked list and the number of referenced matching key value pairs is not 0;
the node recording unit is used for storing the target IP arbitration process ID in a reference linked list in the target node, wherein the reference linked list is used for storing the IP arbitration process ID which establishes connection with the node;
a linked list adding unit, configured to update the number of references in a target key value pair matched with the target IP arbitration process ID in the process linked list to a historical number of references plus 1;
the system also performs:
and if the number of the currently used resource locks is not lower than the set number threshold, rejecting the connection request and outputting a connection failure prompt.
5. The system of claim 4, wherein the system further comprises:
the node judging unit is used for calling a reference linked list of the target node and judging whether the reference linked list stores the IP arbitration process ID which is the same as the target IP arbitration process ID:
a request rejecting unit, configured to reject the connection request and return a connection failure prompt if the reference linked list stores an IP arbitration process ID that is the same as the target IP arbitration process ID;
and the request accepting unit is used for requesting through the connection if the IP arbitration process ID which is the same as the target IP arbitration process ID is not stored in the reference chain table.
6. A terminal, comprising:
a processor;
a memory for storing execution instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-3.
7. A computer readable storage medium storing a computer program, which when executed by a processor implements the method of any one of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110942057.3A CN113835621B (en) | 2021-08-17 | 2021-08-17 | IP arbitration process quantity management and control method, system, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110942057.3A CN113835621B (en) | 2021-08-17 | 2021-08-17 | IP arbitration process quantity management and control method, system, terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113835621A CN113835621A (en) | 2021-12-24 |
CN113835621B true CN113835621B (en) | 2023-08-08 |
Family
ID=78960625
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110942057.3A Active CN113835621B (en) | 2021-08-17 | 2021-08-17 | IP arbitration process quantity management and control method, system, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113835621B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6279032B1 (en) * | 1997-11-03 | 2001-08-21 | Microsoft Corporation | Method and system for quorum resource arbitration in a server cluster |
CN102882927A (en) * | 2012-08-29 | 2013-01-16 | 华南理工大学 | Cloud storage data synchronizing framework and implementing method thereof |
CN109491615A (en) * | 2018-11-13 | 2019-03-19 | 郑州云海信息技术有限公司 | A kind of arbitration system based on cluster storage system |
-
2021
- 2021-08-17 CN CN202110942057.3A patent/CN113835621B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6279032B1 (en) * | 1997-11-03 | 2001-08-21 | Microsoft Corporation | Method and system for quorum resource arbitration in a server cluster |
CN102882927A (en) * | 2012-08-29 | 2013-01-16 | 华南理工大学 | Cloud storage data synchronizing framework and implementing method thereof |
CN109491615A (en) * | 2018-11-13 | 2019-03-19 | 郑州云海信息技术有限公司 | A kind of arbitration system based on cluster storage system |
Also Published As
Publication number | Publication date |
---|---|
CN113835621A (en) | 2021-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106533805B (en) | Micro-service request processing method, micro-service controller and micro-service architecture | |
CN108055157B (en) | Service node acquisition method and device | |
CN111045834B (en) | Method, device and storage medium for accessing USB storage device under cloud desktop | |
CN107508694B (en) | Node management method and node equipment in cluster | |
CN110830283A (en) | Fault detection method, device, equipment and system | |
CN113347037B (en) | Data center access method and device | |
CN109361542A (en) | The fault handling method of client, device, system, terminal and server | |
CN111585805B (en) | Smooth release upgrading method and device, computer system and readable storage medium | |
CN111556125B (en) | Access request distribution method, load balancing equipment and electronic equipment | |
CN110990190A (en) | Distributed file lock fault processing method, system, terminal and storage medium | |
CN113852506A (en) | Fault processing method and device, electronic equipment and storage medium | |
CN109831521B (en) | Cache instance management method and device, computer equipment and storage medium | |
CN105933271B (en) | Data processing method and device based on encryption machine | |
US8370897B1 (en) | Configurable redundant security device failover | |
CN113835621B (en) | IP arbitration process quantity management and control method, system, terminal and storage medium | |
CN111371598A (en) | Configuration method and system | |
CN111190913A (en) | Distributed lock implementation method and system | |
CN116389385A (en) | System resource processing method, device, storage medium and equipment | |
US20220094589A1 (en) | Communications methods and apparatus for minimizing and/or preventing message processing faults | |
CN113904847B (en) | Cloud platform binding method, system, equipment and medium of Internet of things card | |
US20050132237A1 (en) | Method, apparatus and program storage device for providing a remote power reset at a remote server through a network connection | |
CN114416522A (en) | Block chain system test method, device, equipment and storage medium | |
CN111131198B (en) | Updating method and device for network security policy configuration | |
CN112367373A (en) | Node determination method and device for distributed system and storage medium | |
EP3139536A1 (en) | Alarm reporting method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |