facebook / facebook/rocksdb

assertion failure for direct I/O writes together with mmap reads

Open
#4,996 1 comment 0 reactions 0 assignees View on GitHub
enhancement up-for-grabs
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

> Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://www.facebook.com/groups/rocksdb.dev

### Expected behavior
It should either return an unsupported error message or allow the configuration.

### Actual behavior
Triggers an assertion:
```
db_stress: env/io_posix.cc:449: rocksdb::PosixMmapReadableFile::PosixMmapReadableFile(int, const string&, void*, size_t, const rocksdb::EnvOptions&): Assertion `!options.use_direct_reads' failed.
Aborted (core dumped)
```

### Steps to reproduce the behavior
Build `db_stress` with assertions enabled, then run
`./db_stress -use_direct_io_for_flush_and_compaction=true -mmap_read=true`

Contributor guide

Open the contributing guide

Research direction

Start in env/io_posix.cc at the PosixMmapReadableFile assertion shown in the report, then run db_stress with -use_direct_io_for_flush_and_compaction=true -mmap_read=true and assertions enabled. Trace how these options are configured together. Done means the combination returns an unsupported error instead of aborting, or works without triggering the assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.