HBase Distributed Pessimistic Lock Manager for Concurrency Control
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current distributed databases face challenges with high transaction concurrency conflicts due to the use of optimistic lock mechanisms, leading to resource wastage and performance bottlenecks, while stand-alone databases struggle with intensive concurrent read and write operations and limited scalability.
Innovation Solution
Implementing a distributed pessimistic lock based on HBase storage, utilizing a lock manager with a cross-linked list format to manage locks and unlock operations, supporting table and row locks, and employing shared read, exclusive, update, and intent locks to manage transaction concurrency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If optimistic lock mechanism is used in distributed databases, then transaction conflict detection is simplified, but resource wastage increases and performance deteriorates under high concurrency conflicts
Solution Approach 1:
The patent applies preliminary action by acquiring locks on target rows before executing transaction operations. The lock manager pre-establishes lock states (locked, unlocked, locking, unlocked_wait) and manages lock acquisition in advance, preventing resource wastage from failed optimistic lock attempts while maintaining simplified conflict detection through structured lock state tracking.
2Device complexity
If stand-alone database is used, then pessimistic lock implementation is simple, but scalability is limited and intensive concurrent operations cannot be supported
Solution Approach 1:
The patent applies segmentation by dividing the distributed database into multiple nodes, each with its own lock manager instance. Locks are acquired at the node level for specific rows, allowing independent lock management across distributed segments. This enables scalable concurrent operations while maintaining relatively simple pessimistic lock implementation through modular lock manager components.
Solution Approach 2:
The patent introduces a lock manager as an intermediary component between transactions and data rows in the distributed database. The lock manager mediates lock acquisition, release, and state management, abstracting the complexity of distributed lock coordination while enabling scalable concurrent access through centralized lock state tracking at each node.
3Reliability
If distributed database with optimistic lock is used, then system availability is improved, but transaction conflict resolution causes resource consumption increase
Solution Approach 1:
The patent applies preliminary action by acquiring locks before transaction execution, preventing conflicting transactions from proceeding and eliminating the need for rollback. This pre-locking mechanism maintains system availability through continuous transaction processing while reducing resource consumption by avoiding redundant transaction retries and rollbacks associated with optimistic lock conflicts.
Data Source
AI summary
A distributed pessimistic lock based on HBase storage and a method for implementing a database pessimistic lock; the distributed pessimistic lock including a lock manager configured to be installed on a Region of a RegionServer node of a HBase system, the lock manager has a lock and unlock interface; and the distributed pessimistic lock, an operation transaction, and a lock holder form a cross linked list format; a horizontal dimension is an information of a current data row, a vertical dimension is an information of the operation transaction, and an intersection point between the horizontal dimension and the vertical dimension is the lock holder. By installing the lock manager on a node Region of a HBase storage system, the lock manager locks and unlocks a data operation of the HBase system with the distributed pessimistic lock.


