Delegated Key-Level Locking in Transactional Multi-Version Stores
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current lock managers in databases face scalability issues and performance problems as the number of outstanding transactions increases, particularly in managing key-level locks effectively.
Innovation Solution
Implementing a memory buffer with a hash table that accumulates record updates and a buffer controller to manage key-level lock requests, delegating higher-level lock requests to a separate lock manager, and using lock strengths for conflict resolution, allowing for efficient handling of key-level locks and improving scalability.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a centralized lock manager handles all key-level locks for transactions, then transaction atomicity is ensured, but scalability and performance deteriorate as the number of outstanding transactions increases
Solution Approach 1:
The patent segments the lock management function into two parts: a centralized lock manager that handles only high-level transaction coordination, and distributed buffer controllers at each server that handle key-level lock operations locally. This segmentation allows the system to maintain transaction atomicity through the lock manager while improving scalability by distributing the lock management workload to individual servers, eliminating the bottleneck of centralized key-level lock management.
2Ease of operation
If a centralized lock manager handles all key-level locks, then comprehensive lock control is achieved, but performance problems occur under high transaction loads
Solution Approach 1:
The patent introduces buffer controllers as intermediary components between the centralized lock manager and the data buffers at each server. These buffer controllers handle key-level lock operations locally, acting as mediators that reduce the communication overhead and coordination burden on the centralized lock manager. This intermediary layer maintains comprehensive lock control while significantly improving performance under high transaction loads by keeping lock operations distributed and local.
3Stability of the object's composition
If key-level locks are managed centrally, then consistent lock states are maintained, but the system experiences performance degradation with increasing transactions
Solution Approach 1:
The patent segments lock state management between the centralized lock manager, which maintains the authoritative lock state for transaction coordination, and distributed buffer controllers, which cache and enforce lock states locally. This segmentation allows the system to maintain lock state consistency through the centralized authority while improving transaction throughput by allowing local servers to make lock decisions independently based on cached state information, reducing centralized contention.
Data Source
AI summary
This disclosure provides various techniques that may allow for key-level lock requests in a database to be managed by code that manages a memory buffer for the database. The transaction-level locks and other higher level locks may be managed by a separate lock manager. In an embodiment, the code inserts key-level lock requests in the record chain even if there is a conflict, and the key-level lock requests remain in the chain after the locks are subsequently granted. Preemption may also be supported in the record chain, in some embodiments.


