facebook / facebook/rocksdb

Get on mmapped PlainTables should be pinnable/zero-copy

Open
#8,374 0 comments 3 reactions 1 assignee Claimed by @bkgood View on GitHub
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

### Expected behavior

mmapped PlainTables can have their TableReaders in memory, either universally (when `Options.max_open_files = -1`) or for the collection of files currently mmapped.

Whilst in memory, it should be possible to get zero-copy access to the values in the backing mmapped pages.

This was at one time the case, but it was discovered that the mappings were not always persisted at least until `PinnableSlice::Reset` was called and fixed (to copy) in facebook/rocksdb#3881.

### Actual behavior

Values are always copied, as is verified in test: https://github.com/facebook/rocksdb/blob/80a59a03a7d6/db/plain_table_db_test.cc#L660

### Steps to reproduce the behavior

Run `plain_table_db_test`.

I've got some patches to attempt to enable this, but I thought it best to create an issue first in case this warrants broader discussion.

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.