CN105208124A - Method and device for managing locks and method and device for determining lock management servers - Google Patents

Method and device for managing locks and method and device for determining lock management servers Download PDF

Info

Publication number
CN105208124A
CN105208124A CN201510634502.4A CN201510634502A CN105208124A CN 105208124 A CN105208124 A CN 105208124A CN 201510634502 A CN201510634502 A CN 201510634502A CN 105208124 A CN105208124 A CN 105208124A
Authority
CN
China
Prior art keywords
lock
management server
lock management
client
resource identification
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.)
Pending
Application number
CN201510634502.4A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201510634502.4A priority Critical patent/CN105208124A/en
Publication of CN105208124A publication Critical patent/CN105208124A/en
Pending legal-status Critical Current

Links

Classifications

    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention discloses a method and device for managing locks, a method and device for determining lock management servers, the lock management servers and client sides. The method for managing the locks is applied to a lock management server cluster which comprises the multiple lock management servers. The method for managing the locks comprises the steps that the first lock management server receives a lock application request sent by the first client side, wherein the lock application request comprises a resource mark, and the first lock management server is determined from the multiple lock management servers by the first client side according to the resource mark on the basis of a preset function relation; if the lock, corresponding to the resource mark, in the first lock management server is in an idle state, the first lock management server allocates the lock to the first client side; if the lock corresponding to the resource mark is not available in the first lock management server, the first lock management server generates the lock according to the resource mark and allocates the lock to the first client side.

Description

