CN108134712A - A kind of processing method, device and the equipment of distributed type assemblies fissure - Google Patents

A kind of processing method, device and the equipment of distributed type assemblies fissure Download PDF

Info

Publication number
CN108134712A
CN108134712A CN201711374254.XA CN201711374254A CN108134712A CN 108134712 A CN108134712 A CN 108134712A CN 201711374254 A CN201711374254 A CN 201711374254A CN 108134712 A CN108134712 A CN 108134712A
Authority
CN
China
Prior art keywords
business
ballot
cluster
clusters
terminal
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
CN201711374254.XA
Other languages
Chinese (zh)
Other versions
CN108134712B (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.)
Hytera Communications Corp Ltd
Original Assignee
Hytera Communications Corp 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 Hytera Communications Corp Ltd filed Critical Hytera Communications Corp Ltd
Priority to CN201711374254.XA priority Critical patent/CN108134712B/en
Publication of CN108134712A publication Critical patent/CN108134712A/en
Application granted granted Critical
Publication of CN108134712B publication Critical patent/CN108134712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 

Abstract

The invention discloses a kind of processing method, device and the equipment of distributed type assemblies fissure, when the operating status of other side can not be perceived between two business clusters of interconnection, two business clusters are switched to a reading mode, according between two business clusters and database, whether the result that can normally connect determines the at most one business cluster with initiation ballot right, business cluster with ballot right is gathered to preset voter initiates ballot, does not initiate to vote without the business cluster for initiating ballot right;If the business cluster that ballot is initiated within the preset time obtains scheduled poll, it is normal service pattern that the business cluster voted, which will be initiated, by read-only pattern switching, voting results are notified not initiate the business cluster voted in two clusters, and stop not initiating the work of the business cluster of ballot.Therefore, by means of the invention it is also possible to avoid the generation of fissure completely, and the service condition of voting results more closing to reality.

Description

A kind of processing method, device and the equipment of distributed type assemblies fissure
Technical field
The present invention relates to distributed type assemblies field more particularly to a kind of processing method of distributed type assemblies fissure, device and Equipment.
Background technology
, can be there are mutually redundant two clusters in the distributed type assemblies of High Availabitity, two clusters are in connection shape During state, service is provided to the user by one of cluster, another cluster is used as backup cluster, is reached each other by heartbeat link Into active and standby negotiation.But when there is heartbeat link failure in two clusters, in two clusters may only there are one for survival shape State may only provide service to the user by one of cluster, if the two is all existing state, while provide clothes to the user Business, and the two can not carry out the synchronization of data, mean that fissure be in the presence of, and such case can lead to user data Confusion, specifically, it is possible that the inconsistent situation of the user data stored in two clusters, therefore can not just learn on earth The user data of which cluster-based storage is effective data.
In the prior art, many methods for solving fissure are provided, but how deramified many methods are all unresolved The cluster of selection activity provides service to the user, also, during for voter and inconsistent user's ballot, may result in throwing Ticket result is unavailable, and if when a side of non-ballot is broken down, voting results can not be also learnt, so as to cause fissure Occur.
Invention content
In view of this, the embodiment of the invention discloses a kind of processing method, device and the equipment of distributed type assemblies fissure, solutions Determined in the prior art, can not the cluster of deramified selection activity provide service to the user, voter and user are thrown When ticket is inconsistent, it may result in that voting results are unavailable, and if when a side of non-ballot is broken down, can not also learn Voting results, the problem of generation so as to cause fissure.
An embodiment of the present invention provides a kind of processing method of distributed type assemblies fissure, the method may include:
When the operating status of other side can not be perceived between two business clusters being connected with each other in distributed system, institute It states two business clusters and is switched to a reading mode;
Judge whether the connection between described two business clusters and database is normal, and according to described two business clusters The whether normal judging result of connection between the database, determining at most one has from described two business clusters Initiate the business cluster of ballot right;
It is described that there is the business cluster for initiating ballot right to gather initiation ballot to voter;Wherein, voter's collection It is combined into what is determined from using terminal and/or arbitration terminal according to preset selection rule;The using terminal is passes through connection Any one in described two business clusters carries out the terminal of network operation, and the arbitration terminal is makes except described in network node With the server except terminal;
Whether the business cluster for judging to initiate ballot obtains scheduled poll within the preset time;
If the business cluster for initiating ballot obtains scheduled poll within the preset time, initiate to vote by described Business cluster by read-only pattern switching be normal service pattern, voting results are notified not initiate to vote in described two clusters Business cluster.
Optionally, according to the whether normal judging result of connection between described two business clusters and the database, At most one is determined from described two business clusters has the business cluster for initiating ballot right, including:
If the connection of described two business clusters and the database is normal, each business in described two business clusters Cluster detects whether other business clusters have initiated ballot respectively;
Ballot has been played when other services sets mass-sendings are not detected in the first business cluster in described two business clusters, it is described First business cluster has the right for initiating ballot;
If in described two business clusters only there are one with the connection of the database it is normal, connect with the database Normal business cluster has the right for initiating ballot;
If described two business clusters are abnormal with the connection of the database, described two business clusters do not have Initiate the right of ballot.
Optionally, it is described that there is the business cluster for initiating ballot right to gather initiation ballot to voter, including:
Voting records and timestamp are written in the business cluster for initiating ballot in the database.
Optionally, if the connection of described two business clusters and the database is normal, described two services sets Each business cluster detects whether other business clusters have initiated ballot respectively in group, including:
The first business cluster in described two business clusters inquire in the database other voting records and when Between stab;
When the voting records and timestamp of other business clusters exist and current time is without departing from from the timestamp During the preset time of beginning, other services sets mass-sendings have played ballot;
When the voting records of other business clusters be not present or the voting records of other business clusters and when Between stamp exist and when current time is beyond preset time since the timestamp, other business clusters do not initiate to throw Ticket.
Optionally, according to preset selection rule, voter's set is determined from using terminal and/or arbitration terminal, Including:
Judge whether the quantity for meeting the using terminal of preset condition in the using terminal has reached preset voter The quantity of set;
If the quantity for meeting the using terminal of preset condition has been more than the quantity of preset voter's set, make from described With the voter determined in terminal in voter's set;
If the quantity for meeting the using terminal of preset condition is less than the quantity of preset voter's set, default from meeting Selection arbitrates terminal to determine the voter together with the using terminal for meeting preset condition in the arbitration terminal of condition Set.
Optionally, the preset condition is:
Using terminal line duration is more than preset time and in stable condition.
Optionally, the business cluster that voting results are notified not initiate ballot in described two clusters, including:
The database is written into the voting results;
The business cluster for not initiating ballot reads the voting results from the database.
Optionally, the business cluster that voting results are notified not initiate ballot in described two clusters, including:
The voting results are sent to the using terminal for being connected to the business cluster for initiating ballot and/or arbitration eventually End;
When the using terminal and/or arbitration terminal are connect with the services sets faciation for not initiating ballot, by described in Voting results are sent to the business cluster for not initiating ballot.
Optionally, whether the business cluster for judging to initiate ballot obtains scheduled poll within the preset time Afterwards, it further includes:
If the business cluster for initiating ballot does not obtain scheduled poll within the preset time, in described two business clusters Whether the services sets for not initiating ballot have mass-sended the business cluster voted and returned and perform and judge to initiate ballot in the preset time Inside obtain scheduled poll.
Optionally, the scheduled poll is poll more than half in voter set.
Optionally, the poll for initiating the business cluster acquisition of ballot is the weighted sum of voter's ballot.
Optionally, the weight of the voter changes according to its importance.
Optionally, it does not initiate to vote without the business cluster for initiating ballot right.
An embodiment of the present invention provides a kind of storage mediums, are stored thereon with program, real when which is executed by processor The processing method of the existing distributed type assemblies fissure.
An embodiment of the present invention provides a kind of processing equipment of distributed type assemblies fissure, the distributed type assemblies equipment packets It includes:Memory is used to store program;Processor is used to run described program, when the processor runs described program When, the processor realizes the processing method of distributed type assemblies fissure of the present invention.
It, will when the operating status of other side can not be perceived between two business clusters of interconnection in the present embodiment The two business clusters are switched to a reading mode, according between two business clusters and database whether the result that can normally connect Determining at most one, there are the services sets for initiating ballot right to have mass-sended ballot, without the business cluster for initiating ballot right It does not initiate to vote, there is the business cluster for initiating ballot right to gather to the voter and initiate ballot, if in the preset time Scheduled poll is inside obtained, will initiate the business cluster voted by read-only pattern switching is normal service pattern, and ballot is tied Fruit notifies not initiating the business cluster of ballot in the two clusters, and stops not initiating the work of the business cluster of ballot.In this way, In the case where ensureing that data can be read out, the generation of fissure is also completely avoided;Also, in being gathered due to voter Voter determines by priority principle of using terminal, therefore the service condition of voting results more closing to reality;Except this it Outside, voting results using multipath transmit as a result, even if do not initiate ballot side's part link break down can know Voting results.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention, for those of ordinary skill in the art, without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow diagram of the processing method of distributed type assemblies fissure provided in an embodiment of the present invention;
Fig. 2 is a kind of flow signal of method for determining the business cluster with ballot right provided in an embodiment of the present invention Figure;
Fig. 3 is the schematic diagram that cluster initiates ballot in distributed type assemblies provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram for informing an other cluster in distributed type assemblies provided in an embodiment of the present invention after the completion of ballot;
Fig. 5 is a kind of structure diagram of the processing unit of distributed type assemblies fissure provided in an embodiment of the present invention;
Fig. 6 is a kind of structure diagram of the processing equipment of distributed type assemblies fissure provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment shall fall within the protection scope of the present invention.
With reference to figure 1, a kind of flow diagram of the processing method of distributed type assemblies fissure of the embodiment of the present invention is shown, In the present embodiment, the method may include:
S101:When the operating status that other side can not be perceived between two business clusters being connected with each other in distributed system When, described two business clusters are switched to a reading mode;
In the present embodiment, in the distributed type assemblies of High Availabitity, there may be two business clusters of interconnection, In, the state of other side can be perceived by certain mechanism between multiple business clusters of interconnection, such as heartbeat can be passed through Whether the mode of link perceives other side in normal operating condition, when there is heartbeat link failure, that is, two be connected with each other industry The operating status of other side can not be perceived between business cluster, in addition to this, when either party the machine of delaying occurs in two business clusters Situation, the two business clusters can not also perceive the operating status of other side again.Wherein, furtherly, the two of interconnection A business cluster can also be mutually redundant two business clusters.
In the present embodiment, described reading mode can be understood as using terminal may only be by business cluster from database Data are read, but data cannot be written in the database, such as increase, modification of data etc. cannot be carried out in the database. Under only reading mode, cluster can carry out the filtering of type of business at proxy entry, by its in addition to digital independent business Its service filter falls, i.e., only receives to read the business of data, do not receive other business in addition to digital independent business;Or also It can be limited in database write service, i.e., not perform the business of database write-in data.
S102:Judge whether the connection between described two business clusters and database is normal, according to described two business The whether normal judging result of connection between cluster and institute's database determines at most one tool from described two business clusters There is the business cluster for initiating ballot right;
In the present embodiment, it should be noted that there is the business cluster for initiating ballot right can initiate to vote, do not have Initiating the business cluster of ballot right cannot initiate to vote.
In the present embodiment, judge whether the connection between the two business clusters and database that are connected with each other is normal, it can be with It is interpreted as judging whether the two business clusters can normally read and write database, can be specifically, judge described two industry It is engaged in the data whether cluster can normally in reading database, and judges whether described two business clusters can be normal Data are written in the database.
In the present embodiment, in order to ensure not occur the situation of fissure, the same time may only determine that at most one has hair The business cluster of ballot right is played, with reference to figure 2, as an example, S102 can specifically include:
S201:It is every in described two business clusters if the connection of described two business clusters and the database is normal A business cluster detects whether other business clusters have initiated ballot respectively;
In the present embodiment, initiating the business cluster of ballot needs that voting records and timestamp are written in the database, so that Any one business cluster can judge whether business cluster initiates according to the voting records and timestamp of other business clusters Ballot, specific S201 can include:
The first business cluster in described two business clusters inquires the ballot of other business clusters in the database Record and timestamp;
When the voting records and timestamp of other business clusters exist and current time is without departing from from the timestamp During the preset time of beginning, other services sets mass-sendings have played ballot;
When the voting records of other business clusters are not present, or the voting records of other business clusters and when Between stamp exist and when current time is beyond preset time since the timestamp, other business clusters do not initiate to throw Ticket.
Distance explanation:If two business clusters being connected with each other include:Cluster A and cluster B, then when the first cluster is cluster During A, other clusters are cluster B;If the first cluster is cluster B, other clusters are cluster A.
Wherein, the timestamp includes the oneself state of business cluster, and self-operating state can include:Business cluster Health status, that is, business cluster whether in survival state, whether initiated ballot etc..Therefore, described two business clusters It can learn whether other business clusters have initiated ballot by database.
S202:Throwing has been played when other services sets mass-sendings are not detected in the first business cluster in described two business clusters Ticket, the first business cluster have the right for initiating ballot;
In the present embodiment, when the connection between described two business clusters and the database is normal, two industry are represented Business cluster can get the operating status of other side from the database, when wherein, a business cluster is detected with being somebody's turn to do Other business clusters of services sets faciation connection do not initiate to vote, then the business cluster has the right for initiating ballot, if with Other business clusters of services sets faciation connection have initiated ballot, then the business cluster does not have initiation under current state The right of ballot.
S203:If in described two business clusters only there are one with the connection of the database it is normal, with the data Library, which connects normal business cluster, has the right for initiating ballot;
In the present embodiment, if only there are one normal with the connection of the data in described two business clusters, then it represents that another The outer one business cluster normal with the database malunion can not be got and the services sets faciation from the database The state of business cluster to connect, and also sent out with the business cluster that the database is normally connect without database described in normal direction The operating status of the business cluster is given, therefore there is the right of initiation ballot with the business cluster that database is normally connect, and nothing Method does not have the right of ballot with the business cluster that the database is normally connect.
It illustrates:Assuming that the two business clusters interconnected is cluster A and cluster B, if then cluster can and data Library normally connects, and cluster B cannot normally be connected with database, and in this state, cluster B can not obtain cluster from database The operating status of A, while cluster B also sends operating status without normal direction database.
S204:If described two business clusters are abnormal with the connection of the database, described two business clusters are equal Without the right for initiating ballot.
In the present embodiment, when two business clusters of interconnection can not normally be connect with the database, represent The two business clusters can not get the operating status of other side from the database, the two business clusters also can not be just Often perform business.At this point, the two does not have the right for initiating ballot, i.e., the two cannot be initiated to vote.
S103:It is described that there is the business cluster for initiating ballot right to gather initiation ballot to voter;Wherein, the ballot Person's collection is combined into what is determined from using terminal and/or arbitration terminal according to preset selection rule;The using terminal is passes through The terminal that any one in described two business clusters carries out network operation is connected, the arbitration terminal is removes institute in network node State the server except using terminal;
In the present embodiment, at most one is only defined in S102 has the business cluster for initiating ballot right, i.e., only There is at most one there is the business cluster for initiating ballot right can initiate to vote, there is initiation franchise when defining one It is described that there is the business cluster for initiating ballot right to initiate ballot to preset voter set during the business cluster of profit.
It illustrates:As shown in figure 3, two business clusters being connected with each other are cluster A and cluster B, when cluster A and cluster There is heartbeat link failure in B, i.e., when both sides can not perceive the operating status of other side, first determines whether out cluster A and database Whether connection and the connection between cluster B and database are normal;If cluster A and cluster B can be normal with database It connects, then cluster A and cluster B is respectively provided with the right for initiating ballot;Then, whether cluster A and cluster B judge other side respectively Ballot is initiated, if cluster B detects that cluster A does not initiate also to vote, cluster B is the cluster with initiation ballot right, so Cluster B can gather to preset voter afterwards initiates ballot.Wherein it is determined that when voter gathers, if User5 and User6 are not Often online user, then it is assumed that User5 and User6 is the user without ballot right, therefore is not belonging to voter's set The range of consideration, as can be seen from the figure determine voter collection be combined into User1, User2, User3, User4, Abiter1, Abiter2 and Abiter3, but User3 has been likely to occur Single Point of Faliure, therefore can not vote in voter's set, but Even if being to have a small amount of using terminal that can not vote, the result of ballot is not influenced.
In the present embodiment, the voter in gathering for voter can be pre-configured, such as can be technical staff Situation choice of dynamical pre-set or according to user;But either any situation, it is required for abiding by User's preferential principle is followed, specifically, determining institute from using terminal and arbitration terminal according to preset selection rule in S103 Voter's set is stated, including:
Judge whether the quantity for meeting the using terminal of preset condition in the using terminal has reached preset voter The quantity of set;
If the quantity for meeting user's terminal of preset condition has been more than the quantity of preset voter's set, from institute State the voter determined in using terminal in voter's set;
If the quantity for meeting the using terminal of preset condition is less than the quantity of preset voter's set, default from meeting Condition arbitrates terminal to determine the ballot together with the using terminal for meeting preset condition with selection in arbitration terminal Person gathers.
In the present embodiment, it should be noted that the preset condition can be that using terminal line duration is more than default Time and in stable condition.For example, it is to be understood that using terminal is often online and in stable condition, wherein described often online It can be understood as carrying out network operation, such as public security system frequently by two business clusters of the interconnection mentioned in S101 Fixation acquisition station, bank server etc..
It, can be with when using terminal line duration is more than the preset time and in stable condition quantity is more in the present embodiment Determine that voter gathers from using terminal;When using terminal line duration is more than preset time and in stable condition negligible amounts When, voter is gathered and is determined, a part of can be determined from user's terminal, a part is determined from arbitration terminal;When When being more than preset time and in stable condition using terminal not comprising line duration, all voter's set can be from arbitration eventually It is determined in end.Therefore, even if there is section failure in using terminal, the execution of the present embodiment is nor affected on, that is to say, that i.e. Make there is part using terminal to break down, business cluster still can initiate to vote.
In the present embodiment, it should be noted that the using terminal can be by connecting the two above-mentioned industry Any one of business cluster carries out the terminal of network operation, such as, it can be understood as using terminal logs in the two services sets Any one of group, the business cluster logged in by the using terminal provide the terminal of network service.In addition to this, network section Further include many often online servers in point, but these servers need not be connected to it is any in the two business clusters One progress network operation, such server can be arbitrator's terminal, and the voter in voter's set can also be from secondary It is determined in sanction person's terminal.
S104:Whether the business cluster for judging to initiate ballot obtains scheduled poll within the preset time.
In the present embodiment, scheduled poll can be most of poll in voter's set, more specifically, as showing Example can be polls more than half in voter's set.Also, the quantity of voter can be odd number in voter's set Can be even number, after initiating to vote, as long as the business cluster for initiating ballot has got the ballot within the preset time Poll more than half can be regarded as voting successfully in person's set.
Specifically, the poll that the business cluster for initiating ballot obtains is the weighted sum of voter's ballot, also, described The weight of voter changes according to importance, and importance mentioned here is the importance of voter.
In practical applications, after there is the services sets mass-sending for initiating ballot right to have played ballot, may there is one in voter It will appear failure, these business clusters to break down are just no longer participate in voting, but as long as the business cluster to break down is big It is more than half in voter gathers, voting results would not be had an impact.
S105:If the business cluster for initiating ballot obtains scheduled poll within the preset time, by the hair It is normal service pattern that the business cluster voted, which is acted, by read-only pattern switching, and voting results are notified not send out in described two clusters Play the business cluster of ballot.
It illustrates:As shown in figure 3, if cluster B has initiated ballot, and voter's collection is obtained within the preset time Poll more than half in conjunction, then it represents that it votes successfully, at this point it is possible to cluster B is thought for main cluster, and cluster A is cluster B's Backup cluster or it is to be understood that B initiation vote successfully after, B provides the cluster of normal service for using terminal, and A is at this time Stop servicing.
In the present embodiment, for normal service pattern, it can be understood as, initiating the successful cluster of ballot at this time can be normal Connection using terminal, and provide network service, and the operation of read-write can be performed in the database for using terminal.
In the present embodiment, notify the business cluster for not initiating ballot in described two clusters that can specifically wrap voting results Include following two embodiments:
Embodiment one:The database is written into the voting results;The business cluster for not initiating ballot is from institute It states and the voting results is read in database.
Embodiment two:The voting results are sent to the using terminal for being connected to the business cluster for initiating ballot And/or arbitration terminal;When the using terminal and/or arbitration terminal are connect with the services sets faciation for not initiating ballot, The voting results are sent to the business cluster for not initiating ballot.
In the present embodiment, voting results are sent to the voter for the business cluster for being connected to initiation ballot and except voter Except using terminal in, wherein, voter be initiate ballot the using terminal voted of business cluster and/or arbitration eventually End.
In the present embodiment, the business cluster for not initiating ballot in two clusters for being connected with each other voting results notice is performed Operation when, can perform the scheme of embodiment one can also perform the scheme of embodiment two, in addition to this it is possible to together Shi Zhihang embodiments one and embodiment two.But in the present embodiment, preferred embodiment is:Both performed embodiment one or Perform embodiment two.In this way, when the services sets group energy for not initiating ballot enough connects upper server, reading service can be passed through The operating status of the business cluster of ballot is initiated in device, know ballot as a result, even if do not initiate a side of ballot can not be with When the database normally connects, it can also never initiate to know other side's in the connected using terminal of business cluster of ballot Voting results.
It illustrates:As shown in figure 4, if cluster B is the business cluster for initiating ballot, cluster A is the industry for not initiating ballot It is engaged in cluster, after poll closing, voting results can be informed database and be connected to the voter of cluster B and except throwing by cluster B Using terminal except ticket person, wherein, User1, User2, User3, User4, Arbiter1, Arbiter2 and Arbiter3 are Voter, and User5 and User6 is voteless using terminal, such as can be the using terminal in addition to voter, Middle User3 may be the using terminal that is not connected with cluster B, and the reason of not being attached with cluster B may be to occur Single Point of Faliure or there is network failure, it is then possible to by receiving the databases of voting results, voter or except throwing The voting results are informed cluster A by the using terminal except ticket person.But the time-out if the side for initiating ballot votes, i.e., The business cluster for initiating ballot does not obtain poll more than half in voter's set within the preset time, described two Ballot business cluster is not initiated in business cluster and gathers initiation ballot to preset voter, and return and perform S104.It needs Bright, the premise that not initiating the business cluster of ballot in two business clusters can initiate to vote is not initiate the business of ballot Cluster can normally be connect with database.
It, will when the operating status of other side can not be perceived between two business clusters of interconnection in the present embodiment The two business clusters are switched to a reading mode, according between two business clusters and database whether the result that can normally connect Determining at most one, there are the services sets for initiating ballot right to have mass-sended ballot, without the business cluster for initiating ballot right It does not initiate to vote, there is the business cluster for initiating ballot right to gather to the voter and initiate ballot, if in the preset time Scheduled poll is inside obtained, will initiate the business cluster voted by read-only pattern switching is normal service pattern, and ballot is tied Fruit notifies not initiating the business cluster of ballot in the two clusters, and stops not initiating the work of the business cluster of ballot.In this way, In the case where ensureing that data can be read out, the generation of fissure is also completely avoided;Also, in being gathered due to voter Voter determines by priority principle of using terminal, therefore the service condition of voting results more closing to reality;Except this it Outside, voting results using multipath transmit as a result, even if do not initiate ballot side's part link break down can know Voting results.
With reference to figure 5, show that a kind of structure of the processing unit of distributed type assemblies fissure provided in an embodiment of the present invention is shown It is intended to, described device can include:
First mode switch unit 501, can not between be connected with each other in distributed system two business clusters for working as When perceiving the operating status of other side, described two business clusters are switched to a reading mode;
First judging unit 502, for judging whether the connection between described two business clusters and database is normal;
First determination unit 503, for according to the connection between described two business clusters and the database whether just Normal judging result determines that at most one has the business cluster for initiating ballot right from described two business clusters;
First initiates ballot unit 504, gathers for the business cluster with initiation ballot right to voter and sends out Play ballot;Wherein, voter's collection is combined into according to preset selection rule, is determined from using terminal and/or arbitration terminal 's;The using terminal is that the terminal of network operation is carried out by connecting any one in described two business clusters, described secondary Terminal is cut out as the server in network node in addition to the using terminal;
Second judgment unit 505, for judging it is pre- whether the business cluster for initiating ballot obtains within the preset time Fixed poll;
Second mode switch unit 506, if being obtained within the preset time for the business cluster for initiating ballot Scheduled poll, by it is described initiate ballot business cluster by read-only pattern switching be normal service pattern;
Notification unit 507, if obtaining scheduled ticket within the preset time for the business cluster for initiating ballot Number notifies voting results not initiating the business cluster of ballot in described two clusters.
Optionally, first determination unit includes:
Detection sub-unit, if normal for described two business clusters and the connection of the data, described two business Each business cluster detects whether other business clusters have initiated ballot respectively in cluster;
Other business are not detected in first determination subelement, the first business cluster for working as in described two business clusters Cluster has initiated ballot, determines that the first business cluster has the right for initiating ballot;
Second determination subelement, if in described two business clusters only there are one with the connection of the database just Often, it is determined that normal business cluster is connect with the database has the right for initiating ballot;
Third determination subelement, if abnormal with the connection of the database for described two business clusters, really Fixed described two business clusters do not have the right for initiating ballot.
Optionally, the first initiation ballot unit includes:
Writing unit, for voting records and timestamp to be written in the database
Optionally, the detection sub-unit, including:
Subelement is inquired, for the voting records and timestamp of inquiry business cluster in the database;
Judge subelement, the voting records of other business clusters and timestamp exist and current time does not surpass for working as When going out the preset time since the timestamp, judgement other services sets mass-sendings have played ballot;When other business When the voting records of cluster are not present or current time exceeds the preset time since the timestamp, judgement is described other Business cluster does not initiate to vote.
Optionally, it further includes:
Whether third judging unit, the quantity for judging to meet in the using terminal terminal of preset condition reach The quantity of preset voter's set;
Second determination unit, if being more than preset voter's set for meeting the quantity of the using terminal of preset condition Quantity, then from the user determine voter set in voter;
Third determination unit, if being less than preset voter's set for meeting the quantity of the using terminal of preset condition Quantity, from the arbitration terminal for meet preset condition selection arbitration terminal with the using terminal with preset condition together determine institute State voter's set.
Optionally, the preset condition is:
Using terminal line duration is more than preset time and in stable condition.
Optionally, the notification unit, including:
Subelement is written, for the voting results to be written the database;
Reading subunit reads the ballot knot for the business cluster for not initiating ballot from the database Fruit.
Optionally, the notification unit, including:
First transmission sub-unit is connected to the business cluster for initiating ballot for the voting results to be sent to Using terminal and/or arbitration terminal;
Second transmission sub-unit, for working as the using terminal and/or arbitrating terminal and the business for not initiating ballot When cluster is connected, the voting results are sent to the business cluster for not initiating ballot.
Optionally, it further includes:
Second initiates ballot unit, if not obtaining scheduled ticket within the preset time for initiating the business cluster of ballot It counts, the services sets for not initiating ballot in described two business clusters have mass-sended ballot and returned to second judgment unit.
Optionally, the scheduled poll is poll more than half in voter set.
Optionally, the poll for initiating the business cluster acquisition of ballot is the weighted sum of voter's ballot.
Optionally, the weight of the voter changes according to its importance.
Optionally, it does not initiate to vote without the business cluster for initiating ballot right.
Device through this embodiment in the case where ensureing that data can be read out, also completely avoids fissure Generation;Also, voter determines that voting results are more by priority principle of using terminal in being gathered due to voter Add the service condition of closing to reality;In addition to this, voting results using multipath transmit as a result, even if do not initiate ballot one Square part link failure can also know voting results.
An embodiment of the present invention provides a kind of storage mediums, are stored thereon with program, real when which is executed by processor The processing method of the existing distributed type assemblies fissure.
With reference to figure 6, show that an embodiment of the present invention provides a kind of structures of the processing equipment of distributed type assemblies fissure to show It is intended to, in the present embodiment, which includes memory 601, processor 602;
Wherein, memory 601, for storing program;
Processor 602, for running described program, specifically, processor realizes following steps when performing program:
When the operating status of other side can not be perceived between two business clusters being connected with each other in distributed system, institute It states two business clusters and is switched to a reading mode;
Judge whether the connection between described two business clusters and database is normal, and according to described two business clusters The whether normal judging result of connection between the database, determining at most one has from described two business clusters Initiate the business cluster of ballot right;
It is described that there is the business cluster for initiating ballot right to gather initiation ballot to voter;Wherein, voter's collection It is combined into what is determined from using terminal and/or arbitration terminal according to preset selection rule;The using terminal is passes through connection Any one in described two business clusters carries out the terminal of network operation, and the arbitration terminal is makes except described in network node With the server except terminal;
Whether the business cluster for judging to initiate ballot obtains scheduled poll within the preset time;
If the business cluster for initiating ballot obtains scheduled poll within the preset time, initiate to vote by described Business cluster by read-only pattern switching be normal service pattern, voting results are notified not initiate to vote in described two clusters Business cluster.
Optionally, according to the whether normal judging result of connection between described two business clusters and the database, At most one is determined from described two business clusters has the business cluster for initiating ballot right, including:
If the connection of described two business clusters and the database is normal, each business in described two business clusters Cluster detects whether other business clusters have initiated ballot respectively;
Ballot has been played when other services sets mass-sendings are not detected in the first business cluster in described two business clusters, it is described First business cluster has the right for initiating ballot;
If in described two business clusters only there are one with the connection of the database it is normal, connect with the database Normal business cluster has the right for initiating ballot;
If described two business clusters are abnormal with the connection of the database, described two business clusters do not have Initiate the right of ballot.
Optionally, it is described that there is the business cluster for initiating ballot right to gather initiation ballot to voter, including:
Voting records and timestamp are written in the business cluster for initiating ballot in the database.
Optionally, if the connection of described two business clusters and the database is normal, described two services sets Each business cluster detects whether other business clusters have initiated ballot respectively in group, including:
The first business cluster in described two business clusters inquire in the database other voting records and when Between stab;
When the voting records and timestamp of other business clusters exist and current time is without departing from from the timestamp During the preset time of beginning, other services sets mass-sendings have played ballot;
When the voting records of other business clusters are not present, or the voting records of other business clusters and when Between stamp exist and when current time is beyond preset time since the timestamp, other business clusters do not initiate to throw Ticket.
Optionally, according to preset selection rule, voter's set is determined from using terminal and/or arbitration terminal, Including:
Judge whether the quantity for meeting the using terminal of preset condition in the using terminal has reached preset voter The quantity of set;
If the quantity for meeting the using terminal of preset condition has been more than the quantity of preset voter's set, make from described With the voter determined in terminal in voter's set;
If the quantity for meeting the using terminal of preset condition is less than the quantity of preset voter's set, default from meeting Selection arbitrates terminal to determine the voter together with the using terminal for meeting preset condition in the arbitration terminal of condition Set.
Optionally, the preset condition is:
Using terminal line duration is more than preset time and in stable condition.
Optionally, the business cluster that voting results are notified not initiate ballot in described two clusters, including:
The database is written into the voting results;
The business cluster for not initiating ballot reads the voting results from the database.
Optionally, the business cluster that voting results are notified not initiate ballot in described two clusters, including:
The voting results are sent to the using terminal for being connected to the business cluster for initiating ballot and/or arbitration eventually End;
When the using terminal and/or arbitration terminal are connect with the services sets faciation for not initiating ballot, by described in Voting results are sent to the business cluster for not initiating ballot.
Optionally, whether the business cluster for judging to initiate ballot obtains scheduled poll within the preset time Afterwards, it further includes:
If the business cluster for initiating ballot does not obtain scheduled poll within the preset time, in described two business clusters Whether the services sets for not initiating ballot have mass-sended the business cluster voted and returned and perform and judge to initiate ballot in the preset time Inside obtain scheduled poll.
Optionally, the scheduled poll is poll more than half in voter set.
Optionally, the poll for initiating the business cluster acquisition of ballot is the weighted sum of voter's ballot.
Optionally, the weight of the voter changes according to its importance.
Optionally, it does not initiate to vote without the business cluster for initiating ballot right.
Wherein, the equipment in the present embodiment can be server, PC, PAD, mobile phone etc..
Wherein, the impermanency that the memory in the equipment of the present embodiment can include in computer readable storage medium is deposited The forms such as reservoir, random access memory (RAM) and/or Nonvolatile memory, such as read-only memory or flash memory (falsh RAM), memory includes at least one storage chip.
Equipment through this embodiment in the case where ensureing that data can be read out, also completely avoids fissure Generation;Also, voter determines that voting results are more by priority principle of using terminal in being gathered due to voter Add the service condition of closing to reality;In addition to this, voting results using multipath transmit as a result, even if do not initiate ballot one Square part link failure can also know voting results.
It should be noted that each embodiment in this specification is described by the way of progressive, each embodiment weight Point explanation is all difference from other examples, and just to refer each other for identical similar part between each embodiment.
The foregoing description of the disclosed embodiments enables professional and technical personnel in the field to realize or use the present invention. A variety of modifications of these embodiments will be apparent for those skilled in the art, it is as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention The embodiments shown herein is not intended to be limited to, and is to fit to and the principles and novel features disclosed herein phase one The most wide range caused.

Claims (15)

1. a kind of processing method of distributed type assemblies fissure, which is characterized in that the method includes:
When the operating status of other side can not be perceived between two business clusters being connected with each other in distributed system, described two A business cluster is switched to a reading mode;
Judge whether the connection between described two business clusters and database is normal, and according to described two business clusters and institute The whether normal judging result of connection between database is stated, determines that at most one has initiation from described two business clusters The business cluster for right of voting;
It is described that there is the business cluster for initiating ballot right to gather initiation ballot to voter;Wherein, voter's collection is combined into It is determined from using terminal and/or arbitration terminal according to preset selection rule;The using terminal is by described in connection Any one in two business clusters carries out the terminal of network operation, and the arbitration terminal is uses eventually except described in network node Server except end;
Whether the business cluster for judging to initiate ballot obtains scheduled poll within the preset time;
If the business cluster for initiating ballot obtains scheduled poll within the preset time, by the industry for initiating ballot Business cluster is normal service pattern by read-only pattern switching, and voting results are notified not initiate the industry of ballot in described two clusters Business cluster.
2. according to the method described in claim 1, it is characterized in that, according between described two business clusters and the database The whether normal judging result of connection, from described two business clusters determine at most one have initiate ballot right industry Business cluster, including:
If the connection of described two business clusters and the database is normal, each business cluster in described two business clusters Detect whether other business clusters have initiated ballot respectively;
Ballot has been played when the mass-sending of other services sets is not detected in the first business cluster in described two business clusters, described first Business cluster has the right for initiating ballot;
If in described two business clusters only there are one with the connection of the database it is normal, connect normally with the database Business cluster have initiate ballot right;
If described two business clusters are abnormal with the connection of the database, described two business clusters, which do not have, initiates The right of ballot.
3. according to the method described in claim 1, it is characterized in that, described have the business cluster for initiating ballot right to ballot Person, which gathers, initiates ballot, including:
Voting records and timestamp are written in the business cluster for initiating ballot in the database.
4. if according to the method described in claim 3, it is characterized in that, described two business clusters and the database Connection is normal, and each business cluster detects whether other business clusters have initiated ballot respectively in described two business clusters, Including:
The first business cluster in described two business clusters inquires the voting records of other business clusters in the database And timestamp;
When voting records and the timestamp presence of other business clusters and current time is without departing from since the timestamp Preset time when, the other services sets mass-sending has played ballot;
When the voting records of other business clusters are not present or the voting records and timestamp of other business clusters In the presence of and current time beyond preset time since the timestamp when, other business clusters do not initiate to vote.
5. according to the method described in claim 1, it is characterized in that, according to preset selection rule, from using terminal and/or secondary It cuts out terminal and determines voter's set, including:
Judge whether the quantity for meeting the using terminal of preset condition in the using terminal has reached preset voter's set Quantity;
If the quantity for meeting the using terminal of preset condition has been more than the quantity of preset voter's set, from described using eventually The voter in voter's set is determined in end;
If the quantity for meeting the using terminal of preset condition is less than the quantity of preset voter set, from meeting preset condition Arbitration terminal in selection arbitration terminal to determine that the voter gathers together with the using terminal for meeting preset condition.
6. according to the method described in claim 5, it is characterized in that, the preset condition is:
Using terminal line duration is more than preset time and in stable condition.
7. according to the method described in claim 1, it is characterized in that, described notify not send out in described two clusters by voting results The business cluster of ballot is played, including:
The database is written into the voting results;
The business cluster for not initiating ballot reads the voting results from the database.
8. according to the method described in claim 1, it is characterized in that, described notify not send out in described two clusters by voting results The business cluster of ballot is played, including:
The voting results are sent to the using terminal for being connected to the business cluster for initiating ballot and/or arbitration terminal;
When the using terminal and/or arbitration terminal are connect with the services sets faciation for not initiating ballot, by the ballot As a result it is sent to the business cluster for not initiating ballot.
9. according to the method described in claim 1, it is characterized in that, whether described judge to initiate the business cluster of ballot default Time in obtain scheduled poll after, further include:
If the business cluster for initiating ballot does not obtain scheduled poll within the preset time, do not sent out in described two business clusters The services sets for playing ballot have mass-sended whether the business cluster voted and returned and perform and judge to initiate ballot obtains within the preset time Obtained scheduled poll.
10. according to the method for claim 1, it is characterised in that, the scheduled poll is in voter set half Poll more than number.
11. according to the method described in claim 1, it is characterized in that, the poll that the business cluster for initiating ballot obtains is described The weighted sum of voter's ballot.
12. according to the method for claim 11, it is characterised in that, the weight of the voter changes according to its importance Become.
13. it according to the method described in claim 1, it is characterized in that, is not initiated without the business cluster for initiating ballot right Ballot.
14. a kind of computer readable storage medium, is stored thereon with computer program, the computer program is held by processing equipment The method described in claim 1-13 is realized during row.
15. a kind of processing equipment of distributed type assemblies fissure, which is characterized in that the equipment includes:
Memory, for storing program;
Processor, for running described program, when the processor runs described program, the processor realizes right will Seek the processing method of the distributed type assemblies fissure described in 1-13.
CN201711374254.XA 2017-12-19 2017-12-19 Distributed cluster split brain processing method, device and equipment Active CN108134712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711374254.XA CN108134712B (en) 2017-12-19 2017-12-19 Distributed cluster split brain processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711374254.XA CN108134712B (en) 2017-12-19 2017-12-19 Distributed cluster split brain processing method, device and equipment

