Disk Lock Management via In-Memory Caching and Release Requests
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed systems, frequent updating of disk locks occupies a large quantity of disk IO resources, affecting system performance due to continuous reading and writing of lock information across nodes.
Innovation Solution
Implement a method where a node that occupies a disk lock can receive a release request from another node or the data storage system, allowing it to release the lock only when necessary, reducing frequent lock applications and releases, and using an occupancy field to manage lock access.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If all nodes continuously read and write lock information from/to the disk, then lock management is maintained, but disk IO resources are heavily occupied and system performance deteriorates
Solution Approach 1:
The patent extracts the lock information from the disk and maintains it in memory on each node. Instead of continuously reading from and writing to the disk, nodes store lock status locally in memory, performing lock operations in-memory. Only when lock information needs to be persisted or synchronized is it written to the disk, dramatically reducing disk IO frequency and improving system performance while maintaining lock management reliability.
2Loss of information
If lock information is frequently refreshed on the disk, then lock status is kept current, but disk IO resources are consumed and performance is affected
Solution Approach 1:
Instead of continuously or frequently refreshing lock information on the disk, the patent implements periodic or event-driven updates. Lock information is updated in memory on each change, and only periodically or when specific conditions are met is it synchronized to the disk. This reduces disk IO operations while maintaining lock status accuracy through efficient in-memory caching and selective persistence.
3Productivity
If nodes directly send release requests to each other, then lock release is efficient, but network interconnection is required between all nodes
Solution Approach 1:
The patent introduces a coordinator node or central化管理 mechanism as an intermediary for lock management. Instead of requiring direct peer-to-peer communication between all nodes, the coordinator receives lock release requests, updates the lock status, and notifies relevant nodes. This reduces network complexity by eliminating the need for full mesh interconnection while maintaining efficient lock release through centralized coordination.
Data Source
AI summary
A disk lock management method, apparatus, and system are disclosed. The method is performed by a first node, including: sending an obtaining request to a data storage system, where the obtaining request is used to request to obtain a disk lock; receiving a release request, where the release request is used to request the first node to release the disk lock; and sending, a release message to the data storage system, where the release message is used to release the disk lock. This method avoids frequent application and releasing operations performed on the disk lock, reduces disk IO resource occupancy caused by application and releasing of the disk lock, and improves overall system performance.