The method of management lock and device, the method determining lock management server and device
Technical field
The present invention relates to communication technical field, particularly a kind of method and device, the method determining lock management server and device, lock management server and client managing lock.
Background technology
Distributed system be one group of main frame by network be interconnected with communicate after the system that formed.In a distributed system, the resource of distributed system is shared between each main frame, access a resource to prevent two or more main frame causes the situation of conflict to occur simultaneously, and each resource needs a corresponding lock, host access resource, need the lock first applying for that this resource is corresponding, apply for successfully, visit again this resource, after access, other main frames discharge the lock that this resource is corresponding, so that can apply for the lock that this resource is corresponding.
The implementation of the lock that the resource of current managing distributing type system is corresponding:
All hosts in distributed system all stores lock corresponding to each resource, has a main frame to be host node, externally provide service in All hosts, and other main frames are as slave node, and the request that slave node receives all is forwarded on host node.The all operations performed on the primary node must be synchronized on slave node.Externally service is provided owing to only there being host node, so the lock quantity that the lock quantity that host node can be supported is exactly whole distributed system can be supported, lock finite capacity, and because each operation performed on the primary node all needs to be synchronized on each slave node in whole distributed system, relate to and repeatedly communicate and consult, so performance is lower, reliability is difficult to be protected simultaneously.
To sum up, the mode of the lock that current management of system resource is corresponding cannot meet high concurrent, low time delay and reliability requirement.
Summary of the invention
The embodiment of the present invention provides a kind of method and device, the method determining lock management server and device, lock management server and the client that manage lock, lock is without the need to persistence, meet process low time delay simultaneously, high concurrent with service, the high reliability of lock, without the need to preserving the multiple copy of lock thus avoiding locking the overhead moving and bring.
Embodiment of the present invention first aspect provides a kind of method managing lock, and described method is applied to lock management server cluster, and described lock management server cluster comprises multiple lock management server, and described method comprises:
First lock management server receives the lock application request that the first client sends, described lock application request comprises resource identification, described first lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
If the state of the lock that resource identification is corresponding described in described first lock management server is idle, then described lock is distributed to described first client by described first lock management server;
If described first lock management server does not have the lock that described resource identification is corresponding, then described first lock management server generates lock according to described resource identification, and distributes to described first client.
In conjunction with first aspect, in the first possible implementation of first aspect, described first lock management server does not have described lock, then described first lock management server generates lock according to described resource identification, and distributes to described first client, comprising:
Described first lock management server is determined to generate described lock by described first lock management server according to described resource identification, then described first lock management server generates lock according to described resource identification, and distributes to described first client.
In conjunction with the first possible implementation of first aspect or first aspect, in the implementation that the second of first aspect is possible, also comprise:
If the state of locking described in described first lock management server is take and take the second client failure of described lock, then described lock is distributed to described first client by described first lock management server.
In conjunction with first aspect to any one the possible implementation in the possible implementation of the second of first aspect, in the third possible implementation of first aspect, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
Embodiment of the present invention second aspect provides a kind of method managing lock, and described method is applied to lock management server cluster, and described lock management server cluster comprises multiple lock management server, and described method comprises:
First lock management server receives the lock releasing request that the first client sends, described lock releasing request comprises resource identification, described first lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
Taken by described first client if lock described in described first lock management server, then the state of described lock is set to the free time by described first lock management server.
In conjunction with second aspect, in the first possible implementation of second aspect, also comprise:
If described first lock management server does not have described lock, then described first lock management server generates lock according to described resource identification, and the state arranging the lock of generation is for taking.
In conjunction with the first possible implementation of second aspect or second aspect, in the implementation that the second of second aspect is possible, also comprise:
If the state of locking described in described first lock management server is for taking, and takies the second client failures of described lock, then the state of described lock is set to the free time by described first lock management server.
In conjunction with second aspect to any one the possible implementation in the possible implementation of the second of second aspect, in the third possible implementation of second aspect, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
The embodiment of the present invention third aspect provides a kind of method determining lock management server, and described method comprises:
Client identifies according to first resource, determines the first lock management server according to predefined function relation from multiple lock management servers that lock management server cluster comprises;
If described first lock management server is working properly, then described client sends the first latching operation request to described first lock management server; Described first latching operation request is the first lock application request or the first lock releasing request; Described first resource mark is carried in described first latching operation request.
In conjunction with the third aspect, in the first possible implementation of the third aspect, also comprise:
Described client identifies according to Secondary resource, determines the second lock management server according to described predefined function relation from described multiple lock management server;
If described second lock management server fail, then described client determines the 3rd lock management server according to described predefined function relation from residue lock management server, and described residue lock management server is the lock management server in described multiple server except described second lock management server;
If described 3rd lock management server is working properly, then described client sends the second latching operation request to described 3rd lock management server, described second latching operation request is the second lock application request or the second lock releasing request, carries described Secondary resource mark in described second latching operation request.
Embodiment of the present invention fourth aspect provides a kind of device managing lock, comprising:
Receiving element, for receiving the lock application request that the first client sends, described lock application request comprises resource identification, described first lock management server be described first client according to described resource identification according to predefined function relation, determine from multiple lock management servers that lock management server cluster comprises;
Allocation units, if be idle for the state of lock corresponding to resource identification described in described first lock management server, then described lock is distributed to described first client by described first lock management server;
Generation unit, if do not have for described first lock management server the lock that described resource identification is corresponding, then described first lock management server generates lock according to described resource identification, and distributes to described first client.
In conjunction with fourth aspect, in the first possible implementation of fourth aspect, described generation unit is used for:
Determine to generate described lock by described first lock management server according to described resource identification, then described first lock management server generates lock according to described resource identification, and distributes to described first client.
In conjunction with the first possible implementation of fourth aspect or fourth aspect, in the implementation that the second of fourth aspect is possible, described allocation units also for:
If the state of locking described in described first lock management server is take and take the second client failure of described lock, then described lock is distributed to described first client by described first lock management server.
In conjunction with fourth aspect to any one the possible implementation in the possible implementation of the second of fourth aspect, in the third possible implementation of fourth aspect, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
The embodiment of the present invention the 5th aspect provides a kind of device managing lock, comprising:
Receiving element, for receiving the lock releasing request that the first client sends, described lock releasing request comprises resource identification, described first lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
Releasing unit, if taken by described first client for locking described in described first lock management server, then the state of described lock is set to the free time by described first lock management server.
In conjunction with the 5th aspect, in the first the possible implementation in the 5th, described device also comprises:
Generation unit, if do not have described lock for described first lock management server, then described first lock management server generates lock according to described resource identification, and the state arranging the lock of generation is for taking.
In conjunction with the first possible implementation of the 5th aspect or the 5th aspect, in the implementation that the second in the 5th is possible, described releasing unit also for:
If the state of locking described in described first lock management server is for taking, and takies the second client failures of described lock, then the state of described lock is set to the free time by described first lock management server.
In conjunction with the 5th aspect to any one the possible implementation in the possible implementation of the second of the 5th aspect, in the third possible implementation in the 5th, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
The embodiment of the present invention the 6th aspect provides a kind of device determining lock management server, comprising:
Determining unit, for according to first resource mark, determines the first lock management server according to the first functional relation from multiple lock management servers that lock management server cluster comprises;
Transmitting element, if working properly for described first lock management server, then described client sends the first latching operation request to described first lock management server; Described first latching operation request is the first lock application request or the first lock releasing request; Described first resource mark is carried in described first latching operation request.
In conjunction with the 6th aspect, in the first the possible implementation in the 6th, described determining unit also for:
According to Secondary resource mark, from described multiple lock management server, determine the second lock management server according to described first functional relation; If described second lock management server fail, then from residue lock management server, determine the 3rd lock management server according to described first functional relation, described residue lock management server is the lock management server in described multiple server except described second lock management server;
Described transmitting element also for: if described 3rd lock management server is working properly, then described client sends the second latching operation request to described 3rd lock management server, described second latching operation request is the second lock application request or the second lock releasing request, carries described Secondary resource mark in described second latching operation request.
The embodiment of the present invention the 7th aspect provides a kind of lock management server, and described lock management server is one in multiple lock management servers of comprising of lock management server cluster, and described lock management server comprises: processor, receiver and communication bus; Wherein, described processor completes mutual communicating with described receiver by described communication bus;
Described receiver is used for:
Receive first client send lock application request, described lock application request comprises resource identification, described lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
Described processor is used for:
If the state of the lock that resource identification is corresponding described in described lock management server is idle, then described lock is distributed to described first client; If described lock management server does not have the lock that described resource identification is corresponding, then described lock management server generates lock according to described resource identification, and distributes to described first client.
In conjunction with the 7th aspect, in the first the possible implementation in the 7th, described processor is used for:
Determine to generate described lock by described lock management server according to described resource identification, then generate lock according to described resource identification, and distribute to described first client.
In conjunction with the first possible implementation of the 7th aspect or the 7th aspect, in the implementation that the second in the 7th is possible, described processor also for:
If the state of locking described in described lock management server is take and take the second client failure of described lock, then described lock is distributed to described first client.
In conjunction with the 7th aspect to any one the possible implementation in the possible implementation of the second of the 7th aspect, in the third possible implementation in the 7th, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
Embodiment of the present invention eighth aspect provides a kind of lock management server, and described lock management server is one in multiple lock management servers of comprising of lock management server cluster, and described lock management server comprises: processor, receiver and communication bus; Wherein, described processor completes mutual communicating with described receiver by described communication bus;
Described receiver is used for:
Receive first client send lock releasing request, described lock releasing request comprises resource identification, described lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
Described processor is used for:
Taken by described first client if lock described in described lock management server, then the state of described lock is set to the free time.
In conjunction with eighth aspect, in the first possible implementation of eighth aspect, described processor also for:
If described lock management server does not have described lock, then generate lock according to described resource identification, and the state arranging the lock of generation is for taking.
In conjunction with the first possible implementation of eighth aspect or eighth aspect, in the implementation that the second of eighth aspect is possible, described processor also for:
If the state of locking described in described lock management server is for taking, and take the second client failures of described lock, then the state of described lock is set to the free time.
In conjunction with eighth aspect to any one the possible implementation in the possible implementation of the second of eighth aspect, in the third possible implementation of eighth aspect, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
The embodiment of the present invention the 9th aspect provides a kind of client, comprising: processor, transmitter and communication bus; Wherein, described processor completes mutual communicating with described transmitter by described communication bus;
Described processor is used for: according to first resource mark, determine the first lock management server according to predefined function relation from multiple lock management servers that lock management server cluster comprises;
Described transmitter is used for: if described first lock management server is working properly, then described client sends the first latching operation request to described first lock management server; Described first latching operation request is the first lock application request or the first lock releasing request; Described first resource mark is carried in described first latching operation request.
In conjunction with the 9th aspect, in the first the possible implementation in the 9th, described processor also for:
According to Secondary resource mark, from described multiple lock management server, determine the second lock management server according to described predefined function relation; If described second lock management server fail, then from residue lock management server, determine the 3rd lock management server according to described predefined function relation, described residue lock management server is the lock management server in described multiple server except described second lock management server.
The one or more technical schemes provided in the embodiment of the present invention, at least have following technique effect or advantage:
In the embodiment of the present invention, client asks the resource identification comprised according to lock application, according to predefined function relation, the first lock management server is determined from multiple lock management servers that lock management server cluster comprises, then lock application request is sent to the first lock management server, if the lock that described in the first lock management server, resource identification is corresponding is idle, then this lock is distributed to client; If there is no the lock that described resource identification is corresponding in the first lock management server, then can generate lock according to described resource identification, and distribute to client.
Therefore, in the embodiment of the present invention, the resource identification that client comprises according to lock application request or lock releasing request, the first lock management server can be determined according to predefined function relation, then lock application and lock release is carried out to the first lock management server, meet process low time delay, and service is high concurrent.Lock is without the need to being stored in the first lock management server always, and the first lock management server can generate lock according to resource identification, and reliability is high.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly introduced.
Fig. 1 is the distributed system that the embodiment of the present invention is suitable for;
Fig. 2 is the flow chart that in the embodiment of the present invention, client determines the recipient locking application request or lock releasing request;
Fig. 3 is the flow chart of the step that in the embodiment of the present invention, client performs after determining lock management server at every turn;
Fig. 4 is the flow chart of the processing procedure that in the embodiment of the present invention, lock management server is asked for lock application;
Fig. 5 is the schematic diagram of the distributed system being deployed with CMS in the embodiment of the present invention;
Fig. 6 is the flow chart of the processing procedure that in the embodiment of the present invention, lock management server is asked for lock application;
Fig. 7 is the flow chart that in the embodiment of the present invention, client carries out latching operation;
Fig. 8 is that in the embodiment of the present invention, lock management server asks the schematic diagram processed to lock application;
Fig. 9 is the schematic diagram that in the embodiment of the present invention, lock management server processes lock releasing request;
Figure 10 is the first high-level schematic functional block diagram of the device managing lock in the embodiment of the present invention;
Figure 11 is the first hardware configuration schematic diagram of lock management server in the embodiment of the present invention;
Figure 12 is the second high-level schematic functional block diagram of the device managing lock in the embodiment of the present invention;
Figure 13 is the second hardware configuration schematic diagram of lock management server in the embodiment of the present invention;
Figure 14 is the high-level schematic functional block diagram of the device determining lock management server in the embodiment of the present invention;
Figure 15 is the hardware configuration schematic diagram of client in the embodiment of the present invention.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly described.
Term " system " in the application and " network " can be used interchangeably." multiple " refer to two or more."and/or", describe the incidence relation of affiliated partner, can there are three kinds of relations in expression, such as, A and/or B, can represent: individualism A, exists A and B simultaneously, these three kinds of situations of individualism B.In addition, character "/", if no special instructions, general expression forward-backward correlation is to the relation liking a kind of "or".
Mention the mode of the lock that the resource of current managing distributing type system is corresponding in the introduction.The lock that the resource of distributed system is corresponding is all persistence, that is: the lock that the resource of distributed system is corresponding must be stored in the memory device of persistence, such as, in the hard disk of one or more lock management server.In the method for the management lock that the embodiment of the present invention proposes, lock without the need to persistence, to the equipment not requirement storing lock, lock management server only need manage lock in internal memory, according to circumstances can generate lock.Also because lock management server according to circumstances can generate lock, so reliability is high.
In the method that the management that the embodiment of the present invention proposes is locked, with similar without copy mode, lock does not have copy, and the latching operation response time is short, and latching operation, without the need to synchronously, is avoided needing during hostdown to carry out locking migration and locking the overhead recovering to bring.Also because lock does not have copy, so the lock quantity sum that the lock capacity of distributed system is each lock management server can be supported, the lock capacity that lock management server directly can increase distributed system is increased.
In the method for the management lock that the embodiment of the present invention proposes, if the lock management server that client is determined breaks down, then can redefine lock management server, until determine a lock management server normally worked, then the lock management server to the normal work determined sends lock application request or lock releasing request, troubleshooting complexity is low, and failure recovery time is short.
Below the method for the management lock that the embodiment of the present invention provides is described in detail.
Please refer to Fig. 1, Fig. 1 is the distributed system that the embodiment of the present invention is suitable for.Distributed system comprises: lock management server cluster, multiple client, multiple resource.Wherein, lock management server cluster comprises multiple lock management server, and each lock management server has a mark, is designated as ServerID.Multiple resource can be physical resource (such as: hard disk), and also can be logical resource (such as: one section of memory space on hard disk), each resource has a resource identification, is designated as ResourceID.Client communicates with lock management server cluster with by network.
The corresponding lock of each resource, when a resource is joined in distributed system, distributed system needs for it generates a lock, this lock characterizes the authority that client conducts interviews to resource, client application is to lock, and can the resource corresponding to lock conduct interviews, lock has life cycle, be called lease, such as 60 seconds.Client needs to complete resource access before lease expires and release lock.If client does not discharge lock after lease expires, then lock will be forced to reclaim by lock management server.If client need continue to use resource, then need again to apply for lock.
In the embodiment of the present invention, if client-requested is to corresponding being locked into row application or discharging of certain resource, then client can according to the resource identification of this resource, according to predefined function relation, determine the first lock management server, then send lock application request or lock releasing request to the first lock management server, and then realize lock application or lock release.Below the lock management method that the embodiment of the present invention provides is described in detail.
First illustrate how client is determined which lock management server to send lock application request or lock releasing request to.As shown in Figure 2, client determines that the recipient locking application request or lock releasing request comprises the following steps:
Step 21: client identifies according to first resource, determines the first lock management server according to predefined function relation from multiple lock management servers that lock management server cluster comprises.
Wherein, predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.Can be specifically hash function relation, can also be other functional relations, as long as a value can be mapped to another value.With predefined function relation be hash function close be example, the binary value of random length (being called input) can be mapped as the binary value of shorter regular length by hash function, and this short binary value is called cryptographic Hash (or being called output).Cryptographic Hash be one piece of data uniquely and extremely compact numeric representation form.Even if input has very little change, all different cryptographic Hash will be produced.
In actual applications, for lock management server cluster arranges hash function, be designated as Hash_cluster, that is, between the mark of all lock management servers in lock management server cluster and resource identification, all meet Hash_cluster.Utilizing Hash_cluster, obtaining ServerID with ResourceID for entering ginseng.Particularly, suppose that lock management server cluster comprises N number of lock management server, in N number of lock management server, the minimum value of ServerID is M, then server ID effective range be [M, M+N), the scope of Hash bucket is [M, M+N), utilize Hash_cluster to obtain intermediate object program with ResourceID for entering ginseng, intermediate object program of reentrying is to the remainder [0 of N, N), remainder adds that M is ServerID.
Specifically, if client-requested to first resource corresponding be locked into line operate, such as: to first resource corresponding be locked into row application or release, then client can according to first resource corresponding first resource mark, according to predefined function relation, calculate the mark of a lock management server.Then the lock management server to the mark correspondence of the lock management server calculated sends latching operation request, and latching operation request can be lock application request or lock releasing request.
For example, client-requested to resource identification be ResourceX corresponding be locked into line operate, then client is with ResourceX for entering ginseng, utilizes Hash_clutser to calculate the mark of Server_1, then client sends latching operation request to Server_1.
Step 22: if described first lock management server is working properly, then described client sends the first latching operation request to described first lock management server; Described first latching operation request is the first lock application request or the first lock releasing request; Described first resource mark is carried in described first latching operation request.
Specifically, after client determines the first lock management server, need to judge that whether the first lock management server (being designated as LockServer) is working properly, if, then send lock application request or lock releasing request to LockServer, if not, then show that LockServer breaks down, now, even if client sends lock application request or lock releasing request to LockServer, because LockServer breaks down, so LockServer cannot respond lock application request or lock releasing request.Therefore, client needs to redefine different from a first lock management server and lock management server normally worked.
For client-requested to Secondary resource mark corresponding be locked into line operate, illustrate that client redefines the process of lock management server.This process specifically comprises:
Described client identifies according to Secondary resource, determines the second lock management server according to described predefined function relation from described multiple lock management server;
If described second lock management server fail, then described client determines the 3rd lock management server according to described predefined function relation from residue lock management server, and described residue lock management server is the lock management server in described multiple server except described second lock management server;
If described 3rd lock management server is working properly, then described client sends the second latching operation request to described 3rd lock management server, described second latching operation request is the second lock application request or the second lock releasing request, carries described Secondary resource mark in described second latching operation request.
First, with client-requested first resource identified to corresponding to be locked into line operate the same, first client identifies according to Secondary resource, a lock management server (being called the second lock management server) is determined according to predefined function relation, if the second lock management server fail, then client needs to redefine different from a second lock management server and lock management server normally worked.
A kind of possible implementation is: utilize described predefined function relation to redefine lock management server.Redefine in the process of lock management server in client, in order to the break down second lock management server is foreclosed, client can determine a server (being called the 3rd lock management server) from residue lock management server, wherein, remain lock management server and comprise lock management server in multiple lock management servers that lock management server cluster comprises except the second lock management server.
Due to the second lock management server fail, so correspondingly lock management server cluster is reduced to N-1 lock management server from N number of lock management server, originally in N number of lock management server, the minimum value of ServerID is M, then server ID effective range is by [M, M+N) [M is become, M+N-1), the scope of Hash bucket is by [M, M+N) [M is become, M+N-1), according to the server ID effective range after change and Hash scope together, Hash_cluster is utilized to obtain intermediate object program with ResourceID for entering ginseng, intermediate object program of reentrying is to the remainder [0 of N-1, N-1), remainder adds that M is the ServerID of the lock management server redefined.
Another kind of possible implementation is: utilize functional relation corresponding to lock management server to redefine lock management server.In this implementation, the historical failure lock management server list that resource identification is corresponding is proposed, wherein, resource identification is the lock application request that sends of client or the resource identification that comprises of lock releasing request, comprise in the historical failure lock management server list that resource identification is corresponding: client is being determined which lock management server to send in the process of lock application request or lock releasing request to, the mark of the lock management server broken down in the lock management server determined.
In client according to the second lock resource identification, determine that, in the process of the second lock management server, the failed server list that resource identification is corresponding is initial list according to predefined function relation, the content of initial list is empty.After client determines the second lock management server, if the second lock management server fail, then by the mark of the second lock management server stored in historical failure lock management server list corresponding to resource identification, also the historical failure lock management server list that namely resource identification is corresponding is updated to the first list by initial list, wherein, the first list comprises the mark of the second lock management server.Then client redefines the 3rd lock management server different from the second lock management server and working properly.
Client determines that a kind of implementation of the 3rd lock management server is: be each lock management Servers installed hash function in lock management server cluster, be designated as Hash_serveice, the Hash_serveice of each lock management server is proprietary, the Hash_serveice of a lock management server is used for when this lock management server fail, and client utilizes the Hash_serveice of this lock management server to determine new lock management server.
Specifically, the Hash_serveice that client utilizes lock management server proprietary, with historical failure lock management server list corresponding to ResourceID and ResourceID for entering ginseng, obtains new ServerID.Wherein, Hash_serveice is the hash function of band historical failure lock management server list, historical failure lock management server list is so in actual applications: the historical failure node listing that ResourceID is corresponding is initialized as sky, client utilizes Hash_cluster, with ResourceID for entering ginseng, calculate A lock management server, if A lock management server fail, then by the mark of A lock management server stored in historical failure lock management server list corresponding to ResourceID, then, if the proprietary Hash_serveice of A lock management server is Hash_A, then client with historical failure lock management server list (comprising the mark of A lock management server) corresponding to ResourceID and ResourceID for entering ginseng, obtain new lock management server (being called the 3rd lock management server).
After client determines the 3rd lock management server, need equally to judge whether the 3rd lock management server (being designated as new LockServer) is working properly, if, then send lock application request or lock releasing request to new LockServer, if not, then show that new LockServer breaks down, now, client by the mark of the 3rd lock management server stored in historical failure lock management server list corresponding to ResourceID, also the historical failure lock management server list that namely resource identification is corresponding is updated to the second list by the first list, wherein, first list comprises the mark of the second lock management server, second list comprises the mark of the second lock management server and the mark of the 3rd lock management server.Then client can redefine lock management server, until the lock management server determined is the lock management server of normal work, the method that client redefines lock management server please refer to aforementioned, just repeats no more at this.
As shown in Figure 3, after client determines lock management server at every turn, all to judge that whether the lock management server (being designated as LockServer) determined is working properly, if, then send lock application request or lock releasing request to LockServer, if not, then perform the proprietary Hash_serveice of LockServer, obtain new LockServer.
It should be noted that, if comprise the mark of all lock management servers in distributed system in the historical failure lock management server list that lock resource identification is corresponding, also all lock management servers namely in client determination distributed system all break down, then client is without the need to sending lock application request or lock releasing request, because do not have lock management server working properly to respond lock application request or lock releasing request in distributed system.
After following explanation lock management server receives the lock application request of client transmission, for the processing procedure of lock application request.
As shown in Figure 4, client comprises the following steps for the processing procedure of lock application request:
Step 41: the first lock management server receives the lock application request that the first client sends, described lock application request comprises resource identification, described first lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server.
First client, by performing the method shown in Fig. 2, can be determined to send lock application request to the first lock management server.Therefore, the first lock management server can receive the lock application request that the first client sends.
Step 42: if the state of the lock that resource identification is corresponding described in described first lock management server is idle, then described lock is distributed to described first client by described first lock management server.
Step 43: if described first lock management server does not have the lock that described resource identification is corresponding, then described first lock management server generates lock according to described resource identification, and distributes to described first client.
In step 42 and step 43 respectively for be that the lock of the first client-requested application is stored in the first lock management server and is not stored in the situation of the first lock management server.Therefore, before execution step 42 and step 43, the first lock management server can also perform following steps:
Described first lock management server judges whether the lock that described resource identification is corresponding is stored in described first lock management server.
First lock management server judges whether the lock of the first client-requested application is stored in the first lock management server, namely judge before the lock application request receiving the first client transmission, other clients whether are had to cross lock corresponding to this resource identification to the first lock management server application, if there are other clients to cross lock corresponding to this resource identification to the first lock management server application, other clients then store lock corresponding to this resource identification in the first lock management server, so that can apply for the lock that this resource identification is corresponding; Otherwise the first lock management server generates lock, and distributes to the first client.
Under the prerequisite be stored in the first lock management server at the lock of the first client-requested application in step 42, the state also for lock corresponding to this resource identification is idle situation.Therefore, after described first lock management server determines that described lock is stored in described first lock management server, following steps can also be performed:
Described first lock management server judges whether the state of the lock that described resource identification is corresponding is idle, if, then perform step 42, if not, then according to the cluster management service (ClusterManagementService disposed in distributed system, CMS) whether manage the state of lock management server and client side simultaneously, may following steps be performed:
If the state of locking described in described first lock management server is take and take the second client failure of described lock, then described lock is distributed to described first client by described first lock management server.
Specifically, be stored in the prerequisite of the first lock management server at the lock of the first client-requested application under, if the state of this lock is idle, then illustrate that this lock can be assigned to the first client, now, this lock is distributed to the first client by the first lock management server, and start this lock lease timer, the state of this lock is set to take, the holder of this lock is set to the first client.Notify that the first client lock is applied for successfully afterwards.
Be stored in the prerequisite of the first lock management server at the lock of the first client-requested application under, if the state of this lock is not idle, but takies, then illustrate that this lock has been assigned to other clients, for convenience of statement, the client taking this lock is designated as the second client.The state that now it is situation working properly and the second client that the first lock management server needs for the state of the second client is that situation about breaking down does different process respectively.First lock management server can know the state of the second client by CMS.
As shown in Figure 5, CMS provides the state synchronized service of cluster management and all lock management servers for distributed system.Have multiple implementation to CMS at present, the embodiment of the present invention does not limit its implementation.Actual CMS in a distributed system be deployed with two kinds of scenes:
The first scene: CMS only manages lock management server, and not administrative client, namely client is stateless.Client can obtain the state of lock management server by CMS, and lock management server cannot obtain the state of client by CMS.Meet this function, be designated as " CMS is the status poll of support lock management server only ".
The second scene: CMS had both managed lock management server, also administrative client.By CMS, lock management server and client side can obtain the state of the other side mutually.Meet this function, be designated as " CMS is support lock management server and client state inquiry simultaneously ".
Wherein, with the state class of the second client seemingly, the state of lock management server can be working properly, can also be break down.
If CMS is the status poll of support lock management server only; then the first lock management server cannot obtain the state of the second client by CMS; also namely the first lock management server cannot know that the second client is working properly or breaks down; therefore, the first lock management server can only notify that the first client lock distributes unsuccessfully.
If CMS is support lock management server and client state inquiry simultaneously, then by CMS, the first lock management server can know that the second client is working properly or breaks down, if the second client operation is normal, then show that the second client normally takies this lock, this lock can not be distributed to the first client by the first lock management server, can only notify that the first client lock distributes unsuccessfully; If the second client failures, then show that the second client ability does not take this lock, this lock is distributed to the first client by the first lock management server, and start this lock lease timer, the state of this lock is set to take, the holder of this lock is set to the first client.Notify that the first client lock is applied for successfully afterwards.
Step 43 is not stored in the situation in the first lock management server for the lock of the first client-requested application.
Specifically, first lock management server receives the lock application request that the first client sends, but the lock of the first client-requested application is not stored in the first lock management server, a kind of execution mode is that the first lock management server directly generates lock, and distributes to the first client.Another kind of execution mode is: before the first lock management server generates lock, needs the legitimacy of this lock application request that checks, under the prerequisite that this lock application request is legal, just generates lock, and distribute to the first client.Therefore, in another embodiment, step 43 specifically comprises:
Described first lock management server is determined to generate described lock by described first lock management server according to described resource identification, then described first lock management server generates lock according to described resource identification, and distributes to described first client.
Wherein, the method of the legitimacy of the first lock management server inspection lock application request is: the first lock management server by utilizing resource identification determines a lock management server, first lock management server can use previously described predefined function relation, such as: Hash_clutser, also additive method can be used, as long as a lock management server can be determined according to resource identification.
If the lock management server that the first lock management server by utilizing resource identification is determined is oneself, then illustrate that this lock application request is legal, should generate lock by the first lock management server, then the first lock management server generates lock, and distributes to the first client.
If the lock management server that the first lock management server by utilizing resource identification is determined is not oneself, it is such as the 4th lock management server, then illustrate and originally should generate lock by the 4th lock management server, but the 4th lock management server fail, because known by the method shown in Fig. 2, first client is according to resource identification, according to predefined function relation, after determining the 4th lock management server, when the 4th lock management server fail, first client just can send lock application request to other lock management servers (such as the first lock management server).Now, a kind of possible execution mode is: the first lock management server directly generates lock, and distributes to the first client.Another kind of possible execution mode is: whether all the first lock management server judges the lock management server fault that in the historical failure lock management server list that resource identification is corresponding, each mark is corresponding respectively, if, then generate lock, and distribute to the first client; If not, then illustrate that the mark of the lock management server normally worked is put into historical failure lock management server list corresponding to resource identification by the first client by mistake, lock application request should be sent to one except the first lock management server lock management server working properly by the first client, but the first lock client but holds and lock application request sent to the first lock management server by mistake, then the first lock management server notifies that the first client lock distributes unsuccessfully.
After following explanation lock management server receives the lock releasing request of client transmission, for the processing procedure of lock releasing request.
As shown in Figure 6, lock management server comprises the following steps for the processing procedure of lock releasing request:
Step 61: the first lock management server receives the lock releasing request that the first client sends, described lock releasing request comprises resource identification, described first lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server.
Apply for ask similar with lock, the first client, by performing the method shown in Fig. 2, can be determined to lock releasing request to the first lock management server transmission.Therefore, the first lock management server can receive the lock releasing request that the first client sends.
Step 62: taken by described first client if lock described in described first lock management server, then the state of described lock is set to the free time by described first lock management server.
Step 63: if described first lock management server does not have described lock, then described first lock management server generates lock according to described resource identification, and the state arranging the lock of generation is for taking.
Apply for asking similar with lock, in step 62 and step 63 respectively for be that the lock that the first client-requested discharges is stored in the first lock management server and is not stored in the situation of the first lock management server.Therefore, before execution step 62 and step 63, the first lock management server can also perform following steps:
Described first lock management server judges whether the lock that described resource identification is corresponding is stored in described first lock management server.
Specifically with reference to above, can not repeat them here.
Under the prerequisite that the lock discharged in the first client-requested in step 62 is stored in the first lock management server, also for the situation that this lock is taken by described first client.Therefore, after described first lock management server determines that described lock is stored in described first lock management server, following steps can also be performed:
Described first lock management server judges whether the state of described lock is taken by described first client, if so, then step 62 is performed, if not, then whether manage the state of lock management server and client side according to the CMS disposed in distributed system simultaneously, may following steps be performed:
If the state of locking described in described first lock management server is for taking, and takies the second client failures of described lock, then the state of described lock is set to the free time by described first lock management server.
Specifically, under the lock of the first client-requested release is stored in the prerequisite of the first lock management server, if this lock is taken by the first client, then illustrate that this lock releasing request is legal, this lock can be released, now, the lease timer of first this lock of lock management server closing, the state of this lock is set to the free time, the holder of this lock is set to nothing.Notify that the first client lock discharges successfully afterwards.
Under the lock of the first client-requested release is stored in the prerequisite of the first lock management server, if this lock is not taken by the first client, but taken by other clients (such as the second client), then illustrate that this lock has been assigned to the second client.The state that now it is situation working properly and the second client that the first lock management server needs for the state of the second client is that situation about breaking down does different process respectively.First lock management server can know the state of the second client by CMS.
If CMS is the status poll of support lock management server only; then the first lock management server cannot obtain the state of the second client by CMS; also namely the first lock management server cannot know that the second client is working properly or breaks down; therefore, the first lock management server can only notify the first client lock release failure.
If CMS is support lock management server and client state inquiry simultaneously, then by CMS, the first lock management server can know that the second client is working properly or breaks down, if the second client operation is normal, then show that the second client normally takies this lock, first lock management server by this lock of release, can not can only notify that the first client lock distributes unsuccessfully; If the second client failures, then show that the second client ability does not take this lock, the state of this lock is set to the free time by the first lock management server, and the holder of this lock is set to nothing.Notify that the first client lock discharges successfully afterwards.
The situation in the first lock management server is not stored in for the lock of the first client-requested application in step 63.
Specifically, first lock management server receives the lock releasing request that the first client sends, but the lock of the first client-requested release is not stored in the first lock management server, and a kind of execution mode is that the first lock management server does not respond this lock releasing request.Another kind of execution mode is: the first lock management server generates lock, and the state arranging the lock of generation is for taking.It is the stand-by period of locking in order to other client applications after shortening that first lock management server generates lock, if there are other clients to generate lock to the first lock management server later, then because the first lock management server stores has this lock, so other clients are without the need to waiting for, this lock can be applied for.First lock management server the lock of generation is set to take be because: not this lock in the first lock management server, then illustrate that the original lock management server originally storing this lock there occurs fault, considering may before original lock management server fail, this lock has been assigned to other clients and has taken, multiple client is distributed to for avoiding lock corresponding to same resource, cause multiple client-access resource to clash, the lock of generation is set to and takies.
Give one example below and illustrate that client is locked into the overall process of release lock from application.Please refer to Fig. 7, Fig. 7 is the flow chart that in the embodiment of the present invention, client carries out latching operation.Comprise the following steps:
Step 1: client application resource identification is the lock that ResourceX is corresponding, calculates Server_1 with Hash_clutser.This lock is applied for Server_1.
By ResourceX, first step 2:Server_1 checks whether lock is managed by oneself.Then continue to check whether lock is occupied.If idle, then start lease timer, lock is set to seizure condition, the holder of record lock is client.
Step 3:Server_1 notifies that client application is locked and successfully locks.
Step 4: the resource that client-access lock is corresponding.
Step 5: the resource access of client to lock correspondence completes.
Step 6: client release lock is to Server_1.
Step 7:Server_1 closes lease timer, and lock is set to the free time.
Following conflict situations may be there is in above step:
In step 1, client terminal to discover Server_1 breaks down, then need, by the proprietary Hash_serveice of Server_1, to recalculate new Server.
In step 2, Server_1 checks that lock is occupied, then notify that client application is locked unsuccessfully.
In step 7, Server_1 checks whether lock releasing request is that client sent, and if not the lock releasing request that client sends, lock releasing request will be lost.
For making those skilled in the art more understand the embodiment of the present invention, illustrate the processing procedure of lock management server to lock application request below.Please refer to Fig. 8, Fig. 8 is that in the embodiment of the present invention, lock management server asks the schematic diagram processed to lock application.Comprise the following steps:
Procedure to apply 1: client-requested application resource identification is the lock that ResourceX is corresponding, calculates Server_1 with Hash_clutser.Judge the state of Server_1, if working properly, then proceed to procedure to apply 2, otherwise proceed to procedure to apply 1.1.
Procedure to apply 1.1, client continues the Hash_service (the historical failure node listing of ResourceX, ResourceX) performing Server_1, and now the historical failure node listing of ResourceX comprises: Server_1.Suppose to calculate Server_2.If Server_2 is working properly, then proceed to procedure to apply 2.Otherwise need repeatedly perform this step, until the normal Server that finds a job, proceed to procedure to apply 2; Or all lock management servers in distributed system all break down, and proceed to procedure to apply 5.
Procedure to apply 2:Server_1 (or Server_2) checks whether lock exists.If existed, illustrate that this lock was applied, proceed to procedure to apply 3.Otherwise, proceed to procedure to apply 2.1.
Procedure to apply 2.1: check whether lock application request is legal.Now do checkpoint 1.
Checkpoint 1: by ResourceID, checks whether lock is managed by oneself.Test mode is: the Hash_cluster performing lock management server cluster, the ServerID obtained, compares with the ID of oneself.
(1) if self-administered lock, then checked, proceeded to procedure to apply 2.2.
(2) if not self-administered lock, then the original lock management server fail of lock is represented.Now do checkpoint 2.
Checkpoint 2: check in the historical failure node listing of ResourceX whether there is Server working properly.
(1) if existed, then this lock application request is illegal request, proceeds to procedure to apply 5.
(2) if there is no, then checked, proceeded to procedure to apply 2.2.
Procedure to apply 2.2:Server1 (or Server2) creates lock according to ResourceID, and distributes to client.
Procedure to apply 3: check whether lock is occupied.(1) if the state of lock is idle, then start lease timer, lock is set to seizure condition, and the holder of lock is set to client.Proceed to procedure to apply 4.(2) if lock is occupied, procedure to apply 3.1 is proceeded to.
Procedure to apply 3.1:(1) if " CMS is the status poll of support lock management server only ", proceed to procedure to apply 5.(2) if " CMS is support lock management server and client state inquiry simultaneously ", and the holder of lock is not nothing, then proceed to procedure to apply 3.2.
Procedure to apply 3.2, holder's state of inquiry lock.
(1) if the holder of lock is working properly, then procedure to apply 5 is proceeded to.
(2) if the holder of lock breaks down, lock is set to seizure condition, and the holder of lock is set to client.Proceed to procedure to apply 4.
Procedure to apply 4: notice client, lock is applied for successfully.Operation completes.
Procedure to apply 5: notice client, lock is applied for unsuccessfully.Operation completes.
For making those skilled in the art more understand the embodiment of the present invention, illustrate the processing procedure of lock management server to lock releasing request below.Please refer to Fig. 9, Fig. 9 is the schematic diagram that in the embodiment of the present invention, lock management server processes lock releasing request.Comprise the following steps:
Release steps 1: client-requested releasing resource is designated lock corresponding to ResourceX, calculates Server_1 with Hash_clutser.Judge the state of Server_1, if working properly, then proceed to release steps 2, otherwise proceed to release steps 1.1.
Release steps 1.1: client continues the Hash_service (the historical failure node listing of ResourceX, ResourceX) performing Server_1, and now the historical failure node listing of ResourceX comprises: Server_1.Suppose to calculate Server_2.If Server_2 is working properly, then proceed to release steps 2.Otherwise need repeatedly perform this step, until the normal Server that finds a job, proceed to release steps 2; Or all lock management servers in distributed system all break down, and proceed to release steps 5.
Release steps 2:Server_1 (or Server_2) checks whether lock exists.If existed, illustrate that this lock was applied, proceed to release steps 3.Otherwise, proceed to release steps 2.1.
Release steps 2.2:Server1 (or Server2) creates lock according to ResourceID.The state of lock be set to and take, the holder of lock is set to nothing.
Release steps 3: check whether the holder of lock is client.(1) if the holder of lock is client, then close lease timer, lock is set to idle condition, and the holder of lock is set to nothing.Proceed to release steps 4.(2) if the holder of lock is not client, release steps 3.1 is proceeded to.
Release steps 3.1:(1) if " CMS is the status poll of support lock management server only ", proceed to release steps 5.(2) if " CMS is support lock management server and client state inquiry simultaneously ", and the holder of lock is not nothing, then proceed to release steps 3.2.
Release steps 3.2, holder's state of inquiry lock.
(1) if the holder of lock is working properly, then release steps 5 is proceeded to.
(2) if the holder of lock breaks down, lock is set to idle condition, and the holder of lock is set to nothing.Proceed to release steps 4.
Release steps 4: notice client, lock discharges successfully.Operation completes.
Release steps 5: notice client, lock release failure.Operation completes.
The embodiment of the present invention also provides the dilatation of lock management server cluster.If lock management server cluster needs to expand N+1 lock management server to from N number of lock management server, originally in N number of lock management server, the minimum value of ServerID is M, then server ID effective range is by [M, M+N) [M is become, M+N+1), the scope of Hash bucket is by [M, M+N) [M is become, M+N+1), client can utilize the server ID effective range after change and Hash scope together, Hash_cluster is utilized to obtain intermediate object program with ResourceID for entering ginseng, intermediate object program of reentrying is to the remainder [0 of N+1, N+1), remainder adds that M is new ServerID.
For the lock management server (referred to as dilatation lock management server) that dilatation is come in, need first to be set to starting state, the initialization of the lock that the resource that startup dilatation lock management server manages is corresponding, to be initiated complete after be set to normal operating conditions, now, dilatation lock management server externally could provide service.In addition, the state synchronized of the lock management server after the ServerID of the lock management server after N+1, dilatation in lock management server cluster and dilatation in lock management server cluster is needed N to become to client.If dilatation lock management discovering server oneself has managed the lock of other lock management servers (such as: the 5th lock management server), and the state of the 5th lock management server is normal work, then dilatation lock management server deletes these locks.
Wherein, the initialized mode of the lock that the resource that dilatation lock management server manages is corresponding is: the lock obtaining dilatation lock management server admin to CMS, and set up lock, by the lock of foundation for taking, after lock time-out to be set up, then the lock set up is available.In the process that the initialization of the lock that the resource managed at dilatation lock management server is corresponding realizes, dilatation lock management server can receive the lock application request or lock releasing request that client sends.Operating process is see above.
From breaking down, situation working properly being returned to for lock management server, having similarity with the dilatation of lock management server cluster.For returning to lock management server (the lock management server that hereinafter referred is recovered) working properly from breaking down, need first to be set to starting state, the initialization of the lock that the resource that the lock management server starting recovery manages is corresponding, to be initiated complete after be set to normal operating conditions, now, the lock management server of recovery externally could provide service.
Wherein, the initialized mode of the lock that the resource that the lock management server of recovery manages is corresponding, the initialized mode of the lock that the resource that can manage with reference to dilatation lock management server is corresponding.
The embodiment of the present invention also provides resource capacity expansion.If need resource capacity expansion, then the resource only dilatation need come in its add CMS to.The lock that the resource of coming in for dilatation is corresponding, when being applied first, this lock is added to corresponding lock management server.
The embodiment of the present invention also provides lock management server cluster capacity reducing.In specific implementation process, the lock management server fail normally worked can be equivalent to lock management server cluster capacity reducing.
Based on same inventive concept, the embodiment of the present invention also provides a kind of device managing lock, and the device of this management lock can be aforementioned lock management server.As shown in Figure 10, the device of this management lock comprises:
Receiving element 101, for receiving the lock application request that the first client sends, described lock application request comprises resource identification, described first lock management server be described first client according to described resource identification according to predefined function relation, determine from multiple lock management servers that lock management server cluster comprises
Allocation units 102, if be idle for the state of lock corresponding to resource identification described in described first lock management server, then described lock is distributed to described first client by described first lock management server;
Generation unit 103, if do not have for described first lock management server the lock that described resource identification is corresponding, then described first lock management server generates lock according to described resource identification, and distributes to described first client.
Optionally, described generation unit is used for:
Determine to generate described lock by described first lock management server according to described resource identification, then described first lock management server generates lock according to described resource identification, and distributes to described first client.
Optionally, described allocation units 102 also for:
If the state of locking described in described first lock management server is take and take the second client failure of described lock, then described lock is distributed to described first client by described first lock management server.
Optionally, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
Various variation pattern in the method for the management lock in earlier figures 4 embodiment and instantiation are equally applicable to the device of the management lock of the present embodiment, by the detailed description of the aforementioned method to management lock, those skilled in the art clearly can know in the present embodiment the implementation method of the device managing lock, so succinct in order to specification, be not described in detail in this.
Based on same inventive concept, the embodiment of the present invention also provides a kind of lock management server, described lock management server is one in multiple lock management servers of comprising of lock management server cluster, please refer to shown in Figure 11, this lock management server comprises: processor 602, receiver 601 and communication bus 600; Wherein, described processor 602 completes mutual communicating with described receiver 601 by described communication bus 600;
Receiver 601, for receiving the lock application request that the first client sends, described lock application request comprises resource identification, described lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
Processor 602, if be idle for the state of lock corresponding to resource identification described in described lock management server, then distributes to described first client by described lock; If described lock management server does not have the lock that described resource identification is corresponding, then described lock management server generates lock according to described resource identification, and distributes to described first client.
Optionally, described processor 602 also for:
Determine to generate described lock by described lock management server according to described resource identification, then generate lock according to described resource identification, and distribute to described first client.
Optionally, described processor 602 also for:
If the state of locking described in described lock management server is take and take the second client failure of described lock, then described lock is distributed to described first client.
Optionally, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
Further, in fig. 11, communication bus 600 can comprise interconnected bus and the bridge of any amount, and the various circuit comprising the memory that one or more processor of being represented by processor 602 and memory 604 represent link together by communication bus 600.Other circuit various of such as ancillary equipment, pressurizer and management circuit etc. and so on can also link together by communication bus 600, and these are all known in the field, therefore, are no longer described further it herein.Bus interface 605 provides interface between communication bus 600 and receiver 601.Receiver 601 can be transceiver, is provided for the unit communicated with other devices various over a transmission medium.
Processor 602 is in charge of communication bus 600 and common process, and memory 604 can be used to the data that storage of processor 602 uses when executable operations.
Various variation pattern in the method for the management lock in earlier figures 4 embodiment and instantiation are equally applicable to the lock management server of the present embodiment, by the detailed description of the aforementioned method to management lock, those skilled in the art clearly can know the implementation method of lock management server in the present embodiment, so succinct in order to specification, be not described in detail in this.
Based on same inventive concept, the embodiment of the present invention also provides a kind of device managing lock, and the device of this management lock can be aforementioned lock management server.As shown in figure 12, the device of this management lock comprises:
Receiving element 201, for receiving the lock releasing request that the first client sends, described lock releasing request comprises resource identification, described first lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
Releasing unit 202, if taken by described first client for locking described in described first lock management server, then the state of described lock is set to the free time by described first lock management server.
Optionally, described device also comprises:
Generation unit 203, if do not have described lock for described first lock management server, then described first lock management server generates lock according to described resource identification, and the state arranging the lock of generation is for taking.
Optionally, described releasing unit 202 also for:
If the state of locking described in described first lock management server is for taking, and takies the second client failures of described lock, then the state of described lock is set to the free time by described first lock management server.
Optionally, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
Various variation pattern in the method for the management lock in earlier figures 6 embodiment and instantiation are equally applicable to the device of the management lock of the present embodiment, by the detailed description of the aforementioned method to management lock, those skilled in the art clearly can know in the present embodiment the implementation method of the device managing lock, so succinct in order to specification, be not described in detail in this.
Based on same inventive concept, the embodiment of the present invention also provides a kind of lock management server, described lock management server is one in multiple lock management servers of comprising of lock management server cluster, please refer to shown in Figure 13, described lock management server comprises: processor 702, receiver 701 and communication bus 700; Wherein, described processor 702 completes mutual communicating with described receiver 701 by described communication bus 700;
Receiver 701, for receiving the lock releasing request that the first client sends, described lock releasing request comprises resource identification, described lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
Processor 702, if taken by described first client for locking described in described lock management server, is then set to the free time by the state of described lock.
Optionally, described processor 702 for:
If described lock management server does not have described lock, then generate lock according to described resource identification, and the state arranging the lock of generation is for taking.
Optionally, described processor 702 for:
If the state of locking described in described lock management server is for taking, and take the second client failures of described lock, then the state of described lock is set to the free time.
Optionally, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
Further, in fig. 13, communication bus 700 can comprise interconnected bus and the bridge of any amount, and the various circuit comprising the memory that one or more processor of being represented by processor 702 and memory 704 represent link together by communication bus 700.Other circuit various of such as ancillary equipment, pressurizer and management circuit etc. and so on can also link together by communication bus 700, and these are all known in the field, therefore, are no longer described further it herein.Bus interface 705 provides interface between communication bus 700 and receiver 701.Receiver 701 can be transceiver, is provided for the unit communicated with other devices various over a transmission medium.
Processor 702 is in charge of communication bus 700 and common process, and memory 704 can be used to the data that storage of processor 702 uses when executable operations.
Various variation pattern in the method for the management lock in earlier figures 6 embodiment and instantiation are equally applicable to the lock management server of the present embodiment, by the detailed description of the aforementioned method to management lock, those skilled in the art clearly can know the implementation method of lock management server in the present embodiment, so succinct in order to specification, be not described in detail in this.
Based on same inventive concept, the embodiment of the present invention also provides a kind of device determining lock management server, and this determines that the device of lock management server can be aforementioned client.As shown in figure 14, this determines that the device of lock management server comprises:
Determining unit 301, for according to first resource mark, determines the first lock management server according to the first functional relation from multiple lock management servers that lock management server cluster comprises;
Transmitting element 302, if working properly for described first lock management server, then described client sends the first latching operation request to described first lock management server; Described first latching operation request is the first lock application request or the first lock releasing request; Described first resource mark is carried in described first latching operation request.
Optionally, described determining unit 301 also for:
According to Secondary resource mark, from described multiple lock management server, determine the second lock management server according to described first functional relation; If described second lock management server fail, then from residue lock management server, determine the 3rd lock management server according to described first functional relation, described residue lock management server is the lock management server in described multiple server except described second lock management server;
Described transmitting element 302 also for: if described 3rd lock management server is working properly, then described client sends the second latching operation request to described 3rd lock management server, described second latching operation request is the second lock application request or the second lock releasing request, carries described Secondary resource mark in described second latching operation request.
Various variation pattern in earlier figures 2 embodiment really in lock management server method and instantiation are equally applicable to the device of the present embodiment lock management server really, by the aforementioned detailed description of method to determining lock management server, those skilled in the art clearly can know in the present embodiment the implementation method of the device determining lock management server, so succinct in order to specification, be not described in detail in this.
Based on same inventive concept, the embodiment of the present invention also provides a kind of client, please refer to shown in Figure 15, and this client comprises: processor 802, transmitter 801 and communication bus 800; Wherein, described processor 802 completes mutual communicating with described transmitter 801 by described communication bus 800;
Processor 802, for according to first resource mark, determines the first lock management server according to predefined function relation from multiple lock management servers that lock management server cluster comprises;
Transmitter 801, if working properly for described first lock management server, then described client sends the first latching operation request to described first lock management server; Described first latching operation request is the first lock application request or the first lock releasing request; Described first resource mark is carried in described first latching operation request.
Optionally, described processor 802 also for:
According to Secondary resource mark, from described multiple lock management server, determine the second lock management server according to described predefined function relation; If described second lock management server fail, then from residue lock management server, determine the 3rd lock management server according to described predefined function relation, described residue lock management server is the lock management server in described multiple server except described second lock management server.
Further, in fig .15, communication bus 800 can comprise interconnected bus and the bridge of any amount, and the various circuit comprising the memory that one or more processor of being represented by processor 802 and memory 804 represent link together by communication bus 800.Other circuit various of such as ancillary equipment, pressurizer and management circuit etc. and so on can also link together by communication bus 800, and these are all known in the field, therefore, are no longer described further it herein.Bus interface 805 provides interface between communication bus 800 and transmitter 801.Transmitter 801 can be transceiver, is provided for the unit communicated with other devices various over a transmission medium.
Processor 802 is in charge of communication bus 800 and common process, and memory 804 can be used to the data that storage of processor 802 uses when executable operations.
Various variation pattern in earlier figures 2 embodiment really in lock management server method and instantiation are equally applicable to the client of the present embodiment, by the aforementioned detailed description of method to determining lock management server, those skilled in the art clearly can know the implementation method of client in the present embodiment, so succinct in order to specification, be not described in detail in this.
In several embodiments that the application provides, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form that hardware also can be adopted to add SFU software functional unit realizes.
The above-mentioned integrated unit realized with the form of SFU software functional unit, can be stored in a computer read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform the part steps of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (English full name: Read-OnlyMemory, be called for short: ROM), random access memory (English full name: RandomAccessMemory, be called for short: RAM), magnetic disc or CD etc. various can be program code stored medium.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (30)