Publications (2)

Publication Number Publication Date
CN108134712A true CN108134712A (en) 2018-06-08
CN108134712B CN108134712B (en) 2020-12-18

Family

ID=62390692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711374254.XA Active CN108134712B (en) 2017-12-19 2017-12-19 Distributed cluster split brain processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN108134712B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131185A (en) * 2020-09-22 2020-12-25 江苏安超云软件有限公司 Method and device for high availability of service in super-fusion distributed storage node
CN112214466A (en) * 2019-07-12 2021-01-12 海能达通信股份有限公司 Distributed cluster system, data writing method, electronic equipment and storage device
CN117155930A (en) * 2023-11-01 2023-12-01 腾讯科技(深圳)有限公司 Node determining method, task processing method and related devices of distributed system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252603A (en) * 2008-04-11 2008-08-27 清华大学 Cluster distributed type lock management method based on storage area network SAN
US20090059888A1 (en) * 2007-08-28 2009-03-05 International Business Machines Corporation Apparatus, system, and method for implementing failover in a polling adapter without support from an application server
CN102308559A (en) * 2011-07-26 2012-01-04 华为技术有限公司 Voting arbitration method and apparatus for cluster computer system
CN103684941A (en) * 2013-11-23 2014-03-26 广东新支点技术服务有限公司 Arbitration server based cluster split-brain prevent method and device
WO2015022012A1 (en) * 2013-08-13 2015-02-19 Nokia Solutions And Networks Oy Network assisted automatic clustering to enable victim to victim communication
CN105704187A (en) * 2014-11-27 2016-06-22 华为技术有限公司 Processing method and apparatus of cluster split brain
CN106170948A (en) * 2015-07-30 2016-11-30 华为技术有限公司 A kind of referee method for dual-active data center, Apparatus and system
CN106878382A (en) * 2016-12-29 2017-06-20 北京华为数字技术有限公司 Dynamically change the method and device of cluster scale in a kind of distributed arbitration program cluster
CN107105032A (en) * 2017-04-20 2017-08-29 腾讯科技(深圳)有限公司 node device operation method and node device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090059888A1 (en) * 2007-08-28 2009-03-05 International Business Machines Corporation Apparatus, system, and method for implementing failover in a polling adapter without support from an application server
CN101252603A (en) * 2008-04-11 2008-08-27 清华大学 Cluster distributed type lock management method based on storage area network SAN
CN102308559A (en) * 2011-07-26 2012-01-04 华为技术有限公司 Voting arbitration method and apparatus for cluster computer system
WO2015022012A1 (en) * 2013-08-13 2015-02-19 Nokia Solutions And Networks Oy Network assisted automatic clustering to enable victim to victim communication
CN103684941A (en) * 2013-11-23 2014-03-26 广东新支点技术服务有限公司 Arbitration server based cluster split-brain prevent method and device
CN105704187A (en) * 2014-11-27 2016-06-22 华为技术有限公司 Processing method and apparatus of cluster split brain
CN106170948A (en) * 2015-07-30 2016-11-30 华为技术有限公司 A kind of referee method for dual-active data center, Apparatus and system
CN106878382A (en) * 2016-12-29 2017-06-20 北京华为数字技术有限公司 Dynamically change the method and device of cluster scale in a kind of distributed arbitration program cluster
CN107105032A (en) * 2017-04-20 2017-08-29 腾讯科技(深圳)有限公司 node device operation method and node device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112214466A (en) * 2019-07-12 2021-01-12 海能达通信股份有限公司 Distributed cluster system, data writing method, electronic equipment and storage device
CN112131185A (en) * 2020-09-22 2020-12-25 江苏安超云软件有限公司 Method and device for high availability of service in super-fusion distributed storage node
CN112131185B (en) * 2020-09-22 2022-08-02 江苏安超云软件有限公司 Method and device for high availability of service in super-fusion distributed storage node
CN117155930A (en) * 2023-11-01 2023-12-01 腾讯科技(深圳)有限公司 Node determining method, task processing method and related devices of distributed system
CN117155930B (en) * 2023-11-01 2024-02-06 腾讯科技(深圳)有限公司 Node determining method, task processing method and related devices of distributed system

