Method and apparatus for file compaction in key-value store system
AssigneeHuawei Technologies Co., Ltd.
InventorsShimin Chen, Liangchang Zhu, Jun Zhang
Life of this patent
Estimating the term…
Abstract
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.
Claims20
A method for file compaction in a key-value store (KV-Store) system, comprising:
- 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, wherein a first key corresponding to a non-latest value of the first key in the KV-Store system and stored in the to-be-compacted SSTable is recorded in the Delete Log, and wherein the new SSTable includes a key-value pair corresponding to a second key different from the first key and does not include a key-value pair that corresponds to the first key in the Delete Log;
- and
- deleting the to-be-compacted SSTable.
A server, wherein the server comprises at least one processor and a memory, wherein the memory has a plurality of instructions stored thereon, wherein the instructions are associated with file compaction in a key-value store (KV-Store) system, and wherein the instructions, when processed by the at least one processor, cause the server to:
- compact, 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, wherein a first key corresponding to a non-latest value of the first key in the KV-Store system and stored in the to-be-compacted SSTable is recorded in the Delete Log, and wherein the new SSTable includes a key-value pair corresponding to a second key different from the first key and does not include a key-value pair that corresponds to the first key in the Delete Log;
- and
- delete the to-be-compacted SSTable.
Dependencies are inferred from the claim text.