meilisearch / meilisearch/heed
stale lmdb reads on openbsd
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 914
- Forks
- 82
- PR merge metrics
- No merged PRs in 30d
Description
On OpenBSD, nested LMDB transactions can read stale data after pages are written through the file descriptor.
Calling msync(..., MS_INVALIDATE) after the writes fixes it. MDB_WRITEMAP also avoids the issue, but cannot be used with nested write transactions.
Tested on OpenBSD 7.9 with heed 0.22.1 and lmdb-master-sys 0.2.6.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the nested-transaction stale-read case on OpenBSD 7.9 with heed 0.22.1 and lmdb-master-sys 0.2.6, then trace the LMDB write and read path. Compare behavior with msync(..., MS_INVALIDATE) and MDB_WRITEMAP; done means nested transactions observe pages written through the file descriptor without relying on the incompatible workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100