1. manage a method for lock, it is characterized in that, described method is applied to lock management server cluster, and described lock management server cluster comprises multiple lock management server, and described method comprises:
First lock management server receives the lock application request that the first client sends, described lock application request comprises resource identification, described first lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
If the state of the lock that resource identification is corresponding described in described first lock management server is idle, then described lock is distributed to described first client by described first lock management server;
If described first lock management server does not have the lock that described resource identification is corresponding, then described first lock management server generates lock according to described resource identification, and distributes to described first client.
2. the method for claim 1, is characterized in that, described first lock management server does not have described lock, then described first lock management server generates lock according to described resource identification, and distributes to described first client, comprising:
Described first lock management server is determined to generate described lock by described first lock management server according to described resource identification, then described first lock management server generates lock according to described resource identification, and distributes to described first client.
3. method as claimed in claim 1 or 2, is characterized in that, also comprise:
If the state of locking described in described first lock management server is take and take the second client failure of described lock, then described lock is distributed to described first client by described first lock management server.
4. the method as described in as arbitrary in claim 1-3, is characterized in that, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
5. manage a method for lock, it is characterized in that, described method is applied to lock management server cluster, and described lock management server cluster comprises multiple lock management server, and described method comprises:
First lock management server receives the lock releasing request that the first client sends, described lock releasing request comprises resource identification, described first lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
Taken by described first client if lock described in described first lock management server, then the state of described lock is set to the free time by described first lock management server.
6. method as claimed in claim 5, is characterized in that, also comprise:
If described first lock management server does not have described lock, then described first lock management server generates lock according to described resource identification, and the state arranging the lock of generation is for taking.
7. the method as described in claim 5 or 6, is characterized in that, also comprises:
If the state of locking described in described first lock management server is for taking, and takies the second client failures of described lock, then the state of described lock is set to the free time by described first lock management server.
8. the method as described in as arbitrary in claim 5-7, is characterized in that, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
9. determine a method for lock management server, it is characterized in that, described method comprises:
Client identifies according to first resource, determines the first lock management server according to predefined function relation from multiple lock management servers that lock management server cluster comprises;
If described first lock management server is working properly, then described client sends the first latching operation request to described first lock management server; Described first latching operation request is the first lock application request or the first lock releasing request; Described first resource mark is carried in described first latching operation request.
10. method as claimed in claim 9, is characterized in that, also comprise:
Described client identifies according to Secondary resource, determines the second lock management server according to described predefined function relation from described multiple lock management server;
If described second lock management server fail, then described client determines the 3rd lock management server according to described predefined function relation from residue lock management server, and described residue lock management server is the lock management server in described multiple server except described second lock management server;
If described 3rd lock management server is working properly, then described client sends the second latching operation request to described 3rd lock management server, described second latching operation request is the second lock application request or the second lock releasing request, carries described Secondary resource mark in described second latching operation request.
11. 1 kinds of devices managing lock, is characterized in that, comprising:
Receiving element, for receiving the lock application request that the first client sends, described lock application request comprises resource identification, described first lock management server be described first client according to described resource identification according to predefined function relation, determine from multiple lock management servers that lock management server cluster comprises;
Allocation units, if be idle for the state of lock corresponding to resource identification described in described first lock management server, then described lock is distributed to described first client by described first lock management server;
Generation unit, if do not have for described first lock management server the lock that described resource identification is corresponding, then described first lock management server generates lock according to described resource identification, and distributes to described first client.
12. devices as claimed in claim 11, it is characterized in that, described generation unit is used for:
Determine to generate described lock by described first lock management server according to described resource identification, then described first lock management server generates lock according to described resource identification, and distributes to described first client.
13. devices as described in claim 11 or 12, is characterized in that, described allocation units also for:
If the state of locking described in described first lock management server is take and take the second client failure of described lock, then described lock is distributed to described first client by described first lock management server.
14. as arbitrary in claim 11-13 as described in device, it is characterized in that, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
15. 1 kinds of devices managing lock, is characterized in that, comprising:
Receiving element, for receiving the lock releasing request that the first client sends, described lock releasing request comprises resource identification, described first lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
Releasing unit, if taken by described first client for locking described in described first lock management server, then the state of described lock is set to the free time by described first lock management server.
16. devices as claimed in claim 15, it is characterized in that, described device also comprises:
Generation unit, if do not have described lock for described first lock management server, then described first lock management server generates lock according to described resource identification, and the state arranging the lock of generation is for taking.
17. devices as described in claim 15 or 16, is characterized in that, described releasing unit also for:
If the state of locking described in described first lock management server is for taking, and takies the second client failures of described lock, then the state of described lock is set to the free time by described first lock management server.
18. as arbitrary in claim 15-17 as described in device, it is characterized in that, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
19. 1 kinds of devices determining lock management server, is characterized in that, comprising:
Determining unit, for according to first resource mark, determines the first lock management server according to the first functional relation from multiple lock management servers that lock management server cluster comprises;
Transmitting element, if working properly for described first lock management server, then described client sends the first latching operation request to described first lock management server; Described first latching operation request is the first lock application request or the first lock releasing request; Described first resource mark is carried in described first latching operation request.
20. devices as claimed in claim 19, is characterized in that, described determining unit also for:
According to Secondary resource mark, from described multiple lock management server, determine the second lock management server according to described first functional relation; If described second lock management server fail, then from residue lock management server, determine the 3rd lock management server according to described first functional relation, described residue lock management server is the lock management server in described multiple server except described second lock management server;
Described transmitting element also for: if described 3rd lock management server is working properly, then described client sends the second latching operation request to described 3rd lock management server, described second latching operation request is the second lock application request or the second lock releasing request, carries described Secondary resource mark in described second latching operation request.
21. 1 kinds of lock management servers, described lock management server is one in multiple lock management servers of comprising of lock management server cluster, and it is characterized in that, described lock management server comprises: processor, receiver and communication bus; Wherein, described processor completes mutual communicating with described receiver by described communication bus;
Described receiver is used for:
Receive first client send lock application request, described lock application request comprises resource identification, described lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
Described processor is used for:
If the state of the lock that resource identification is corresponding described in described lock management server is idle, then described lock is distributed to described first client; If described lock management server does not have the lock that described resource identification is corresponding, then described lock management server generates lock according to described resource identification, and distributes to described first client.
22. lock management servers as claimed in claim 21, it is characterized in that, described processor is used for:
Determine to generate described lock by described lock management server according to described resource identification, then generate lock according to described resource identification, and distribute to described first client.
23. lock management servers as described in claim 21 or 22, is characterized in that, described processor also for:
If the state of locking described in described lock management server is take and take the second client failure of described lock, then described lock is distributed to described first client.
24. as arbitrary in claim 21-23 as described in lock management server, it is characterized in that, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
25. 1 kinds of lock management servers, described lock management server is one in multiple lock management servers of comprising of lock management server cluster, and it is characterized in that, described lock management server comprises: processor, receiver and communication bus; Wherein, described processor completes mutual communicating with described receiver by described communication bus;
Described receiver is used for:
Receive first client send lock releasing request, described lock releasing request comprises resource identification, described lock management server be described first client according to described resource identification according to predefined function relation, determine from described multiple lock management server;
Described processor is used for:
Taken by described first client if lock described in described lock management server, then the state of described lock is set to the free time.
26. lock management servers as claimed in claim 25, is characterized in that, described processor also for:
If described lock management server does not have described lock, then generate lock according to described resource identification, and the state arranging the lock of generation is for taking.
27. lock management servers as described in claim 25 or 26, is characterized in that, described processor also for:
If the state of locking described in described lock management server is for taking, and take the second client failures of described lock, then the state of described lock is set to the free time.
28. as arbitrary in claim 25-27 as described in lock management server, it is characterized in that, described predefined function relation is used for the mark described resource identification being mapped as a lock management server in described multiple lock management server.
29. 1 kinds of clients, is characterized in that, comprising: processor, transmitter and communication bus; Wherein, described processor completes mutual communicating with described transmitter by described communication bus;
Described processor is used for: according to first resource mark, determine the first lock management server according to predefined function relation from multiple lock management servers that lock management server cluster comprises;
Described transmitter is used for: if described first lock management server is working properly, then described client sends the first latching operation request to described first lock management server; Described first latching operation request is the first lock application request or the first lock releasing request; Described first resource mark is carried in described first latching operation request.
30. clients as claimed in claim 29, is characterized in that, described processor also for:
According to Secondary resource mark, from described multiple lock management server, determine the second lock management server according to described predefined function relation; If described second lock management server fail, then from residue lock management server, determine the 3rd lock management server according to described predefined function relation, described residue lock management server is the lock management server in described multiple server except described second lock management server.
CN201510634502.4A 2015-09-29 2015-09-29 Method and device for managing locks and method and device for determining lock management servers Pending CN105208124A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510634502.4A CN105208124A (en) 2015-09-29 2015-09-29 Method and device for managing locks and method and device for determining lock management servers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510634502.4A CN105208124A (en) 2015-09-29 2015-09-29 Method and device for managing locks and method and device for determining lock management servers

