Skip to content

osd: Add file-free variant of memstore - #71931

Merged
ljflores merged 1 commit into
ceph:mainfrom
aainscow:memstore_use_mem
Oct 1, 2026
Merged

ljflores merged 1 commit into
ceph:mainfrom
aainscow:memstore_use_mem

Conversation

@aainscow

@aainscow aainscow commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Memstore currently writes all object to a file. This is used to inspect the resulting objects, however some test harnesses now use memstore for very short-term tests. The filesystem is both unnecessary for these tests, but leaks directories on every run.

The fix here is to optionally drop the directories completely.

Fixes: https://tracker.ceph.com/issues/80674

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@aainscow
aainscow requested a review from a team as a code owner September 20, 2026 22:26
@aainscow
aainscow requested review from bill-scales and removed request for a team September 20, 2026 22:27
Small unit tests built around MemStore (e.g. PGBackendTestFixture) had
to create a real directory on disk for every test run, just to satisfy
MemStore's assumption that it always persists its state to a path.

When MemStore is constructed with an empty path, skip all disk I/O:
- mount/umount skip _load()/_save()
- mkfs skips writing the collections file on disk
- write_meta/read_meta use an in-memory map (meta_map) instead of
  the on-disk ObjectStore::write_meta/read_meta implementation

Also update PGBackendTestFixture to exploit the new mode: pass an
empty path to MockStore so tests no longer create a temporary directory
on disk, removing the mkdir/cleanup_data_dir machinery entirely.

Assisted-by: Claude Sonnet 5 <[email protected]>
Assisted-by: IBM Bob v2.1.0
Signed-off-by: Alex Ainscow <[email protected]>

@bill-scales bill-scales left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath20-testing-20260924.011348-main.

@ljflores
ljflores merged commit 4b26ec1 into ceph:main Oct 1, 2026
16 checks passed
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/36917666459

@aainscow aainscow added the no-backport-required Label that can be optionally added to show that we do not need to backport. label Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build/ops cephfs Ceph File System core needs-qa no-backport-required Label that can be optionally added to show that we do not need to backport. tests wip-bharath20-testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants