[go: up one dir, main page]

CN102088484B - Write lock method of distributed file system and a system thereof - Google Patents

Write lock method of distributed file system and a system thereof Download PDF

Info

Publication number
CN102088484B
CN102088484B CN201010596619.5A CN201010596619A CN102088484B CN 102088484 B CN102088484 B CN 102088484B CN 201010596619 A CN201010596619 A CN 201010596619A CN 102088484 B CN102088484 B CN 102088484B
Authority
CN
China
Prior art keywords
lock
data block
file
lower floor
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201010596619.5A
Other languages
Chinese (zh)
Other versions
CN102088484A (en
Inventor
朱鹏
江凌生
王瑜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing ZTE New Software Co Ltd
Original Assignee
Nanjing ZTE New Software 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 Nanjing ZTE New Software Co Ltd filed Critical Nanjing ZTE New Software Co Ltd
Priority to CN201010596619.5A priority Critical patent/CN102088484B/en
Publication of CN102088484A publication Critical patent/CN102088484A/en
Priority to PCT/CN2011/083694 priority patent/WO2012083797A1/en
Application granted granted Critical
Publication of CN102088484B publication Critical patent/CN102088484B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • G06F16/1767Concurrency control, e.g. optimistic or pessimistic approaches
    • G06F16/1774Locking methods, e.g. locking methods for file systems allowing shared and concurrent access to files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention discloses a write lock method of distributed file system and a system thereof, wherein the method comprises the following steps: when an upper-layer data-location register server receives a request for opening a file sent from a file request client, the upper-layer data-location register server extracts the data block path information of the file and returns the same to the file request client; a lower-layer lock server returns the write lock authority information of the specific data portion of the specific data block to the file request client according to a lock request of the specific data portion of the specific data block in the file, wherein the lock request is sent from the file request client. The write lock method of distributed file system and a system thereof provided the present invention not only can improve throughput of a distributed file system lock write submission without any increase in hardware investment, but also can carry out synchronous capacity expansion with the capacity expansion of the distributed file system and possess an excellent expandability.

Description

A kind of distributed file system write locking means and system
Technical field
The present invention relates to field of data storage, specifically, what relate in particular to a kind of distributed file system writes locking means and system.
Background technology
In large-scale distributed file system, in order to accomplish the concurrency of magnanimity, guarantee again the consistency of file system data simultaneously, normally select a unified latch node to concentrate lock management to the data of storing in distributed file system, this latch node can be single server or cluster, for ease of statement, below by latch node (lock server or cluster) referred to as lock server.Yet along with the fast development of multimedia industry, for many-sided considerations such as cost, reliabilities, for large-scale distributed file system, increasing manufacturer or enterprise adopt the mode of cloud to store.Cloud storage refers to by functions such as cluster application or distributed file systems, various dissimilar memory devices a large amount of in network is gathered to collaborative work by application software, the common system that data storage and Operational Visit function are externally provided, that is to say that cloud is stored and is one and take the cloud computing system that data store and management is core.In cloud storage, should consider fail safe, also to consider cost, therefore, it is crucial how disposing cloud.Especially present, the scale of cloud is increasing, and increasing cloud will be distributed in a plurality of places, lock server how to dispose the afterwards distributed file system complex that will become.
In cloud storage, if come the core of locked out distribution formula file system with single lock server.When a plurality of programs are accessed the different document misregistration amount of different files in distributed system simultaneously, need to access successively this lock server and to obtain the specific document misregistration amount of specific file be write to lock authority.Now, limit greatly the access handling capacity of distributed file system, caused throughput performance to decline.And when a plurality of programs are accessed the identical file side-play amount of same file in distributed system simultaneously, first the program of access obtained this specific file specific document misregistration amount write lock authority.So now, other access program can only be waited in buffer memory.Only have in the ban the program of access discharged this specific file specific document misregistration amount write lock authority time, what other program could obtain the specific document misregistration amount of this specific file of data writes lock authority.Therefore, single lock server becomes the bottleneck of writing for huge cloud.
Summary of the invention
The present invention is directed to the deficiencies in the prior art, what a kind of distributed file system was provided writes locking means and system, not only can guarantee in the situation that hardware input does not increase, improve the handling capacity that distributed file system locking is submitted to, and can also be along with the dilatation of distributed file system synchronous dilatation, there is good extensibility.
For solving the problems of the technologies described above, the invention provides following technical scheme:
Distributed file system write a locking means, comprise the following steps:
When upper layer data location register server receive that file request client sends write the request of opening certain file time, upper layer data location register server extracts the data block routing information of described file, and returns to described file request client;
The locking request to given data piece particular data part in described file that lower floor's lock server is sent according to described file request client, returns to described file request client by the lock authority information of writing of described certain data block particular data part.
In an embodiment of the present invention, when described upper layer data location register server extracts the data block routing information of described file and data block routing information that discovery does not have described file, first described upper layer data location register server is the unique complete data block path of described document creation, and record the data block routing information of described file, thereby the lock authority of writing of the different pieces of information piece on the data block path of described file is distributed in described lower floor lock server.
In an embodiment of the present invention, described file request client is before sending the locking request of described certain data block particular data part to described lower floor lock server, also judge the lock condition of described particular data part in described file request client terminal local buffer memory, if described particular data part is in described file request client terminal local buffer memory and locked, described file request client does not send locking request to described lower floor lock server, if described particular data part is not locked, described file request client sends locking request to described lower floor lock server.
In an embodiment of the present invention, described lower floor lock server, according to the locking request to described certain data block particular data part of sending of described file request client, creates data block lock state information table, is specially:
When described lower floor lock server receives the locking request to described certain data block particular data part that described file request client sends, described lower floor lock server judges whether current be the locking request receiving for the first time described certain data block, if so, in described data block lock state information table, add described certain data block and corresponding locking request information thereof; If not, in described data block lock state information table, retrieve the locking request information of described certain data block particular data part.
In an embodiment of the present invention, described lower floor lock server according to the locking request of the described file request client receiving and return to described file request client described certain data block particular data part write lock authority information, judge whether to notify lower layer data block server that the needed described particular data of described file request client is partly sent to described file request client, be specially:
When described lower floor lock server receives the read-write locking request to described certain data block particular data part that described file request client sends, described lower floor lock server checks the lock condition of particular data part described in current data block locking information table, if described particular data part is not locked, in described data block lock state information table, the lock-out state of described particular data part is labeled as to locking, and notifies lower layer data block server to return to described particular data partly to described file request client; If described particular data part is locked, carries out and lock unsuccessfully strategy;
When described lower floor lock server receive that described file request client sends to described certain data block particular data part write locking request time, described lower floor lock server checks the lock condition of current described particular data part, if described particular data part is not locked, in described data block status information table, the lock-out state of described particular data part is labeled as to locking, and returns and lock successfully described file request client; If described particular data part is locked, carries out and lock unsuccessfully strategy.
In an embodiment of the present invention, described file request client sends to the read-write locking request of described certain data block particular data part or before writing locking request to described lower floor lock server, also check the hit situation of described particular data part in local cache, if there is no described particular data part in described local cache, described particular data part is not hit in judgement, and sends read-write locking request to described lower floor lock server; If there is described certain data block and not locked in described local cache, judges that described particular data partly hits, and send and write locking request to described lower floor lock server.
Meanwhile, the present invention also provides a kind of locking system of writing of distributed file system, comprises and is arranged at intrasystem upper layer data location register selecting paths module, lower floor's data interlock module and lower floor's data memory module; Upper layer data location register selecting paths module is for receiving the request of opening certain file of writing that file request client sends, and the data block routing information that extracts described file returns to described file request client; The locking request to described file certain data block particular data part of lower floor's data interlock module for sending according to described file request client, returns to described file request client by the lock authority information of writing of described certain data block particular data part.
In an embodiment of the present invention, described upper layer data location register selecting paths module is when extracting the data block routing information of described file and data block routing information that discovery does not have described file, described upper layer data location register selecting paths module is also used to the unique complete data block path of described document creation, and record the data block routing information of described file, thereby the lock authority of writing of the different pieces of information piece on the data block path of described file is distributed in described lower floor lock server.
In an embodiment of the present invention, described file request client is before sending the locking request of described certain data block particular data part to described lower floor data interlock module, also judge the lock condition of described particular data part in described file request client terminal local buffer memory, if described particular data part is in described file request client terminal local buffer memory and locked, described file request client does not send locking request to described lower floor data interlock module, if described particular data part is not locked, described file request client sends locking request to described lower floor data interlock module.
In an embodiment of the present invention, the locking request to described certain data block particular data part that described lower floor data interlock module is sent according to described file request client, creates described data block lock state information table, is specially:
When described lower floor data interlock module receives the locking request to described certain data block particular data part that described file request client sends, described lower floor data interlock module judges whether current be the locking request receiving for the first time described certain data block, if so, in described data block lock state information table, add described certain data block and corresponding locking request information thereof; If not, in described data block lock state information table, retrieve the locking request information of described particular data part.
In an embodiment of the present invention, described lower floor data interlock module according to the locking request of the described file request client receiving and return to described file request client described certain data block particular data part write lock authority information, judge whether to notify lower layer data block server that the needed described particular data of described file request client is partly sent to described file request client, be specially:
When described lower floor data interlock module receives the Read-Write Locks request to described certain data block particular data part that described file request client sends, the lock condition of the part of particular data described in described lower floor data interlock module check current data block lock state information table, if described particular data part is not locked, in described data block lock state information table, the lock-out state of described particular data part is labeled as to locking, and notifies lower floor's data memory module to return to described particular data partly to described file request client; If described particular data part is locked, carries out and lock unsuccessfully strategy;
When described lower floor data interlock module receive that described file request client sends to described certain data block particular data part write locking request time, described lower floor data interlock module checks the lock condition of the part of particular data described in current described data block lock state information table, if described particular data part is not locked, in described data block status information table, the lock-out state of described particular data part is labeled as to locking, and returns and lock successfully described file request client; If described certain data block is locked, carries out and lock unsuccessfully strategy.
In an embodiment of the present invention, described file request client sends to the read-write locking request of described certain data block particular data part or before writing locking request to described lower floor data interlock module, also check the hit situation of described particular data part in local cache, if there is no described particular data part in described local cache, described particular data part is not hit in judgement, and sends read-write locking request to described lower floor lock server; If there is described particular data part and not locked in described local cache, described particular data part is hit in judgement, and sends and write locking request to described lower floor lock server.
Owing to having adopted above technical scheme, the beneficial effect that the present invention possesses is: by upper layer data location register server, be the definite unique data block path in one or more file of file request client-requested, thereby the lock authority of writing of the different pieces of information piece on the data block path of described file is distributed in lower floor's lock server, and the data block routing information of described file is returned to described file request client; File request client is according to the described data block routing information obtaining from upper layer data location register server, to lower floor lock server, initiate to write the solicited message of opening some certain data block particular data parts in described file, and from obtaining the locked authority information of writing of described certain data block in corresponding lower floor lock server.So, upper layer data memory location storage server is distributed to the lock authority of writing of all data blocks of described file in one or more lower floor's lock server of lower floor, abandon the locking means that the single lock server of traditional employing carrys out locked out distribution formula file system, reduced on the one hand the load of the lock server of upper layer data location register server; On the other hand, also realize veritably corresponding lower layer data block server memory storage in lower floor's lock server managing distributing type system data write lock authority, thereby in the situation that not increasing distributed file system hardware resource, improve the handling capacity that distributed file system locking is submitted to.Simultaneously, use locking means provided by the invention, can be used in the distributed file system of one or more upper layer data location register server, therefore, can also be along with the dilatation of the distributed file system synchronous dilatation of the ability of the raising throughput of system of this locking means, has good extensibility.
Accompanying drawing explanation
Fig. 1 is the falsework composition of an embodiment of the present invention;
Fig. 2 is the workflow diagram of the another kind of embodiment of the present invention.
Embodiment
Below by embodiment, by reference to the accompanying drawings the present invention is described in further detail.
At present, the bottleneck problem of writing in order to solve huge cloud that single lock server causes, as shown in Figure 1, what the invention provides a kind of distributed file system writes locking means and system, it is mainly conceived: in the lower floor of distributed file system, with the lock server of a plurality of dispersions, carry out the data of storing in common locked out distribution formula file system.Compare with traditional single lock server, the locked authority of the data of storing in the distributed file system that the present invention will lock is shared in a plurality of different file system data server of lower floor.Specifically, this document system data server mainly comprises lower floor's lock server and lower layer data block server, wherein, lower layer data block server is mainly used to the data block information in distributed storage file system, lower floor's lock server is mainly used for the data that locking is stored in lower layer data block server, the locked authority of the data in this data block server is managed.What the locked authority of saying here mainly referred to data in distributed file system writes lock authority.Specifically, this writes locking means is by upper layer data location register server, to be one or more file of opening of file request client-requested file is determined unique full block of data path, thereby the lock authority of writing of the different pieces of information piece on the data block path of this document is distributed in a plurality of lower floors lock server.In fact, in the storage server of upper layer data position, store a large amount of data block routing informations in lower layer data block server that is stored in, in internal system, also the data block routing information being stored in lower layer data block server is called to metadata.At upper layer data location register server place, adopt special lock server to lock metadata.Er lower floor, locks with a plurality of lower floors lock server disperseing the data block being stored in lower layer data block server.When lower floor's lock server receive that file request client sends to this document in during the locking request of certain data block particular data part, lower floor's lock server just returns to file request client by the lock authority information of writing of described certain data block particular data part.
The locking means of writing provided by the invention adopts a plurality of lower floors lock server disperseing to carry out the object of the data in locked out distribution formula file system, is mainly in order to reduce the load of the lock server of upper layer data location register server.Simultaneously, the lock authority of writing of the different pieces of information piece in the file of file request client-requested being opened by upper layer data location register server is distributed in lower floor's lock server, the file system data server that makes lower floor is no longer a buffering of upper strata lock server, and that has really realized data in the managing distributed file system of lower floor's lock server writes lock authority.This is write locking means and can use widely in single or many upper layer datas location register server, if while using in a plurality of upper layer data location register servers, each upper layer data location register server does not have standby usage relation.
In an embodiment of the present invention, when described upper layer data location register server extracts the data block routing information of certain specific file and data block routing information that discovery does not have this document, for example do not find that there is the data block routing information of file A, show that now upper layer data location register server is to receive for the first time the request of opening of writing to this specific file A that file request client is sent, so, first upper layer data location register server is that this specific file A creates a unique complete data block path, and the data block routing information of log file A.By the establishment in file data blocks path, thereby the lock authority of writing of the different pieces of information piece on the data block path of file A is distributed in described lower floor lock server, thus the locking of realization the most fine-grained (byte level).Wherein the routing information of all data blocks in this document A can be described in this data block path, mainly comprises on this document data block path and has which data block and these data blocks to be stored in which lower layer data block server.It should be noted that, now, what lower floor's lock server not knowing oneself had been managed these data blocks writes lock authority.
When having again file request client to write the request of the A that opens file to the transmission of upper layer data location register server, because the unique complete data block path of file A now creates, therefore, upper layer data location register server can extract the data block routing information of file A, and returns to file request client.It should be noted that for the first time to send and write the file request client of A request and sending for the second time of opening file to write the file request client that the A that opens file asks can be same file requesting client, can be also different file request clients.When these two file request clients need to be write the same data block in locking this document A, they can access the same lower layer data block server of this data block of storage simultaneously.
In an embodiment of the present invention, in the lock server Transmit message A of file request client Xiang lower floor, to before the locking request of certain data block particular data part, also judge the lock condition of this particular data part in file request client terminal local buffer memory.At this, for explaining conveniently, by certain data block referred to as data block B.If data block B particular data part is in file request client terminal local buffer memory and locked by this document requesting client, this document requesting client does not need to send locking request to lower floor's lock server, can directly start to write the operation of data block B particular data part; If data block B particular data part is not locked, now may there be two kinds of situations, a kind of is in the local cache of this document requesting client, there is no data block B particular data part, another kind of situation is in the local cache of this document requesting client, to have data block B particular data part, it is locked that but this particular data does not partly have, for both of these case, this document requesting client Dou Huixiang lower floor lock server sends locking request.
In an embodiment of the present invention, the locking request to this certain data block particular data part that lower floor's lock server is sent according to file request client, create data block lock state information table, concrete mode is: when the lock server C of lower floor receives the locking request to this data block B particular data part that file request client sends, the lock server C of lower floor need to judge whether current be to receive for the first time the locking request to this data block B that file request client is sent, if, the lock server C of lower floor now just know oneself managed this data block B write lock authority.Also show to be stored in the available data piece lock state information table in the lock server C of lower floor, also there is no the relevant information of data block B simultaneously.Now lower floor's lock server C adds entry and the corresponding locking request information of data block B thereof of this data block B in data block lock state information table; If not, lower floor's lock server C only need to be in current data block lock state information table the locking request information of retrieves data blocks B particular data part.
In an embodiment of the present invention, suppose that the lock server C of lower floor receives the locking request to data block B particular data part that file request client is sent for the first time, that is to say, now, the lock server C of lower floor can be according to the relevant lock authority of writing of the variable locking request retrieves data blocks B particular data part of the file request client receiving, and return to this document requesting client data block B particular data part write lock authority information, judge whether to notify the lower layer data block server that the lock server C of lower floor is corresponding that the needed particular data of file request client is partly sent to this document requesting client simultaneously, specifically: when lower floor's lock server receives the read-write locking request to data block B particular data part D that file request client sends, wherein, for user, this particular data part D is the side-play amount of file A.Lower floor's lock server checks the lock condition of particular data part D in current data block locking information table, if particular data part D is not locked, now, show that particular data part D is not also locked by other programs, in data block lock state information table, the lock-out state of particular data part D is labeled as to locking, and notifies lower layer data block server to return to particular data part D to file request client; It should be noted that, for same data block, wherein can comprise a lot of data messages, may be a few page informations in numerous data messages and file request client need to lock.At this, these data messages are divided into a plurality of parts, what file request client need to lock so is the some parts in a plurality of parts.When if two file request clients are write data divisions different in same data block B simultaneously, these two file request clients can be carried out write operation simultaneously.In other words, from user's angle, if two users need to write locking is document misregistration amounts different in same file, these two users just can carry out write operation simultaneously so.If particular data part D is locked, now, show that particular data part D is locked by other programs, use and lock unsuccessfully strategy accordingly;
When lower floor's lock server receive that file request client sends to data block B particular data part write locking request time, lower floor's lock server checks the lock condition of particular data part in current data block locking information table, if particular data part is not locked, in data block status information table, the lock-out state of particular data part is labeled as to locking, and returns and lock successfully described file request client; If particular data part is locked, use lock unsuccessfully tactfully accordingly, specifically, lock failed strategy and comprise and locking unsuccessfully or other strategy.
Furtherly, when file request client partly locks after successful message to data block B particular data, will write the successful message of locking and return to operation user, user just can partly carry out and start the operation writing or revise data block B particular data.If file request client is when locking accordingly unsuccessfully strategy to the execution of data data division, file request client can be selected to wait for and continue to lock, or directly return and write locking unsuccessfully to operation user, now, the authority that user does not partly write data block B particular data.
In fact, the downward layer data storage server of file request client C sends to the read-write locking request of data block B particular data part or before writing locking request, also checks the hit situation of particular data part in local cache.If there is no particular data part in local cache, the data that do not have storage file requesting client to lock in local cache are described, certain data block part is not hit in judgement, and the lock server C of Bing Xiang lower floor sends read-write locking request; If there is particular data part in local cache, show, before file request client, data block B particular data was partly carried out to read operation or write operation, just now this particular data part is not also write locking by file request client, this particular data part is hit in judgement, and the lock server C of Bing Xiang lower floor sends and writes locking request.That is to say, if certain data block was partly carried out to read operation or write operation before a file client, when it asks this particular data part again, only need to send and write locking request to lower floor's lock server.
As shown in Figure 2, be the method flow diagram of an embodiment of the present invention, in conjunction with Fig. 2, the embodiment of the present invention is explained in detail.For explaining conveniently, the file request client of take needs in lock file A data block B particular data partly as example is elaborated, wherein, Fac represents file request client, Fas represents the file system server (comprising lower layer data block server and lower floor's lock server) of lower floor, Flr represents upper layer data location register server, and concrete steps are as follows:
S1: the solicited message of writing the A that opens file that file request client Fac sends to upper layer data location register server Flr;
S2: the solicited message of writing the A that opens file that upper layer data location register server Fl r reception file request client Fac sends the data block routing information of extraction document A, be chunk information, if Flr extracts the chunk information less than file A, Flr judgement is current is to receive for the first time the request of writing the A that opens file that file request client is sent, and for file A creates an intactly unique complete chunk for the interior all data blocks of description document A, and record this chunk information.If Flr can extract the chunk information of file A, the chunk information of the direct extraction document A of Flr, and return to file request client;
The lock condition of S3:Fac judgement data block B particular data part in local cache, if certain data block part in Fac local cache and locked, forwards step S4 to; If it is locked that particular data does not partly have, forward step S5 to;
S4: judged that particular data part is locked, Fac returns to Subscriber Locked success, can write the operation of data block B particular data part;
The hit situation of S5:Fac judgement data block B particular data part in local cache, if miss, forwards S6 to, if hit, forwards S9 to;
S6:Fac sends the request of Read-Write Locks given data piece B particular data part to the lower floor's data storage server in Fas;
S7:Fas checks in current data block lock state information list data block B, whether particular data part is locked, if it is not locked, lower floor's lock server is labeled as locking by the lock-out state of the particular data part of data block B in data block lock state information table, and returns to this particular data partly to file request client; If locked, carry out and lock unsuccessfully strategy;
S8:Fac checks the state that fas returns, if return to the particular data part needing, the operation of returning to locking success and starting to write to user; If receiving to carry out lock unsuccessfully strategy, can to user return to locking failure or wait for a period of time after continue to ask to lock.
S9:Fac sends to the lower floor's data storage server in Fas the request of writing locking data piece B particular data part;
S10:Fas checks in current data block lock state information list data block B, whether particular data part is locked, if it is not locked, lower floor's lock server is labeled as locking by the lock-out state of the particular data part of data block B in data block lock state information table, and returns to locking successfully to file request client; If locked, carry out and lock unsuccessfully strategy;
S11:Fac checks the state that fas returns, and locks successfully the operation of returning to locking success and starting to write to user if returned; If receiving to carry out lock unsuccessfully strategy, can to user return to locking failure or wait for a period of time after continue to ask to lock.
Meanwhile, the invention allows for a kind of locking system of writing of distributed file system, comprise and be arranged at intrasystem upper layer data location register selecting paths module, lower floor's data interlock module and lower floor's data memory module; Upper layer data location register selecting paths module is for receiving the request of opening certain file of writing that file request client sends, and the data block routing information that extracts described file returns to described file request client; The locking request to described file certain data block particular data part of lower floor's data interlock module for sending according to described file request client, returns to described file request client by the lock authority information of writing of described certain data block particular data part.
It should be noted that, in the above-described embodiment, just in order to express easily, the file request client of just take needs locking data piece B particular data partly as example describes.In fact, in distributed file system, in the file system data server of lower floor, store a large amount of data with the storage of data block form.Upper layer data location register server is divided into a plurality of data blocks by identical file, and be stored in same or different lower floor's file system data servers, normally be stored in different file system data servers, be specifically stored in data block server.That is to say, in same lower floor file system data server, can store the data block that much comes from different files.And once upper layer data location register server has been determined a unique complete data block path of certain file, so, when all file request clients need to lock certain the particular data part of some data blocks in this document, all can only and carry out corresponding lock operation by this unique data block path access.That is to say now, the locked authority of this data block has been distributed in lower floor's file system data server.And upper layer data location register server is when receiving writing of file request client and open the locking request of certain file, only can select a copy data piece path determining, so itself does not improve the load of upper layer data location register server.Henceforth, to the locking of writing of certain data block in distributed file system, all it doesn't matter with upper layer data location register server.
And because lower floor's file system data server is more, so the data block of each file system data server admin is limited, therefore, the data block that each file system data server need to be managed write lock authority be also limited, so the load of lower floor's file system data server can not improve too much yet, therefore can not affect the normal work of lower floor's file system data server.By adopting a plurality of file system data servers, shared the locking load of single lock server in existing distributed file system, in the situation that not improving the hardware input of this distributed file system own, improved the throughput that distributed file system locking is submitted to.In actual applications, can select a data location register server (single master), also can select a plurality of Data Position registrar server (many master).If use a plurality of Data Position registrar server on upper strata, and the data in distributed file system are write in the lower floor's file system data server that is distributed to magnanimity of lock authority by a plurality of Data Position registrar server, so along with the growth of lower floor's file system data server in distributed file system, this locking system can be followed the dilatation of distributed file system and dilatation, thereby has good autgmentability.
Writing under the prerequisite of opening same file, except writing to the transmission of upper layer data location register server the file request client end of opening this document request for the first time, other each file request client only need to the communication of upper layer data location register server once, just can obtain the data block routing information of the file that needs the data division place that locks.If what this document requesting client need to obtain this data block again writing lock during authority, this document requesting client only needs downward layer data storage server to send locking request, can write lock authority from what obtain this data block in lower floor's lock server.So just reduced the number of times of file request client and upper strata location register server communication.Wherein, this data block write that lock authority comprises all data of storing in this data block write lock authority.And for same file requesting client, only need to carry out a communication with the data location register on upper strata, make upper layer data location register server substantially can keep there is same performance with not supporting the file system of writing lock, thereby reduced unnecessary communication-cost.
Above content is in conjunction with concrete execution mode further description made for the present invention, can not assert that specific embodiment of the invention is confined to these explanations.For general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, can also make some simple deduction or replace, all should be considered as belonging to protection scope of the present invention.

Claims (10)

  1. Distributed file system write a locking means, it is characterized in that, comprise the following steps:
    Upper layer data location register server is distributed to lower floor's lock server by the lock authority of writing of the different pieces of information piece of file, and the lock of writing of the different pieces of information piece of a file is separate between authority;
    When upper layer data location register server receive that file request client sends write the request of opening certain file time, upper layer data location register server extracts the data block routing information of described file, and returns to described file request client;
    When described lower floor lock server receives the locking request to certain data block particular data part that described file request client sends, described lower floor lock server judges whether current be the locking request receiving for the first time described certain data block, if so, in data block lock state information table, add described certain data block and corresponding locking request information thereof; If not, in described data block lock state information table, retrieve the locking request information of described certain data block particular data part, described certain data block is write to lock authority information and return to described file request client.
  2. 2. the method for claim 1, it is characterized in that, when described upper layer data location register server extracts the data block routing information of described file and data block routing information that discovery does not have described file, first described upper layer data location register server is the unique complete data block path of described document creation, and record the data block routing information of described file, thereby the lock authority of writing of the different pieces of information piece on the data block path of described file is distributed in described lower floor lock server.
  3. 3. the method for claim 1, it is characterized in that, described file request client is before sending the locking request of described certain data block particular data part to described lower floor lock server, also judge the lock condition of described particular data part in described file request client terminal local buffer memory, if described particular data part is in described file request client terminal local buffer memory and locked, described file request client does not send locking request to described lower floor lock server, if described particular data part is not locked, described file request client sends locking request to described lower floor lock server.
  4. 4. method as claimed in claim 3, it is characterized in that, described lower floor lock server according to the locking request of the described file request client receiving and return to certain data block particular data part described in described file request client write lock authority information, judge whether to notify lower layer data block server that the needed described particular data of described file request client is partly sent to described file request client, be specially:
    When described lower floor lock server receives the read-write locking request to described certain data block particular data part that described file request client sends, described lower floor lock server checks the lock condition of particular data part described in current data block locking information table, if described particular data part is not locked, in described data block lock state information table, the lock-out state of described particular data part is labeled as to locking, and notifies lower layer data block server to return to described particular data partly to described file request client; If described particular data part is locked, carries out and lock unsuccessfully strategy;
    When described lower floor lock server receive that described file request client sends to described certain data block particular data part write locking request time, described lower floor lock server checks the lock condition of the part of particular data described in current described data block lock state information table, if described particular data part is not locked, in described data block status information table, the lock-out state of described particular data part is labeled as to locking, and returns and lock successfully described file request client; If described particular data part is locked, carries out and lock unsuccessfully strategy.
  5. 5. method as claimed in claim 4, it is characterized in that, described file request client sends to the read-write locking request of described certain data block particular data part or before writing locking request to described lower floor lock server, also check the hit situation of described particular data part in local cache, if there is no described particular data part in described local cache, described particular data part is not hit in judgement, and sends read-write locking request to described lower floor lock server; If there is described particular data part and not locked in described local cache, described particular data part is hit in judgement, and sends and write locking request to described lower floor lock server.
  6. Distributed file system write a locking system, it is characterized in that, comprise being arranged at intrasystem upper layer data location register selecting paths module and authority issues module, lower floor's data interlock module and lower floor's data memory module; Upper layer data location register selecting paths module is for receiving the request of opening certain file of writing that file request client sends, and the data block routing information that extracts described file returns to described file request client; Authority issues module for the lock authority of writing of the different pieces of information piece of file is distributed to lower floor's lock server, and the lock of writing of the different pieces of information piece of a file is separate between authority; Lower floor's data interlock module for when described lower floor data interlock module, receive that described file request client sends to locking request partly of certain data block particular data time, described lower floor data interlock module judges whether current be the locking request receiving for the first time described certain data block, if so, in data block lock state information table, add described certain data block and corresponding locking request information thereof; If not, in described data block lock state information table, retrieve the locking request information of described particular data part, described certain data block is write to lock authority information and return to described file request client.
  7. 7. the locking system of writing as claimed in claim 6, it is characterized in that, described upper layer data location register selecting paths module is when extracting the data block routing information of described file and data block routing information that discovery does not have described file, described upper layer data location register selecting paths module is also used to the unique complete data block path of described document creation, and record the data block routing information of described file, thereby the lock authority of writing of the different pieces of information piece on the data block path of described file is distributed in described lower floor lock server.
  8. 8. the locking system of writing as claimed in claim 6, it is characterized in that, described file request client is before sending the locking request of described certain data block particular data part to described lower floor data interlock module, also judge the lock condition of described particular data part in described file request client terminal local buffer memory, if described particular data part is in described file request client terminal local buffer memory and locked, described file request client does not send locking request to described lower floor data interlock module, if described particular data part is not locked, described file request client sends locking request to described lower floor data interlock module.
  9. 9. the locking system of writing as claimed in claim 8, it is characterized in that, described lower floor data interlock module according to the locking request of the described file request client receiving and return to described file request client described certain data block particular data part write lock authority information, judge whether to notify lower layer data block server that the needed described particular data of described file request client is partly sent to described file request client:
    When described lower floor data interlock module receives the Read-Write Locks request to described certain data block particular data part that described file request client sends, the lock condition of the part of particular data described in described lower floor data interlock module check current data block lock state information table, if described particular data part is not locked, in described data block lock state information table, the lock-out state of described particular data part is labeled as to locking, and notifies lower floor's data memory module to return to described particular data partly to described file request client; If described particular data part is locked, carries out and lock unsuccessfully strategy;
    When described lower floor data interlock module receive that described file request client sends to described certain data block particular data part write locking request time, described lower floor data interlock module checks the lock condition of the part of particular data described in current described data block lock state information table, if described particular data part is not locked, in described data block status information table, the lock-out state of described particular data part is labeled as to locking, and returns and lock successfully described file request client; If described certain data block is locked, carries out and lock unsuccessfully strategy.
  10. 10. the locking system of writing as claimed in claim 9, it is characterized in that, described file request client sends to the read-write locking request of described certain data block particular data part or before writing locking request to described lower floor data interlock module, also check the hit situation of described particular data part in local cache, if there is no described particular data part in described local cache, described particular data part is not hit in judgement, and sends read-write locking request to described lower floor lock server; If there is described particular data part and not locked in described local cache, described particular data part is hit in judgement, and sends and write locking request to described lower floor lock server.
CN201010596619.5A 2010-12-20 2010-12-20 Write lock method of distributed file system and a system thereof Active CN102088484B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201010596619.5A CN102088484B (en) 2010-12-20 2010-12-20 Write lock method of distributed file system and a system thereof
PCT/CN2011/083694 WO2012083797A1 (en) 2010-12-20 2011-12-08 Write lock method and system for distributed file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010596619.5A CN102088484B (en) 2010-12-20 2010-12-20 Write lock method of distributed file system and a system thereof

Publications (2)

Publication Number Publication Date
CN102088484A CN102088484A (en) 2011-06-08
CN102088484B true CN102088484B (en) 2014-12-10

Family

ID=44100096

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010596619.5A Active CN102088484B (en) 2010-12-20 2010-12-20 Write lock method of distributed file system and a system thereof

Country Status (2)

Country Link
CN (1) CN102088484B (en)
WO (1) WO2012083797A1 (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088484B (en) * 2010-12-20 2014-12-10 南京中兴新软件有限责任公司 Write lock method of distributed file system and a system thereof
US8751493B2 (en) * 2012-04-23 2014-06-10 Google Inc. Associating a file type with an application in a network storage service
CN103095686B (en) * 2012-12-19 2016-06-08 华为技术有限公司 Focus metadata access control method and service device
CN104281442A (en) * 2013-07-12 2015-01-14 富泰华工业(深圳)有限公司 Document processing system and document processing method
CN104573428B (en) * 2013-10-12 2018-02-13 方正宽带网络服务股份有限公司 A kind of method and system for improving server cluster resource availability
CN103647850B (en) * 2013-12-25 2017-01-25 北京京东尚科信息技术有限公司 Data processing method, device and system of distributed version control system
CN105320512B (en) * 2014-07-30 2019-08-06 腾讯科技(深圳)有限公司 Distribute the method and device of trunk permission
CN105681367A (en) * 2014-11-17 2016-06-15 中国移动通信集团公司 Method, server and client for sharing file contents
CN106559282A (en) * 2015-09-29 2017-04-05 中兴通讯股份有限公司 A kind of lock file management method and device
CN105224255B (en) * 2015-10-14 2018-10-30 浪潮(北京)电子信息产业有限公司 A kind of storage file management method and device
CN106855871B (en) * 2015-12-09 2020-04-07 阿里巴巴集团控股有限公司 Data migration method and device
CN107146075B (en) * 2016-03-01 2020-11-10 创新先进技术有限公司 Request processing method and device
CN108647285B (en) * 2018-05-04 2021-06-22 北京小米移动软件有限公司 Renaming method and device in distributed file system and distributed file system
CN111274208B (en) * 2018-12-05 2023-06-30 杭州海康威视系统技术有限公司 Method and device for locking file
CN116055565B (en) * 2023-01-28 2023-06-06 北京蓝色星际科技股份有限公司 Data transmission method, system, device, electronic equipment and storage medium
CN119336608B (en) * 2024-12-18 2025-03-28 英诺达(成都)电子科技有限公司 Method, device and system for managing test case files, electronic equipment, storage medium and program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6925515B2 (en) * 2001-05-07 2005-08-02 International Business Machines Corporation Producer/consumer locking system for efficient replication of file data
CN1771495A (en) * 2003-05-07 2006-05-10 国际商业机器公司 Distributed file serving architecture system
CN101706802A (en) * 2009-11-24 2010-05-12 成都市华为赛门铁克科技有限公司 Method, device and sever for writing, modifying and restoring data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088484B (en) * 2010-12-20 2014-12-10 南京中兴新软件有限责任公司 Write lock method of distributed file system and a system thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6925515B2 (en) * 2001-05-07 2005-08-02 International Business Machines Corporation Producer/consumer locking system for efficient replication of file data
CN1771495A (en) * 2003-05-07 2006-05-10 国际商业机器公司 Distributed file serving architecture system
CN101706802A (en) * 2009-11-24 2010-05-12 成都市华为赛门铁克科技有限公司 Method, device and sever for writing, modifying and restoring data

Also Published As

Publication number Publication date
WO2012083797A1 (en) 2012-06-28
CN102088484A (en) 2011-06-08

Similar Documents

Publication Publication Date Title
CN102088484B (en) Write lock method of distributed file system and a system thereof
US11397721B2 (en) Merging conflict resolution for multi-master distributed databases
US8086581B2 (en) Method for managing lock resources in a distributed storage system
JP5730271B2 (en) Network data storage system and data access method thereof
CN106936899B (en) Configuration method of distributed statistical analysis system and distributed statistical analysis system
US8935560B2 (en) System and method of file locking in a network file system federated namespace
US9462056B1 (en) Policy-based meta-data driven co-location of computation and datasets in the cloud
US8832113B2 (en) Data management apparatus and system
US20070011136A1 (en) Employing an identifier for an account of one domain in another domain to facilitate access of data on shared storage media
CN102314506B (en) Based on the distributed buffering district management method of dynamic index
CN105025053A (en) Distributed file upload method based on cloud storage technology and system
CN101697168A (en) Method and system for dynamically managing metadata of distributed file system
US9009196B2 (en) Discovery and client routing to database nodes
CN101771723A (en) Data synchronization method
CN101512527A (en) Data processing system and method of handling requests
CN110825704B (en) A method for reading data, a method for writing data, and a server
US20070271239A1 (en) Method for transferring data between terminal apparatuses in a transparent computation system
WO2023197404A1 (en) Object storage method and apparatus based on distributed database
US10055139B1 (en) Optimized layout in a two tier storage
US10387384B1 (en) Method and system for semantic metadata compression in a two-tier storage system using copy-on-write
CN101778131A (en) Data synchronization system
CN101789963A (en) Data synchronization system
CN104951475B (en) Distributed file system and implementation method
US8572201B2 (en) System and method for providing a directory service network
CN113168405B (en) Database management service providing system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant