facebook / facebook/rocksdb

Support partitioning memtables

Open
#9,391 4 comments 0 reactions 0 assignees View on GitHub
enhancement feature-request
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

From what I found in the documentation, there can be only a single active memtable. Is there a particular reason for this limitation?

I think it could be beneficial to have multiple active memtables, especially when using a prefix_extractor. Suppose we have a fixed size hashmap for the memtables, and the prefix hash determines which memtable to use. That could not only reduce contention on the memtables, but we would end up with memtables with keyspaces with disjoint prefixes, which should improve the utilization of the prefix bloom filter. This information could then also be used during compaction, because we know that there cannot be any overlap between SST files from different buckets.

What do you think about such an extension? I would be willing to take a stab at this, but I could need a few pointers where I find the relevant places in the code.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.