Database Locking Non-Existent Index Keys via Partitioning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database management systems face performance delays when handling transactions that request access to non-existent index keys, as existing locking mechanisms often block multiple transactions due to locking entire ranges of keys, leading to inefficiencies in concurrency and resource utilization.

Innovation Solution

Implement a k-partition function to assign non-existent index keys to specific partitions, allowing for targeted locking of only the necessary partitions, thereby reducing the number of blocked transactions and improving system performance by allowing access to other partitions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional locking mechanisms lock entire ranges of keys when a non-existent key is requested, then data consistency is maintained, but transaction concurrency is reduced and system performance deteriorates

Engineering Contradiction:
Improvedata consistencyVSAvoidtransaction concurrency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent divides the key space into multiple partitions (e.g., using hash partitioning where key k maps to partition k mod P). When a transaction requests a non-existent key, only the specific partition containing that key is locked, rather than locking the entire key range. This segmentation allows other transactions to access different partitions simultaneously, improving concurrency while maintaining data consistency within each partition.

Inventive Principle:
Principle #1Segmentation

2Reliability

If traditional locking mechanisms lock entire ranges of keys, then data consistency is ensured, but the number of blocked transactions increases and resource utilization decreases

Engineering Contradiction:
Improvedata consistencyVSAvoidresource utilization
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

By partitioning the key space and locking only the specific partition containing the requested non-existent key, the system minimizes the scope of locked resources. This allows other transactions to utilize different partitions efficiently, reducing resource idle time and improving overall system utilization while maintaining consistency within each partition.

Inventive Principle:
Principle #1Segmentation

3Productivity

If k-partition function is used to assign non-existent keys to specific partitions, then transaction concurrency is improved and performance is enhanced, but system complexity increases

Engineering Contradiction:
Improvetransaction concurrencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent employs a universal hash partitioning function that can be applied to any key in the index, making the locking mechanism adaptable to different key types and index structures. This multi-functional approach allows the same partitioning logic to handle various scenarios (existing keys, non-existent keys, range queries) without requiring separate complex locking strategies for each case.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The system changes the parameter of key representation by transforming keys through a hash function to map them to partition identifiers. This parameter transformation simplifies the locking decision process - instead of analyzing key ranges and overlaps, the system simply computes the partition number and locks that specific partition, reducing the computational complexity of lock management.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP3513333B1Managing transactions requesting non-existent index keys in database systems
Publication Date: 2021.01.20 GOOGLE LLC
  • EP3513333B1 patent drawingFigure 1
  • EP3513333B1 patent drawingFigure 2A~2C
  • EP3513333B1 patent drawingFigure 3

AI summary

This disclosure provides systems, methods, and apparatus for managing locks for non-existent keys in an index of a database. The system can receive a first transaction for accessing a first requested key that does not match any of a plurality of keys in the index. The system partitions the first requested key using a partitioning function to a first partition. The system can also receive a second transaction for accessing a second requested key that does not match any of the plurality of keys in the index. The system also partitions the second requested key using the partitioning function to a second partition. The system assigns locks to the second transaction only if the second partition is distinct from the first partition.