Publications (1)

Publication Number Publication Date
CN105208124A true CN105208124A (en) 2015-12-30

Family

ID=54955547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510634502.4A Pending CN105208124A (en) 2015-09-29 2015-09-29 Method and device for managing locks and method and device for determining lock management servers

Country Status (1)

Country Link
CN (1) CN105208124A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105721617A (en) * 2016-04-28 2016-06-29 安徽四创电子股份有限公司 Rolling update method for cloud service system
CN106095594A (en) * 2016-06-01 2016-11-09 新浪网技术(中国)有限公司 The method of a kind of resource process, Apparatus and system
CN106354565A (en) * 2016-09-21 2017-01-25 努比亚技术有限公司 Distributed lock client and control method
CN106936931A (en) * 2017-04-26 2017-07-07 华为技术有限公司 The implementation method of distributed lock, relevant device and system
CN107516048A (en) * 2016-06-16 2017-12-26 阿里巴巴集团控股有限公司 The method and apparatus of file access in a kind of control distributed file system
CN107544851A (en) * 2017-05-11 2018-01-05 新华三云计算技术有限公司 One kind lock operation processing method and device
WO2018068626A1 (en) * 2016-10-13 2018-04-19 华为技术有限公司 Method, device, and system for managing disk lock
CN109040266A (en) * 2018-08-14 2018-12-18 郑州云海信息技术有限公司 The management method and device locked in micro services framework
CN110321357A (en) * 2019-06-14 2019-10-11 北京奇艺世纪科技有限公司 A kind of read/writing control method, device and server
CN110334823A (en) * 2019-06-17 2019-10-15 北京大米科技有限公司 Reserving method, device, electronic equipment and medium
CN110445864A (en) * 2019-08-11 2019-11-12 西藏宁算科技集团有限公司 The realization method and system of distributed lock under a kind of cloud computing environment
CN110704541A (en) * 2019-10-15 2020-01-17 浪潮云信息技术有限公司 High-availability distributed method and architecture for Redis cluster multi-data center
CN110866021A (en) * 2019-10-16 2020-03-06 微梦创科网络科技(中国)有限公司 Go language based locking and releasing method and system for distributed lock
CN111190913A (en) * 2019-12-30 2020-05-22 联动优势(北京)数字科技有限公司 Distributed lock implementation method and system
CN111708744A (en) * 2020-05-15 2020-09-25 苏州浪潮智能科技有限公司 Method, system, device and medium for maintaining file lock based on stateless protocol
CN111858079A (en) * 2020-07-27 2020-10-30 北京达佳互联信息技术有限公司 Distributed lock migration method and device, electronic equipment and storage medium
CN114710976A (en) * 2020-10-16 2022-07-05 华为技术有限公司 Lock restating method, lock management method and server

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105721617A (en) * 2016-04-28 2016-06-29 安徽四创电子股份有限公司 Rolling update method for cloud service system
CN105721617B (en) * 2016-04-28 2019-05-14 安徽四创电子股份有限公司 A kind of rolling update method of cloud service system
CN106095594A (en) * 2016-06-01 2016-11-09 新浪网技术(中国)有限公司 The method of a kind of resource process, Apparatus and system
CN106095594B (en) * 2016-06-01 2019-09-27 新浪网技术(中国)有限公司 A kind of method, apparatus and system of resource processing
CN107516048A (en) * 2016-06-16 2017-12-26 阿里巴巴集团控股有限公司 The method and apparatus of file access in a kind of control distributed file system
CN107516048B (en) * 2016-06-16 2021-01-08 阿里巴巴集团控股有限公司 Method and equipment for controlling file access in distributed file system
CN106354565B (en) * 2016-09-21 2019-08-20 努比亚技术有限公司 A kind of distributed lock client and control method
CN106354565A (en) * 2016-09-21 2017-01-25 努比亚技术有限公司 Distributed lock client and control method
WO2018068626A1 (en) * 2016-10-13 2018-04-19 华为技术有限公司 Method, device, and system for managing disk lock
US11221763B2 (en) 2016-10-13 2022-01-11 Huawei Technologies Co., Ltd. Disk lock management method, apparatus, and system
CN106936931A (en) * 2017-04-26 2017-07-07 华为技术有限公司 The implementation method of distributed lock, relevant device and system
CN112073456B (en) * 2017-04-26 2022-01-07 华为技术有限公司 Method, related equipment and system for realizing distributed lock
CN112073456A (en) * 2017-04-26 2020-12-11 华为技术有限公司 Method, related equipment and system for realizing distributed lock
CN106936931B (en) * 2017-04-26 2020-09-04 华为技术有限公司 Method, related equipment and system for realizing distributed lock
CN107544851A (en) * 2017-05-11 2018-01-05 新华三云计算技术有限公司 One kind lock operation processing method and device
CN107544851B (en) * 2017-05-11 2020-06-09 新华三云计算技术有限公司 Lock operation processing method and device
CN109040266A (en) * 2018-08-14 2018-12-18 郑州云海信息技术有限公司 The management method and device locked in micro services framework
CN110321357B (en) * 2019-06-14 2021-06-29 北京奇艺世纪科技有限公司 Read-write control method and device and server
CN110321357A (en) * 2019-06-14 2019-10-11 北京奇艺世纪科技有限公司 A kind of read/writing control method, device and server
CN110334823A (en) * 2019-06-17 2019-10-15 北京大米科技有限公司 Reserving method, device, electronic equipment and medium
CN110445864B (en) * 2019-08-11 2022-04-08 西藏宁算科技集团有限公司 Method and system for realizing distributed lock in cloud computing environment
CN110445864A (en) * 2019-08-11 2019-11-12 西藏宁算科技集团有限公司 The realization method and system of distributed lock under a kind of cloud computing environment
CN110704541A (en) * 2019-10-15 2020-01-17 浪潮云信息技术有限公司 High-availability distributed method and architecture for Redis cluster multi-data center
CN110866021A (en) * 2019-10-16 2020-03-06 微梦创科网络科技(中国)有限公司 Go language based locking and releasing method and system for distributed lock
CN111190913A (en) * 2019-12-30 2020-05-22 联动优势(北京)数字科技有限公司 Distributed lock implementation method and system
CN111708744A (en) * 2020-05-15 2020-09-25 苏州浪潮智能科技有限公司 Method, system, device and medium for maintaining file lock based on stateless protocol
CN111708744B (en) * 2020-05-15 2023-01-06 苏州浪潮智能科技有限公司 Method, system, device and medium for maintaining file lock based on stateless protocol
CN111858079A (en) * 2020-07-27 2020-10-30 北京达佳互联信息技术有限公司 Distributed lock migration method and device, electronic equipment and storage medium
CN111858079B (en) * 2020-07-27 2024-03-12 北京达佳互联信息技术有限公司 Distributed lock migration method and device, electronic equipment and storage medium
CN114710976A (en) * 2020-10-16 2022-07-05 华为技术有限公司 Lock restating method, lock management method and server
CN114710976B (en) * 2020-10-16 2023-06-16 华为技术有限公司 Lock reiteration method, lock management method and server

