KV-Store SSTable Compaction via Delete Log Segmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current key-value store (KV-Store) systems face inefficiencies in compaction operations, requiring significant I/O bandwidth and memory resources, which hinders other operations and affects user experience due to the need to read and process multiple SSTables simultaneously.

Innovation Solution

Implementing a method for single-file compaction by using a Delete Log to identify and remove non-latest values from SSTables, reducing the need to read multiple SSTables during compaction and thereby minimizing resource usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of substance

If multi-file compaction is performed by merging multiple SSTables simultaneously, then storage space is reduced by removing non-latest values, but I/O bandwidth and memory resources are heavily occupied affecting other operations

Engineering Contradiction:
Improvestorage spaceVSAvoidrate of other operations
Core Design Contradiction:
Loss of substanceVSProductivity

Solution Approach 1:

The patent segments the compaction process by introducing per-SSTable Delete Logs that independently track deleted keys for each SSTable. This allows the system to process and compact SSTables individually rather than requiring simultaneous processing of multiple SSTables, thereby reducing the peak I/O bandwidth and memory resource requirements while maintaining the space-saving benefits of compaction.

Inventive Principle:
Principle #1Segmentation

2Reliability

If multiple SSTables are read simultaneously during compaction, then non-latest values are identified and removed, but resource consumption increases and user experience deteriorates

Engineering Contradiction:
Improvedata consistencyVSAvoidresource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent applies preliminary action by maintaining Delete Logs that continuously record deleted keys as they occur during PUT operations. This pre-computation of deletion information eliminates the need to read and analyze multiple SSTables simultaneously during compaction, as the Delete Logs already contain the necessary information to identify non-latest values, thereby reducing resource consumption while ensuring data consistency.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11232073B2Method and apparatus for file compaction in key-value store system
Publication Date: 2022.01.25 HUAWEI TECH CO LTD
  • US11232073B2 patent drawing
  • US11232073B2 patent drawing
  • US11232073B2 patent drawing

AI summary

Example methods and apparatuses for file compaction in a key-value store system relating to the field of data processing technologies are described. One example method for file compaction in a key-value store (KV-Store) system includes compacting, according to a to-be-deleted log (Delete Log) that corresponds to a to-be-compacted sorted string table (SSTable), the to-be-compacted SSTable to generate a new SSTable. A key corresponding to a non-latest value in the KV-Store system and stored in the to-be-compacted SSTable is recorded in the Delete Log, and the new SSTable does not include a key-value pair that corresponds to the key in Delete Log. The to-be-compacted SSTable is then deleted.