facebook / facebook/rocksdb

DeleteRange can not be handled correctly while memtable_insert_with_hint_prefix_extractor is enabled

Open
#5,118 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

I set the `memtable_insert_with_hint_prefix_extractor` with rocksdb::NewFixedPrefixTransform(length) and do some DeleteRange and then Put. We can not scan the full data if there are some DeleteRanges.

some example can reproduce this:

```
Options options;
options.memtable_insert_with_hint_prefix_extractor.reset(NewFixedPrefixTransform(3));

// do delete range
db_->DeleteRange(WriteOptions(), db_->DefaultColumnFamily(), "000", "100");

// put 001
db_->Put(WriteOptions(), "001", "");

auto* iter = db_->NewIterator(read_opts);
for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
// iterator should include "001"
}
```
Is it a known bug? And I did not see any test case for this in https://github.com/facebook/rocksdb/blob/master/db/db_range_del_test.cc

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.