Similar Documents

Publication Publication Date Title
CN105208124A (en) Method and device for managing locks and method and device for determining lock management servers
CN106331098B (en) Server cluster system
CN101751415B (en) Metadata service system, metadata synchronized method and writing server updating method
CN106776130B (en) Log recovery method, storage device and storage node
CN105550229A (en) Method and device for repairing data of distributed storage system
CN105426271A (en) Lock management method and device for distributed storage system
CN109976941B (en) Data recovery method and device
CN106452836B (en) main node setting method and device
CN108776579B (en) Distributed storage cluster capacity expansion method, device, equipment and storage medium
CN110018783B (en) Data storage method, device and system
CN112202853B (en) Data synchronization method, system, computer device and storage medium
EP4075252A1 (en) Data storage method, apparatus, and system and data reading method, apparatus, and system in storage system
CN113835844A (en) Management method and device of container cluster and cloud computing platform
CN105550230A (en) Method and device for detecting failure of node of distributed storage system
CN104753987A (en) Distributed session management method and system
CN113946276A (en) Disk management method and device in cluster and server
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
CN108616598B (en) Data synchronization method and device and distributed storage system
CN110825758B (en) Transaction processing method and device
CN115314361B (en) Server cluster management method and related components thereof
CN105740096A (en) Method and apparatus for data remote disaster tolerance backup of cluster file system
CN106991121B (en) Super-fusion data storage method and system
CN116931814A (en) Cloud hard disk capacity expansion method and device, electronic equipment and storage medium
CN112131201B (en) Method, system, equipment and medium for high availability of network additional storage
CN114281600A (en) Disaster recovery backup and recovery method, device, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20151230