Row-Level Locking for Bitmap Index Concurrent Updates

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for updating bitmap indices in databases lead to low performance during concurrent updates due to the locking of entire data blocks, affecting unrelated rows and hindering simultaneous updates.

Innovation Solution

Implementing row-level locking mechanisms for bitmap index Memtables, allowing for the isolation of updates to specific rows, thereby reducing the locking range and enhancing performance during concurrent updates.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a data block is locked as a whole during bitmap index updates, then data consistency is ensured, but concurrent update performance deteriorates due to unnecessary locking of unrelated rows

Engineering Contradiction:
Improvedata consistencyVSAvoidconcurrent update performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the data block locking mechanism into row-level locking. Instead of locking the entire data block (which contains hundreds of thousands of rows), the system now locks only the specific row that needs to be updated. This is achieved by introducing row lock identifiers and implementing fine-grained lock management, allowing concurrent updates to different rows while maintaining data consistency within each row.

Inventive Principle:
Principle #1Segmentation

2Productivity

If row-level locking is implemented for bitmap index updates, then concurrent update performance improves, but system complexity increases due to additional lock management mechanisms

Engineering Contradiction:
Improveconcurrent update performanceVSAvoidlock management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent extracts the lock management functionality into separate, dedicated components. Row lock identifiers are separated from the main data structure, and lock acquisition/release operations are handled by specialized routines. This modular approach isolates the complexity of row-level locking management, making it easier to maintain and extend while benefiting from improved concurrent performance.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS11086835B2Updating and querying a bitmap index
Publication Date: 2021.08.10 BEIJING OCEANBASE TECHNOLOGY CO LTD
  • US11086835B2 patent drawing
  • US11086835B2 patent drawing
  • US11086835B2 patent drawing

AI summary

This disclosure relates to bitmap index writing, dumping, merging, and querying. In one aspect, a method includes determining, based on update data, a to-be-updated row of a bitmap index that indexes data of a database using a bitmap data structure. The to-be-updated row of the bitmap index is locked. The locking includes adding a row lock to the to-be-updated row, thereby preventing the to-be-updated row from being updated by other update operations. At least one other row of the bitmap index remains unlocked for updating by other update operations. Data in the to-be-updated row of the bitmap index is updated based on the update data.