Also Published As

Publication number Publication date
CN108134712B (en) 2020-12-18

Similar Documents

Publication Publication Date Title
CN101909711B (en) On-line monitoring of resources
CN100496037C (en) Access relay device
CN107453929B (en) Cluster system self-construction method and device and cluster system
CN107888636A (en) Data processing method and system based on cloud storage
CN106878473A (en) A kind of message treatment method, server cluster and system
CN104469699B (en) Cluster quorum method and more cluster coupled systems
CN106412113A (en) Energy cloud service system and communication method thereof
CN102868770B (en) A kind of method of distribution interface, equipment and system
CN108134712A (en) A kind of processing method, device and the equipment of distributed type assemblies fissure
CN109218141A (en) A kind of malfunctioning node detection method and relevant apparatus
US10402298B2 (en) System and method for comprehensive performance and availability tracking using passive monitoring and intelligent synthetic transaction generation in a transaction processing system
CN106502822A (en) Data read-write method and device
CN108566363A (en) Method and system is determined based on the Brute Force of streaming computing
CN108173672A (en) The method and apparatus for detecting failure
CN107368485A (en) The management method and Database Systems of a kind of database
CN106649856A (en) Database access device, system and method
CN106909307A (en) A kind of method and device for managing dual-active storage array
CN106550189A (en) A kind of interlock method, relevant device and system
CN104702647B (en) Information requesting method and system
CN104199866B (en) A kind of offer machine abnormality eliminating method and device
CN111314283B (en) Method and device for defending attack
CN102968720B (en) Paying server, terminal and payment channel partition method
US6941347B2 (en) Network administration system and method of re-arranging network resources
WO2019119263A1 (en) Distributed cluster split-brain processing method, apparatus, and device
CN114339711A (en) Internet access system and method based on distributed architecture

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