CN113835621A - 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 PDF

Info

Publication number
CN113835621A
CN113835621A CN202110942057.3A CN202110942057A CN113835621A CN 113835621 A CN113835621 A CN 113835621A CN 202110942057 A CN202110942057 A CN 202110942057A CN 113835621 A CN113835621 A CN 113835621A
Authority
CN
China
Prior art keywords
arbitration process
target
arbitration
connection
linked list
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.)
Granted
Application number
CN202110942057.3A
Other languages
Chinese (zh)
Other versions
CN113835621B (en
Inventor
王玉萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110942057.3A priority Critical patent/CN113835621B/en
Publication of CN113835621A publication Critical patent/CN113835621A/en
Application granted granted Critical
Publication of CN113835621B publication Critical patent/CN113835621B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy 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 managing and controlling the number of IP arbitration processes, wherein the method comprises the following steps: creating a process linked list and storing the key value pair of the existing IP arbitration process in the process linked list, wherein the key value pair comprises the ID of the existing IP arbitration process and the corresponding referred number, and the referred number is the number of nodes connected with 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 chain table or the referenced number of the matching key value pair 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 the set number threshold, the target IP arbitration process ID successfully applies for the resource locks and requests through the connection. The invention limits the number of IP arbitration processes based on the resource lock, and enhances the system robustness under abnormal conditions.

Description

IP arbitration process quantity management and control method, system, terminal and storage medium
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 managing and controlling the number of IP arbitration processes.
Background
In a storage system with multiple controllers, IP arbitration is generally needed to judge the connection condition of nodes and the take-over condition of the nodes when a certain node fails; one deployment of IP arbitration is on a third party server; currently, the number of IP arbitration processes for connection by a storage cluster is limited, some systems are limited to 5, and records of the connection processes are stored by an array with the length of 5 (meanwhile, the IP arbitration process with the maximum connection of each node is 5); that is, one third-party server may open no more than 5 IP arbitration processes, or multiple third-party servers open no more than 5 IP arbitration processes altogether; when the total connection process number of the ipquoorum is not higher than 5; the multi-control system can normally operate and has certain capability of handling abnormal conditions.
But when a third-party server is in the situation of non-artificial active operation (for example, mouse problem generates multiple clicks, or the process is started too slowly to be existed), a plurality of IP arbitration processes are started (exceeding the requirement of system limit); when a node has a network failure and then recovers, the system will have a problem with a very high probability, taking a 4-control cluster as an example: assume the current connection situation is: the node1, the node2, the node3 and the node4 are respectively connected with 5 processes of ipquorum1-ipquorum5, so 5 IDs of the iPquuorum 1-ipquorum5 are stored in an IP arbitration connection array of the cluster, and the array is full; but an ipqurum6 process is always requesting to connect with node1, because the number of connections of node1 has reached 5, ipqurum6 is rejected, but the ipqurum6 process is still trying; when a network fault occurs in the node1, the connection between the node1 and the iqquorum 1-iqquorum 5 is disconnected, and the other 3 nodes in the cluster still maintain the connection with the iqquorum 1-iqquorum 5, so that the cluster senses 5 iqquorum; when the node1 network is recovered, the ipquorum6 is connected with the node1 before other processes, and is reported to the cluster, and because the connection array of the cluster is full, when receiving and storing the new ipquorum6, a fault occurs, and the cluster is abnormally crashed.
In order to solve the problem of cluster system crash caused by IP arbitration process connection after a certain node or certain nodes in the multi-control system are failed and recovered, the invention provides a method for managing and controlling the number of IP arbitration processes.
Disclosure of Invention
Aiming at the technical problem of storage system crash caused by the fact that the number of created 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 and controlling the number of IP arbitration processes, so as to solve the technical problem.
In a first aspect, the present invention provides a method for managing and controlling the number of IP arbitration processes, including:
creating a process linked list and storing the key value pair of the existing IP arbitration process in the process linked list, wherein the key value pair comprises the ID of the existing IP arbitration process and the corresponding referred number, and the referred number is the number of nodes connected with 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 chain table or the referenced number of the matching key value pair 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 the set number threshold, the target IP arbitration process ID successfully applies for the resource locks and requests through the connection.
Further, the method further comprises:
if the matching key value pair of the target IP arbitration process ID exists in the process linked list and the number of times of being quoted of the matching key value pair is not 0, establishing the connection between the target IP arbitration process and the target node through the connection request;
storing a target IP arbitration process ID in a reference linked list in a target node, wherein the reference linked list is used for storing the IP arbitration process ID connected with the node;
and updating the referred times in the target key value pair matched with the target IP arbitration process ID in the process chain table into historical referred times plus 1.
Further, before requesting through the connection, the method further includes:
calling a reference linked list of a target node, and judging whether an IP arbitration process ID which is the same as the target IP arbitration process ID is stored in the reference linked list:
if so, rejecting the connection request and returning a connection failure prompt;
and if not, the connection request is passed.
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, and if the connection disconnection of the IP arbitration process and the node is monitored, updating the number of times of reference of the matching key value pair of the IP arbitration process in the process chain table;
and if the referred times of the matching key value pairs in the process linked list of the IP arbitration process are cleared, releasing the resource lock of the IP arbitration process.
In a second aspect, the present invention provides an IP arbitration process quantity management and control system, including:
the system comprises a process recording unit, a process judging unit and a processing unit, wherein the process recording unit is used for creating a process linked list and storing the key value pair of the existing IP arbitration process in the process linked list, the key value pair comprises the ID of the existing IP arbitration process and the corresponding referred number, and the referred number is the number of nodes connected with the IP arbitration process;
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;
a lock application unit, configured to apply for a resource lock for the target IP arbitration process ID if a matching key-value pair of the target IP arbitration process ID does not exist in a process chain table, or a referenced number of the matching key-value pair is 0;
and 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.
Further, the system further comprises:
the process direct connection unit is used for establishing the connection between the target IP arbitration process and the target node through the connection request if the matching key value pair of the target IP arbitration process ID exists in the process linked list and the number of times of reference of the matching key value pair is not 0;
the node recording unit is used for storing a target IP arbitration process ID in a reference chain table in a target node, wherein the reference chain table is used for storing the IP arbitration process ID connected with the node;
and the linked list adding unit is used for updating the referred times in the target key value pair matched with the target IP arbitration process ID in the process linked list into historical referred times plus 1.
Further, the system further comprises:
the node judgment unit is used for calling 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:
a request rejection 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 receiving unit is used for passing the connection request 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 a 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 updating the number of times of reference of the matching key value pair of the IP arbitration process in the process chain table if the connection disconnection of the IP arbitration process and the node is monitored;
and the locking release unit is used for releasing the resource lock of the IP arbitration process if the referred times of the matching key value pairs in the process linked list of the IP arbitration process are cleared.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
the method, the system, the terminal and the storage medium for managing and controlling the number of the IP arbitration processes realize the number management and control of the newly added IP arbitration processes by additionally arranging the resource locks with specific number and recording the existing IP arbitration processes and the corresponding quoted conditions through the process chain table, namely once the IP arbitration process of the connection request is judged to be the newly added IP arbitration process based on the process chain table, the resource locks need to be applied for the newly added IP arbitration process, the number of the resource locks is limited, when the IP arbitration process which has applied for the resource locks reaches the limit value, the subsequently added IP arbitration process can not apply for the resource locks, and the connection with the nodes can not be established. The invention limits the number of IP arbitration processes based on the resource lock, enhances the system robustness under the abnormal condition, can not depend on manual examination and limitation of the number of IP arbitration processes for initiating connection, and completely hands the abnormal judgment to the system for processing, so that the system is more robust and more 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 or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is another schematic flow diagram 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 those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problem of cluster system crash caused by ipquorum process connection after a certain node or certain nodes in the multi-control system are failed and recovered, the invention provides a multi-control cluster ipquorum connection method based on a resource lock; because a new iPquorum process is connected every time, a resource lock is required to be applied, the connection process can not overflow in an overrun mode, and further cluster abnormity can not be caused.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution subject in fig. 1 may be an IP arbitration process quantity management and control system.
As shown in fig. 1, the method includes:
step 110, creating a process linked list and storing the key value pair of the existing IP arbitration process in the process linked list, wherein the key value pair comprises the ID of the existing IP arbitration process and the corresponding referred number, and the referred number is the number of nodes connected with the IP arbitration process.
The cluster maintains a connection linked list, the elements are key value pairs (iquorumid, value), the iquorumid is the ID of the established connection iquorums, and the value is the connection times.
Step 120, the target IP arbitration process ID and the target node in the IP arbitration process connection request are analyzed.
When the system receives an IP arbitration process connection request, the request is withheld and the target IP arbitration process ID and target node are parsed from the connection request.
Step 130, if the matching key value pair of the target IP arbitration process ID does not exist in the process chain table, or the referenced number of the matching key value pair is 0, applying for a resource lock for the target IP arbitration process ID.
In 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 lock, and requests the resource lock through the connection.
In order to facilitate understanding of the present invention, the IP arbitration process quantity management and control method provided by the present invention is further described below with reference to the principle of the IP arbitration process quantity management and control method of the present invention and the process of managing and controlling the IP arbitration process quantity in the embodiment.
Specifically, the IP arbitration process number management and control method includes:
s1, creating a process linked list and storing the key value pair of the existing IP arbitration process in the process linked list, wherein the key value pair comprises the ID of the existing IP arbitration process and the corresponding referred number, and the referred number is the number of nodes connected with the IP arbitration process.
S2, resolving the target IP arbitration process ID and the target node in the IP arbitration process connection request.
S3, if the matching key value pair of the target IP arbitration process ID does not exist in the process chain table, or the quoted number of the matching key value pair 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 the set number threshold, the target IP arbitration process ID successfully applies for the resource locks and requests through the connection. Prior to requesting over the connection, the method further comprises: calling a reference linked list of a target node, and judging whether an IP arbitration process ID which is the same as the target IP arbitration process ID is stored in the reference linked list: if so, rejecting the connection request and returning a connection failure prompt; and if not, the connection request is passed. 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 linked list of the node, and avoids the repeated connection of the IP arbitration process and the node, which causes the waste of computing resources.
S4, if the matching key value pair of the target IP arbitration process ID exists in the process chain table, and the number of times of quoting of the matching key value pair is not 0, establishing the connection between the target IP arbitration process and the target node through the connection request; storing a target IP arbitration process ID in a reference linked list in a target node, wherein the reference linked list is used for storing the IP arbitration process ID connected with the node; and updating the referred times in the target key value pair matched with the target IP arbitration process ID in the process chain table into historical referred times plus 1.
If the matching key value pair of the target IP arbitration process ID exists in the process chain table, and the number of times of being quoted of the matching key value pair is not 0, the target IP arbitration process ID is the existing IP arbitration process of the system, and the existing IP arbitration process already applies for the resource lock, so that the resource lock does not need to be applied again.
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 number of times of reference of the matching key value pair of the IP arbitration process in the process chain table; and if the referred times of the matching key value pairs in the process linked list of the IP arbitration process are cleared, releasing the resource lock of the IP arbitration process.
The following description takes an example that the system can create 5 IP arbitration processes, please refer to fig. 2, which includes the following processes:
1. an initialization stage:
the cluster resource locks are initialized to 5; when a new IP arbitration process initiates a connection request, a resource lock is applied first;
the cluster maintains a connection linked list, wherein the elements are key value pairs (iPquorumID, value), the iPquorumID is the ID of the established connection iPquorum, and the value is the connection times;
each node in the cluster maintains a connection linked list, wherein the element is an iquorumID which represents the iquorumm connected with the node;
2. connection phase (take ipquorum1 request connection node1 as an example):
when an ipquoorm 1 requests to connect with node1, firstly, whether a key-value pair of ipquoorm 1 already exists in a cluster connection linked list is judged; if the connection between the iPquorum1 and the node1 is not established, the connection between any node in the cluster and the iPquorum1 is not established, and if the connection between the iPquorum1 and the node1 is to be established, a resource lock is required to be applied first; if yes, judging whether the connection really exists currently (value >0) or an invalid connection which is disconnected currently is connected previously (value is 0); if value >0, a node1 can autonomously judge whether to establish connection with ipquorum1 without applying for a resource lock; if the value is 0, the resource lock needs to be applied first;
for the situation that a connection request needs to apply for a resource lock first, if the ipquorum1 requests to connect the node1, the resource lock needs to be applied first; firstly, judging the number of the available resource locks which are not applied to the cluster, if the number is more than 0, executing the process of establishing the connection: (number of cluster resource locks is reduced by 1), node1 establishes connection with iquorum 1; an element ipquorum1 is added to a connection chain table of the node1, if no key (ipquorum 1) exists in a cluster connection chain table, an element (ipquorum1,1) is added, and if key (iprurum 1 exists and value (0) exists, value +1 is added; h ]; if the available resource lock is equal to 0, the connection is directly determined;
when the resource lock is not required to be applied, the fact that a node in the cluster is connected with the iquorum 1 is described; at this time, the node1 needs to judge whether the ipquorum1 exists in the own connection list, and if so, the connection of the ipquorum1 is rejected; if not, the process of establishing connection with iquorum 1 is executed: [ node1 ] is connected with ipquorum 1; an element ipquorum1 is added to a connection chain table of the node 1; adding 1 to a value corresponding to ipquorum1 in the cluster linked list; "C (B)
3. Ipquorum connection when a node fails and recovers:
taking the case that the node1 network fails, if the linked list before the node1 network fails, there are iPquorum1, iPquorum2, iPquorum3, iPquorum4 and iPquorum 5; there is also an ipquorum6 process that is denied a connection but is still trying. When node1 has a network failure, loses communication with other nodes of the cluster, or exits from the cluster, the cluster can update its connection linked list according to the connection linked list of node 1: (cluster in its linked list) subtract 1 from the corresponding value of the elements with key values ipquorum1, ipquorum2, ipquorum3, ipquorum4, ipquorum 5; if the value is reduced to 0, releasing a resource lock, and increasing the number of the cluster resource locks by 1; h ]; when the network fault of the node1 is recovered, ipquorum6 preemptively requests to establish connection with the node 1; then the method is repeated according to the step 2: process of connection phase ] to determine whether to connect or not.
The embodiment limits the number of the IP arbitration processes based on the resource lock, enhances the robustness of the system under the abnormal condition, can not depend on manual examination and limitation of the number of the IP arbitration processes for initiating the connection, and completely hands the abnormal judgment to the system for processing, so that the system is more robust and more humanized.
As shown in fig. 3, the system 300 includes:
the system comprises a process recording unit, a process judging unit and a processing unit, wherein the process recording unit is used for creating a process linked list and storing the key value pair of the existing IP arbitration process in the process linked list, the key value pair comprises the ID of the existing IP arbitration process and the corresponding referred number, and the referred number is the number of nodes connected with the IP arbitration process;
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;
a lock application unit, configured to apply for a resource lock for the target IP arbitration process ID if a matching key-value pair of the target IP arbitration process ID does not exist in a process chain table, or a referenced number of the matching key-value pair is 0;
and 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.
Optionally, as an embodiment of the present invention, the system further includes:
the process direct connection unit is used for establishing the connection between the target IP arbitration process and the target node through the connection request if the matching key value pair of the target IP arbitration process ID exists in the process linked list and the number of times of reference of the matching key value pair is not 0;
the node recording unit is used for storing a target IP arbitration process ID in a reference chain table in a target node, wherein the reference chain table is used for storing the IP arbitration process ID connected with the node;
and the linked list adding unit is used for updating the referred times in the target key value pair matched with the target IP arbitration process ID in the process linked list into historical referred times plus 1.
Optionally, as an embodiment of the present invention, the system further includes:
the node judgment unit is used for calling 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:
a request rejection 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 receiving unit is used for passing the connection request 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 a 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 updating the number of times of reference of the matching key value pair of the IP arbitration process in the process chain table if the connection disconnection of the IP arbitration process and the node is monitored;
and the locking release unit is used for releasing the resource lock of the IP arbitration process if the referred times of the matching key value pairs in the process linked list of the IP arbitration process are 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 managing and controlling the number of IP arbitration processes according to the embodiment of the present invention.
Among them, the terminal 400 may include: a processor 410, a memory 420, and a communication unit 430. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 420 may be used for storing instructions executed by the processor 410, and the memory 420 may be implemented by any type of volatile or non-volatile storage 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 executable instructions in memory 420, when executed by processor 410, enable 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 operating or executing software programs and/or modules stored in the memory 420 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 410 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 430, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the 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) or a Random Access Memory (RAM).
Therefore, the invention realizes the quantity control of the newly added IP arbitration process by adding the specific quantity of resource locks and recording the existing IP arbitration process and the corresponding quoted condition through the process chain table, namely once the IP arbitration process of the connection request is judged to be the newly added IP arbitration process based on the process chain table, the resource lock is required to be applied for the newly added IP arbitration process, the quantity of the resource locks is limited, when the IP arbitration process which has applied for the resource lock reaches the limit value, the subsequent newly added IP arbitration process can not apply for the resource lock, and the connection with the node can not be established. The invention limits the number of IP arbitration processes based on the resource lock, enhances the robustness of the system under the abnormal condition, can not depend on manual examination and limitation of the number of IP arbitration processes for initiating connection, and completely hands over the abnormal judgment to the system for processing, so that the system is more robust and more humanized.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for managing and controlling the quantity of IP arbitration processes is characterized by comprising the following steps:
creating a process linked list and storing the key value pair of the existing IP arbitration process in the process linked list, wherein the key value pair comprises the ID of the existing IP arbitration process and the corresponding referred number, and the referred number is the number of nodes connected with 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 chain table or the referenced number of the matching key value pair 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 the set number threshold, the target IP arbitration process ID successfully applies for the resource locks and requests through the connection.
2. The method of claim 1, further comprising:
if the matching key value pair of the target IP arbitration process ID exists in the process linked list and the number of times of being quoted of the matching key value pair is not 0, establishing the connection between the target IP arbitration process and the target node through the connection request;
storing a target IP arbitration process ID in a reference linked list in a target node, wherein the reference linked list is used for storing the IP arbitration process ID connected with the node;
and updating the referred times in the target key value pair matched with the target IP arbitration process ID in the process chain table into historical referred times plus 1.
3. The method of claim 2, wherein prior to requesting via the connection, the method further comprises:
calling a reference linked list of a target node, and judging whether an IP arbitration process ID which is the same as the target IP arbitration process ID is stored in the reference linked list:
if so, rejecting the connection request and returning a connection failure prompt;
and if not, the connection request is passed.
4. The method of claim 1, further comprising:
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 method of claim 1, further comprising:
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 number of times of reference of the matching key value pair of the IP arbitration process in the process chain table;
and if the referred times of the matching key value pairs in the process linked list of the IP arbitration process are cleared, releasing the resource lock of the IP arbitration process.
6. An IP arbitration process quantity management and control system is characterized by comprising:
the system comprises a process recording unit, a process judging unit and a processing unit, wherein the process recording unit is used for creating a process linked list and storing the key value pair of the existing IP arbitration process in the process linked list, the key value pair comprises the ID of the existing IP arbitration process and the corresponding referred number, and the referred number is the number of nodes connected with the IP arbitration process;
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;
a lock application unit, configured to apply for a resource lock for the target IP arbitration process ID if a matching key-value pair of the target IP arbitration process ID does not exist in a process chain table, or a referenced number of the matching key-value pair is 0;
and 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.
7. The system of claim 6, further comprising:
the process direct connection unit is used for establishing the connection between the target IP arbitration process and the target node through the connection request if the matching key value pair of the target IP arbitration process ID exists in the process linked list and the number of times of reference of the matching key value pair is not 0;
the node recording unit is used for storing a target IP arbitration process ID in a reference chain table in a target node, wherein the reference chain table is used for storing the IP arbitration process ID connected with the node;
and the linked list adding unit is used for updating the referred times in the target key value pair matched with the target IP arbitration process ID in the process linked list into historical referred times plus 1.
8. The system of claim 7, further comprising:
the node judgment unit is used for calling 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:
a request rejection 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 receiving unit is used for passing the connection request 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.
9. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of any one of claims 1-5.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN202110942057.3A 2021-08-17 2021-08-17 IP arbitration process quantity management and control method, system, terminal and storage medium Active CN113835621B (en)

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 true CN113835621A (en) 2021-12-24
CN113835621B 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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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
CN113835621B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
US11269718B1 (en) Root cause detection and corrective action diagnosis system
US10127124B1 (en) Performing fencing operations in multi-node distributed storage systems
CN111209110B (en) Task scheduling management method, system and storage medium for realizing load balancing
US20210349795A1 (en) Automating the failover of a relational database in a cloud computing environment
WO2021068919A1 (en) Pbft algorithm-based improved method for active recovery of single node from anomaly
WO2017215430A1 (en) Node management method in cluster and node device
CN113660350A (en) Distributed lock coordination method, device, equipment and storage medium
CN109361542A (en) The fault handling method of client, device, system, terminal and server
CN113656168A (en) Method, system, medium and equipment for automatic disaster recovery and scheduling of traffic
CN110990190A (en) Distributed file lock fault processing method, system, terminal and storage medium
CN113672471A (en) Software monitoring method, device, equipment and storage medium
CN107426012B (en) Fault recovery method and device based on super-fusion architecture
CN113703946A (en) Application recovery method and device, electronic equipment and computer readable storage medium
CN112492011A (en) Distributed storage system fault switching method, system, terminal and storage medium
CN113765690A (en) Cluster switching method, system, device, terminal, server and storage medium
CN113835621A (en) IP arbitration process quantity management and control method, system, terminal and storage medium
CN110620684A (en) Storage double-control split-brain-preventing method, system, terminal and storage medium
CN113778763B (en) Intelligent switching method and system for three-way interface service faults
CN114168071B (en) Distributed cluster capacity expansion method, distributed cluster capacity expansion device and medium
US20220094589A1 (en) Communications methods and apparatus for minimizing and/or preventing message processing faults
CN112367373B (en) Node determination method and device for distributed system and storage medium
CN114416522A (en) Block chain system test method, device, equipment and storage medium
CN113238893A (en) Disaster recovery system, method, computer device and medium for multiple data centers
CN112367386A (en) Ignite-based automatic operation and maintenance method, apparatus and computer equipment
CN112491732A (en) Storage network congestion management method, system, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant