Skip to content

Conversation

@b5
Copy link
Member

@b5 b5 commented Oct 2, 2025

Description

This was a smaller change than expected.

  • There is already a gc_smoke_mem test, so we know GC works with a memstore
  • store::mem::Options was already defined, just empty. I've added a public gc: Option<GcConfig> field
  • expanded MemStore::new to call MemStore::new_with_opts to expose providing custom GC options

Breaking Changes

None.

Notes & open questions

I haven't actually ensured that MemStore::new_with_opts works & is publically exposed. Should add a test for that

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@github-actions
Copy link

github-actions bot commented Oct 2, 2025

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh-blobs/pr/177/docs/iroh_blobs/

Last updated: 2025-10-06T15:19:09Z

@b5 b5 changed the title feat: expose garbage collection for MemStore feat(MemStore)!: expose garbage collection Oct 2, 2025
@n0bot n0bot bot added this to iroh Oct 2, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Oct 2, 2025
@rklaehn
Copy link
Collaborator

rklaehn commented Oct 6, 2025

😊 I guess I thought gc for mem was working since I had tests for it...

Ah, this is where the stray file form the other PR comes from!

@rklaehn
Copy link
Collaborator

rklaehn commented Oct 6, 2025

Looks fine other than fmt.

The public API change is so inconsequential that I am tempted to call this "no change"...

A public type has stopped implementing one or more auto traits. This can break downstream code that depends on the traits being implemented.

Options is no longer RefUnwindSafe, nobody cares...

@b5 b5 marked this pull request as ready for review October 6, 2025 12:43
@rklaehn rklaehn merged commit 0a5124a into main Oct 6, 2025
58 of 64 checks passed
@rklaehn rklaehn deleted the b5/memstore_gc branch October 6, 2025 16:43
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Oct 6, 2025
Frando added a commit that referenced this pull request Nov 4, 2025
## Description

#177 made GC work with the MemStore as well. However the types needed
for configuring that are still behind the `fs-store` feature. This PR
exposes these types independent of feature flags.

## Breaking Changes

Moved:
`iroh_blobs::store::fs::options::{GcConfig, ProtectOutcome, ProtectCb}`
are now `iroh_blobs::store::{GcConfig, ProtectOutcome, ProtectCb}`

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants