CN107360245A - A kind of local cache method and device based on lease lock mechanism - Google Patents
A kind of local cache method and device based on lease lock mechanism Download PDFInfo
- Publication number
- CN107360245A CN107360245A CN201710630929.6A CN201710630929A CN107360245A CN 107360245 A CN107360245 A CN 107360245A CN 201710630929 A CN201710630929 A CN 201710630929A CN 107360245 A CN107360245 A CN 107360245A
- Authority
- CN
- China
- Prior art keywords
- client
- storage system
- data
- lease
- target 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000007246 mechanism Effects 0.000 title claims abstract description 20
- 238000003860 storage Methods 0.000 claims abstract description 172
- 230000005540 biological transmission Effects 0.000 claims abstract description 13
- 238000012545 processing Methods 0.000 claims description 17
- 230000001360 synchronised effect Effects 0.000 claims description 11
- 230000000977 initiatory effect Effects 0.000 claims description 10
- 238000004321 preservation Methods 0.000 claims description 7
- 238000000151 deposition Methods 0.000 claims description 2
- 230000003111 delayed effect Effects 0.000 claims 1
- 230000008569 process Effects 0.000 abstract description 16
- 238000004904 shortening Methods 0.000 abstract description 4
- 230000015556 catabolic process Effects 0.000 description 7
- 238000006731 degradation reaction Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 3
- 238000007710 freezing Methods 0.000 description 3
- 230000008014 freezing Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000005012 migration Effects 0.000 description 2
- 238000013508 migration Methods 0.000 description 2
- 238000011084 recovery Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 230000000386 athletic effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
- H04L67/5683—Storage of data provided by user terminals, i.e. reverse caching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
- H04L67/5682—Policies or rules for updating, deleting or replacing the stored data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/61—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Storage Device Security (AREA)
Abstract
We are bright to disclose a kind of local cache method and device based on lease lock mechanism, and this method includes:When storage system receives the data access request of client transmission, the priority of the client is determined;Lease authority is sent to the client according to the priority of the client;The target data is sent into the client to be cached, so that the client operates the target data of caching according to the lease authority.Pass through lease lock mechanism, client can be by the data buffer storage in storage system to local client, so reduce the data exchange flow process between the service end where client and storage system, reduce the read operation to file and the operation of path list, shortening path reduces delay, improves the data access capabilities of storage system.
Description
Technical field
The present invention relates to the field of storage, more particularly to a kind of caching method and device of lease lock mechanism.
Background technology
With the development of Internet technology, storage system needs to support the data of magnanimity, and needs support and client
Read-write operation.
In the prior art, in order to improve the performance that client is read to memory system data, there is provided many to improve storage
The method of system, such as high performance storage hardware equipment is provided, or the high performance software of exploitation.
But client is all carried out, online due to network not when the data in storage system conduct interviews
Together, there can be different delays, have a strong impact on read-write operation of the client to data.
The content of the invention
In view of this, a kind of local cache method and device based on lease lock mechanism provided in an embodiment of the present invention, visitor
Family end on the data buffer storage in storage system to local client, will can so reduce where client and storage system
Data exchange flow process between service end, reduce the read operation to file and the operation of path list, shorten path reduction
Delay, improve the data access capabilities of storage system.
A kind of local cache method based on lease lock mechanism provided in an embodiment of the present invention, including:
When storage system receives the data access request of client transmission, the priority of the client is determined;
Lease authority is sent to the client according to the priority of the client;
The target data is sent into the client to be cached, so that the client is according to the lease authority
The target data of caching is operated.
Optionally, the priority for determining the client, including:
When storage system receives the data access request of client transmission, the client access target data are determined
Order;
If it is first to target data initiate access request client when, the client possesses first priority;
If not the first client for initiating to access to target data, the client are gathered around with the second priority.
Optionally, the priority according to the client sends lease authority to the client, including:
If the client possesses first priority, will read lease, write lease and processing lease be sent to the client;
If the client possesses the second priority, lease will be read and processing lease is sent to the client.
Optionally, in addition to:
If client is not the first client for initiating to access to target data, judge first to target data initiation access
The first client whether to target data carry out write operation;
If first client carries out write operation to target data, the power that first client writes lease is cancelled
Limit, and the target data cached in the first client is synchronized in storage system.
Optionally, in addition to:
After the client of data access being initiated to the storage system and the storage system disconnects, described in preservation
The lease authority information of client, and start timer;
If in the default time range of the timer, the client reconnects with storage system, by preservation
The lease authority information of the client is sent to the client;
If in the default time range of the timer, the client does not reconnect with the storage system, institute
State the lease authority information for the client that storage system release preserves.
Optionally, the target data is sent to before the client cached, in addition to:
After the storage system receives the data access request of client transmission, the request that is detected according to client
The attribute of the data record of target data in node, judge whether directly to notify local TDB numbers in client read requests node
According to the data record in storehouse;
If the attribute of data record records to be fixed in the local TDB databases, directly read by client described in
The data record of target data;
If the attribute of data record is recorded at random in the local TDB databases, the local TDB numbers of requesting node are judged
According in storehouse, whether fixing comprising target data records;
If the fixed record comprising target data in the local TDB databases of requesting node, is directly read by client
The data record of the target data;
If the fixed record not comprising target data in the local TDB databases of requesting node, is initialized in storage system
Each local TDB databases, and according to the lease authority of client judge whether to need that the data record of target data is strong
System moves to requesting node;
If the lease authority of client includes reading lease, recorded at random is copied into requesting node, and notify client
Read the data record of target data;
The lease authority of client includes reading lease and writes lease, then forces recorded at random to move to requesting node, and
Client is notified to read the data record of target data.
Optionally, in addition to:
When detecting the reconstruction operation of triggering storage system, main section is determined from all nodes of the storage system
Point;
Freeze the storage system;
Update the data record in host node in local TDB data in storage system;
Data record in the local TDB databases in the storage system of renewal is synchronized to each from node
In;
Releasing is freezed to the storage system.
Optionally, triggering the condition of the storage system reconstruction operation includes:
Detect that any one node breaks down in the storage system;
Or
Detect and new node is added in the storage system.
Optionally, the data record in the renewal storage system in local TDB databases, including:
Obtain the data record in each TDB databases from node local in storage system;
Local TDB numbers data record in the local TDB databases from node got being fused in host node
According in storehouse;
The each data being directed in the storage system, data record corresponding to the data is carried out according to preset order
Sequence;
The data record of each data record time the latest is saved in the local TDB databases of host node.
The embodiment of the invention also discloses a kind of local cache device based on lease lock mechanism, including:
Priority determining unit, for when storage system receives the data access request that client is sent, determining institute
State the priority of client;
Transmitting element, lease authority is sent to the client for the priority according to the client;
Buffer unit, cached for the target data to be sent into the client so that the client according to
The target data of caching is operated according to the lease authority.
In the embodiment of the present invention, storage system is accessed by lease lock mechanism, ensure that in storage system all nodes it
Between data uniformity, and can be by the data buffer storage in storage system to local client by lease lock mechanism client
On, so reduce the data exchange flow process between the service end where client and storage system, reduce the reading to file
Operation and the operation of path list, shortening path reduces delay, improves the data access capabilities of storage system.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 shows a kind of flow signal of local cache method based on lease lock mechanism provided in an embodiment of the present invention
Figure;
Fig. 2 shows a kind of schematic flow sheet of lease down method provided in an embodiment of the present invention;
Fig. 3 shows that a kind of flow of data record synchronous method provided in an embodiment of the present invention is intended to;
Fig. 4 shows the schematic flow sheet that a kind of storage system provided in an embodiment of the present invention is recovered;
Fig. 5 shows a kind of structural representation of local cache device based on lease lock mechanism provided in an embodiment of the present invention
Figure;
Fig. 6 shows a kind of structural representation of storage system provided in an embodiment of the present invention.
Embodiment
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 carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
With reference to figure 1, a kind of stream of local cache method based on lease lock mechanism provided in an embodiment of the present invention is shown
Journey schematic diagram, in the present embodiment, this method includes:
S101:Client sends data access request to storage system;
S102:When storage system receives the data access request of client transmission, the priority of client is determined;
In the present embodiment, the storage system of client sends data access request, and storage system can root
Access order according to client to target data, the priority of client is determined, specifically, S101 includes:
When storage system receives the data access request of client transmission, the client access target data are determined
Sequentially;
If it is first to target data initiate access request client when, the client possesses first priority;
If not it is first to target data initiate access request client when, the client possesses the second priority.
S103:Storage system sends lease authority according to the priority of the client to client;
S104:Target data is cached to client;
In the present embodiment, possess the lease authority difference that the client of different priority is got, specifically:
Client for possessing first priority, the client can possess three lease authorities, be respectively:Read to rent
About, lease and processing lease are write;
Client for possessing the second priority, the client can possess two lease authorities, be respectively:Read lease
With processing lease.
Wherein, reading the authority of lease includes:The client-cache target data to be read and only can be allowed by reading lease
" reading " operation can be performed to the target data for being cached to client, may only check target data, but target can not be edited
Data.In addition, reading lease authority can also ensure that the data for being cached to client are newest data, and can ensure
Multiple client accesses identical data simultaneously.
The data mentioned in the present embodiment can be file or catalogue etc..
Writing the authority of lease includes:Write lease and exclusive lock service is provided, that is, allow client-cache target data, and can
To carry out " writing " operation to target data.
It should be noted that " writing " operation of target data can be understood as that edlin can be entered to target data.
The authority of processing lease includes:The opening handle of late release client, or postpone to send to server and open
The request of handle.
Wherein, processing lease is accomplished that, when network failure occurs between client and storage system, before disconnection
The accessing request information that client has been sent, the access request that the client that storage system receives before will be switched off is sent are carried out
Preserve, and preserve the lease authority information for these clients for initiating access request, when client and storage system are again coupled to
Afterwards, storage system can respond each access request, therefore client without being again to storage according to the sequencing of preservation
System sends the access request, specifically, including:
After the client of data access being initiated to storage system and storage system disconnects, the lease of client is preserved
Authority information, and start timer;
If in the default time range of timer, the client reconnects with storage system, by the lease of client
Authority information is sent to the client;
If in the default time range of timer, the client does not reconnect with storage system, storage system release
The information of the lease authority of the client of preservation.
In the present embodiment, after storage system releases the lease authority information of client, client is needed again to depositing
Storage system sends access request.
In the present embodiment, if client be not it is first to target data initiate access, that is to say, that it is now first to mesh
The first client that mark data are initiated to access conducts interviews to target data, if now the first client edits target
Data, because target data is being updated, then the data for being now cached to client are not just newest data, therefore,
Lease degradation processing can be carried out to the first client, specifically, also including:
S201:When storage system receives the data access request of client transmission, determine that the client accesses mesh
Mark the order of data;
S202:If it is first to target data initiate access request client when, it is preferential that the client possesses first
Power;
S203:If not the first client for initiating to access to target data, the client are gathered around with the second priority sheet
In embodiment, if client is the first client of first access target data, first client possesses first priority,
Storage system will read lease, write lease and processing lease these three authorities are all sent to the first client, afterwards, if there is it again
When its second client sends the request of access target data to storage system, the first client is monitored in real time, if the
One client does not perform write operation to target data always, then the operation of lease degradation is not carried out to the first client, if prison
Measure the first client objectives data and perform write operation, then cancel the authority that the first client writes lease, and will be in the first client
The target data that have updated is held to be synchronized to storage system.Storage system will read lease and processing lease is sent to the second client,
And the target data in storage system is cached in the second client.
In the present embodiment, if storage system is single node, after nodes sharing process receives the request of data access, need
Lease information is searched from the TDB databases of storage system, and according to the priority of client, lease power is sent for client
Limit, and accesses the shared information record of the data, and carries out the judgement of lease degradation, when needing to carry out lease drop to client
During level, downgrade information is sent into other share and access to the node, the node carries out lease degradation processing, degrades and completes
Afterwards, share and returned, authorize other client leases.
In the present embodiment, if storage system is multinode, as shown in fig. 6, storage system includes host node and more
It is individual from node, after nodes sharing process receives the request of data access, share the local TDB data that process reads storage system
Data record in storehouse, the judgement of lease degradation is carried out, when judging to need to carry out lease degradation, according to the note in local TDB
The process ID of the data is opened in record, notifies that the process is degraded;When judging that the process is not the process in this node, it is necessary to
The node virtual number where the process is searched by High Availabitity, service can be used by being then sent to the height of the process, pass through distal end
High Availabitity Service Notification other nodes shared carry out lease degradation.
, it is necessary to which explanation, for the storage system of multiple nodes, each node includes local TDB in the present embodiment
Database, preserve in each TDB databases be in storage system data check and more new record.
S105:Lease authority according to client conducts interviews to the target data for being cached to client.
In the present embodiment, order that client is accessed target data is different, and the lease authority that client is got is not yet
Together.If the lease authority of client includes:Read right, write permission, processing authority, then the client target data can be entered
When row write operation, read operation, client and storage system disconnect, the operation of delay request response;If the lease authority of client
Including:Read right, processing authority, then the client may only be to target data progress read operation and client and storage system
During disconnection, the operation of delay request response.
In the present embodiment, in client access target data, the data of caching should be the data of latest update, in order to
Ensure this point, the data record of each node in storage system should be real-time synchronization, specifically include:
S301:Client reads the local TDB databases in any one node in storage system, judges local TDB numbers
Data record according to the target data to be cached included in storehouse is recorded at random or fixed record, and using the node as asking
Seek node;
S302:If fixed record, the client record to the request and send data record access request and High Availabitity
Service, and jump to S311;
S303:If recorded at random, the request for locking local TDB databases is sent to requesting node;
S304:Requesting node locks local TDB databases, and retrieves local TDB databases, checks whether number of targets be present
According to fixed record;
S305:If the fixed record of target data in the local TDB databases of requesting node be present, S311 is jumped to;
S306:If in the absence of the fixed record of target data in the local TDB databases of requesting node, according to default
Key values calculate the node where the fixed record of the target data;
S307:Sent to host node and redirect request, host node initialization data storehouse is handled, and makes the random note of target data
Record and fixed record are same nodes;
S308:Host node judges whether to need to force migration recorded at random according to the lease authority of client;
S309:If the lease authority of client includes reading lease, recorded at random is copied into requesting node, and jump to
S311;
S310:If the lease authority of client includes reading lease and writes lease, recorded at random is forced to move to request
Node;
S311:Requesting node notifies the data record of client access target data.
In the present embodiment, forcing the process of migration recorded at random includes:Node where setting recorded at random is host node,
And the data record of target data is replicated and is sent to requesting node;Wherein, recorded at random needs to record newest node number.
The step of by 301~S311, the uniformity of data record between storage system is not only ensure that, and ensure that visitor
The data that family end is cached to are newest data.
In the embodiment of the present invention, storage system is accessed by lease lock mechanism, ensure that in storage system all nodes it
Between data uniformity, and can be by the data buffer storage in storage system to local client by lease lock mechanism client
On, so reduce the data exchange flow process between the service end where client and storage system, reduce the reading to file
Operation and the operation of path list, shortening path reduces delay, improves the data access capabilities of storage system.
With reference to figure 4, the schematic flow sheet that a kind of storage system provided in an embodiment of the present invention is recovered is shown, in this implementation
In example, this method includes:
In the present embodiment, when storage system includes multinode, as shown in Fig. 2 storage system include host node and
It is multiple from node, when any one nodes break down in storage system or storage system need to increase node, it is necessary to
Storage system is rebuild, it is necessary to which the data of each node are merged and carry out weight in cluster during reconstruction
New distribution, specifically includes:
S401:When detecting the reconstruction operation of triggering storage system, main section is determined from all nodes of storage system
Point;
In the present embodiment, each physical node can correspond to a virtual node number in storage system, and this is virtual
Node number is stored in the public domain of cluster, during recovery, passes through the physics that dummy node in election system is minimum
Host node of the node as system, the recovery process of storage system is monitored by the High Availabitity service of the node.
S402:Freeze storage system;
In the present embodiment, freezing the process of the storage system includes:TDB data files all in storage system are locked
Processing, client is forbidden to carry out any operation to the data in storage system.
It should be noted that also need to judge whether that all nodes all include required TDB data, if having node not
Comprising required TDB data, then TDB data are re-created, and ensured in each node in storage system comprising required
TDB data.
S403:Update the data record in host node in TDB databases in storage system.
In the present embodiment, TDB databases are located in the host node of storage system, update the data record in TDB databases,
Need to get the data record in other nodes, and the data record in TDB storehouses is updated, specifically, including:
Host node obtains the data record of TDB data from others from node;
The TDB data records got are fused in TDB databases;
Each data being directed in storage system, data record corresponding to the data is arranged sequentially in time
Sequence;
The data record of each data record time the latest is saved in the local TDB databases of host node.
In the present embodiment, what is recorded in TDB databases is access situation, the update status of data storage in storage system
Deng.That is, when having client to conduct interviews the data in storage system, or client accesses the number in storage system
According to, and when have updated the data, be required for being recorded.
S404:Data record in TDB databases in the storage system of renewal is synchronized to each from node.
Specifically, S403 includes:By the data record in the TDB databases of renewal be pushed in storage system it is all from
In node, and the old record that is stored from node is deleted, wherein, this is old to be recorded as in synchronous TDB databases before data record
The data record of storage.
In the present embodiment, the data record preserved in each node in each storage system associates a virtual section
Point, can be related to other nodes by the data preserved in the node by dummy node when physical node breaks down
Connection.Therefore, it is necessary to establish a new dummy node to each node in storage system, the dummy node of foundation can manage
Manage the data record in each node.
S405:Release the freeze operation to storage system.
In addition,, can be in master in order to preferably manage each node because storage system includes many nodes
The dummy node number ground chart for calling the roll of the contestants in athletic events new in node, the ground chart can manage each node in storage system.
In the present embodiment, when any one node in storage system breaks down, or needs to increase new node,
Need to rebuild storage system, by being updated to TDB databases, and the data in the TDB databases of renewal are same
Walk in each node, realize different internodal datas synchronizations, and then realize lease between the different nodes of storage system
The uniformity of lock, it ensure that the lock in storage system between all nodes for same data is synchronous.In the present embodiment, for
Storage system, it is consistent that storage system, which includes a host node and multiple lease locks from node, each node,.
With reference to figure 5, a kind of knot of local cache device based on lease lock mechanism provided in an embodiment of the present invention is shown
Structure schematic diagram, in the present embodiment, the device include:
Priority determining unit 501, for when storage system receive client transmission data access request when, it is determined that
The priority of the client;
Transmitting element 502, lease authority is sent to the client for the priority according to the client;
Buffer unit 503, cached for the target data to be sent into the client, so that the client
The target data of caching is operated according to the lease authority.
Optionally, priority determining unit, it is specifically used for:
When storage system receives the data access request of client transmission, the client access target data are determined
Order;
If it is first to target data initiate access request client when, the client possesses first priority;
If not the first client for initiating to access to target data, the client are gathered around with the second priority.
Optionally, transmitting element is specifically used for:
If the client possesses first priority, will read lease, write lease and processing lease be sent to the client;
If the client possesses the second priority, lease will be read and processing lease is sent to the client.
Optionally, the device is additionally operable to:
If client is not the first client for initiating to access to target data, judge first to target data initiation access
The first client whether to target data carry out write operation;
If first client carries out write operation to target data, the power that first client writes lease is cancelled
Limit, and the target data cached in the first client is synchronized in storage system.
Optionally, the device is additionally operable to:
After the client of data access being initiated to the storage system and the storage system disconnects, described in preservation
The lease authority information of client, and start timer;
If in the default time range of the timer, the client reconnects with storage system, by preservation
The lease authority information of the client is sent to the client;
If in the default time range of the timer, the client does not reconnect with the storage system, institute
State the lease authority information for the client that storage system release preserves.
Optionally, the device is additionally operable to:
After the storage system receives the data access request of client transmission, the request that is detected according to client
The attribute of the data record of target data in node, judge whether directly to notify local TDB numbers in client read requests node
According to the data record in storehouse;
If the attribute of data record records to be fixed in the local TDB databases, directly read by client described in
The data record of target data;
If the attribute of data record is recorded at random in the local TDB databases, the local TDB numbers of requesting node are judged
According in storehouse, whether fixing comprising target data records;
If the fixed record comprising target data in the local TDB databases of requesting node, is directly read by client
The data record of the target data;
If the fixed record not comprising target data in the local TDB databases of requesting node, is initialized in storage system
Each local TDB databases, and according to the lease authority of client judge whether to need that the data record of target data is strong
System moves to requesting node;
If the lease authority of client includes reading lease, recorded at random is copied into requesting node, and notify client
Read the data record of target data;
The lease authority of client includes reading lease and writes lease, then forces recorded at random to move to requesting node, and
Client is notified to read the data record of target data.
Optionally, the device also includes:
Host node determining unit, with when detect triggering storage system reconstruction operation when, from the institute of the storage system
Have and host node is determined in node;
Freezing unit, for freezing the storage system;
Updating block, for updating the data record in storage system in host node in local TDB data;
Synchronization unit, it is synchronized to for the data record in the local TDB databases in the storage system by renewal
Each is from node;
Lifting unit, the storage system is freezed for releasing.
Optionally, triggering the condition of the storage system reconstruction operation includes:
Detect that any one node breaks down in the storage system;
Or
Detect and new node is added in the storage system.
Optionally, updating block, it is specifically used for:
Obtain the data record in each TDB databases from node local in storage system;
Local TDB numbers data record in the local TDB databases from node got being fused in host node
According in storehouse;
The each data being directed in the storage system, data record corresponding to the data is carried out according to preset order
Sequence;
The data record of each data record time the latest is saved in the local TDB databases of host node.
By the device of the embodiment of the present invention, storage system is accessed by lease lock mechanism, ensure that institute in storage system
Have a uniformity of data between node, and by lease lock mechanism client can by the data buffer storage in storage system to this
In ground client, so reduce the data exchange flow process between the service end where client and storage system, reduce pair
The read operation of file and the operation of path list, shortening path reduces delay, improves the data access energy of storage system
Power.
It should be noted that each embodiment in this specification is described by the way of progressive, each embodiment weight
Point explanation is all difference with other embodiment, between each embodiment identical similar part mutually referring to.
The foregoing description of the disclosed embodiments, professional and technical personnel in the field are enable to realize or using the present invention.
A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The most wide scope caused.
Claims (10)
- A kind of 1. local cache method based on lease lock mechanism, it is characterised in that including:When storage system receives the data access request of client transmission, the priority of the client is determined;Lease authority is sent to the client according to the priority of the client;The target data is sent into the client to be cached so that the client according to the lease authority to slow The target data deposited is operated.
- 2. according to the method for claim 1, it is characterised in that the priority for determining the client, including:When storage system receives the data access request of client transmission, the suitable of the client access target data is determined Sequence;If it is first to target data initiate access request client when, the client possesses first priority;If not the first client for initiating to access to target data, the client are gathered around with the second priority.
- 3. according to the method for claim 1, it is characterised in that the priority according to the client is to the client End sends lease authority, including:If the client possesses first priority, will read lease, write lease and processing lease be sent to the client;If the client possesses the second priority, lease will be read and processing lease is sent to the client.
- 4. according to the method for claim 3, it is characterised in that also include:If client is not the first client for initiating to access to target data, judge first to initiate the of access to target data Whether one client is carrying out write operation to target data;If first client carries out write operation to target data, the authority that first client writes lease is cancelled, And the target data cached in the first client is synchronized in storage system.
- 5. according to the method for claim 1, it is characterised in that also include:After the client of data access being initiated to the storage system and the storage system disconnects, the client is preserved The lease authority information at end, and start timer;If in the default time range of the timer, the client reconnects with storage system, by described in preservation The lease authority information of client is sent to the client;If in the default time range of the timer, the client does not reconnect with the storage system, described to deposit The lease authority information for the client that storage system release preserves.
- 6. according to the method for claim 1, it is characterised in that the target data is sent to the client and delayed Before depositing, in addition to:After the storage system receives the data access request of client transmission, the requesting node that is detected according to client The attribute of the data record of middle target data, judge whether directly to notify local TDB databases in client read requests node In data record;If the attribute of data record records to be fixed in the local TDB databases, the target is directly read by client The data record of data;If the attribute of data record is recorded at random in the local TDB databases, the local TDB databases of requesting node are judged In whether the fixed record comprising target data;If the fixed record comprising target data in the local TDB databases of requesting node, directly read by client described in The data record of target data;If the fixed record not comprising target data in the local TDB databases of requesting node, is initialized each in storage system Individual local TDB databases, and judge whether to need to force to move by the data record of target data according to the lease authority of client Move on to requesting node;If the lease authority of client includes reading lease, recorded at random is copied into requesting node, and notify client to read The data record of target data;The lease authority of client includes reading lease and writes lease, then forces recorded at random to move to requesting node, and notify Client reads the data record of target data.
- 7. according to the method for claim 1, it is characterised in that also include:When detecting the reconstruction operation of triggering storage system, host node is determined from all nodes of the storage system;Freeze the storage system;Update the data record in host node in local TDB data in storage system;Data record in the local TDB databases in the storage system of renewal is synchronized to each from node;Releasing is freezed to the storage system.
- 8. according to the method for claim 7, it is characterised in that triggering the condition of the storage system reconstruction operation includes:Detect that any one node breaks down in the storage system;OrDetect and new node is added in the storage system.
- 9. according to the method for claim 7, it is characterised in that local TDB databases in the renewal storage system In data record, including:Obtain the data record in each TDB databases from node local in storage system;Local TDB databases data record in the local TDB databases from node got being fused in host node In;The each data being directed in the storage system, are arranged according to preset order data record corresponding to the data Sequence;The data record of each data record time the latest is saved in the local TDB databases of host node.
- A kind of 10. local cache device based on lease lock mechanism, it is characterised in that including:Priority determining unit, for when storage system receives the data access request that client is sent, determining the visitor The priority at family end;Transmitting element, lease authority is sent to the client for the priority according to the client;Buffer unit, cached for the target data to be sent into the client, so that the client is according to institute Lease authority is stated to operate the target data of caching.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710630929.6A CN107360245B (en) | 2017-07-28 | 2017-07-28 | Local caching method and device based on lease lock mechanism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710630929.6A CN107360245B (en) | 2017-07-28 | 2017-07-28 | Local caching method and device based on lease lock mechanism |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107360245A true CN107360245A (en) | 2017-11-17 |
CN107360245B CN107360245B (en) | 2020-10-16 |
Family
ID=60285779
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710630929.6A Active CN107360245B (en) | 2017-07-28 | 2017-07-28 | Local caching method and device based on lease lock mechanism |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107360245B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109324764A (en) * | 2018-11-01 | 2019-02-12 | 郑州云海信息技术有限公司 | A kind of implementation method and device of distribution exclusive lock |
CN111177197A (en) * | 2019-12-26 | 2020-05-19 | 北京仁科互动网络技术有限公司 | Cache processing method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102136003A (en) * | 2011-03-25 | 2011-07-27 | 上海交通大学 | Large-scale distributed storage system |
CN104268242A (en) * | 2010-09-17 | 2015-01-07 | 微软公司 | Directory Leasing |
CN105631023A (en) * | 2015-12-30 | 2016-06-01 | 华为技术有限公司 | Method and device for distribution type lock service |
CN106331148A (en) * | 2016-09-14 | 2017-01-11 | 郑州云海信息技术有限公司 | Cache management method and cache management device for data reading by clients |
CN106777047A (en) * | 2016-12-09 | 2017-05-31 | 郑州云海信息技术有限公司 | A kind of metadata read method and its device for distributed system |
-
2017
- 2017-07-28 CN CN201710630929.6A patent/CN107360245B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104268242A (en) * | 2010-09-17 | 2015-01-07 | 微软公司 | Directory Leasing |
CN102136003A (en) * | 2011-03-25 | 2011-07-27 | 上海交通大学 | Large-scale distributed storage system |
CN105631023A (en) * | 2015-12-30 | 2016-06-01 | 华为技术有限公司 | Method and device for distribution type lock service |
CN106331148A (en) * | 2016-09-14 | 2017-01-11 | 郑州云海信息技术有限公司 | Cache management method and cache management device for data reading by clients |
CN106777047A (en) * | 2016-12-09 | 2017-05-31 | 郑州云海信息技术有限公司 | A kind of metadata read method and its device for distributed system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109324764A (en) * | 2018-11-01 | 2019-02-12 | 郑州云海信息技术有限公司 | A kind of implementation method and device of distribution exclusive lock |
CN111177197A (en) * | 2019-12-26 | 2020-05-19 | 北京仁科互动网络技术有限公司 | Cache processing method and system |
CN111177197B (en) * | 2019-12-26 | 2023-03-14 | 北京仁科互动网络技术有限公司 | Cache processing method and system |
Also Published As
Publication number | Publication date |
---|---|
CN107360245B (en) | 2020-10-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101278540B (en) | System and method to maintain coherence of cache contents in a multi-tier software system aimed at interfacing large databases | |
US7500020B1 (en) | Coherency of replicas for a distributed file sharing system | |
CN107885758A (en) | The data migration method and dummy node of a kind of dummy node | |
CN106911728B (en) | The choosing method and device of host node in distributed system | |
US20030065760A1 (en) | System and method for management of a storage area network | |
CN103109292B (en) | The system and method for Aggregation Query result in fault tolerant data base management system | |
US7577868B2 (en) | No data loss IT disaster recovery over extended distances | |
CN110169040A (en) | Distributed data storage method and system based on multilayer consistency Hash | |
US7165083B2 (en) | File management method in a distributed storage system | |
CN108363641B (en) | Main and standby machine data transmission method, control node and database system | |
CN103034664B (en) | Control database the method, system and device of Data Migration | |
CN110990200B (en) | Flow switching method and device based on multiple active data centers | |
JP2005216067A (en) | Data processing system | |
CN110688261A (en) | Heterogeneous electronic file cloud disaster recovery system based on block chain | |
CN104811740B (en) | A kind of distribution method of video file, system and device | |
JP2008518284A (en) | Metadata management for fixed content distributed data storage | |
CN111506592B (en) | Database upgrading method and device | |
CN105068758A (en) | Distributed file system data I/O optimization method for parallel data collection | |
CN108491504A (en) | Method and device for decentralized configuration management | |
CN102170460A (en) | Cluster storage system and data storage method thereof | |
CN104750757B (en) | A kind of date storage method and equipment based on HBase | |
CN107360245A (en) | A kind of local cache method and device based on lease lock mechanism | |
US20060149786A1 (en) | Distributed database system | |
CN109684273A (en) | A kind of snapshot management method, apparatus, equipment and readable storage medium storing program for executing | |
CN106603319A (en) | Fault processing method, management server, and logic server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20200916 Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd. Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601 Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |