Delegated Key-Level Locking in Transactional Multi-Version Stores

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvetransaction atomicityVSAvoidscalability
Core Design Contradiction:
ReliabilityVSProductivity

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.

Inventive Principle:
Principle #1Segmentation

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

Engineering Contradiction:
Improvelock controlVSAvoidperformance
Core Design Contradiction:
Ease of operationVSProductivity

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Engineering Contradiction:
Improvelock state consistencyVSAvoidtransaction throughput
Core Design Contradiction:
Stability of the object's compositionVSProductivity

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.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10769128B2Delegated key-level locking for a transactional multi-version key-value store
Publication Date: 2020.09.08 SALESFORCE INC
  • US10769128B2 patent drawing
  • US10769128B2 patent drawing
  • US10769128B2 patent drawing

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.