Dynamic Lock Localization for Distributed Key-Value Stores
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Distributed transactions on key-value stores face increased latency due to lock acquisition overhead and network overhead, especially when dealing with multiple entity-groups, as existing lock-based protocols are inefficient and lead to unnecessary lock dispersion and contention.
Innovation Solution
Implement dynamic lock-localization policies that include lock migration and contention-based dynamic lock ordering to reduce network round trips and latency, by dynamically migrating and placing locks in distinct entity-groups, and using alternative concurrency control mechanisms like MVCC to minimize lock usage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If lock-based protocol is used to support distributed transactions across entity-groups, then transactional support is provided, but transaction latency increases with the number of entity-groups
Solution Approach 1:
The patent segments locks into separate lock objects that can be independently managed and migrated, separating the locking mechanism from data objects. This allows locks to be relocated to minimize network round trips during acquisition, reducing transaction latency while maintaining distributed transactional support across multiple entity-groups
Solution Approach 2:
The patent implements dynamic lock migration where locks are moved between nodes based on current system state and access patterns. Locks are migrated to nodes that will minimize acquisition time and network overhead, transforming the static lock placement into a dynamic process that adapts to workload changes
2Productivity
If data objects are re-partitioned and re-assigned to balance load, then load balancing is improved, but lock acquisition overhead increases due to lock dispersion
Solution Approach 1:
The patent decouples data objects from their locks by creating separate lock objects. This segmentation allows data to be freely repartitioned for load balancing while locks maintain their own independent placement, preventing lock dispersion from increasing acquisition overhead
Solution Approach 2:
The patent introduces a lock manager as an intermediary component that handles lock acquisition and migration independently from data storage operations. This mediator coordinates lock placement and migration to minimize network overhead during data repartitioning and load balancing operations
3Reliability
If locks are acquired sequentially and synchronously to prevent deadlocks, then deadlock prevention is ensured, but transaction execution time increases
Solution Approach 1:
The patent implements dynamic lock ordering where the acquisition order is not fixed but adapts based on current contention levels and system state. Locks are acquired in an optimized sequence that minimizes waiting time while maintaining deadlock prevention through careful ordering management
Solution Approach 2:
The patent changes the lock acquisition parameters from static sequential ordering to dynamic contention-based ordering. The system monitors lock contention levels and adjusts acquisition sequences accordingly, using parameters like contention level and migration cost to determine optimal acquisition order
Data Source
AI summary
Systems and methods for accelerating distributed transactions on key-value stores includes applying one or more policies of dynamic lock-localization, the policies including a lock migration stage that decreases nodes on which locks are present so that a transaction needs fewer number of network round trips to acquire locks, the policies including a lock ordering stage for pipelining during lock acquisition and wherein the order on locks to avoid deadlock is controlled by average contentions for the locks rather than static lexicographical ordering; and dynamically migrating and placing locks for distributed objects in distinct entity-groups in a datastore through the policies of dynamic lock-localization.


