Skip to content

docs: correct reserved-write methods to not claim direct disk writes#372

Merged
Kerollmops merged 1 commit into
meilisearch:mainfrom
SAY-5:docs/clarify-reserved-methods
May 21, 2026
Merged

docs: correct reserved-write methods to not claim direct disk writes#372
Kerollmops merged 1 commit into
meilisearch:mainfrom
SAY-5:docs/clarify-reserved-methods

Conversation

@SAY-5

@SAY-5 SAY-5 commented May 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #367. The put_reserved, put_reserved_with_flags, get_or_put_reserved, and get_or_put_reserved_with_flags docs claimed the value "can directly be written to disk", which @Kerollmops noted is wrong: the reserved pointer only refers to the memory map (so "directly to disk") with MDB_WRITEMAP, otherwise it points to an in-memory page, and the real benefit is reducing copies. The doc comments now state that the value is written into LMDB-reserved space to avoid an extra copy, with the MDB_WRITEMAP caveat. Doctests for all four methods pass.

@Kerollmops Kerollmops left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your help. Merging 👌

@Kerollmops Kerollmops enabled auto-merge May 21, 2026 07:09
@Kerollmops Kerollmops added this pull request to the merge queue May 21, 2026
Merged via the queue into meilisearch:main with commit 14e3e49 May 21, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation about the _reserved methods is wrong

2 participants