Locking can be handled easily. We need two messages for lock (one for request, the other
for grant), and one message for unlock requests. Also, this method is simple as it
resembles the centralized database.
Deadlocks can be handled easily. The reason is, we have one lock manager who is
responsible for handling the lock requests.
The lock-manager site becomes the bottleneck as it is the only site to handle all the lock
requests generated at all the sites in the system.
Highly vulnerable to single point-of-failure. If the lock-manager site failed, then we lose
the concurrency control.
Distributed Lock Manager - Concurrency Contorl in Distributed Database
Distributed Lock-Manager Approach
In this approach, the function of lock-manager is distributed over several sites.
[Every DBMS server (site) has all the components like Transaction Manager, LockManager, Storage Manager, etc.]
In Distributed Lock-Manager, every site owns the data which is stored locally.
This is true for a table that is fragmented into n fragments and stored in n sites. In this
case, every fragment is unique from every other fragment and completely owned by the
site in which it is stored. For those fragments, the local Lock-Manager is responsible to
handle lock and unlock requests generated by the same site or by other sites.
If the data stored in a site is replicated in other sites, then a site cannot own the data
completely. In such case, we cannot handle any lock request for a data item stored in a
site as the case of fragmented data. If we handle like fragmented data, it leads to
inconsistency problems as there are multiple copies stored in several sites. This case can
be handled using several protocols which are specifically designed for handling lock
requests on replicated data. The protocols are,
Primary Copy Protocol
Majority Based Protocol
Quorum Consensus Protocol
Simple implementation is required for the data which are fragmented. They can be
handled as in the case of Single Lock-Manager approach.
For replicated data, again the work can be distributed over several sites using one of the
above listed protocols.
Lock-Manager site is not the bottleneck as the work of lock-manager is distributed over