Alternating Row Column Lock Queues Database Concurrency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional database systems face limited concurrency due to sub-optimal one-dimensional locking mechanisms, which hinder efficient execution of both row-oriented and column-oriented operations, leading to potential delays and reduced throughput.

Innovation Solution

A device and method utilizing separate queues (C-queue for column-oriented and R-queue for row-oriented operations) and a scheduler to alternate between C-type and R-type time slots, allowing for parallel execution of operations with different locking modes, thereby reducing lock collisions and enhancing concurrency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If one-dimensional row locking is used in traditional database systems, then row-oriented operations can be executed, but column-oriented operations suffer from limited concurrency and lock collisions

Engineering Contradiction:
Improvedatabase throughputVSAvoidsupport for both row-oriented and column-oriented operations
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent segments the operation queue into two separate queues: a C-queue for column-oriented operations and an R-queue for row-oriented operations. This segmentation allows each queue type to be processed with appropriate locking mechanisms, preventing lock collisions between different operation types while maintaining support for both operational modes.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transitions from one-dimensional locking (single queue processed sequentially) to two-dimensional processing by introducing separate queues for different operation orientations. This dimensional change enables concurrent processing of column-oriented and row-oriented operations without lock interference, thereby improving database throughput.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Adaptability or versatility

If column locks are used to allow concurrent column writes and queries, then column-oriented operations can run in parallel, but row-oriented operations may be blocked

Engineering Contradiction:
Improveconcurrency for column-oriented operationsVSAvoidexecution of row-oriented operations
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent implements periodic alternation between processing C-queue operations and R-queue operations through time slots. During C-type time slots, column-oriented operations execute with column locks; during R-type time slots, row-oriented operations execute with row locks. This periodic switching ensures both operation types receive appropriate locking support without continuous blocking.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

The scheduler performs preliminary classification of incoming operations into C-queue or R-queue based on their orientation requirements. This preliminary action ensures that operations are routed to the appropriate queue before execution, preventing lock conflicts and ensuring that row-oriented operations are scheduled during R-type time slots when row locks are available.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If separate queues and alternating time slots are used to reduce lock collisions, then throughput increases, but system complexity increases

Engineering Contradiction:
Improvedatabase throughputVSAvoidlocking mechanism complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The scheduler implements a universal interface that accepts both column-oriented and row-oriented operations without requiring separate scheduling mechanisms. The single scheduler handles both queue types, classifies operations, and manages time slot allocation, thereby reducing overall system complexity despite the dual-queue architecture.

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

Solution Approach 2:

The system dynamically adjusts the alternation between C-type and R-type time slots based on queue depths and operation priorities. This dynamic scheduling allows the system to adapt to varying workloads, processing more C-queue operations when column-oriented requests accumulate and more R-queue operations when row-oriented requests increase, thereby optimizing throughput without rigid complexity.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11366799B2Data locking method based on alternating row and column locks
Publication Date: 2022.06.21 HUAWEI TECH CO LTD
  • US11366799B2 patent drawing
  • US11366799B2 patent drawing
  • US11366799B2 patent drawing

AI summary

A device for executing an operation on a database is provided. The device comprises a C-queue configured to store a plurality of column-oriented operations, an R-queue configured to store a plurality of row-oriented operations, a scheduler configured to assign the operation to the C-queue or the R-queue based on whether the operation is row-oriented, a timing unit configured to alternate between C-type time slots and R-type time slots, an execution unit configured to execute operations from the C-queue in C-type time slots and/or operations from the R-queue in R-type time slots.